diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver index 86cee84..77443e7 100644 --- a/node_modules/.bin/semver +++ b/node_modules/.bin/semver @@ -6,7 +6,7 @@ case `uname` in esac if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver" "$@" + exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" else - exec node "$basedir/../semver/bin/semver" "$@" + exec node "$basedir/../semver/bin/semver.js" "$@" fi diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd index 22d9286..9913fa9 100644 --- a/node_modules/.bin/semver.cmd +++ b/node_modules/.bin/semver.cmd @@ -14,4 +14,4 @@ IF EXIST "%dp0%\node.exe" ( SET PATHEXT=%PATHEXT:;.JS;=;% ) -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver" %* +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1 index 98c1b09..314717a 100644 --- a/node_modules/.bin/semver.ps1 +++ b/node_modules/.bin/semver.ps1 @@ -11,17 +11,17 @@ $ret=0 if (Test-Path "$basedir/node$exe") { # Support pipeline input if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args + $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args + & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args } $ret=$LASTEXITCODE } else { # Support pipeline input if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver" $args + $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args } else { - & "node$exe" "$basedir/../semver/bin/semver" $args + & "node$exe" "$basedir/../semver/bin/semver.js" $args } $ret=$LASTEXITCODE } diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index e959878..df69dc2 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,43 +1,59 @@ { - "name": "Close-milestone", + "name": "close-milestone", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "node_modules/@actions/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", - "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, - "node_modules/@actions/core/node_modules/@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "node_modules/@actions/github": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz", + "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==", "dependencies": { - "tunnel": "^0.0.6" + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" } }, - "node_modules/@actions/github": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", - "integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", + "node_modules/@actions/github/node_modules/@octokit/core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", "dependencies": { - "@actions/http-client": "^1.0.8", - "@octokit/core": "^3.0.0", - "@octokit/plugin-paginate-rest": "^2.2.3", - "@octokit/plugin-rest-endpoint-methods": "^4.0.0" + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@actions/github/node_modules/@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "dependencies": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" } }, "node_modules/@actions/http-client": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.9.tgz", - "integrity": "sha512-0O4SsJ7q+MK0ycvXPl2e6bMXV7dxAXOGjrXS1eTF9s2S401Tp6c/P3c3Joz04QefC1J6Gt942Wl2jbm3f4mLcg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", "dependencies": { - "tunnel": "0.0.6" + "tunnel": "^0.0.6" } }, "node_modules/@octokit/auth": { @@ -53,21 +69,47 @@ } }, "node_modules/@octokit/auth-action": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@octokit/auth-action/-/auth-action-1.3.2.tgz", - "integrity": "sha512-eCFGNq30e8ObTh6fwcmq8JRaGoputPQtPi9PTgbsEo+NPd5JrOoynI2bV7OpePRqgtATp1JRWC0y/3iXTB11ow==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-action/-/auth-action-1.3.4.tgz", + "integrity": "sha512-wv9yNsc6lVgEHZeGKmktUB0WOFqA4PkVOlF4GL0bS+p4Rvv7ooOl/uh2Mm/eLk7FpI0AoFaQarbgPYvnHQOvfA==", "dependencies": { - "@octokit/auth-token": "^2.4.0", + "@octokit/auth-token": "^3.0.0", "@octokit/types": "^6.0.3" } }, + "node_modules/@octokit/auth-action/node_modules/@octokit/auth-token": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz", + "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==", + "dependencies": { + "@octokit/types": "^9.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", + "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==" + }, "node_modules/@octokit/auth-app": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-3.0.0.tgz", - "integrity": "sha512-7280Oz7zsyF1cRuJEMJGG0H3zenOKY44P2QZRwN/21qRqyI+aQ0wM7IQny6uQk/xow36B7JNu2U2GtcgEdx8iA==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-3.6.1.tgz", + "integrity": "sha512-6oa6CFphIYI7NxxHrdVOzhG7hkcKyGyYocg7lNDSJVauVOLtylg8hNJzoUyPAYKKK0yUeoZamE/lMs2tG+S+JA==", "dependencies": { - "@octokit/request": "^5.4.11", - "@octokit/request-error": "^2.0.0", + "@octokit/auth-oauth-app": "^4.3.0", + "@octokit/auth-oauth-user": "^1.2.3", + "@octokit/request": "^5.6.0", + "@octokit/request-error": "^2.1.0", "@octokit/types": "^6.0.3", "@types/lru-cache": "^5.1.0", "deprecation": "^2.3.1", @@ -76,10 +118,206 @@ "universal-user-agent": "^6.0.0" } }, + "node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-4.3.4.tgz", + "integrity": "sha512-OYOTSSINeUAiLMk1uelaGB/dEkReBqHHr8+hBejzMG4z1vA4c7QSvDAS0RVZSr4oD4PEUPYFzEl34K7uNrXcWA==", + "dependencies": { + "@octokit/auth-oauth-device": "^3.1.1", + "@octokit/auth-oauth-user": "^2.0.0", + "@octokit/request": "^5.6.3", + "@octokit/types": "^6.0.3", + "@types/btoa-lite": "^1.0.0", + "btoa-lite": "^1.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-2.1.1.tgz", + "integrity": "sha512-JgqnNNPf9CaWLxWm9uh2WgxcaVYhxBR09NVIPTiMU2dVZ3FObOHs3njBiLNw+zq84k+rEdm5Y7AsiASrZ84Apg==", + "dependencies": { + "@octokit/auth-oauth-device": "^4.0.0", + "@octokit/oauth-methods": "^2.0.0", + "@octokit/request": "^6.0.0", + "@octokit/types": "^9.0.0", + "btoa-lite": "^1.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-4.0.4.tgz", + "integrity": "sha512-Xl85BZYfqCMv+Uvz33nVVUjE7I/PVySNaK6dRRqlkvYcArSr9vRcZC9KVjXYObGRTCN6mISeYdakAZvWEN4+Jw==", + "dependencies": { + "@octokit/oauth-methods": "^2.0.0", + "@octokit/request": "^6.0.0", + "@octokit/types": "^9.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", + "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", + "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/endpoint": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.4.tgz", + "integrity": "sha512-hXJP43VT2IrUxBCNIahta8qawpIzLvCjHLCuDDsdIPbd6+jPwsc3KGl/kdQ37mLd+sdiJm6c9qKI7k5CjE0Z9A==", + "dependencies": { + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-5.0.0.tgz", + "integrity": "sha512-y1WhN+ERDZTh0qZ4SR+zotgsQUE1ysKnvBt1hvDRB2WRzYtVKQjn97HEPzoehh66Fj9LwNdlZh+p6TJatT0zzg==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-2.0.4.tgz", + "integrity": "sha512-RDSa6XL+5waUVrYSmOlYROtPq0+cfwppP4VaQY/iIei3xlFb0expH6YNsxNrZktcLhJWSpm9uzeom+dQrXlS3A==", + "dependencies": { + "@octokit/oauth-authorization-url": "^5.0.0", + "@octokit/request": "^6.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^8.0.0", + "btoa-lite": "^1.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", + "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", + "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-8.2.1.tgz", + "integrity": "sha512-8oWMUji8be66q2B9PmEIUyQm00VPDPun07umUWSaCwxmeaquFBro4Hcc3ruVoDo3zkQyZBlRvhIMEYS3pBhanw==", + "dependencies": { + "@octokit/openapi-types": "^14.0.0" + } + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-14.0.0.tgz", + "integrity": "sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw==" + }, + "node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", + "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==" + }, "node_modules/@octokit/auth-oauth-app": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-3.0.8.tgz", - "integrity": "sha512-LxP/1oQSICvmy5CLCesF3hT8CjtTHga3hsQKBTmFq892pgoOmHUhbcc0BALqgjcuRz1dEy8x2QB7UQibEnEerw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-3.1.1.tgz", + "integrity": "sha512-ClH/fR5R/GvFQTIbO175DGPVqH7FFKrwmPl8r+ZZtqHzv8D9DaR+qpt10KvnxiOOMElOncKY+Z/MayZ4R8rz/Q==", "dependencies": { "@octokit/request": "^5.3.0", "@octokit/request-error": "^2.0.0", @@ -89,31 +327,232 @@ "universal-user-agent": "^6.0.0" } }, + "node_modules/@octokit/auth-oauth-device": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-3.1.4.tgz", + "integrity": "sha512-6sHE/++r+aEFZ/BKXOGPJcH/nbgbBjS1A4CHfq/PbPEwb0kZEt43ykW98GBO/rYBPAYaNpCPvXfGwzgR9yMCXg==", + "dependencies": { + "@octokit/oauth-methods": "^2.0.0", + "@octokit/request": "^6.0.0", + "@octokit/types": "^6.10.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.4.tgz", + "integrity": "sha512-hXJP43VT2IrUxBCNIahta8qawpIzLvCjHLCuDDsdIPbd6+jPwsc3KGl/kdQ37mLd+sdiJm6c9qKI7k5CjE0Z9A==", + "dependencies": { + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-5.0.0.tgz", + "integrity": "sha512-y1WhN+ERDZTh0qZ4SR+zotgsQUE1ysKnvBt1hvDRB2WRzYtVKQjn97HEPzoehh66Fj9LwNdlZh+p6TJatT0zzg==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-2.0.4.tgz", + "integrity": "sha512-RDSa6XL+5waUVrYSmOlYROtPq0+cfwppP4VaQY/iIei3xlFb0expH6YNsxNrZktcLhJWSpm9uzeom+dQrXlS3A==", + "dependencies": { + "@octokit/oauth-authorization-url": "^5.0.0", + "@octokit/request": "^6.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^8.0.0", + "btoa-lite": "^1.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-14.0.0.tgz", + "integrity": "sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw==" + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-8.2.1.tgz", + "integrity": "sha512-8oWMUji8be66q2B9PmEIUyQm00VPDPun07umUWSaCwxmeaquFBro4Hcc3ruVoDo3zkQyZBlRvhIMEYS3pBhanw==", + "dependencies": { + "@octokit/openapi-types": "^14.0.0" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", + "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==" + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", + "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", + "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/auth-oauth-user": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-1.3.0.tgz", + "integrity": "sha512-3QC/TAdk7onnxfyZ24BnJRfZv8TRzQK7SEFUS9vLng4Vv6Hv6I64ujdk/CUkREec8lhrwU764SZ/d+yrjjqhaQ==", + "dependencies": { + "@octokit/auth-oauth-device": "^3.1.1", + "@octokit/oauth-methods": "^1.1.0", + "@octokit/request": "^5.4.14", + "@octokit/types": "^6.12.2", + "btoa-lite": "^1.0.0", + "universal-user-agent": "^6.0.0" + } + }, "node_modules/@octokit/auth-token": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", - "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", "dependencies": { "@octokit/types": "^6.0.3" } }, "node_modules/@octokit/core": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.2.5.tgz", - "integrity": "sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.0.tgz", + "integrity": "sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg==", "dependencies": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.4.12", - "@octokit/types": "^6.0.3", - "before-after-hook": "^2.1.0", + "@octokit/auth-token": "^3.0.0", + "@octokit/graphql": "^5.0.0", + "@octokit/request": "^6.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/core/node_modules/@octokit/auth-token": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz", + "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==", + "dependencies": { + "@octokit/types": "^9.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/core/node_modules/@octokit/endpoint": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.4.tgz", + "integrity": "sha512-hXJP43VT2IrUxBCNIahta8qawpIzLvCjHLCuDDsdIPbd6+jPwsc3KGl/kdQ37mLd+sdiJm6c9qKI7k5CjE0Z9A==", + "dependencies": { + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/core/node_modules/@octokit/openapi-types": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", + "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==" + }, + "node_modules/@octokit/core/node_modules/@octokit/request": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", + "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/core/node_modules/@octokit/request-error": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", + "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/core/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" } }, "node_modules/@octokit/endpoint": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz", - "integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==", + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", "dependencies": { "@octokit/types": "^6.0.3", "is-plain-object": "^5.0.0", @@ -121,37 +560,112 @@ } }, "node_modules/@octokit/graphql": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.0.tgz", - "integrity": "sha512-CJ6n7izLFXLvPZaWzCQDjU/RP+vHiZmWdOunaCS87v+2jxMsW9FB5ktfIxybRBxZjxuJGRnxk7xJecWTVxFUYQ==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.5.tgz", + "integrity": "sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ==", "dependencies": { - "@octokit/request": "^5.3.0", - "@octokit/types": "^6.0.3", + "@octokit/request": "^6.0.0", + "@octokit/types": "^9.0.0", "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/graphql/node_modules/@octokit/endpoint": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.4.tgz", + "integrity": "sha512-hXJP43VT2IrUxBCNIahta8qawpIzLvCjHLCuDDsdIPbd6+jPwsc3KGl/kdQ37mLd+sdiJm6c9qKI7k5CjE0Z9A==", + "dependencies": { + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", + "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==" + }, + "node_modules/@octokit/graphql/node_modules/@octokit/request": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", + "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/graphql/node_modules/@octokit/request-error": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", + "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@octokit/graphql/node_modules/@octokit/types": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", + "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + } + }, + "node_modules/@octokit/oauth-authorization-url": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-4.3.3.tgz", + "integrity": "sha512-lhP/t0i8EwTmayHG4dqLXgU+uPVys4WD/qUNvC+HfB1S1dyqULm5Yx9uKc1x79aP66U1Cb4OZeW8QU/RA9A4XA==" + }, + "node_modules/@octokit/oauth-methods": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-1.2.6.tgz", + "integrity": "sha512-nImHQoOtKnSNn05uk2o76om1tJWiAo4lOu2xMAHYsNr0fwopP+Dv+2MlGvaMMlFjoqVd3fF3X5ZDTKCsqgmUaQ==", + "dependencies": { + "@octokit/oauth-authorization-url": "^4.3.1", + "@octokit/request": "^5.4.14", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.12.2", + "btoa-lite": "^1.0.0" } }, "node_modules/@octokit/openapi-types": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-5.1.0.tgz", - "integrity": "sha512-bodZvSYgycbUuuKrC/anCBUExvaSSWzMMFz0xl7pcJujxnmGxvqvcFHktjx1ZOSyeNKLfYF0QCgibaHUGsZTng==" + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.10.0.tgz", - "integrity": "sha512-71OsKBSMcQEu/6lfVbhv5C5ikU1rn10rKot/WiV7do7fyfElQ2eCUQFogHPbj0ci5lnKAjvahOiMAr6lcvL8Qw==", + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", "dependencies": { - "@octokit/types": "^6.10.0" + "@octokit/types": "^6.40.0" }, "peerDependencies": { "@octokit/core": ">=2" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.12.0.tgz", - "integrity": "sha512-RgnQ1aoetdOJjZYC37LV5FNlL7GY/v1CdC5dur1Zp/UiADJlbRFbAz/xLx26ovXw67dK7EUtwCghS+6QyiI9RA==", + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", "dependencies": { - "@octokit/types": "^6.10.0", + "@octokit/types": "^6.39.0", "deprecation": "^2.3.1" }, "peerDependencies": { @@ -159,24 +673,22 @@ } }, "node_modules/@octokit/request": { - "version": "5.4.14", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.14.tgz", - "integrity": "sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", "dependencies": { "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.0.0", - "@octokit/types": "^6.7.1", - "deprecation": "^2.0.0", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.1", - "once": "^1.4.0", + "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" } }, "node_modules/@octokit/request-error": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz", - "integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", "dependencies": { "@octokit/types": "^6.0.3", "deprecation": "^2.0.0", @@ -184,11 +696,11 @@ } }, "node_modules/@octokit/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.10.0.tgz", - "integrity": "sha512-aMDo10kglofejJ96edCBIgQLVuzMDyjxmhdgEcoUUD64PlHYSrNsAGqN0wZtoiX4/PCQ3JLA50IpkP1bcKD/cA==", + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", "dependencies": { - "@octokit/openapi-types": "^5.1.0" + "@octokit/openapi-types": "^12.11.0" } }, "node_modules/@types/btoa-lite": { @@ -197,37 +709,37 @@ "integrity": "sha512-wJsiX1tosQ+J5+bY5LrSahHxr2wT+uME5UDwdN1kg4frt40euqA+wzECkmq4t5QbveHiJepfdThgQrPw6KiSlg==" }, "node_modules/@types/jsonwebtoken": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.0.tgz", - "integrity": "sha512-9bVao7LvyorRGZCw0VmH/dr7Og+NdjYSsKAxB43OQoComFbBgsEpoR9JW6+qSq/ogwVBg8GI2MfAlk4SYI4OLg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", + "integrity": "sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/lru-cache": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.0.tgz", - "integrity": "sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w==" + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==" }, "node_modules/@types/node": { - "version": "14.14.30", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.30.tgz", - "integrity": "sha512-gUWhy8s45fQp4PqqKecsnOkdW0kt1IaKjgOIR3HPokkzTmQj9ji2wWFID5THu1MKrtO+d4s2lVrlEhXUsPXSvg==" + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" }, "node_modules/before-after-hook": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.1.tgz", - "integrity": "sha512-5ekuQOvO04MDj7kYZJaMab2S8SPjGJbotVNyv7QYFCOAwrGZs/YnoDNlh1U+m5hl7H2D/+n0taaAV/tfyd3KMA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, "node_modules/btoa-lite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", - "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=" + "integrity": "sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA==" }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "node_modules/deprecation": { "version": "2.3.1", @@ -251,24 +763,18 @@ } }, "node_modules/jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", "dependencies": { "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", + "lodash": "^4.17.21", "ms": "^2.1.1", - "semver": "^5.6.0" + "semver": "^7.3.8" }, "engines": { - "node": ">=4", - "npm": ">=1.4.28" + "node": ">=12", + "npm": ">=6" } }, "node_modules/jwa": { @@ -290,40 +796,10 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" - }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lru-cache": { "version": "6.0.0", @@ -342,9 +818,9 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -363,7 +839,7 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dependencies": { "wrappy": "1" } @@ -388,11 +864,17 @@ ] }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/tr46": { @@ -409,12 +891,12 @@ } }, "node_modules/universal-github-app-jwt": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-1.1.0.tgz", - "integrity": "sha512-3b+ocAjjz4JTyqaOT+NNBd5BtTuvJTxWElIoeHSVelUV9J3Jp7avmQTdLKCaoqi/5Ox2o/q+VK19TJ233rVXVQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-1.1.1.tgz", + "integrity": "sha512-G33RTLrIBMFmlDV4u4CBF7dh71eWwykck4XgaxaIVeZKOYZRAAxvcGMRFTUclVY6xoUPQvO4Ne5wKGxYm/Yy9w==", "dependencies": { - "@types/jsonwebtoken": "^8.3.3", - "jsonwebtoken": "^8.5.1" + "@types/jsonwebtoken": "^9.0.0", + "jsonwebtoken": "^9.0.0" } }, "node_modules/universal-user-agent": { @@ -447,7 +929,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/yallist": { "version": "4.0.0", diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js index 1566289..48df6ad 100644 --- a/node_modules/@actions/core/lib/core.js +++ b/node_modules/@actions/core/lib/core.js @@ -34,7 +34,6 @@ const file_command_1 = require("./file-command"); const utils_1 = require("./utils"); const os = __importStar(require("os")); const path = __importStar(require("path")); -const uuid_1 = require("uuid"); const oidc_utils_1 = require("./oidc-utils"); /** * The code to exit an action @@ -64,20 +63,9 @@ function exportVariable(name, val) { process.env[name] = convertedVal; const filePath = process.env['GITHUB_ENV'] || ''; if (filePath) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - // These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter. - if (name.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedVal.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; - file_command_1.issueCommand('ENV', commandValue); - } - else { - command_1.issueCommand('set-env', { name }, convertedVal); + return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); } + command_1.issueCommand('set-env', { name }, convertedVal); } exports.exportVariable = exportVariable; /** @@ -95,7 +83,7 @@ exports.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env['GITHUB_PATH'] || ''; if (filePath) { - file_command_1.issueCommand('PATH', inputPath); + file_command_1.issueFileCommand('PATH', inputPath); } else { command_1.issueCommand('add-path', {}, inputPath); @@ -135,7 +123,10 @@ function getMultilineInput(name, options) { const inputs = getInput(name, options) .split('\n') .filter(x => x !== ''); - return inputs; + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); } exports.getMultilineInput = getMultilineInput; /** @@ -168,8 +159,12 @@ exports.getBooleanInput = getBooleanInput; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function setOutput(name, value) { + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + } process.stdout.write(os.EOL); - command_1.issueCommand('set-output', { name }, value); + command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput; /** @@ -298,7 +293,11 @@ exports.group = group; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function saveState(name, value) { - command_1.issueCommand('save-state', { name }, value); + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); } exports.saveState = saveState; /** diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map index 9abe68f..99f7fd8 100644 --- a/node_modules/@actions/core/lib/core.js.map +++ b/node_modules/@actions/core/lib/core.js.map @@ -1 +1 @@ -{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAC7C,iDAA+D;AAC/D,mCAA2D;AAE3D,uCAAwB;AACxB,2CAA4B;AAC5B,+BAAiC;AAEjC,6CAAuC;AAavC;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAuCD,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,8DAA8D;AAC9D,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAQ;IACnD,MAAM,YAAY,GAAG,sBAAc,CAAC,GAAG,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,YAAY,CAAA;IAEhC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;IAChD,IAAI,QAAQ,EAAE;QACZ,MAAM,SAAS,GAAG,gBAAgB,SAAM,EAAE,EAAE,CAAA;QAE5C,sKAAsK;QACtK,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CACb,4DAA4D,SAAS,GAAG,CACzE,CAAA;SACF;QAED,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;YACpC,MAAM,IAAI,KAAK,CACb,6DAA6D,SAAS,GAAG,CAC1E,CAAA;SACF;QAED,MAAM,YAAY,GAAG,GAAG,IAAI,KAAK,SAAS,GAAG,EAAE,CAAC,GAAG,GAAG,YAAY,GAAG,EAAE,CAAC,GAAG,GAAG,SAAS,EAAE,CAAA;QACzF,2BAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;KACtC;SAAM;QACL,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,YAAY,CAAC,CAAA;KAC9C;AACH,CAAC;AA1BD,wCA0BC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAA;IACjD,IAAI,QAAQ,EAAE;QACZ,2BAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;KACpC;SAAM;QACL,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;KACxC;IACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AARD,0BAQC;AAED;;;;;;;;GAQG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,IAAI,OAAO,IAAI,OAAO,CAAC,cAAc,KAAK,KAAK,EAAE;QAC/C,OAAO,GAAG,CAAA;KACX;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AAZD,4BAYC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAC/B,IAAY,EACZ,OAAsB;IAEtB,MAAM,MAAM,GAAa,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;SAC7C,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IAExB,OAAO,MAAM,CAAA;AACf,CAAC;AATD,8CASC;AAED;;;;;;;;;GASG;AACH,SAAgB,eAAe,CAAC,IAAY,EAAE,OAAsB;IAClE,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACnC,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IACxC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAA;IAC1C,MAAM,IAAI,SAAS,CACjB,6DAA6D,IAAI,IAAI;QACnE,4EAA4E,CAC/E,CAAA;AACH,CAAC;AAVD,0CAUC;AAED;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IAC5B,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAHD,8BAGC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,OAAgB;IAC7C,eAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AACvC,CAAC;AAFD,wCAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAuB;IAC/C,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IAEnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAJD,8BAIC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,GAAG,CAAA;AAC5C,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CACnB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,OAAO,EACP,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,sBASC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CACrB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,SAAS,EACT,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,0BASC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CACpB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,QAAQ,EACR,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,wBASC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC;AAED,SAAsB,UAAU,CAAC,GAAY;;QAC3C,OAAO,MAAM,uBAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACzC,CAAC;CAAA;AAFD,gCAEC;AAED;;GAEG;AACH,qCAAiC;AAAzB,kGAAA,OAAO,OAAA;AAEf;;GAEG;AACH,qCAAyC;AAAjC,0GAAA,eAAe,OAAA;AAEvB;;GAEG;AACH,2CAAqE;AAA7D,yGAAA,WAAW,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,4GAAA,cAAc,OAAA"} \ No newline at end of file +{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAC7C,iDAAuE;AACvE,mCAA2D;AAE3D,uCAAwB;AACxB,2CAA4B;AAE5B,6CAAuC;AAavC;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAuCD,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,8DAA8D;AAC9D,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAQ;IACnD,MAAM,YAAY,GAAG,sBAAc,CAAC,GAAG,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,YAAY,CAAA;IAEhC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;IAChD,IAAI,QAAQ,EAAE;QACZ,OAAO,+BAAgB,CAAC,KAAK,EAAE,qCAAsB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;KAClE;IAED,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,YAAY,CAAC,CAAA;AAC/C,CAAC;AAVD,wCAUC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAA;IACjD,IAAI,QAAQ,EAAE;QACZ,+BAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;KACpC;SAAM;QACL,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;KACxC;IACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AARD,0BAQC;AAED;;;;;;;;GAQG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,IAAI,OAAO,IAAI,OAAO,CAAC,cAAc,KAAK,KAAK,EAAE;QAC/C,OAAO,GAAG,CAAA;KACX;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AAZD,4BAYC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAC/B,IAAY,EACZ,OAAsB;IAEtB,MAAM,MAAM,GAAa,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;SAC7C,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IAExB,IAAI,OAAO,IAAI,OAAO,CAAC,cAAc,KAAK,KAAK,EAAE;QAC/C,OAAO,MAAM,CAAA;KACd;IAED,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;AAC1C,CAAC;AAbD,8CAaC;AAED;;;;;;;;;GASG;AACH,SAAgB,eAAe,CAAC,IAAY,EAAE,OAAsB;IAClE,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACnC,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IACxC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAA;IAC1C,MAAM,IAAI,SAAS,CACjB,6DAA6D,IAAI,IAAI;QACnE,4EAA4E,CAC/E,CAAA;AACH,CAAC;AAVD,0CAUC;AAED;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAA;IACnD,IAAI,QAAQ,EAAE;QACZ,OAAO,+BAAgB,CAAC,QAAQ,EAAE,qCAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;KACvE;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IAC5B,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAA;AAC3D,CAAC;AARD,8BAQC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,OAAgB;IAC7C,eAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AACvC,CAAC;AAFD,wCAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAuB;IAC/C,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IAEnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAJD,8BAIC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,GAAG,CAAA;AAC5C,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CACnB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,OAAO,EACP,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,sBASC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CACrB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,SAAS,EACT,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,0BASC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CACpB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,QAAQ,EACR,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,wBASC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAAA;IAClD,IAAI,QAAQ,EAAE;QACZ,OAAO,+BAAgB,CAAC,OAAO,EAAE,qCAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;KACtE;IAED,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAA;AAC3D,CAAC;AAPD,8BAOC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC;AAED,SAAsB,UAAU,CAAC,GAAY;;QAC3C,OAAO,MAAM,uBAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACzC,CAAC;CAAA;AAFD,gCAEC;AAED;;GAEG;AACH,qCAAiC;AAAzB,kGAAA,OAAO,OAAA;AAEf;;GAEG;AACH,qCAAyC;AAAjC,0GAAA,eAAe,OAAA;AAEvB;;GAEG;AACH,2CAAqE;AAA7D,yGAAA,WAAW,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,4GAAA,cAAc,OAAA"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/file-command.d.ts b/node_modules/@actions/core/lib/file-command.d.ts index ed408eb..2d1f2f4 100644 --- a/node_modules/@actions/core/lib/file-command.d.ts +++ b/node_modules/@actions/core/lib/file-command.d.ts @@ -1 +1,2 @@ -export declare function issueCommand(command: string, message: any): void; +export declare function issueFileCommand(command: string, message: any): void; +export declare function prepareKeyValueMessage(key: string, value: any): string; diff --git a/node_modules/@actions/core/lib/file-command.js b/node_modules/@actions/core/lib/file-command.js index 55e3e9f..2d0d738 100644 --- a/node_modules/@actions/core/lib/file-command.js +++ b/node_modules/@actions/core/lib/file-command.js @@ -20,13 +20,14 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.issueCommand = void 0; +exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ const fs = __importStar(require("fs")); const os = __importStar(require("os")); +const uuid_1 = require("uuid"); const utils_1 = require("./utils"); -function issueCommand(command, message) { +function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); @@ -38,5 +39,20 @@ function issueCommand(command, message) { encoding: 'utf8' }); } -exports.issueCommand = issueCommand; +exports.issueFileCommand = issueFileCommand; +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; +} +exports.prepareKeyValueMessage = prepareKeyValueMessage; //# sourceMappingURL=file-command.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/file-command.js.map b/node_modules/@actions/core/lib/file-command.js.map index ee35699..b1a9d54 100644 --- a/node_modules/@actions/core/lib/file-command.js.map +++ b/node_modules/@actions/core/lib/file-command.js.map @@ -1 +1 @@ -{"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;;;;;;;;;;;;;;AAEvC,mCAAmC;AACnC,uDAAuD;AAEvD,uCAAwB;AACxB,uCAAwB;AACxB,mCAAsC;AAEtC,SAAgB,YAAY,CAAC,OAAe,EAAE,OAAY;IACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAA;IACjD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CACb,wDAAwD,OAAO,EAAE,CAClE,CAAA;KACF;IACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAA;KACrD;IAED,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,sBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QACjE,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAA;AACJ,CAAC;AAdD,oCAcC"} \ No newline at end of file +{"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;;;;;;;;;;;;;;AAEvC,mCAAmC;AACnC,uDAAuD;AAEvD,uCAAwB;AACxB,uCAAwB;AACxB,+BAAiC;AACjC,mCAAsC;AAEtC,SAAgB,gBAAgB,CAAC,OAAe,EAAE,OAAY;IAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAA;IACjD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CACb,wDAAwD,OAAO,EAAE,CAClE,CAAA;KACF;IACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAA;KACrD;IAED,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,sBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QACjE,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAA;AACJ,CAAC;AAdD,4CAcC;AAED,SAAgB,sBAAsB,CAAC,GAAW,EAAE,KAAU;IAC5D,MAAM,SAAS,GAAG,gBAAgB,SAAM,EAAE,EAAE,CAAA;IAC5C,MAAM,cAAc,GAAG,sBAAc,CAAC,KAAK,CAAC,CAAA;IAE5C,4EAA4E;IAC5E,6EAA6E;IAC7E,iBAAiB;IACjB,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QAC3B,MAAM,IAAI,KAAK,CACb,4DAA4D,SAAS,GAAG,CACzE,CAAA;KACF;IAED,IAAI,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACtC,MAAM,IAAI,KAAK,CACb,6DAA6D,SAAS,GAAG,CAC1E,CAAA;KACF;IAED,OAAO,GAAG,GAAG,KAAK,SAAS,GAAG,EAAE,CAAC,GAAG,GAAG,cAAc,GAAG,EAAE,CAAC,GAAG,GAAG,SAAS,EAAE,CAAA;AAC9E,CAAC;AApBD,wDAoBC"} \ No newline at end of file diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/LICENSE b/node_modules/@actions/core/node_modules/@actions/http-client/LICENSE deleted file mode 100644 index 5823a51..0000000 --- a/node_modules/@actions/core/node_modules/@actions/http-client/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Actions Http Client for Node.js - -Copyright (c) GitHub, Inc. - -All rights reserved. - -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/@actions/core/node_modules/@actions/http-client/README.md b/node_modules/@actions/core/node_modules/@actions/http-client/README.md deleted file mode 100644 index 7e06ade..0000000 --- a/node_modules/@actions/core/node_modules/@actions/http-client/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# `@actions/http-client` - -A lightweight HTTP client optimized for building actions. - -## Features - - - HTTP client with TypeScript generics and async/await/Promises - - Typings included! - - [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner - - Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+. - - Basic, Bearer and PAT Support out of the box. Extensible handlers for others. - - Redirects supported - -Features and releases [here](./RELEASES.md) - -## Install - -``` -npm install @actions/http-client --save -``` - -## Samples - -See the [tests](./__tests__) for detailed examples. - -## Errors - -### HTTP - -The HTTP client does not throw unless truly exceptional. - -* A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. -* Redirects (3xx) will be followed by default. - -See the [tests](./__tests__) for detailed examples. - -## Debugging - -To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: - -```shell -export NODE_DEBUG=http -``` - -## Node support - -The http-client is built using the latest LTS version of Node 12. It may work on previous node LTS versions but it's tested and officially supported on Node12+. - -## Support and Versioning - -We follow semver and will hold compatibility between major versions and increment the minor version with new features and capabilities (while holding compat). - -## Contributing - -We welcome PRs. Please create an issue and if applicable, a design before proceeding with code. - -once: - -``` -npm install -``` - -To build: - -``` -npm run build -``` - -To run all tests: - -``` -npm test -``` diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/package.json b/node_modules/@actions/core/node_modules/@actions/http-client/package.json deleted file mode 100644 index c1de221..0000000 --- a/node_modules/@actions/core/node_modules/@actions/http-client/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "@actions/http-client", - "version": "2.0.1", - "description": "Actions Http Client", - "keywords": [ - "github", - "actions", - "http" - ], - "homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client", - "license": "MIT", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib", - "!.DS_Store" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/toolkit.git", - "directory": "packages/http-client" - }, - "scripts": { - "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", - "test": "echo \"Error: run tests from root\" && exit 1", - "build": "tsc", - "format": "prettier --write **/*.ts", - "format-check": "prettier --check **/*.ts", - "tsc": "tsc" - }, - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "devDependencies": { - "@types/tunnel": "0.0.3", - "proxy": "^1.0.1" - }, - "dependencies": { - "tunnel": "^0.0.6" - } -} diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index 45341c3..1f3824d 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,6 +1,6 @@ { "name": "@actions/core", - "version": "1.9.1", + "version": "1.10.0", "description": "Actions core lib", "keywords": [ "github", diff --git a/node_modules/@actions/github/LICENSE.md b/node_modules/@actions/github/LICENSE.md new file mode 100644 index 0000000..dbae2ed --- /dev/null +++ b/node_modules/@actions/github/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright 2019 GitHub + +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/@actions/github/README.md b/node_modules/@actions/github/README.md index 02e9be0..30e6a68 100644 --- a/node_modules/@actions/github/README.md +++ b/node_modules/@actions/github/README.md @@ -22,7 +22,7 @@ async function run() { // You can also pass in additional options as a second parameter to getOctokit // const octokit = github.getOctokit(myToken, {userAgent: "MyActionVersion1"}); - const { data: pullRequest } = await octokit.pulls.get({ + const { data: pullRequest } = await octokit.rest.pulls.get({ owner: 'octokit', repo: 'rest.js', pull_number: 123, @@ -50,7 +50,7 @@ const github = require('@actions/github'); const context = github.context; -const newIssue = await octokit.issues.create({ +const newIssue = await octokit.rest.issues.create({ ...context.repo, title: 'New issue!', body: 'Hello Universe!' @@ -59,18 +59,19 @@ const newIssue = await octokit.issues.create({ ## Webhook payload typescript definitions -The npm module `@octokit/webhooks` provides type definitions for the response payloads. You can cast the payload to these types for better type information. +The npm module `@octokit/webhooks-definitions` provides type definitions for the response payloads. You can cast the payload to these types for better type information. -First, install the npm module `npm install @octokit/webhooks` +First, install the npm module `npm install @octokit/webhooks-definitions` Then, assert the type based on the eventName ```ts import * as core from '@actions/core' import * as github from '@actions/github' -import * as Webhooks from '@octokit/webhooks' +import {PushEvent} from '@octokit/webhooks-definitions/schema' + if (github.context.eventName === 'push') { - const pushPayload = github.context.payload as Webhooks.WebhookPayloadPush - core.info(`The head commit is: ${pushPayload.head}`) + const pushPayload = github.context.payload as PushEvent + core.info(`The head commit is: ${pushPayload.head_commit}`) } ``` @@ -90,7 +91,7 @@ const octokit = GitHub.plugin(enterpriseServer220Admin) const myToken = core.getInput('myToken'); const myOctokit = new octokit(getOctokitOptions(token)) // Create a new user -myOctokit.enterpriseAdmin.createUser({ +myOctokit.rest.enterpriseAdmin.createUser({ login: "testuser", email: "testuser@test.com", }); diff --git a/node_modules/@actions/github/lib/context.d.ts b/node_modules/@actions/github/lib/context.d.ts index daab690..7d3a7de 100644 --- a/node_modules/@actions/github/lib/context.d.ts +++ b/node_modules/@actions/github/lib/context.d.ts @@ -13,6 +13,9 @@ export declare class Context { job: string; runNumber: number; runId: number; + apiUrl: string; + serverUrl: string; + graphqlUrl: string; /** * Hydrate the context from the environment */ diff --git a/node_modules/@actions/github/lib/context.js b/node_modules/@actions/github/lib/context.js index dd4d10a..767933c 100644 --- a/node_modules/@actions/github/lib/context.js +++ b/node_modules/@actions/github/lib/context.js @@ -8,6 +8,7 @@ class Context { * Hydrate the context from the environment */ constructor() { + var _a, _b, _c; this.payload = {}; if (process.env.GITHUB_EVENT_PATH) { if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { @@ -27,6 +28,9 @@ class Context { this.job = process.env.GITHUB_JOB; this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); + this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; + this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; + this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; } get issue() { const payload = this.payload; diff --git a/node_modules/@actions/github/lib/context.js.map b/node_modules/@actions/github/lib/context.js.map index 9c4eafe..91fb9a9 100644 --- a/node_modules/@actions/github/lib/context.js.map +++ b/node_modules/@actions/github/lib/context.js.map @@ -1 +1 @@ -{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;AAEA,2BAA2C;AAC3C,2BAAsB;AAEtB,MAAa,OAAO;IAgBlB;;OAEG;IACH;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,IAAI,eAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAY,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAChE,CAAA;aACF;iBAAM;gBACL,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAA;gBAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,IAAI,kBAAkB,QAAG,EAAE,CAAC,CAAA;aACvE;SACF;QACD,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;QAC/C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAA2B,EAAE,EAAE,CAAC,CAAA;QACtE,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAuB,EAAE,EAAE,CAAC,CAAA;IAChE,CAAC;IAED,IAAI,KAAK;QACP,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAE5B,uCACK,IAAI,CAAC,IAAI,KACZ,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,CAAC,MAAM,IAClE;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;AApED,0BAoEC"} \ No newline at end of file +{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;AAEA,2BAA2C;AAC3C,2BAAsB;AAEtB,MAAa,OAAO;IAmBlB;;OAEG;IACH;;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,IAAI,eAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAY,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAChE,CAAA;aACF;iBAAM;gBACL,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAA;gBAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,IAAI,kBAAkB,QAAG,EAAE,CAAC,CAAA;aACvE;SACF;QACD,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;QAC/C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAA2B,EAAE,EAAE,CAAC,CAAA;QACtE,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAuB,EAAE,EAAE,CAAC,CAAA;QAC9D,IAAI,CAAC,MAAM,SAAG,OAAO,CAAC,GAAG,CAAC,cAAc,mCAAI,wBAAwB,CAAA;QACpE,IAAI,CAAC,SAAS,SAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAAI,oBAAoB,CAAA;QACtE,IAAI,CAAC,UAAU,SACb,OAAO,CAAC,GAAG,CAAC,kBAAkB,mCAAI,gCAAgC,CAAA;IACtE,CAAC;IAED,IAAI,KAAK;QACP,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAE5B,uCACK,IAAI,CAAC,IAAI,KACZ,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,CAAC,MAAM,IAClE;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;AA3ED,0BA2EC"} \ 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 index 90c3b98..8c2121d 100644 --- a/node_modules/@actions/github/lib/github.d.ts +++ b/node_modules/@actions/github/lib/github.d.ts @@ -1,6 +1,6 @@ import * as Context from './context'; import { GitHub } from './utils'; -import { OctokitOptions } from '@octokit/core/dist-types/types'; +import { OctokitOptions, OctokitPlugin } from '@octokit/core/dist-types/types'; export declare const context: Context.Context; /** * Returns a hydrated octokit ready to use for GitHub Actions @@ -8,4 +8,4 @@ export declare const context: Context.Context; * @param token the repo PAT or GITHUB_TOKEN * @param options other options to set */ -export declare function getOctokit(token: string, options?: OctokitOptions): InstanceType; +export declare function getOctokit(token: string, options?: OctokitOptions, ...additionalPlugins: OctokitPlugin[]): InstanceType; diff --git a/node_modules/@actions/github/lib/github.js b/node_modules/@actions/github/lib/github.js index e30e81e..b717a6b 100644 --- a/node_modules/@actions/github/lib/github.js +++ b/node_modules/@actions/github/lib/github.js @@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( 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)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -29,8 +29,9 @@ exports.context = new Context.Context(); * @param token the repo PAT or GITHUB_TOKEN * @param options other options to set */ -function getOctokit(token, options) { - return new utils_1.GitHub(utils_1.getOctokitOptions(token, options)); +function getOctokit(token, options, ...additionalPlugins) { + const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); + return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options)); } exports.getOctokit = getOctokit; //# 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 index 717d03e..60be74b 100644 --- a/node_modules/@actions/github/lib/github.js.map +++ b/node_modules/@actions/github/lib/github.js.map @@ -1 +1 @@ -{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAoC;AACpC,mCAAiD;AAKpC,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C;;;;;GAKG;AACH,SAAgB,UAAU,CACxB,KAAa,EACb,OAAwB;IAExB,OAAO,IAAI,cAAM,CAAC,yBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;AACtD,CAAC;AALD,gCAKC"} \ No newline at end of file +{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAoC;AACpC,mCAAiD;AAKpC,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C;;;;;GAKG;AACH,SAAgB,UAAU,CACxB,KAAa,EACb,OAAwB,EACxB,GAAG,iBAAkC;IAErC,MAAM,iBAAiB,GAAG,cAAM,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAA;IAC7D,OAAO,IAAI,iBAAiB,CAAC,yBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;AACjE,CAAC;AAPD,gCAOC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/internal/utils.js b/node_modules/@actions/github/lib/internal/utils.js index 197a441..175a4da 100644 --- a/node_modules/@actions/github/lib/internal/utils.js +++ b/node_modules/@actions/github/lib/internal/utils.js @@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( 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)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; diff --git a/node_modules/@actions/github/lib/utils.d.ts b/node_modules/@actions/github/lib/utils.d.ts index 0015a35..e889ee0 100644 --- a/node_modules/@actions/github/lib/utils.d.ts +++ b/node_modules/@actions/github/lib/utils.d.ts @@ -2,14 +2,8 @@ import * as Context from './context'; import { Octokit } from '@octokit/core'; import { OctokitOptions } from '@octokit/core/dist-types/types'; export declare const context: Context.Context; -export declare const GitHub: (new (...args: any[]) => { - [x: string]: any; -}) & { - new (...args: any[]): { - [x: string]: any; - }; - plugins: any[]; -} & typeof Octokit & import("@octokit/core/dist-types/types").Constructor; /** diff --git a/node_modules/@actions/github/lib/utils.js b/node_modules/@actions/github/lib/utils.js index b066c22..d803f01 100644 --- a/node_modules/@actions/github/lib/utils.js +++ b/node_modules/@actions/github/lib/utils.js @@ -14,12 +14,12 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( 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)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getOctokitOptions = exports.GitHub = exports.context = void 0; +exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0; const Context = __importStar(require("./context")); const Utils = __importStar(require("./internal/utils")); // octokit + plugins @@ -28,13 +28,13 @@ const plugin_rest_endpoint_methods_1 = require("@octokit/plugin-rest-endpoint-me const plugin_paginate_rest_1 = require("@octokit/plugin-paginate-rest"); exports.context = new Context.Context(); const baseUrl = Utils.getApiBaseUrl(); -const defaults = { +exports.defaults = { baseUrl, request: { agent: Utils.getProxyAgent(baseUrl) } }; -exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults); +exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults); /** * Convience function to correctly format Octokit Options to pass into the constructor. * diff --git a/node_modules/@actions/github/lib/utils.js.map b/node_modules/@actions/github/lib/utils.js.map index 3a6f6b4..7221d06 100644 --- a/node_modules/@actions/github/lib/utils.js.map +++ b/node_modules/@actions/github/lib/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAoC;AACpC,wDAAyC;AAEzC,oBAAoB;AACpB,wCAAqC;AAErC,wFAAyE;AACzE,wEAA0D;AAE7C,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAA;AACrC,MAAM,QAAQ,GAAG;IACf,OAAO;IACP,OAAO,EAAE;QACP,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC;KACpC;CACF,CAAA;AAEY,QAAA,MAAM,GAAG,cAAO,CAAC,MAAM,CAClC,kDAAmB,EACnB,mCAAY,CACb,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAEpB;;;;;GAKG;AACH,SAAgB,iBAAiB,CAC/B,KAAa,EACb,OAAwB;IAExB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAA,CAAC,iEAAiE;IAE/G,OAAO;IACP,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAC7C,IAAI,IAAI,EAAE;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;KACjB;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AAbD,8CAaC"} \ No newline at end of file +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAoC;AACpC,wDAAyC;AAEzC,oBAAoB;AACpB,wCAAqC;AAErC,wFAAyE;AACzE,wEAA0D;AAE7C,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAA;AACxB,QAAA,QAAQ,GAAmB;IACtC,OAAO;IACP,OAAO,EAAE;QACP,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC;KACpC;CACF,CAAA;AAEY,QAAA,MAAM,GAAG,cAAO,CAAC,MAAM,CAClC,kDAAmB,EACnB,mCAAY,CACb,CAAC,QAAQ,CAAC,gBAAQ,CAAC,CAAA;AAEpB;;;;;GAKG;AACH,SAAgB,iBAAiB,CAC/B,KAAa,EACb,OAAwB;IAExB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAA,CAAC,iEAAiE;IAE/G,OAAO;IACP,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAC7C,IAAI,IAAI,EAAE;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;KACjB;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AAbD,8CAaC"} \ No newline at end of file diff --git a/node_modules/@actions/github/node_modules/@octokit/core/LICENSE b/node_modules/@actions/github/node_modules/@octokit/core/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/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/@actions/github/node_modules/@octokit/core/README.md b/node_modules/@actions/github/node_modules/@octokit/core/README.md new file mode 100644 index 0000000..b540cb9 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/README.md @@ -0,0 +1,448 @@ +# core.js + +> Extendable client for GitHub's REST & GraphQL APIs + +[![@latest](https://img.shields.io/npm/v/@octokit/core.svg)](https://www.npmjs.com/package/@octokit/core) +[![Build Status](https://github.com/octokit/core.js/workflows/Test/badge.svg)](https://github.com/octokit/core.js/actions?query=workflow%3ATest+branch%3Amaster) + + + +- [Usage](#usage) + - [REST API example](#rest-api-example) + - [GraphQL example](#graphql-example) +- [Options](#options) +- [Defaults](#defaults) +- [Authentication](#authentication) +- [Logging](#logging) +- [Hooks](#hooks) +- [Plugins](#plugins) +- [Build your own Octokit with Plugins and Defaults](#build-your-own-octokit-with-plugins-and-defaults) +- [LICENSE](#license) + + + +If you need a minimalistic library to utilize GitHub's [REST API](https://developer.github.com/v3/) and [GraphQL API](https://developer.github.com/v4/) which you can extend with plugins as needed, then `@octokit/core` is a great starting point. + +If you don't need the Plugin API then using [`@octokit/request`](https://github.com/octokit/request.js/) or [`@octokit/graphql`](https://github.com/octokit/graphql.js/) directly is a good alternative. + +## Usage + + + + + + +
+Browsers + +Load @octokit/core directly from cdn.skypack.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/core + +```js +const { Octokit } = require("@octokit/core"); +// or: import { Octokit } from "@octokit/core"; +``` + +
+ +### REST API example + +```js +// Create a personal access token at https://github.com/settings/tokens/new?scopes=repo +const octokit = new Octokit({ auth: `personal-access-token123` }); + +const response = await octokit.request("GET /orgs/{org}/repos", { + org: "octokit", + type: "private", +}); +``` + +See [`@octokit/request`](https://github.com/octokit/request.js) for full documentation of the `.request` method. + +### GraphQL example + +```js +const octokit = new Octokit({ auth: `secret123` }); + +const response = await octokit.graphql( + `query ($login: String!) { + organization(login: $login) { + repositories(privacy: PRIVATE) { + totalCount + } + } + }`, + { login: "octokit" } +); +``` + +See [`@octokit/graphql`](https://github.com/octokit/graphql.js) for full documentation of the `.graphql` method. + +## Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ options.authStrategy + + Function + + Defaults to @octokit/auth-token. See Authentication below for examples. +
+ options.auth + + String or Object + + See Authentication below for examples. +
+ options.baseUrl + + String + + +When using with GitHub Enterprise Server, set `options.baseUrl` to the root URL of the API. For example, if your GitHub Enterprise Server's hostname is `github.acme-inc.com`, then set `options.baseUrl` to `https://github.acme-inc.com/api/v3`. Example + +```js +const octokit = new Octokit({ + baseUrl: "https://github.acme-inc.com/api/v3", +}); +``` + +
+ options.previews + + Array of Strings + + +Some REST API endpoints require preview headers to be set, or enable +additional features. Preview headers can be set on a per-request basis, e.g. + +```js +octokit.request("POST /repos/{owner}/{repo}/pulls", { + mediaType: { + previews: ["shadow-cat"], + }, + owner, + repo, + title: "My pull request", + base: "master", + head: "my-feature", + draft: true, +}); +``` + +You can also set previews globally, by setting the `options.previews` option on the constructor. Example: + +```js +const octokit = new Octokit({ + previews: ["shadow-cat"], +}); +``` + +
+ options.request + + Object + + +Set a default request timeout (`options.request.timeout`) or an [`http(s).Agent`](https://nodejs.org/api/http.html#http_class_http_agent) e.g. for proxy usage (Node only, `options.request.agent`). + +There are more `options.request.*` options, see [`@octokit/request` options](https://github.com/octokit/request.js#request). `options.request` can also be set on a per-request basis. + +
+ options.timeZone + + String + + +Sets the `Time-Zone` header which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + +```js +const octokit = new Octokit({ + timeZone: "America/Los_Angeles", +}); +``` + +The time zone header will determine the timezone used for generating the timestamp when creating commits. See [GitHub's Timezones documentation](https://developer.github.com/v3/#timezones). + +
+ options.userAgent + + String + + +A custom user agent string for your app or library. Example + +```js +const octokit = new Octokit({ + userAgent: "my-app/v1.2.3", +}); +``` + +
+ +## Defaults + +You can create a new Octokit class with customized default options. + +```js +const MyOctokit = Octokit.defaults({ + auth: "personal-access-token123", + baseUrl: "https://github.acme-inc.com/api/v3", + userAgent: "my-app/v1.2.3", +}); +const octokit1 = new MyOctokit(); +const octokit2 = new MyOctokit(); +``` + +If you pass additional options to your new constructor, the options will be merged shallowly. + +```js +const MyOctokit = Octokit.defaults({ + foo: { + opt1: 1, + }, +}); +const octokit = new MyOctokit({ + foo: { + opt2: 1, + }, +}); +// options will be { foo: { opt2: 1 }} +``` + +If you need a deep or conditional merge, you can pass a function instead. + +```js +const MyOctokit = Octokit.defaults((options) => { + return { + foo: Object.assign({}, options.foo, { opt2: 1 }), + }; +}); +const octokit = new MyOctokit({ + foo: { opt2: 1 }, +}); +// options will be { foo: { opt1: 1, opt2: 1 }} +``` + +Be careful about mutating the `options` object in the `Octokit.defaults` callback, as it can have unforeseen consequences. + +## Authentication + +Authentication is optional for some REST API endpoints accessing public data, but is required for GraphQL queries. Using authentication also increases your [API rate limit](https://developer.github.com/v3/#rate-limiting). + +By default, Octokit authenticates using the [token authentication strategy](https://github.com/octokit/auth-token.js). Pass in a token using `options.auth`. It can be a personal access token, an OAuth token, an installation access token or a JSON Web Token for GitHub App authentication. The `Authorization` header will be set according to the type of token. + +```js +import { Octokit } from "@octokit/core"; + +const octokit = new Octokit({ + auth: "mypersonalaccesstoken123", +}); + +const { data } = await octokit.request("/user"); +``` + +To use a different authentication strategy, set `options.authStrategy`. A list of authentication strategies is available at [octokit/authentication-strategies.js](https://github.com/octokit/authentication-strategies.js/#readme). + +Example + +```js +import { Octokit } from "@octokit/core"; +import { createAppAuth } from "@octokit/auth-app"; + +const appOctokit = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: 123, + privateKey: process.env.PRIVATE_KEY, + }, +}); + +const { data } = await appOctokit.request("/app"); +``` + +The `.auth()` method returned by the current authentication strategy can be accessed at `octokit.auth()`. Example + +```js +const { token } = await appOctokit.auth({ + type: "installation", + installationId: 123, +}); +``` + +## Logging + +There are four built-in log methods + +1. `octokit.log.debug(message[, additionalInfo])` +1. `octokit.log.info(message[, additionalInfo])` +1. `octokit.log.warn(message[, additionalInfo])` +1. `octokit.log.error(message[, additionalInfo])` + +They can be configured using the [`log` client option](client-options). By default, `octokit.log.debug()` and `octokit.log.info()` are no-ops, while the other two call `console.warn()` and `console.error()` respectively. + +This is useful if you build reusable [plugins](#plugins). + +If you would like to make the log level configurable using an environment variable or external option, we recommend the [console-log-level](https://github.com/watson/console-log-level) package. Example + +```js +const octokit = new Octokit({ + log: require("console-log-level")({ level: "info" }), +}); +``` + +## Hooks + +You can customize Octokit's request lifecycle with hooks. + +```js +octokit.hook.before("request", async (options) => { + validate(options); +}); +octokit.hook.after("request", async (response, options) => { + console.log(`${options.method} ${options.url}: ${response.status}`); +}); +octokit.hook.error("request", async (error, options) => { + if (error.status === 304) { + return findInCache(error.response.headers.etag); + } + + throw error; +}); +octokit.hook.wrap("request", async (request, options) => { + // add logic before, after, catch errors or replace the request altogether + return request(options); +}); +``` + +See [before-after-hook](https://github.com/gr2m/before-after-hook#readme) for more documentation on hooks. + +## Plugins + +Octokit’s functionality can be extended using plugins. The `Octokit.plugin()` method accepts a plugin (or many) and returns a new constructor. + +A plugin is a function which gets two arguments: + +1. the current instance +2. the options passed to the constructor. + +In order to extend `octokit`'s API, the plugin must return an object with the new methods. + +```js +// index.js +const { Octokit } = require("@octokit/core") +const MyOctokit = Octokit.plugin( + require("./lib/my-plugin"), + require("octokit-plugin-example") +); + +const octokit = new MyOctokit({ greeting: "Moin moin" }); +octokit.helloWorld(); // logs "Moin moin, world!" +octokit.request("GET /"); // logs "GET / - 200 in 123ms" + +// lib/my-plugin.js +module.exports = (octokit, options = { greeting: "Hello" }) => { + // hook into the request lifecycle + octokit.hook.wrap("request", async (request, options) => { + const time = Date.now(); + const response = await request(options); + console.log( + `${options.method} ${options.url} – ${response.status} in ${Date.now() - + time}ms` + ); + return response; + }); + + // add a custom method + return { + helloWorld: () => console.log(`${options.greeting}, world!`); + } +}; +``` + +## Build your own Octokit with Plugins and Defaults + +You can build your own Octokit class with preset default options and plugins. In fact, this is mostly how the `@octokit/` modules work, such as [`@octokit/action`](https://github.com/octokit/action.js): + +```js +const { Octokit } = require("@octokit/core"); +const MyActionOctokit = Octokit.plugin( + require("@octokit/plugin-paginate-rest").paginateRest, + require("@octokit/plugin-throttling").throttling, + require("@octokit/plugin-retry").retry +).defaults({ + throttle: { + onAbuseLimit: (retryAfter, options) => { + /* ... */ + }, + onRateLimit: (retryAfter, options) => { + /* ... */ + }, + }, + authStrategy: require("@octokit/auth-action").createActionAuth, + userAgent: `my-octokit-action/v1.2.3`, +}); + +const octokit = new MyActionOctokit(); +const installations = await octokit.paginate("GET /app/installations"); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js b/node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js new file mode 100644 index 0000000..0f46e61 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js @@ -0,0 +1,176 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var universalUserAgent = require('universal-user-agent'); +var beforeAfterHook = require('before-after-hook'); +var request = require('@octokit/request'); +var graphql = require('@octokit/graphql'); +var authToken = require('@octokit/auth-token'); + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +const VERSION = "3.6.0"; + +const _excluded = ["authStrategy"]; +class Octokit { + constructor(options = {}) { + const hook = new beforeAfterHook.Collection(); + const requestDefaults = { + baseUrl: request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; // prepend default user agent with `options.userAgent` if set + + requestDefaults.headers["user-agent"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(" "); + + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + + this.request = request.request.defaults(requestDefaults); + this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults); + this.log = Object.assign({ + debug: () => {}, + info: () => {}, + warn: console.warn.bind(console), + error: console.error.bind(console) + }, options.log); + this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered. + // (2) If only `options.auth` is set, use the default token authentication strategy. + // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance. + // TODO: type `options.auth` based on `options.authStrategy`. + + if (!options.authStrategy) { + if (!options.auth) { + // (1) + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + // (2) + const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\_(ツ)_/¯ + + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { + authStrategy + } = options, + otherOptions = _objectWithoutProperties(options, _excluded); + + const auth = authStrategy(Object.assign({ + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, options.auth)); // @ts-ignore ¯\_(ツ)_/¯ + + hook.wrap("request", auth.hook); + this.auth = auth; + } // apply plugins + // https://stackoverflow.com/a/16345172 + + + const classConstructor = this.constructor; + classConstructor.plugins.forEach(plugin => { + Object.assign(this, plugin(this, options)); + }); + } + + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + + super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null)); + } + + }; + return OctokitWithDefaults; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + + + static plugin(...newPlugins) { + var _a; + + const currentPlugins = this.plugins; + const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a); + return NewOctokit; + } + +} +Octokit.VERSION = VERSION; +Octokit.plugins = []; + +exports.Octokit = Octokit; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js.map b/node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js.map new file mode 100644 index 0000000..3467e52 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"3.6.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":["VERSION","Octokit","constructor","options","hook","Collection","requestDefaults","baseUrl","request","endpoint","DEFAULTS","headers","Object","assign","bind","mediaType","previews","format","userAgent","getUserAgent","filter","Boolean","join","timeZone","defaults","graphql","withCustomRequest","log","debug","info","warn","console","error","authStrategy","auth","type","createTokenAuth","wrap","otherOptions","octokit","octokitOptions","classConstructor","plugins","forEach","plugin","OctokitWithDefaults","args","newPlugins","_a","currentPlugins","NewOctokit","concat","includes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;;ACAP,AAMO,MAAMC,OAAN,CAAc;AACjBC,EAAAA,WAAW,CAACC,OAAO,GAAG,EAAX,EAAe;AACtB,UAAMC,IAAI,GAAG,IAAIC,0BAAJ,EAAb;AACA,UAAMC,eAAe,GAAG;AACpBC,MAAAA,OAAO,EAAEC,eAAO,CAACC,QAAR,CAAiBC,QAAjB,CAA0BH,OADf;AAEpBI,MAAAA,OAAO,EAAE,EAFW;AAGpBH,MAAAA,OAAO,EAAEI,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACK,OAA1B,EAAmC;AACxC;AACAJ,QAAAA,IAAI,EAAEA,IAAI,CAACU,IAAL,CAAU,IAAV,EAAgB,SAAhB;AAFkC,OAAnC,CAHW;AAOpBC,MAAAA,SAAS,EAAE;AACPC,QAAAA,QAAQ,EAAE,EADH;AAEPC,QAAAA,MAAM,EAAE;AAFD;AAPS,KAAxB,CAFsB;;AAetBX,IAAAA,eAAe,CAACK,OAAhB,CAAwB,YAAxB,IAAwC,CACpCR,OAAO,CAACe,SAD4B,EAEnC,mBAAkBlB,OAAQ,IAAGmB,+BAAY,EAAG,EAFT,EAInCC,MAJmC,CAI5BC,OAJ4B,EAKnCC,IALmC,CAK9B,GAL8B,CAAxC;;AAMA,QAAInB,OAAO,CAACI,OAAZ,EAAqB;AACjBD,MAAAA,eAAe,CAACC,OAAhB,GAA0BJ,OAAO,CAACI,OAAlC;AACH;;AACD,QAAIJ,OAAO,CAACa,QAAZ,EAAsB;AAClBV,MAAAA,eAAe,CAACS,SAAhB,CAA0BC,QAA1B,GAAqCb,OAAO,CAACa,QAA7C;AACH;;AACD,QAAIb,OAAO,CAACoB,QAAZ,EAAsB;AAClBjB,MAAAA,eAAe,CAACK,OAAhB,CAAwB,WAAxB,IAAuCR,OAAO,CAACoB,QAA/C;AACH;;AACD,SAAKf,OAAL,GAAeA,eAAO,CAACgB,QAAR,CAAiBlB,eAAjB,CAAf;AACA,SAAKmB,OAAL,GAAeC,yBAAiB,CAAC,KAAKlB,OAAN,CAAjB,CAAgCgB,QAAhC,CAAyClB,eAAzC,CAAf;AACA,SAAKqB,GAAL,GAAWf,MAAM,CAACC,MAAP,CAAc;AACrBe,MAAAA,KAAK,EAAE,MAAM,EADQ;AAErBC,MAAAA,IAAI,EAAE,MAAM,EAFS;AAGrBC,MAAAA,IAAI,EAAEC,OAAO,CAACD,IAAR,CAAahB,IAAb,CAAkBiB,OAAlB,CAHe;AAIrBC,MAAAA,KAAK,EAAED,OAAO,CAACC,KAAR,CAAclB,IAAd,CAAmBiB,OAAnB;AAJc,KAAd,EAKR5B,OAAO,CAACwB,GALA,CAAX;AAMA,SAAKvB,IAAL,GAAYA,IAAZ,CAtCsB;AAwCtB;AACA;AACA;AACA;;AACA,QAAI,CAACD,OAAO,CAAC8B,YAAb,EAA2B;AACvB,UAAI,CAAC9B,OAAO,CAAC+B,IAAb,EAAmB;AACf;AACA,aAAKA,IAAL,GAAY,aAAa;AACrBC,UAAAA,IAAI,EAAE;AADe,SAAb,CAAZ;AAGH,OALD,MAMK;AACD;AACA,cAAMD,IAAI,GAAGE,yBAAe,CAACjC,OAAO,CAAC+B,IAAT,CAA5B,CAFC;;AAID9B,QAAAA,IAAI,CAACiC,IAAL,CAAU,SAAV,EAAqBH,IAAI,CAAC9B,IAA1B;AACA,aAAK8B,IAAL,GAAYA,IAAZ;AACH;AACJ,KAdD,MAeK;AACD,YAAM;AAAED,QAAAA;AAAF,UAAoC9B,OAA1C;AAAA,YAAyBmC,YAAzB,4BAA0CnC,OAA1C;;AACA,YAAM+B,IAAI,GAAGD,YAAY,CAACrB,MAAM,CAACC,MAAP,CAAc;AACpCL,QAAAA,OAAO,EAAE,KAAKA,OADsB;AAEpCmB,QAAAA,GAAG,EAAE,KAAKA,GAF0B;AAGpC;AACA;AACA;AACA;AACA;AACAY,QAAAA,OAAO,EAAE,IAR2B;AASpCC,QAAAA,cAAc,EAAEF;AAToB,OAAd,EAUvBnC,OAAO,CAAC+B,IAVe,CAAD,CAAzB,CAFC;;AAcD9B,MAAAA,IAAI,CAACiC,IAAL,CAAU,SAAV,EAAqBH,IAAI,CAAC9B,IAA1B;AACA,WAAK8B,IAAL,GAAYA,IAAZ;AACH,KA3EqB;AA6EtB;;;AACA,UAAMO,gBAAgB,GAAG,KAAKvC,WAA9B;AACAuC,IAAAA,gBAAgB,CAACC,OAAjB,CAAyBC,OAAzB,CAAkCC,MAAD,IAAY;AACzChC,MAAAA,MAAM,CAACC,MAAP,CAAc,IAAd,EAAoB+B,MAAM,CAAC,IAAD,EAAOzC,OAAP,CAA1B;AACH,KAFD;AAGH;;AACc,SAARqB,QAAQ,CAACA,QAAD,EAAW;AACtB,UAAMqB,mBAAmB,GAAG,cAAc,IAAd,CAAmB;AAC3C3C,MAAAA,WAAW,CAAC,GAAG4C,IAAJ,EAAU;AACjB,cAAM3C,OAAO,GAAG2C,IAAI,CAAC,CAAD,CAAJ,IAAW,EAA3B;;AACA,YAAI,OAAOtB,QAAP,KAAoB,UAAxB,EAAoC;AAChC,gBAAMA,QAAQ,CAACrB,OAAD,CAAd;AACA;AACH;;AACD,cAAMS,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBW,QAAlB,EAA4BrB,OAA5B,EAAqCA,OAAO,CAACe,SAAR,IAAqBM,QAAQ,CAACN,SAA9B,GACrC;AACEA,UAAAA,SAAS,EAAG,GAAEf,OAAO,CAACe,SAAU,IAAGM,QAAQ,CAACN,SAAU;AADxD,SADqC,GAIrC,IAJA,CAAN;AAKH;;AAZ0C,KAA/C;AAcA,WAAO2B,mBAAP;AACH;AACD;AACJ;AACA;AACA;AACA;AACA;;;AACiB,SAAND,MAAM,CAAC,GAAGG,UAAJ,EAAgB;AACzB,QAAIC,EAAJ;;AACA,UAAMC,cAAc,GAAG,KAAKP,OAA5B;AACA,UAAMQ,UAAU,IAAIF,EAAE,GAAG,cAAc,IAAd,CAAmB,EAAxB,EAEhBA,EAAE,CAACN,OAAH,GAAaO,cAAc,CAACE,MAAf,CAAsBJ,UAAU,CAAC3B,MAAX,CAAmBwB,MAAD,IAAY,CAACK,cAAc,CAACG,QAAf,CAAwBR,MAAxB,CAA/B,CAAtB,CAFG,EAGhBI,EAHY,CAAhB;AAIA,WAAOE,UAAP;AACH;;AAnHgB;AAqHrBjD,OAAO,CAACD,OAAR,GAAkBA,OAAlB;AACAC,OAAO,CAACyC,OAAR,GAAkB,EAAlB;;;;"} \ No newline at end of file diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-src/index.js b/node_modules/@actions/github/node_modules/@octokit/core/dist-src/index.js new file mode 100644 index 0000000..bdbc335 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-src/index.js @@ -0,0 +1,125 @@ +import { getUserAgent } from "universal-user-agent"; +import { Collection } from "before-after-hook"; +import { request } from "@octokit/request"; +import { withCustomRequest } from "@octokit/graphql"; +import { createTokenAuth } from "@octokit/auth-token"; +import { VERSION } from "./version"; +export class Octokit { + constructor(options = {}) { + const hook = new Collection(); + const requestDefaults = { + baseUrl: request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request"), + }), + mediaType: { + previews: [], + format: "", + }, + }; + // prepend default user agent with `options.userAgent` if set + requestDefaults.headers["user-agent"] = [ + options.userAgent, + `octokit-core.js/${VERSION} ${getUserAgent()}`, + ] + .filter(Boolean) + .join(" "); + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = request.defaults(requestDefaults); + this.graphql = withCustomRequest(this.request).defaults(requestDefaults); + this.log = Object.assign({ + debug: () => { }, + info: () => { }, + warn: console.warn.bind(console), + error: console.error.bind(console), + }, options.log); + this.hook = hook; + // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered. + // (2) If only `options.auth` is set, use the default token authentication strategy. + // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance. + // TODO: type `options.auth` based on `options.authStrategy`. + if (!options.authStrategy) { + if (!options.auth) { + // (1) + this.auth = async () => ({ + type: "unauthenticated", + }); + } + else { + // (2) + const auth = createTokenAuth(options.auth); + // @ts-ignore ¯\_(ツ)_/¯ + hook.wrap("request", auth.hook); + this.auth = auth; + } + } + else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy(Object.assign({ + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions, + }, options.auth)); + // @ts-ignore ¯\_(ツ)_/¯ + hook.wrap("request", auth.hook); + this.auth = auth; + } + // apply plugins + // https://stackoverflow.com/a/16345172 + const classConstructor = this.constructor; + classConstructor.plugins.forEach((plugin) => { + Object.assign(this, plugin(this, options)); + }); + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent + ? { + userAgent: `${options.userAgent} ${defaults.userAgent}`, + } + : null)); + } + }; + return OctokitWithDefaults; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + var _a; + const currentPlugins = this.plugins; + const NewOctokit = (_a = class extends this { + }, + _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))), + _a); + return NewOctokit; + } +} +Octokit.VERSION = VERSION; +Octokit.plugins = []; diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-src/types.js b/node_modules/@actions/github/node_modules/@octokit/core/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-src/version.js b/node_modules/@actions/github/node_modules/@octokit/core/dist-src/version.js new file mode 100644 index 0000000..bace1a9 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "3.6.0"; diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-types/index.d.ts b/node_modules/@actions/github/node_modules/@octokit/core/dist-types/index.d.ts new file mode 100644 index 0000000..b757c5b --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-types/index.d.ts @@ -0,0 +1,30 @@ +import { HookCollection } from "before-after-hook"; +import { request } from "@octokit/request"; +import { graphql } from "@octokit/graphql"; +import { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types"; +export declare class Octokit { + static VERSION: string; + static defaults>(this: S, defaults: OctokitOptions | Function): S; + static plugins: OctokitPlugin[]; + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin & { + plugins: any[]; + }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor>>; + constructor(options?: OctokitOptions); + request: typeof request; + graphql: typeof graphql; + log: { + debug: (message: string, additionalInfo?: object) => any; + info: (message: string, additionalInfo?: object) => any; + warn: (message: string, additionalInfo?: object) => any; + error: (message: string, additionalInfo?: object) => any; + [key: string]: any; + }; + hook: HookCollection; + auth: (...args: unknown[]) => Promise; +} diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-types/types.d.ts b/node_modules/@actions/github/node_modules/@octokit/core/dist-types/types.d.ts new file mode 100644 index 0000000..3970d0d --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-types/types.d.ts @@ -0,0 +1,44 @@ +import * as OctokitTypes from "@octokit/types"; +import { RequestError } from "@octokit/request-error"; +import { Octokit } from "."; +export declare type RequestParameters = OctokitTypes.RequestParameters; +export interface OctokitOptions { + authStrategy?: any; + auth?: any; + userAgent?: string; + previews?: string[]; + baseUrl?: string; + log?: { + debug: (message: string) => unknown; + info: (message: string) => unknown; + warn: (message: string) => unknown; + error: (message: string) => unknown; + }; + request?: OctokitTypes.RequestRequestOptions; + timeZone?: string; + [option: string]: any; +} +export declare type Constructor = new (...args: any[]) => T; +export declare type ReturnTypeOf = T extends AnyFunction ? ReturnType : T extends AnyFunction[] ? UnionToIntersection, void>> : never; +/** + * @author https://stackoverflow.com/users/2887218/jcalz + * @see https://stackoverflow.com/a/50375286/10325032 + */ +export declare type UnionToIntersection = (Union extends any ? (argument: Union) => void : never) extends (argument: infer Intersection) => void ? Intersection : never; +declare type AnyFunction = (...args: any) => any; +export declare type OctokitPlugin = (octokit: Octokit, options: OctokitOptions) => { + [key: string]: any; +} | void; +export declare type Hooks = { + request: { + Options: Required; + Result: OctokitTypes.OctokitResponse; + Error: RequestError | Error; + }; + [key: string]: { + Options: unknown; + Result: unknown; + Error: unknown; + }; +}; +export {}; diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-types/version.d.ts b/node_modules/@actions/github/node_modules/@octokit/core/dist-types/version.d.ts new file mode 100644 index 0000000..f1a3d02 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "3.6.0"; diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-web/index.js b/node_modules/@actions/github/node_modules/@octokit/core/dist-web/index.js new file mode 100644 index 0000000..741d231 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-web/index.js @@ -0,0 +1,130 @@ +import { getUserAgent } from 'universal-user-agent'; +import { Collection } from 'before-after-hook'; +import { request } from '@octokit/request'; +import { withCustomRequest } from '@octokit/graphql'; +import { createTokenAuth } from '@octokit/auth-token'; + +const VERSION = "3.6.0"; + +class Octokit { + constructor(options = {}) { + const hook = new Collection(); + const requestDefaults = { + baseUrl: request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request"), + }), + mediaType: { + previews: [], + format: "", + }, + }; + // prepend default user agent with `options.userAgent` if set + requestDefaults.headers["user-agent"] = [ + options.userAgent, + `octokit-core.js/${VERSION} ${getUserAgent()}`, + ] + .filter(Boolean) + .join(" "); + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = request.defaults(requestDefaults); + this.graphql = withCustomRequest(this.request).defaults(requestDefaults); + this.log = Object.assign({ + debug: () => { }, + info: () => { }, + warn: console.warn.bind(console), + error: console.error.bind(console), + }, options.log); + this.hook = hook; + // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered. + // (2) If only `options.auth` is set, use the default token authentication strategy. + // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance. + // TODO: type `options.auth` based on `options.authStrategy`. + if (!options.authStrategy) { + if (!options.auth) { + // (1) + this.auth = async () => ({ + type: "unauthenticated", + }); + } + else { + // (2) + const auth = createTokenAuth(options.auth); + // @ts-ignore ¯\_(ツ)_/¯ + hook.wrap("request", auth.hook); + this.auth = auth; + } + } + else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy(Object.assign({ + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions, + }, options.auth)); + // @ts-ignore ¯\_(ツ)_/¯ + hook.wrap("request", auth.hook); + this.auth = auth; + } + // apply plugins + // https://stackoverflow.com/a/16345172 + const classConstructor = this.constructor; + classConstructor.plugins.forEach((plugin) => { + Object.assign(this, plugin(this, options)); + }); + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent + ? { + userAgent: `${options.userAgent} ${defaults.userAgent}`, + } + : null)); + } + }; + return OctokitWithDefaults; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + var _a; + const currentPlugins = this.plugins; + const NewOctokit = (_a = class extends this { + }, + _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))), + _a); + return NewOctokit; + } +} +Octokit.VERSION = VERSION; +Octokit.plugins = []; + +export { Octokit }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@actions/github/node_modules/@octokit/core/dist-web/index.js.map b/node_modules/@actions/github/node_modules/@octokit/core/dist-web/index.js.map new file mode 100644 index 0000000..238c82e --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"3.6.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACMnC,MAAM,OAAO,CAAC;AACrB,IAAI,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC9B,QAAQ,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;AACtC,QAAQ,MAAM,eAAe,GAAG;AAChC,YAAY,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO;AACtD,YAAY,OAAO,EAAE,EAAE;AACvB,YAAY,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE;AACxD;AACA,gBAAgB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;AAChD,aAAa,CAAC;AACd,YAAY,SAAS,EAAE;AACvB,gBAAgB,QAAQ,EAAE,EAAE;AAC5B,gBAAgB,MAAM,EAAE,EAAE;AAC1B,aAAa;AACb,SAAS,CAAC;AACV;AACA,QAAQ,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG;AAChD,YAAY,OAAO,CAAC,SAAS;AAC7B,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1D,SAAS;AACT,aAAa,MAAM,CAAC,OAAO,CAAC;AAC5B,aAAa,IAAI,CAAC,GAAG,CAAC,CAAC;AACvB,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE;AAC7B,YAAY,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtD,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;AAC9B,YAAY,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAClE,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;AAC9B,YAAY,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;AACpE,SAAS;AACT,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACzD,QAAQ,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACjF,QAAQ,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AACjC,YAAY,KAAK,EAAE,MAAM,GAAG;AAC5B,YAAY,IAAI,EAAE,MAAM,GAAG;AAC3B,YAAY,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;AAC5C,YAAY,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;AAC9C,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACxB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;AACnC,YAAY,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;AAC/B;AACA,gBAAgB,IAAI,CAAC,IAAI,GAAG,aAAa;AACzC,oBAAoB,IAAI,EAAE,iBAAiB;AAC3C,iBAAiB,CAAC,CAAC;AACnB,aAAa;AACb,iBAAiB;AACjB;AACA,gBAAgB,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3D;AACA,gBAAgB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,gBAAgB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACjC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;AAC9D,YAAY,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC;AACpD,gBAAgB,OAAO,EAAE,IAAI,CAAC,OAAO;AACrC,gBAAgB,GAAG,EAAE,IAAI,CAAC,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO,EAAE,IAAI;AAC7B,gBAAgB,cAAc,EAAE,YAAY;AAC5C,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9B;AACA,YAAY,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5C,YAAY,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AAC7B,SAAS;AACT;AACA;AACA,QAAQ,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC;AAClD,QAAQ,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACrD,YAAY,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,OAAO,QAAQ,CAAC,QAAQ,EAAE;AAC9B,QAAQ,MAAM,mBAAmB,GAAG,cAAc,IAAI,CAAC;AACvD,YAAY,WAAW,CAAC,GAAG,IAAI,EAAE;AACjC,gBAAgB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9C,gBAAgB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;AACpD,oBAAoB,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7C,oBAAoB,OAAO;AAC3B,iBAAiB;AACjB,gBAAgB,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS;AAClG,sBAAsB;AACtB,wBAAwB,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC/E,qBAAqB;AACrB,sBAAsB,IAAI,CAAC,CAAC,CAAC;AAC7B,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,OAAO,mBAAmB,CAAC;AACnC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,MAAM,CAAC,GAAG,UAAU,EAAE;AACjC,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC;AAC5C,QAAQ,MAAM,UAAU,IAAI,EAAE,GAAG,cAAc,IAAI,CAAC;AACpD,aAAa;AACb,YAAY,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/G,YAAY,EAAE,CAAC,CAAC;AAChB,QAAQ,OAAO,UAAU,CAAC;AAC1B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@actions/github/node_modules/@octokit/core/package.json b/node_modules/@actions/github/node_modules/@octokit/core/package.json new file mode 100644 index 0000000..548e76c --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/core/package.json @@ -0,0 +1,57 @@ +{ + "name": "@octokit/core", + "description": "Extendable client for GitHub's REST & GraphQL APIs", + "version": "3.6.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "github:octokit/core.js", + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/auth": "^3.0.1", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^27.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^14.0.4", + "fetch-mock": "^9.0.0", + "http-proxy-agent": "^5.0.0", + "jest": "^27.0.0", + "lolex": "^6.0.0", + "prettier": "2.4.1", + "proxy": "^1.0.1", + "semantic-release": "^18.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^27.0.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/LICENSE b/node_modules/@actions/github/node_modules/@octokit/graphql/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@actions/github/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/@actions/github/node_modules/@octokit/graphql/README.md b/node_modules/@actions/github/node_modules/@octokit/graphql/README.md new file mode 100644 index 0000000..fe7881c --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/README.md @@ -0,0 +1,409 @@ +# 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://github.com/octokit/graphql.js/workflows/Test/badge.svg)](https://github.com/octokit/graphql.js/actions?query=workflow%3ATest+branch%3Amaster) + + + +- [Usage](#usage) + - [Send a simple query](#send-a-simple-query) + - [Authentication](#authentication) + - [Variables](#variables) + - [Pass query together with headers and variables](#pass-query-together-with-headers-and-variables) + - [Use with GitHub Enterprise](#use-with-github-enterprise) + - [Use custom `@octokit/request` instance](#use-custom-octokitrequest-instance) +- [TypeScript](#typescript) + - [Additional Types](#additional-types) +- [Errors](#errors) +- [Partial responses](#partial-responses) +- [Writing tests](#writing-tests) +- [License](#license) + + + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/graphql` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+Node + + +Install with npm install @octokit/graphql + +```js +const { graphql } = require("@octokit/graphql"); +// or: import { graphql } from "@octokit/graphql"; +``` + +
+ +### Send a simple query + +```js +const { repository } = await graphql( + ` + { + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } + `, + { + headers: { + authorization: `token secret123`, + }, + } +); +``` + +### Authentication + +The simplest way to authenticate a request is to set the `Authorization` header, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const graphqlWithAuth = graphql.defaults({ + headers: { + authorization: `token secret123`, + }, +}); +const { repository } = await graphqlWithAuth(` + { + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } +`); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + id: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const graphqlWithAuth = graphql.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { repository } = await graphqlWithAuth( + `{ + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + }` +); +``` + +### Variables + +⚠️ 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 { 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`, + }, + } +); +``` + +### 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 +let { graphql } = require("@octokit/graphql"); +graphql = 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 + } + } + } + } + } +`); +``` + +### Use custom `@octokit/request` instance + +```js +const { request } = require("@octokit/request"); +const { withCustomRequest } = require("@octokit/graphql"); + +let requestCounter = 0; +const myRequest = request.defaults({ + headers: { + authentication: "token secret123", + }, + request: { + hook(request, options) { + requestCounter++; + return request(options); + }, + }, +}); +const myGraphql = withCustomRequest(myRequest); +await request("/"); +await myGraphql(` + { + repository(owner: "acme-project", name: "acme-repo") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } +`); +// requestCounter is now 2 +``` + +## TypeScript + +`@octokit/graphql` is exposing proper types for its usage with TypeScript projects. + +### Additional Types + +Additionally, `GraphQlQueryResponseData` has been exposed to users: + +```ts +import type { GraphQlQueryResponseData } from "@octokit/graphql"; +``` + +## Errors + +In case of a GraphQL error, `error.message` is set to a combined message describing all errors returned by the endpoint. +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 +let { graphql, GraphqlResponseError } = require("@octokit/graphql"); +graphqlt = graphql.defaults({ + headers: { + authorization: `token secret123`, + }, +}); +const query = `{ + viewer { + bioHtml + } +}`; + +try { + const result = await graphql(query); +} catch (error) { + if (error instanceof GraphqlResponseError) { + // do something with the error, allowing you to detect a graphql response error, + // compared to accidentally catching unrelated errors. + + // server responds with an object like the following (as an example) + // class GraphqlResponseError { + // "headers": { + // "status": "403", + // }, + // "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' + } else { + // handle non-GraphQL error + } +} +``` + +## 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 +let { graphql } = require("@octokit/graphql"); +graphql = 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/@actions/github/node_modules/@octokit/graphql/dist-node/index.js b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js new file mode 100644 index 0000000..6401417 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js @@ -0,0 +1,118 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var request = require('@octokit/request'); +var universalUserAgent = require('universal-user-agent'); + +const VERSION = "4.8.0"; + +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors:\n` + data.errors.map(e => ` - ${e.message}`).join("\n"); +} + +class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; // Expose the errors and response data in their shorthand properties. + + this.errors = response.errors; + this.data = response.data; // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + +} + +const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } + } + + const parsedOptions = typeof query === "string" ? Object.assign({ + query + }, options) : query; + const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + + if (!result.variables) { + result.variables = {}; + } + + result.variables[key] = parsedOptions[key]; + return result; + }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix + // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 + + const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; + + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + + return request(requestOptions).then(response => { + if (response.data.errors) { + const headers = {}; + + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + + throw new GraphqlResponseError(requestOptions, headers, response.data); + } + + return response.data.data; + }); +} + +function withDefaults(request$1, newDefaults) { + const newRequest = request$1.defaults(newDefaults); + + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: request.request.endpoint + }); +} + +const graphql$1 = withDefaults(request.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} + +exports.GraphqlResponseError = GraphqlResponseError; +exports.graphql = graphql$1; +exports.withCustomRequest = withCustomRequest; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js.map b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js.map new file mode 100644 index 0000000..873a8d4 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/error.js","../dist-src/graphql.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.8.0\";\n","function _buildMessageForResponseErrors(data) {\n return (`Request failed due to following response errors:\\n` +\n data.errors.map((e) => ` - ${e.message}`).join(\"\\n\"));\n}\nexport class GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n // Expose the errors and response data in their shorthand properties.\n this.errors = response.errors;\n this.data = response.data;\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { GraphqlResponseError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nexport function graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n return response.data.data;\n });\n}\n","import { request as Request } from \"@octokit/request\";\nimport { graphql } from \"./graphql\";\nexport function withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: Request.endpoint,\n });\n}\n","import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport { withDefaults } from \"./with-defaults\";\nexport const graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,\n },\n method: \"POST\",\n url: \"/graphql\",\n});\nexport { GraphqlResponseError } from \"./error\";\nexport function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\",\n });\n}\n"],"names":["VERSION","_buildMessageForResponseErrors","data","errors","map","e","message","join","GraphqlResponseError","Error","constructor","request","headers","response","name","captureStackTrace","NON_VARIABLE_OPTIONS","FORBIDDEN_VARIABLE_OPTIONS","GHES_V3_SUFFIX_REGEX","graphql","query","options","Promise","reject","key","includes","parsedOptions","Object","assign","requestOptions","keys","reduce","result","variables","baseUrl","endpoint","DEFAULTS","test","url","replace","then","withDefaults","newDefaults","newRequest","defaults","newApi","bind","Request","getUserAgent","method","withCustomRequest","customRequest"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAP,SAASC,8BAAT,CAAwCC,IAAxC,EAA8C;AAC1C,SAAS,oDAAD,GACJA,IAAI,CAACC,MAAL,CAAYC,GAAZ,CAAiBC,CAAD,IAAQ,MAAKA,CAAC,CAACC,OAAQ,EAAvC,EAA0CC,IAA1C,CAA+C,IAA/C,CADJ;AAEH;;AACD,AAAO,MAAMC,oBAAN,SAAmCC,KAAnC,CAAyC;AAC5CC,EAAAA,WAAW,CAACC,OAAD,EAAUC,OAAV,EAAmBC,QAAnB,EAA6B;AACpC,UAAMZ,8BAA8B,CAACY,QAAD,CAApC;AACA,SAAKF,OAAL,GAAeA,OAAf;AACA,SAAKC,OAAL,GAAeA,OAAf;AACA,SAAKC,QAAL,GAAgBA,QAAhB;AACA,SAAKC,IAAL,GAAY,sBAAZ,CALoC;;AAOpC,SAAKX,MAAL,GAAcU,QAAQ,CAACV,MAAvB;AACA,SAAKD,IAAL,GAAYW,QAAQ,CAACX,IAArB,CARoC;;AAUpC;;AACA,QAAIO,KAAK,CAACM,iBAAV,EAA6B;AACzBN,MAAAA,KAAK,CAACM,iBAAN,CAAwB,IAAxB,EAA8B,KAAKL,WAAnC;AACH;AACJ;;AAf2C;;ACHhD,MAAMM,oBAAoB,GAAG,CACzB,QADyB,EAEzB,SAFyB,EAGzB,KAHyB,EAIzB,SAJyB,EAKzB,SALyB,EAMzB,OANyB,EAOzB,WAPyB,CAA7B;AASA,MAAMC,0BAA0B,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,KAApB,CAAnC;AACA,MAAMC,oBAAoB,GAAG,eAA7B;AACA,AAAO,SAASC,OAAT,CAAiBR,OAAjB,EAA0BS,KAA1B,EAAiCC,OAAjC,EAA0C;AAC7C,MAAIA,OAAJ,EAAa;AACT,QAAI,OAAOD,KAAP,KAAiB,QAAjB,IAA6B,WAAWC,OAA5C,EAAqD;AACjD,aAAOC,OAAO,CAACC,MAAR,CAAe,IAAId,KAAJ,CAAW,4DAAX,CAAf,CAAP;AACH;;AACD,SAAK,MAAMe,GAAX,IAAkBH,OAAlB,EAA2B;AACvB,UAAI,CAACJ,0BAA0B,CAACQ,QAA3B,CAAoCD,GAApC,CAAL,EACI;AACJ,aAAOF,OAAO,CAACC,MAAR,CAAe,IAAId,KAAJ,CAAW,uBAAsBe,GAAI,mCAArC,CAAf,CAAP;AACH;AACJ;;AACD,QAAME,aAAa,GAAG,OAAON,KAAP,KAAiB,QAAjB,GAA4BO,MAAM,CAACC,MAAP,CAAc;AAAER,IAAAA;AAAF,GAAd,EAAyBC,OAAzB,CAA5B,GAAgED,KAAtF;AACA,QAAMS,cAAc,GAAGF,MAAM,CAACG,IAAP,CAAYJ,aAAZ,EAA2BK,MAA3B,CAAkC,CAACC,MAAD,EAASR,GAAT,KAAiB;AACtE,QAAIR,oBAAoB,CAACS,QAArB,CAA8BD,GAA9B,CAAJ,EAAwC;AACpCQ,MAAAA,MAAM,CAACR,GAAD,CAAN,GAAcE,aAAa,CAACF,GAAD,CAA3B;AACA,aAAOQ,MAAP;AACH;;AACD,QAAI,CAACA,MAAM,CAACC,SAAZ,EAAuB;AACnBD,MAAAA,MAAM,CAACC,SAAP,GAAmB,EAAnB;AACH;;AACDD,IAAAA,MAAM,CAACC,SAAP,CAAiBT,GAAjB,IAAwBE,aAAa,CAACF,GAAD,CAArC;AACA,WAAOQ,MAAP;AACH,GAVsB,EAUpB,EAVoB,CAAvB,CAZ6C;AAwB7C;;AACA,QAAME,OAAO,GAAGR,aAAa,CAACQ,OAAd,IAAyBvB,OAAO,CAACwB,QAAR,CAAiBC,QAAjB,CAA0BF,OAAnE;;AACA,MAAIhB,oBAAoB,CAACmB,IAArB,CAA0BH,OAA1B,CAAJ,EAAwC;AACpCL,IAAAA,cAAc,CAACS,GAAf,GAAqBJ,OAAO,CAACK,OAAR,CAAgBrB,oBAAhB,EAAsC,cAAtC,CAArB;AACH;;AACD,SAAOP,OAAO,CAACkB,cAAD,CAAP,CAAwBW,IAAxB,CAA8B3B,QAAD,IAAc;AAC9C,QAAIA,QAAQ,CAACX,IAAT,CAAcC,MAAlB,EAA0B;AACtB,YAAMS,OAAO,GAAG,EAAhB;;AACA,WAAK,MAAMY,GAAX,IAAkBG,MAAM,CAACG,IAAP,CAAYjB,QAAQ,CAACD,OAArB,CAAlB,EAAiD;AAC7CA,QAAAA,OAAO,CAACY,GAAD,CAAP,GAAeX,QAAQ,CAACD,OAAT,CAAiBY,GAAjB,CAAf;AACH;;AACD,YAAM,IAAIhB,oBAAJ,CAAyBqB,cAAzB,EAAyCjB,OAAzC,EAAkDC,QAAQ,CAACX,IAA3D,CAAN;AACH;;AACD,WAAOW,QAAQ,CAACX,IAAT,CAAcA,IAArB;AACH,GATM,CAAP;AAUH;;ACjDM,SAASuC,YAAT,CAAsB9B,SAAtB,EAA+B+B,WAA/B,EAA4C;AAC/C,QAAMC,UAAU,GAAGhC,SAAO,CAACiC,QAAR,CAAiBF,WAAjB,CAAnB;;AACA,QAAMG,MAAM,GAAG,CAACzB,KAAD,EAAQC,OAAR,KAAoB;AAC/B,WAAOF,OAAO,CAACwB,UAAD,EAAavB,KAAb,EAAoBC,OAApB,CAAd;AACH,GAFD;;AAGA,SAAOM,MAAM,CAACC,MAAP,CAAciB,MAAd,EAAsB;AACzBD,IAAAA,QAAQ,EAAEH,YAAY,CAACK,IAAb,CAAkB,IAAlB,EAAwBH,UAAxB,CADe;AAEzBR,IAAAA,QAAQ,EAAEY,eAAO,CAACZ;AAFO,GAAtB,CAAP;AAIH;;MCPYhB,SAAO,GAAGsB,YAAY,CAAC9B,eAAD,EAAU;AACzCC,EAAAA,OAAO,EAAE;AACL,kBAAe,sBAAqBZ,OAAQ,IAAGgD,+BAAY,EAAG;AADzD,GADgC;AAIzCC,EAAAA,MAAM,EAAE,MAJiC;AAKzCX,EAAAA,GAAG,EAAE;AALoC,CAAV,CAA5B;AAOP,AACO,SAASY,iBAAT,CAA2BC,aAA3B,EAA0C;AAC7C,SAAOV,YAAY,CAACU,aAAD,EAAgB;AAC/BF,IAAAA,MAAM,EAAE,MADuB;AAE/BX,IAAAA,GAAG,EAAE;AAF0B,GAAhB,CAAnB;AAIH;;;;;;"} \ No newline at end of file diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/error.js b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/error.js new file mode 100644 index 0000000..182f967 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/error.js @@ -0,0 +1,21 @@ +function _buildMessageForResponseErrors(data) { + return (`Request failed due to following response errors:\n` + + data.errors.map((e) => ` - ${e.message}`).join("\n")); +} +export class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + // Expose the errors and response data in their shorthand properties. + this.errors = response.errors; + this.data = response.data; + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } +} diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/graphql.js b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/graphql.js new file mode 100644 index 0000000..8297f84 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/graphql.js @@ -0,0 +1,52 @@ +import { GraphqlResponseError } from "./error"; +const NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType", +]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +export function graphql(request, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix + // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 + const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError(requestOptions, headers, response.data); + } + return response.data.data; + }); +} diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/index.js b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/index.js new file mode 100644 index 0000000..2a7d06b --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/index.js @@ -0,0 +1,18 @@ +import { request } from "@octokit/request"; +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +import { withDefaults } from "./with-defaults"; +export const graphql = withDefaults(request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`, + }, + method: "POST", + url: "/graphql", +}); +export { GraphqlResponseError } from "./error"; +export function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql", + }); +} diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/types.js b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/version.js b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/version.js new file mode 100644 index 0000000..3a4f8ff --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "4.8.0"; diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/with-defaults.js b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/with-defaults.js new file mode 100644 index 0000000..6ea309e --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-src/with-defaults.js @@ -0,0 +1,12 @@ +import { request as Request } from "@octokit/request"; +import { graphql } from "./graphql"; +export function withDefaults(request, newDefaults) { + const newRequest = request.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: Request.endpoint, + }); +} diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/error.d.ts b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/error.d.ts new file mode 100644 index 0000000..3bd37ad --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/error.d.ts @@ -0,0 +1,13 @@ +import { ResponseHeaders } from "@octokit/types"; +import { GraphQlEndpointOptions, GraphQlQueryResponse } from "./types"; +declare type ServerResponseData = Required>; +export declare class GraphqlResponseError extends Error { + readonly request: GraphQlEndpointOptions; + readonly headers: ResponseHeaders; + readonly response: ServerResponseData; + name: string; + readonly errors: GraphQlQueryResponse["errors"]; + readonly data: ResponseData; + constructor(request: GraphQlEndpointOptions, headers: ResponseHeaders, response: ServerResponseData); +} +export {}; diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/graphql.d.ts b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/graphql.d.ts new file mode 100644 index 0000000..2942b8b --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/graphql.d.ts @@ -0,0 +1,3 @@ +import { request as Request } from "@octokit/request"; +import { RequestParameters, GraphQlQueryResponseData } from "./types"; +export declare function graphql(request: typeof Request, query: string | RequestParameters, options?: RequestParameters): Promise; diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/index.d.ts b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/index.d.ts new file mode 100644 index 0000000..282f98a --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/index.d.ts @@ -0,0 +1,5 @@ +import { request } from "@octokit/request"; +export declare const graphql: import("./types").graphql; +export { GraphQlQueryResponseData } from "./types"; +export { GraphqlResponseError } from "./error"; +export declare function withCustomRequest(customRequest: typeof request): import("./types").graphql; diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/types.d.ts b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/types.d.ts new file mode 100644 index 0000000..b266bdb --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/types.d.ts @@ -0,0 +1,55 @@ +import { EndpointOptions, RequestParameters as RequestParametersType, EndpointInterface } from "@octokit/types"; +export declare type GraphQlEndpointOptions = EndpointOptions & { + variables?: { + [key: string]: unknown; + }; +}; +export declare type RequestParameters = RequestParametersType; +export declare type Query = string; +export interface graphql { + /** + * Sends a GraphQL query request based on endpoint options + * The GraphQL query must be specified in `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: RequestParameters): GraphQlResponse; + /** + * Sends a GraphQL query request based on endpoint options + * + * @param {string} query GraphQL query. Example: `'query { viewer { login } }'`. + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (query: Query, parameters?: RequestParameters): GraphQlResponse; + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: RequestParameters) => graphql; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} +export declare type GraphQlResponse = Promise; +export declare type GraphQlQueryResponseData = { + [key: string]: any; +}; +export declare type GraphQlQueryResponse = { + data: ResponseData; + errors?: [ + { + type: string; + message: string; + path: [string]; + extensions: { + [key: string]: any; + }; + locations: [ + { + line: number; + column: number; + } + ]; + } + ]; +}; diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/version.d.ts b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/version.d.ts new file mode 100644 index 0000000..e80848e --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "4.8.0"; diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..03edc32 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts @@ -0,0 +1,3 @@ +import { request as Request } from "@octokit/request"; +import { graphql as ApiInterface, RequestParameters } from "./types"; +export declare function withDefaults(request: typeof Request, newDefaults: RequestParameters): ApiInterface; diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-web/index.js b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-web/index.js new file mode 100644 index 0000000..5307e26 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-web/index.js @@ -0,0 +1,106 @@ +import { request } from '@octokit/request'; +import { getUserAgent } from 'universal-user-agent'; + +const VERSION = "4.8.0"; + +function _buildMessageForResponseErrors(data) { + return (`Request failed due to following response errors:\n` + + data.errors.map((e) => ` - ${e.message}`).join("\n")); +} +class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + // Expose the errors and response data in their shorthand properties. + this.errors = response.errors; + this.data = response.data; + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } +} + +const NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType", +]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix + // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 + const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError(requestOptions, headers, response.data); + } + return response.data.data; + }); +} + +function withDefaults(request$1, newDefaults) { + const newRequest = request$1.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: request.endpoint, + }); +} + +const graphql$1 = withDefaults(request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`, + }, + method: "POST", + url: "/graphql", +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql", + }); +} + +export { GraphqlResponseError, graphql$1 as graphql, withCustomRequest }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/dist-web/index.js.map b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-web/index.js.map new file mode 100644 index 0000000..3c6a6ed --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/error.js","../dist-src/graphql.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.8.0\";\n","function _buildMessageForResponseErrors(data) {\n return (`Request failed due to following response errors:\\n` +\n data.errors.map((e) => ` - ${e.message}`).join(\"\\n\"));\n}\nexport class GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n // Expose the errors and response data in their shorthand properties.\n this.errors = response.errors;\n this.data = response.data;\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { GraphqlResponseError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nexport function graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n return response.data.data;\n });\n}\n","import { request as Request } from \"@octokit/request\";\nimport { graphql } from \"./graphql\";\nexport function withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: Request.endpoint,\n });\n}\n","import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport { withDefaults } from \"./with-defaults\";\nexport const graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,\n },\n method: \"POST\",\n url: \"/graphql\",\n});\nexport { GraphqlResponseError } from \"./error\";\nexport function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\",\n });\n}\n"],"names":["request","Request","graphql"],"mappings":";;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C,SAAS,8BAA8B,CAAC,IAAI,EAAE;AAC9C,IAAI,QAAQ,CAAC,kDAAkD,CAAC;AAChE,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAC9D,CAAC;AACD,AAAO,MAAM,oBAAoB,SAAS,KAAK,CAAC;AAChD,IAAI,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC5C,QAAQ,KAAK,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxD,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACjC,QAAQ,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;AAC3C;AACA,QAAQ,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACtC,QAAQ,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;AAClC;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,KAAK;AACL,CAAC;;ACnBD,MAAM,oBAAoB,GAAG;AAC7B,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,OAAO;AACX,IAAI,WAAW;AACf,CAAC,CAAC;AACF,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9D,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAC7C,AAAO,SAAS,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;AACjD,IAAI,IAAI,OAAO,EAAE;AACjB,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,OAAO,EAAE;AAC7D,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,0DAA0D,CAAC,CAAC,CAAC,CAAC;AAC3G,SAAS;AACT,QAAQ,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzD,gBAAgB,SAAS;AACzB,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,oBAAoB,EAAE,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC;AAC5G,SAAS;AACT,KAAK;AACL,IAAI,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;AAChG,IAAI,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AAC9E,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAChD,YAAY,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AAC7C,YAAY,OAAO,MAAM,CAAC;AAC1B,SAAS;AACT,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AAC/B,YAAY,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;AAClC,SAAS;AACT,QAAQ,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AACnD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;AACA;AACA,IAAI,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/E,IAAI,IAAI,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACnF,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK;AACtD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE;AAClC,YAAY,MAAM,OAAO,GAAG,EAAE,CAAC;AAC/B,YAAY,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;AAC7D,gBAAgB,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACrD,aAAa;AACb,YAAY,MAAM,IAAI,oBAAoB,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnF,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;AAClC,KAAK,CAAC,CAAC;AACP,CAAC;;ACjDM,SAAS,YAAY,CAACA,SAAO,EAAE,WAAW,EAAE;AACnD,IAAI,MAAM,UAAU,GAAGA,SAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK;AACvC,QAAQ,OAAO,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACnD,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;AACrD,QAAQ,QAAQ,EAAEC,OAAO,CAAC,QAAQ;AAClC,KAAK,CAAC,CAAC;AACP,CAAC;;ACPW,MAACC,SAAO,GAAG,YAAY,CAAC,OAAO,EAAE;AAC7C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,IAAI,MAAM,EAAE,MAAM;AAClB,IAAI,GAAG,EAAE,UAAU;AACnB,CAAC,CAAC,CAAC;AACH,AACO,SAAS,iBAAiB,CAAC,aAAa,EAAE;AACjD,IAAI,OAAO,YAAY,CAAC,aAAa,EAAE;AACvC,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,GAAG,EAAE,UAAU;AACvB,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@actions/github/node_modules/@octokit/graphql/package.json b/node_modules/@actions/github/node_modules/@octokit/graphql/package.json new file mode 100644 index 0000000..9ba3cb7 --- /dev/null +++ b/node_modules/@actions/github/node_modules/@octokit/graphql/package.json @@ -0,0 +1,47 @@ +{ + "name": "@octokit/graphql", + "description": "GitHub GraphQL API client for browsers and Node", + "version": "4.8.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "graphql" + ], + "repository": "github:octokit/graphql.js", + "dependencies": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.2.5", + "@types/jest": "^27.0.0", + "@types/node": "^14.0.4", + "fetch-mock": "^9.0.0", + "jest": "^27.0.0", + "prettier": "2.3.2", + "semantic-release": "^17.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.0" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@actions/github/package.json b/node_modules/@actions/github/package.json index bb2cebe..3bcbe30 100644 --- a/node_modules/@actions/github/package.json +++ b/node_modules/@actions/github/package.json @@ -1,45 +1,15 @@ { - "_from": "@actions/github", - "_id": "@actions/github@4.0.0", - "_inBundle": false, - "_integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", - "_location": "/@actions/github", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "@actions/github", - "name": "@actions/github", - "escapedName": "@actions%2fgithub", - "scope": "@actions", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", - "_shasum": "d520483151a2bf5d2dc9cd0f20f9ac3a2e458816", - "_spec": "@actions/github", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@actions/http-client": "^1.0.8", - "@octokit/core": "^3.0.0", - "@octokit/plugin-paginate-rest": "^2.2.3", - "@octokit/plugin-rest-endpoint-methods": "^4.0.0" - }, - "deprecated": false, + "name": "@actions/github", + "version": "5.1.1", "description": "Actions github lib", - "devDependencies": { - "jest": "^25.1.0", - "proxy": "^1.0.1" - }, + "keywords": [ + "github", + "actions" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/github", + "license": "MIT", + "main": "lib/github.js", + "types": "lib/github.d.ts", "directories": { "lib": "lib", "test": "__tests__" @@ -48,14 +18,6 @@ "lib", "!.DS_Store" ], - "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" }, @@ -65,13 +27,23 @@ "directory": "packages/github" }, "scripts": { - "audit-moderate": "npm install && npm audit --audit-level=moderate", + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "jest", "build": "tsc", "format": "prettier --write **/*.ts", "format-check": "prettier --check **/*.ts", - "test": "jest", "tsc": "tsc" }, - "types": "lib/github.d.ts", - "version": "4.0.0" + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" + }, + "devDependencies": { + "proxy": "^1.0.2" + } } diff --git a/node_modules/@actions/http-client/README.md b/node_modules/@actions/http-client/README.md index be61eb3..7e06ade 100644 --- a/node_modules/@actions/http-client/README.md +++ b/node_modules/@actions/http-client/README.md @@ -1,18 +1,11 @@ +# `@actions/http-client` -

- -

- -# Actions Http-Client - -[![Http Status](https://github.com/actions/http-client/workflows/http-tests/badge.svg)](https://github.com/actions/http-client/actions) - -A lightweight HTTP client optimized for use with actions, TypeScript with generics and async await. +A lightweight HTTP client optimized for building actions. ## Features - HTTP client with TypeScript generics and async/await/Promises - - Typings included so no need to acquire separately (great for intellisense and no versioning drift) + - Typings included! - [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner - Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+. - Basic, Bearer and PAT Support out of the box. Extensible handlers for others. @@ -28,7 +21,7 @@ npm install @actions/http-client --save ## Samples -See the [HTTP](./__tests__) tests for detailed examples. +See the [tests](./__tests__) for detailed examples. ## Errors @@ -39,13 +32,13 @@ The HTTP client does not throw unless truly exceptional. * A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. * Redirects (3xx) will be followed by default. -See [HTTP tests](./__tests__) for detailed examples. +See the [tests](./__tests__) for detailed examples. ## Debugging To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: -``` +```shell export NODE_DEBUG=http ``` @@ -63,17 +56,18 @@ We welcome PRs. Please create an issue and if applicable, a design before proce once: -```bash -$ npm install +``` +npm install ``` To build: -```bash -$ npm run build +``` +npm run build ``` To run all tests: -```bash -$ npm test + +``` +npm test ``` diff --git a/node_modules/@actions/http-client/RELEASES.md b/node_modules/@actions/http-client/RELEASES.md deleted file mode 100644 index 245477d..0000000 --- a/node_modules/@actions/http-client/RELEASES.md +++ /dev/null @@ -1,22 +0,0 @@ -## Releases - -## 1.0.9 -Throw HttpClientError instead of a generic Error from the \Json() helper methods when the server responds with a non-successful status code. - -## 1.0.8 -Fixed security issue where a redirect (e.g. 302) to another domain would pass headers. The fix was to strip the authorization header if the hostname was different. More [details in PR #27](https://github.com/actions/http-client/pull/27) - -## 1.0.7 -Update NPM dependencies and add 429 to the list of HttpCodes - -## 1.0.6 -Automatically sends Content-Type and Accept application/json headers for \Json() helper methods if not set in the client or parameters. - -## 1.0.5 -Adds \Json() helper methods for json over http scenarios. - -## 1.0.4 -Started to add \Json() helper methods. Do not use this release for that. Use >= 1.0.5 since there was an issue with types. - -## 1.0.1 to 1.0.3 -Adds proxy support. diff --git a/node_modules/@actions/http-client/actions.png b/node_modules/@actions/http-client/actions.png deleted file mode 100644 index 1857ef3..0000000 Binary files a/node_modules/@actions/http-client/actions.png and /dev/null differ diff --git a/node_modules/@actions/http-client/auth.d.ts b/node_modules/@actions/http-client/auth.d.ts deleted file mode 100644 index 1094189..0000000 --- a/node_modules/@actions/http-client/auth.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import ifm = require('./interfaces'); -export declare class BasicCredentialHandler implements ifm.IRequestHandler { - username: string; - password: string; - constructor(username: string, password: string); - prepareRequest(options: any): void; - canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; - handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; -} -export declare class BearerCredentialHandler implements ifm.IRequestHandler { - token: string; - constructor(token: string); - prepareRequest(options: any): void; - canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; - handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; -} -export declare class PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler { - token: string; - constructor(token: string); - prepareRequest(options: any): void; - canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; - handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; -} diff --git a/node_modules/@actions/http-client/auth.js b/node_modules/@actions/http-client/auth.js deleted file mode 100644 index 67a58aa..0000000 --- a/node_modules/@actions/http-client/auth.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - options.headers['Authorization'] = - 'Basic ' + - Buffer.from(this.username + ':' + this.password).toString('base64'); - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = 'Bearer ' + this.token; - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = - 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; diff --git a/node_modules/@actions/http-client/index.d.ts b/node_modules/@actions/http-client/index.d.ts deleted file mode 100644 index 9583dc7..0000000 --- a/node_modules/@actions/http-client/index.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -/// -import http = require('http'); -import ifm = require('./interfaces'); -export declare enum HttpCodes { - OK = 200, - MultipleChoices = 300, - MovedPermanently = 301, - ResourceMoved = 302, - SeeOther = 303, - NotModified = 304, - UseProxy = 305, - SwitchProxy = 306, - TemporaryRedirect = 307, - PermanentRedirect = 308, - BadRequest = 400, - Unauthorized = 401, - PaymentRequired = 402, - Forbidden = 403, - NotFound = 404, - MethodNotAllowed = 405, - NotAcceptable = 406, - ProxyAuthenticationRequired = 407, - RequestTimeout = 408, - Conflict = 409, - Gone = 410, - TooManyRequests = 429, - InternalServerError = 500, - NotImplemented = 501, - BadGateway = 502, - ServiceUnavailable = 503, - GatewayTimeout = 504 -} -export declare enum Headers { - Accept = "accept", - ContentType = "content-type" -} -export declare enum MediaTypes { - ApplicationJson = "application/json" -} -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -export declare function getProxyUrl(serverUrl: string): string; -export declare class HttpClientError extends Error { - constructor(message: string, statusCode: number); - statusCode: number; - result?: any; -} -export declare class HttpClientResponse implements ifm.IHttpClientResponse { - constructor(message: http.IncomingMessage); - message: http.IncomingMessage; - readBody(): Promise; -} -export declare function isHttps(requestUrl: string): boolean; -export declare class HttpClient { - userAgent: string | undefined; - handlers: ifm.IRequestHandler[]; - requestOptions: ifm.IRequestOptions; - private _ignoreSslError; - private _socketTimeout; - private _allowRedirects; - private _allowRedirectDowngrade; - private _maxRedirects; - private _allowRetries; - private _maxRetries; - private _agent; - private _proxyAgent; - private _keepAlive; - private _disposed; - constructor(userAgent?: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions); - options(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; - get(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; - del(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; - post(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; - patch(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; - put(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; - head(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; - sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: ifm.IHeaders): Promise; - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise>; - postJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; - putJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; - patchJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: ifm.IHeaders): Promise; - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose(): void; - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream): Promise; - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: ifm.IHttpClientResponse) => void): void; - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl: string): http.Agent; - private _prepareRequest; - private _mergeHeaders; - private _getExistingOrDefaultHeader; - private _getAgent; - private _performExponentialBackoff; - private static dateTimeDeserializer; - private _processResponse; -} diff --git a/node_modules/@actions/http-client/index.js b/node_modules/@actions/http-client/index.js deleted file mode 100644 index 5c54cf8..0000000 --- a/node_modules/@actions/http-client/index.js +++ /dev/null @@ -1,535 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const http = require("http"); -const https = require("https"); -const pm = require("./proxy"); -let tunnel; -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function getProxyUrl(serverUrl) { - let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return new Promise(async (resolve, reject) => { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - let parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - } - get(requestUrl, additionalHeaders) { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - } - del(requestUrl, additionalHeaders) { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - } - post(requestUrl, data, additionalHeaders) { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - } - patch(requestUrl, data, additionalHeaders) { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - } - put(requestUrl, data, additionalHeaders) { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - } - head(requestUrl, additionalHeaders) { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - async getJson(requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - let res = await this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async postJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async putJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async patchJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - async request(verb, requestUrl, data, headers) { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - let parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { - response = await this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - let parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol == 'https:' && - parsedUrl.protocol != parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - await response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (let header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = await this.requestRaw(info, data); - redirectsRemaining--; - } - if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - await response.readBody(); - await this._performExponentialBackoff(numTries); - } - } - return response; - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return new Promise((resolve, reject) => { - let callbackForResult = function (err, res) { - if (err) { - reject(err); - } - resolve(res); - }; - this.requestRawWithCallback(info, data, callbackForResult); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - let socket; - if (typeof data === 'string') { - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - let handleResult = (err, res) => { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - }; - let req = info.httpModule.request(info.options, (msg) => { - let res = new HttpClientResponse(msg); - handleResult(null, res); - }); - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error('Request timeout: ' + info.options.path), null); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err, null); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - let parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - this.handlers.forEach(handler => { - handler.prepareRequest(info.options); - }); - } - return info; - } - _mergeHeaders(headers) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - let proxyUrl = pm.getProxyUrl(parsedUrl); - let useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (!!agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (!!this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (useProxy) { - // If using proxy, need tunnel - if (!tunnel) { - tunnel = require('tunnel'); - } - const agentOptions = { - maxSockets: maxSockets, - keepAlive: this._keepAlive, - proxy: { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`, - host: proxyUrl.hostname, - port: proxyUrl.port - } - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - } - static dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - let a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - async _processResponse(res, options) { - return new Promise(async (resolve, reject) => { - const statusCode = res.message.statusCode; - const response = { - statusCode: statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode == HttpCodes.NotFound) { - resolve(response); - } - let obj; - let contents; - // get the result from the body - try { - contents = await res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = 'Failed request: (' + statusCode + ')'; - } - let err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - }); - } -} -exports.HttpClient = HttpClient; diff --git a/node_modules/@actions/http-client/interfaces.d.ts b/node_modules/@actions/http-client/interfaces.d.ts deleted file mode 100644 index 78bd85b..0000000 --- a/node_modules/@actions/http-client/interfaces.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/// -import http = require('http'); -export interface IHeaders { - [key: string]: any; -} -export interface IHttpClient { - options(requestUrl: string, additionalHeaders?: IHeaders): Promise; - get(requestUrl: string, additionalHeaders?: IHeaders): Promise; - del(requestUrl: string, additionalHeaders?: IHeaders): Promise; - post(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; - patch(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; - put(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; - sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: IHeaders): Promise; - request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: IHeaders): Promise; - requestRaw(info: IRequestInfo, data: string | NodeJS.ReadableStream): Promise; - requestRawWithCallback(info: IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: IHttpClientResponse) => void): void; -} -export interface IRequestHandler { - prepareRequest(options: http.RequestOptions): void; - canHandleAuthentication(response: IHttpClientResponse): boolean; - handleAuthentication(httpClient: IHttpClient, requestInfo: IRequestInfo, objs: any): Promise; -} -export interface IHttpClientResponse { - message: http.IncomingMessage; - readBody(): Promise; -} -export interface IRequestInfo { - options: http.RequestOptions; - parsedUrl: URL; - httpModule: any; -} -export interface IRequestOptions { - headers?: IHeaders; - socketTimeout?: number; - ignoreSslError?: boolean; - allowRedirects?: boolean; - allowRedirectDowngrade?: boolean; - maxRedirects?: number; - maxSockets?: number; - keepAlive?: boolean; - deserializeDates?: boolean; - allowRetries?: boolean; - maxRetries?: number; -} -export interface ITypedResponse { - statusCode: number; - result: T | null; - headers: Object; -} diff --git a/node_modules/@actions/http-client/interfaces.js b/node_modules/@actions/http-client/interfaces.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@actions/http-client/interfaces.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.d.ts b/node_modules/@actions/http-client/lib/auth.d.ts similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.d.ts rename to node_modules/@actions/http-client/lib/auth.d.ts diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js b/node_modules/@actions/http-client/lib/auth.js similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js rename to node_modules/@actions/http-client/lib/auth.js diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js.map b/node_modules/@actions/http-client/lib/auth.js.map similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js.map rename to node_modules/@actions/http-client/lib/auth.js.map diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/index.d.ts b/node_modules/@actions/http-client/lib/index.d.ts similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/index.d.ts rename to node_modules/@actions/http-client/lib/index.d.ts diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js b/node_modules/@actions/http-client/lib/index.js similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js rename to node_modules/@actions/http-client/lib/index.js diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js.map b/node_modules/@actions/http-client/lib/index.js.map similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js.map rename to node_modules/@actions/http-client/lib/index.js.map diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/interfaces.d.ts b/node_modules/@actions/http-client/lib/interfaces.d.ts similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/interfaces.d.ts rename to node_modules/@actions/http-client/lib/interfaces.d.ts diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/interfaces.js b/node_modules/@actions/http-client/lib/interfaces.js similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/interfaces.js rename to node_modules/@actions/http-client/lib/interfaces.js diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/interfaces.js.map b/node_modules/@actions/http-client/lib/interfaces.js.map similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/interfaces.js.map rename to node_modules/@actions/http-client/lib/interfaces.js.map diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.d.ts b/node_modules/@actions/http-client/lib/proxy.d.ts similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.d.ts rename to node_modules/@actions/http-client/lib/proxy.d.ts diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js b/node_modules/@actions/http-client/lib/proxy.js similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js rename to node_modules/@actions/http-client/lib/proxy.js diff --git a/node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js.map b/node_modules/@actions/http-client/lib/proxy.js.map similarity index 100% rename from node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js.map rename to node_modules/@actions/http-client/lib/proxy.js.map diff --git a/node_modules/@actions/http-client/package.json b/node_modules/@actions/http-client/package.json index fdd8401..c1de221 100644 --- a/node_modules/@actions/http-client/package.json +++ b/node_modules/@actions/http-client/package.json @@ -1,67 +1,48 @@ { - "_from": "@actions/http-client@^1.0.8", - "_id": "@actions/http-client@1.0.9", - "_inBundle": false, - "_integrity": "sha512-0O4SsJ7q+MK0ycvXPl2e6bMXV7dxAXOGjrXS1eTF9s2S401Tp6c/P3c3Joz04QefC1J6Gt942Wl2jbm3f4mLcg==", - "_location": "/@actions/http-client", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@actions/http-client@^1.0.8", - "name": "@actions/http-client", - "escapedName": "@actions%2fhttp-client", - "scope": "@actions", - "rawSpec": "^1.0.8", - "saveSpec": null, - "fetchSpec": "^1.0.8" - }, - "_requiredBy": [ - "/@actions/github" - ], - "_resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.9.tgz", - "_shasum": "af1947d020043dbc6a3b4c5918892095c30ffb52", - "_spec": "@actions/http-client@^1.0.8", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@actions\\github", - "author": { - "name": "GitHub, Inc." - }, - "bugs": { - "url": "https://github.com/actions/http-client/issues" - }, - "bundleDependencies": false, - "dependencies": { - "tunnel": "0.0.6" - }, - "deprecated": false, + "name": "@actions/http-client", + "version": "2.0.1", "description": "Actions Http Client", - "devDependencies": { - "@types/jest": "^25.1.4", - "@types/node": "^12.12.31", - "jest": "^25.1.0", - "prettier": "^2.0.4", - "proxy": "^1.0.1", - "ts-jest": "^25.2.1", - "typescript": "^3.8.3" - }, - "homepage": "https://github.com/actions/http-client#readme", "keywords": [ - "Actions", - "Http" + "github", + "actions", + "http" ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client", "license": "MIT", - "main": "index.js", - "name": "@actions/http-client", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", - "url": "git+https://github.com/actions/http-client.git" + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/http-client" }, "scripts": { - "audit-check": "npm audit --audit-level=moderate", - "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out", - "format": "prettier --write *.ts && prettier --write **/*.ts", - "format-check": "prettier --check *.ts && prettier --check **/*.ts", - "test": "jest" + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "echo \"Error: run tests from root\" && exit 1", + "build": "tsc", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", + "tsc": "tsc" }, - "version": "1.0.9" + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "devDependencies": { + "@types/tunnel": "0.0.3", + "proxy": "^1.0.1" + }, + "dependencies": { + "tunnel": "^0.0.6" + } } diff --git a/node_modules/@actions/http-client/proxy.d.ts b/node_modules/@actions/http-client/proxy.d.ts deleted file mode 100644 index 4599865..0000000 --- a/node_modules/@actions/http-client/proxy.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function getProxyUrl(reqUrl: URL): URL | undefined; -export declare function checkBypass(reqUrl: URL): boolean; diff --git a/node_modules/@actions/http-client/proxy.js b/node_modules/@actions/http-client/proxy.js deleted file mode 100644 index 88f00ec..0000000 --- a/node_modules/@actions/http-client/proxy.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function getProxyUrl(reqUrl) { - let usingSsl = reqUrl.protocol === 'https:'; - let proxyUrl; - if (checkBypass(reqUrl)) { - return proxyUrl; - } - let proxyVar; - if (usingSsl) { - proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - if (proxyVar) { - proxyUrl = new URL(proxyVar); - } - return proxyUrl; -} -exports.getProxyUrl = getProxyUrl; -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - let upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (let upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { - return true; - } - } - return false; -} -exports.checkBypass = checkBypass; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/LICENSE b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/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/auth-action/node_modules/@octokit/auth-token/README.md b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/README.md new file mode 100644 index 0000000..2e48b73 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/README.md @@ -0,0 +1,285 @@ +# auth-token.js + +> GitHub API token authentication for browsers and Node.js + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-token.svg)](https://www.npmjs.com/package/@octokit/auth-token) +[![Build Status](https://github.com/octokit/auth-token.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-token.js/actions?query=workflow%3ATest) + +`@octokit/auth-token` is the simplest of [GitHub’s authentication strategies](https://github.com/octokit/auth.js). + +It is useful if you want to support multiple authentication strategies, as it’s API is compatible with its sibling packages for [basic](https://github.com/octokit/auth-basic.js), [GitHub App](https://github.com/octokit/auth-app.js) and [OAuth app](https://github.com/octokit/auth.js) authentication. + + + +- [Usage](#usage) +- [`createTokenAuth(token) options`](#createtokenauthtoken-options) +- [`auth()`](#auth) +- [Authentication object](#authentication-object) +- [`auth.hook(request, route, options)` or `auth.hook(request, options)`](#authhookrequest-route-options-or-authhookrequest-options) +- [Find more information](#find-more-information) + - [Find out what scopes are enabled for oauth tokens](#find-out-what-scopes-are-enabled-for-oauth-tokens) + - [Find out if token is a personal access token or if it belongs to an OAuth app](#find-out-if-token-is-a-personal-access-token-or-if-it-belongs-to-an-oauth-app) + - [Find out what permissions are enabled for a repository](#find-out-what-permissions-are-enabled-for-a-repository) + - [Use token for git operations](#use-token-for-git-operations) +- [License](#license) + + + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/auth-token` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+Node + + +Install with npm install @octokit/auth-token + +```js +const { createTokenAuth } = require("@octokit/auth-token"); +// or: import { createTokenAuth } from "@octokit/auth-token"; +``` + +
+ +```js +const auth = createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +const authentication = await auth(); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } +``` + +## `createTokenAuth(token) options` + +The `createTokenAuth` method accepts a single argument of type string, which is the token. The passed token can be one of the following: + +- [Personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) +- [OAuth access token](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/) +- [GITHUB_TOKEN provided to GitHub Actions](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables) +- Installation access token ([server-to-server](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)) +- User authentication for installation ([user-to-server](https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)) + +Examples + +```js +// Personal access token or OAuth access token +createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghs_InstallallationOrActionToken00000000"); +// { +// type: 'token', +// token: 'ghs_InstallallationOrActionToken00000000', +// tokenType: 'installation' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghu_InstallationUserToServer000000000000"); +// { +// type: 'token', +// token: 'ghu_InstallationUserToServer000000000000', +// tokenType: 'user-to-server' +// } +``` + +## `auth()` + +The `auth()` method has no options. It returns a promise which resolves with the the authentication object. + +## Authentication object + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ token + + string + + The provided token. +
+ tokenType + + string + + Can be either "oauth" for personal access tokens and OAuth tokens, "installation" for installation access tokens (includes GITHUB_TOKEN provided to GitHub Actions), "app" for a GitHub App JSON Web Token, or "user-to-server" for a user authentication token through an app installation. +
+ +## `auth.hook(request, route, options)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It authenticates the request using the provided token. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: authorizations } = await auth.hook( + request, + "GET /authorizations" +); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: authorizations } = await requestWithAuth("GET /authorizations"); +``` + +## Find more information + +`auth()` does not send any requests, it only transforms the provided token string into an authentication object. + +Here is a list of things you can do to retrieve further information + +### Find out what scopes are enabled for oauth tokens + +Note that this does not work for installations. There is no way to retrieve permissions based on an installation access tokens. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("HEAD /"); +const scopes = response.headers["x-oauth-scopes"].split(/,\s+/); + +if (scopes.length) { + console.log( + `"${TOKEN}" has ${scopes.length} scopes enabled: ${scopes.join(", ")}` + ); +} else { + console.log(`"${TOKEN}" has no scopes enabled`); +} +``` + +### Find out if token is a personal access token or if it belongs to an OAuth app + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("HEAD /"); +const clientId = response.headers["x-oauth-client-id"]; + +if (clientId) { + console.log( + `"${token}" is an OAuth token, its app’s client_id is ${clientId}.` + ); +} else { + console.log(`"${token}" is a personal access token`); +} +``` + +### Find out what permissions are enabled for a repository + +Note that the `permissions` key is not set when authenticated using an installation access token. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("GET /repos/{owner}/{repo}", { + owner: "octocat", + repo: "hello-world", +}); + +console.log(response.data.permissions); +// { +// admin: true, +// push: true, +// pull: true +// } +``` + +### Use token for git operations + +Both OAuth and installation access tokens can be used for git operations. However, when using with an installation, [the token must be prefixed with `x-access-token`](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#http-based-git-access-by-an-installation). + +This example is using the [`execa`](https://github.com/sindresorhus/execa) package to run a `git push` command. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const { token, tokenType } = await auth(); +const tokenWithPrefix = + tokenType === "installation" ? `x-access-token:${token}` : token; + +const repositoryUrl = `https://${tokenWithPrefix}@github.com/octocat/hello-world.git`; + +const { stdout } = await execa("git", ["push", repositoryUrl]); +console.log(stdout); +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-node/index.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-node/index.js new file mode 100644 index 0000000..984c49b --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-node/index.js @@ -0,0 +1,52 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token: token, + tokenType + }; +} + +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} + +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; + +exports.createTokenAuth = createTokenAuth; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-node/index.js.map b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-node/index.js.map new file mode 100644 index 0000000..7f9e2f5 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":["REGEX_IS_INSTALLATION_LEGACY","REGEX_IS_INSTALLATION","REGEX_IS_USER_TO_SERVER","auth","token","isApp","split","length","isInstallation","test","isUserToServer","tokenType","type","withAuthorizationPrefix","hook","request","route","parameters","endpoint","merge","headers","authorization","createTokenAuth","Error","replace","Object","assign","bind"],"mappings":";;;;AAAA,MAAMA,4BAA4B,GAAG,OAAO;AAC5C,MAAMC,qBAAqB,GAAG,OAAO;AACrC,MAAMC,uBAAuB,GAAG,OAAO;AAChC,eAAeC,IAAI,CAACC,KAAK,EAAE;EAC9B,MAAMC,KAAK,GAAGD,KAAK,CAACE,KAAK,CAAC,IAAI,CAAC,CAACC,MAAM,KAAK,CAAC;EAC5C,MAAMC,cAAc,GAAGR,4BAA4B,CAACS,IAAI,CAACL,KAAK,CAAC,IAC3DH,qBAAqB,CAACQ,IAAI,CAACL,KAAK,CAAC;EACrC,MAAMM,cAAc,GAAGR,uBAAuB,CAACO,IAAI,CAACL,KAAK,CAAC;EAC1D,MAAMO,SAAS,GAAGN,KAAK,GACjB,KAAK,GACLG,cAAc,GACV,cAAc,GACdE,cAAc,GACV,gBAAgB,GAChB,OAAO;EACrB,OAAO;IACHE,IAAI,EAAE,OAAO;IACbR,KAAK,EAAEA,KAAK;IACZO;GACH;AACL;;ACpBA;AACA;AACA;AACA;AACA;AACA,AAAO,SAASE,uBAAuB,CAACT,KAAK,EAAE;EAC3C,IAAIA,KAAK,CAACE,KAAK,CAAC,IAAI,CAAC,CAACC,MAAM,KAAK,CAAC,EAAE;IAChC,OAAQ,UAASH,KAAM,EAAC;;EAE5B,OAAQ,SAAQA,KAAM,EAAC;AAC3B;;ACTO,eAAeU,IAAI,CAACV,KAAK,EAAEW,OAAO,EAAEC,KAAK,EAAEC,UAAU,EAAE;EAC1D,MAAMC,QAAQ,GAAGH,OAAO,CAACG,QAAQ,CAACC,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;EAC1DC,QAAQ,CAACE,OAAO,CAACC,aAAa,GAAGR,uBAAuB,CAACT,KAAK,CAAC;EAC/D,OAAOW,OAAO,CAACG,QAAQ,CAAC;AAC5B;;MCHaI,eAAe,GAAG,SAASA,eAAe,CAAClB,KAAK,EAAE;EAC3D,IAAI,CAACA,KAAK,EAAE;IACR,MAAM,IAAImB,KAAK,CAAC,0DAA0D,CAAC;;EAE/E,IAAI,OAAOnB,KAAK,KAAK,QAAQ,EAAE;IAC3B,MAAM,IAAImB,KAAK,CAAC,uEAAuE,CAAC;;EAE5FnB,KAAK,GAAGA,KAAK,CAACoB,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC;EAC/C,OAAOC,MAAM,CAACC,MAAM,CAACvB,IAAI,CAACwB,IAAI,CAAC,IAAI,EAAEvB,KAAK,CAAC,EAAE;IACzCU,IAAI,EAAEA,IAAI,CAACa,IAAI,CAAC,IAAI,EAAEvB,KAAK;GAC9B,CAAC;AACN,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/auth.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/auth.js new file mode 100644 index 0000000..b22ce98 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/auth.js @@ -0,0 +1,21 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +export async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || + REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp + ? "app" + : isInstallation + ? "installation" + : isUserToServer + ? "user-to-server" + : "oauth"; + return { + type: "token", + token: token, + tokenType, + }; +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/hook.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/hook.js new file mode 100644 index 0000000..f8e47f0 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/hook.js @@ -0,0 +1,6 @@ +import { withAuthorizationPrefix } from "./with-authorization-prefix"; +export async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/index.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/index.js new file mode 100644 index 0000000..f2ddd63 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/index.js @@ -0,0 +1,14 @@ +import { auth } from "./auth"; +import { hook } from "./hook"; +export const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token), + }); +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/types.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js new file mode 100644 index 0000000..9035813 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js @@ -0,0 +1,11 @@ +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +export function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/auth.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/auth.d.ts new file mode 100644 index 0000000..dc41835 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/auth.d.ts @@ -0,0 +1,2 @@ +import { Token, Authentication } from "./types"; +export declare function auth(token: Token): Promise; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/hook.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/hook.d.ts new file mode 100644 index 0000000..21e4b6f --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/hook.d.ts @@ -0,0 +1,2 @@ +import { AnyResponse, EndpointOptions, RequestInterface, RequestParameters, Route, Token } from "./types"; +export declare function hook(token: Token, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/index.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/index.d.ts new file mode 100644 index 0000000..f496ab1 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/index.d.ts @@ -0,0 +1,7 @@ +import { StrategyInterface, Token, Authentication } from "./types"; +export type Types = { + StrategyOptions: Token; + AuthOptions: never; + Authentication: Authentication; +}; +export declare const createTokenAuth: StrategyInterface; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/types.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/types.d.ts new file mode 100644 index 0000000..4267fa1 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/types.d.ts @@ -0,0 +1,33 @@ +import * as OctokitTypes from "@octokit/types"; +export type AnyResponse = OctokitTypes.OctokitResponse; +export type StrategyInterface = OctokitTypes.StrategyInterface<[ + Token +], [ +], Authentication>; +export type EndpointDefaults = OctokitTypes.EndpointDefaults; +export type EndpointOptions = OctokitTypes.EndpointOptions; +export type RequestParameters = OctokitTypes.RequestParameters; +export type RequestInterface = OctokitTypes.RequestInterface; +export type Route = OctokitTypes.Route; +export type Token = string; +export type OAuthTokenAuthentication = { + type: "token"; + tokenType: "oauth"; + token: Token; +}; +export type InstallationTokenAuthentication = { + type: "token"; + tokenType: "installation"; + token: Token; +}; +export type AppAuthentication = { + type: "token"; + tokenType: "app"; + token: Token; +}; +export type UserToServerAuthentication = { + type: "token"; + tokenType: "user-to-server"; + token: Token; +}; +export type Authentication = OAuthTokenAuthentication | InstallationTokenAuthentication | AppAuthentication | UserToServerAuthentication; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts new file mode 100644 index 0000000..2e52c31 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts @@ -0,0 +1,6 @@ +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +export declare function withAuthorizationPrefix(token: string): string; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-web/index.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-web/index.js new file mode 100644 index 0000000..8b1cd7d --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-web/index.js @@ -0,0 +1,55 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || + REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp + ? "app" + : isInstallation + ? "installation" + : isUserToServer + ? "user-to-server" + : "oauth"; + return { + type: "token", + token: token, + tokenType, + }; +} + +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} + +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token), + }); +}; + +export { createTokenAuth }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-web/index.js.map b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-web/index.js.map new file mode 100644 index 0000000..1d6197b --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":[],"mappings":"AAAA,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,qBAAqB,GAAG,OAAO,CAAC;AACtC,MAAM,uBAAuB,GAAG,OAAO,CAAC;AACjC,eAAe,IAAI,CAAC,KAAK,EAAE;AAClC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACjD,IAAI,MAAM,cAAc,GAAG,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC;AACnE,QAAQ,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1C,IAAI,MAAM,cAAc,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/D,IAAI,MAAM,SAAS,GAAG,KAAK;AAC3B,UAAU,KAAK;AACf,UAAU,cAAc;AACxB,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,kBAAkB,gBAAgB;AAClC,kBAAkB,OAAO,CAAC;AAC1B,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,SAAS;AACjB,KAAK,CAAC;AACN;;ACpBA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,uBAAuB,CAAC,KAAK,EAAE;AAC/C,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AACxC,QAAQ,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5B,CAAC;;ACTM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;AACpE,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACHW,MAAC,eAAe,GAAG,SAAS,eAAe,CAAC,KAAK,EAAE;AAC/D,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;AACpF,KAAK;AACL,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;AACjG,KAAK;AACL,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACpD,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/openapi-types/dist-node/index.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-node/index.js similarity index 84% rename from node_modules/@octokit/openapi-types/dist-node/index.js rename to node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-node/index.js index 859bc42..20d1e04 100644 --- a/node_modules/@octokit/openapi-types/dist-node/index.js +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-node/index.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); -const VERSION = "5.1.0"; +const VERSION = "9.0.0"; exports.VERSION = VERSION; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/openapi-types/dist-web/index.js b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-web/index.js similarity index 68% rename from node_modules/@octokit/openapi-types/dist-web/index.js rename to node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-web/index.js index 8cf584d..8b7457a 100644 --- a/node_modules/@octokit/openapi-types/dist-web/index.js +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-web/index.js @@ -1,4 +1,4 @@ -const VERSION = "5.1.0"; +const VERSION = "9.0.0"; export { VERSION }; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/package.json b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/package.json new file mode 100644 index 0000000..5d72ac1 --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/auth-token/package.json @@ -0,0 +1,48 @@ +{ + "name": "@octokit/auth-token", + "description": "GitHub API token authentication for browsers and Node.js", + "version": "3.0.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "repository": "github:octokit/auth-token.js", + "dependencies": { + "@octokit/types": "^9.0.0" + }, + "devDependencies": { + "@octokit/core": "^4.0.0", + "@octokit/request": "^6.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^29.0.0", + "fetch-mock": "^9.0.0", + "jest": "^29.0.0", + "prettier": "2.8.3", + "semantic-release": "^20.0.0", + "ts-jest": "^29.0.0", + "typescript": "^4.0.0" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/LICENSE b/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 0000000..c61fbbe --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +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/auth-action/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 0000000..9da833c --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 0000000..26eae6a --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,20 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public" + }, + "version": "16.0.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "10.0.0" + } +} diff --git a/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..806b5bc --- /dev/null +++ b/node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,118413 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installations": { + /** + * You must use a [JWT](https://docs.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. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/code_security_and_analysis": { + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + get: operations["secret-scanning/get-security-analysis-settings-for-enterprise"]; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + patch: operations["secret-scanning/patch-security-analysis-settings-for-enterprise"]; + }; + "/enterprises/{enterprise}/dependabot/alerts": { + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["dependabot/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + post: operations["secret-scanning/post-security-product-enablement-for-enterprise"]; + }; + "/events": { + /** 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. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * 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. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** 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. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + /** Gets information about a notification thread. */ + get: operations["activity/get-thread"]; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/orgs/{org}": { + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + get: operations["oidc/get-oidc-custom-sub-template-for-org"]; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + put: operations["oidc/update-oidc-custom-sub-template-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/required_workflows": { + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflows"]; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + post: operations["actions/create-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}": { + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/get-required-workflow"]; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/delete-required-workflow"]; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + patch: operations["actions/update-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": { + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-selected-repositories-required-workflow"]; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/set-selected-repos-to-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": { + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/add-selected-repo-to-required-workflow"]; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/remove-selected-repo-from-required-workflow"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/actions/variables": { + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-org-variables"]; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + post: operations["actions/create-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}": { + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/get-org-variable"]; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + delete: operations["actions/delete-org-variable"]; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + patch: operations["actions/update-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories": { + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-variable"]; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories/{repository_id}": { + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-variable"]; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-variable"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/codespaces/billing": { + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["codespaces/set-codespaces-billing"]; + }; + "/orgs/{org}/codespaces/secrets": { + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-org-secrets"]; + }; + "/orgs/{org}/codespaces/secrets/public-key": { + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/get-org-public-key"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}": { + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/delete-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/dependabot/alerts": { + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-org"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** 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`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** 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. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** 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. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces": { + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-codespaces-for-user-in-org"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/memberships/{username}": { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations["orgs/get-membership-for-user"]; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * 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. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** 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. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/public_members": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/security-managers": { + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + get: operations["orgs/list-security-manager-teams"]; + }; + "/orgs/{org}/security-managers/teams/{team_slug}": { + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + put: operations["orgs/add-security-manager-team"]; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + delete: operations["orgs/remove-security-manager-team"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/orgs/{org}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** 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: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** 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. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** 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. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** 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. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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: operations["rate-limit/get"]; + }; + "/repos/{org}/{repo}/actions/required_workflows": { + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/list-repo-required-workflows"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": { + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/get-repo-required-workflow"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": { + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-repo-required-workflow-usage"]; + }; + "/repos/{owner}/{repo}": { + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/get"]; + /** + * 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, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + get: operations["actions/get-custom-oidc-sub-claim-for-repo"]; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/set-custom-oidc-sub-claim-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": { + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/variables": { + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/list-repo-variables"]; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + post: operations["actions/create-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/variables/{name}": { + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/get-repo-variable"]; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-repo-variable"]; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * 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. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-pull-request-review-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-status-checks-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-all-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations["repos/set-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations["repos/add-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **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: operations["checks/get"]; + /** + * **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. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** 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. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **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. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-alert"]; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases": { + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/list-codeql-databases"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": { + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/check-collaborator"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + put: operations["repos/add-collaborator"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * 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. + * + * + * 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` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * 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`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + get: operations["repos/get-content"]; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * 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 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. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/get-alert"]; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + patch: operations["dependabot/update-alert"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + get: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * 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. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations["repos/create-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": { + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** 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. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + get: operations["repos/list-webhooks"]; + /** + * 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. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * 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` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * 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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** 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://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": { + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations["issues/check-user-can-be-assigned-to-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** 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. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + put: operations["repos/enable-lfs-for-repo"]; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** Lists all notifications for the current user in the specified repository. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + put: operations["repos/update-information-about-pages-site"]; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + post: operations["repos/create-pages-site"]; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * 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. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployment": { + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + post: operations["repos/create-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/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. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["pulls/list"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + get: operations["pulls/list-requested-reviewers"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["pulls/request-reviewers"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * 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. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * 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. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** 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. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** 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. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** 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://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables": { + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/list-environment-variables"]; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + post: operations["actions/create-environment-variable"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables/{name}": { + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/get-environment-variable"]; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-environment-variable"]; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-environment-variable"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **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. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/publish": { + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/publish-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * 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. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/ssh_signing_keys": { + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/list-ssh-signing-keys-for-authenticated-user"]; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + post: operations["users/create-ssh-signing-key-for-authenticated-user"]; + }; + "/user/ssh_signing_keys/{ssh_signing_key_id}": { + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/get-ssh-signing-key-for-authenticated-user"]; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + delete: operations["users/delete-ssh-signing-key-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** 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. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/ssh_signing_keys": { + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + get: operations["users/list-ssh-signing-keys-for-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/versions": { + /** Get all supported GitHub API versions. */ + get: operations["meta/get-all-versions"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description A GitHub user. + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description A GitHub user. + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise on GitHub. + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for a repository. + * @enum {string} + */ + repository_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for an organization. + * @enum {string} + */ + organization_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A repository on GitHub. + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # 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 [EMAIL]. 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/ + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** Enterprise Security Analysis Settings */ + "enterprise-security-analysis-settings": { + /** + * @description Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to + * this enterprise. + * @example false + */ + advanced_security_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * enterprise. + * @example false + */ + secret_scanning_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this enterprise. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + /** @description The security alert number. */ + "alert-number": number; + /** @description Details for the vulnerable package. */ + "dependabot-alert-package": { + /** @description The package's language or package management ecosystem. */ + ecosystem: string; + /** @description The unique package name within its ecosystem. */ + name: string; + }; + /** @description Details pertaining to one vulnerable version range for the advisory. */ + "dependabot-alert-security-vulnerability": { + package: components["schemas"]["dependabot-alert-package"]; + /** + * @description The severity of the vulnerability. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Conditions that identify vulnerable versions of this vulnerability's package. */ + vulnerable_version_range: string; + /** @description Details pertaining to the package version that patches this vulnerability. */ + first_patched_version: { + /** @description The package version that patches this vulnerability. */ + identifier: string; + } | null; + }; + /** @description Details for the GitHub Security Advisory. */ + "dependabot-alert-security-advisory": { + /** @description The unique GitHub Security Advisory ID assigned to the advisory. */ + ghsa_id: string; + /** @description The unique CVE ID assigned to the advisory. */ + cve_id: string | null; + /** @description A short, plain text summary of the advisory. */ + summary: string; + /** @description A long-form Markdown-supported description of the advisory. */ + description: string; + /** @description Vulnerable version range information for the advisory. */ + vulnerabilities: components["schemas"]["dependabot-alert-security-vulnerability"][]; + /** + * @description The severity of the advisory. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Details for the advisory pertaining to the Common Vulnerability Scoring System. */ + cvss: { + /** @description The overall CVSS score of the advisory. */ + score: number; + /** @description The full CVSS vector string for the advisory. */ + vector_string: string | null; + }; + /** @description Details for the advisory pertaining to Common Weakness Enumeration. */ + cwes: { + /** @description The unique CWE ID. */ + cwe_id: string; + /** @description The short, plain text name of the CWE. */ + name: string; + }[]; + /** @description Values that identify this advisory among security information sources. */ + identifiers: { + /** + * @description The type of advisory identifier. + * @enum {string} + */ + type: "CVE" | "GHSA"; + /** @description The value of the advisory identifer. */ + value: string; + }[]; + /** @description Links to additional advisory information. */ + references: { + /** + * Format: uri + * @description The URL of the reference. + */ + url: string; + }[]; + /** + * Format: date-time + * @description The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + published_at: string; + /** + * Format: date-time + * @description The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + updated_at: string; + /** + * Format: date-time + * @description The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + withdrawn_at: string | null; + }; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-dismissed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-fixed-at": string | null; + /** + * Simple Repository + * @description A GitHub repository. + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert-with-repository": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + /** + * @description A feed of discussions for a given repository. + * @example https://github.com/{user}/{repo}/discussions + */ + repository_discussions_url?: string; + /** + * @description A feed of discussions for a given repository and category. + * @example https://github.com/{user}/{repo}/discussions/categories/{category} + */ + repository_discussions_category_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + repository_discussions?: components["schemas"]["link-with-type"]; + repository_discussions_category?: components["schemas"]["link-with-type"]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + 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?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * 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. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** + * @example FLAT_RATE + * @enum {string} + */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Simple + * @description A GitHub organization. + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** + * @description Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + * this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + * to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + * @example false + */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * Actions OIDC Subject customization + * @description Actions OIDC Subject customization + */ + "oidc-custom-sub": { + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys: string[]; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "required-workflow": { + /** @description Unique identifier for a required workflow */ + id: number; + /** @description Name present in the workflow file */ + name: string; + /** @description Path of the workflow file */ + path: string; + /** + * @description Scope of the required workflow + * @enum {string} + */ + scope: "all" | "selected"; + /** @description Ref at which the workflow file will be selected */ + ref: string; + /** + * @description State of the required workflow + * @enum {string} + */ + state: "active" | "deleted"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/actions/required_workflows/1/repositories + */ + selected_repositories_url?: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + repository: components["schemas"]["minimal-repository"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Actions Variable for an Organization + * @description Organization variable for GitHub Actions. + */ + "organization-actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + /** + * @description Visibility of a variable + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/variables/USERNAME/repositories + */ + selected_repositories_url?: string; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** + * @description Severity of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-severity": + | "critical" + | "high" + | "medium" + | "low" + | "warning" + | "note" + | "error"; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "alert-instances-url": string; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | ("source" | "generated" | "test" | "library") + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + /** + * @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. + * @example you've used 100% of your spending limit for Codespaces + */ + last_known_stop_notice?: string | null; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + /** @example "member" */ + invitation_source?: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on macOS 12 core runner machines. */ + macos_12_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Team Organization + * @description Team Organization + */ + "team-organization": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Repository + * @description A repository on GitHub. + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Required workflow + * @description A GitHub Actions required workflow + */ + "repo-required-workflow": { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example Required CI */ + name: string; + /** @example .github/workflows/required_ci.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: "active" | "deleted"; + source_repository: components["schemas"]["minimal-repository"]; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/sample-org/sample-repo/actions/required_workflows/5 */ + url: string; + /** @example https://github.com/sample-org/source-repo/blob/main/.github/workflows/required_ci.yaml */ + html_url: string; + /** @example https://github.com/sample-org/sample-repo/workflows/required/sample-org/source-repo/.github/workflows/required_ci.yaml/badge.svg */ + badge_url: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads: boolean; + /** @example true */ + has_discussions: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @example true */ + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + /** + * @description The name of the workflow. + * @example Build + */ + workflow_name: string | null; + /** + * @description The name of the current branch. + * @example main + */ + head_branch: string | null; + }; + /** + * Actions OIDC subject customization for a repository + * @description Actions OIDC subject customization for a repository + */ + "oidc-custom-sub-repo": { + /** @description Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. */ + use_default: boolean; + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys?: string[]; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. + * + * `none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repos only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. + * @enum {string} + */ + access_level: "none" | "user" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description A commit. + */ + "nullable-simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title: string; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: { [key: string]: unknown } | string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** Actions Variable */ + "actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + * @example true + */ + is_alphanumeric: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + * @example true + */ + require_last_push_approval?: boolean; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + 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; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + */ + require_last_push_approval?: boolean; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description A commit. + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @example completed + * @enum {string|null} + */ + status: ("queued" | "in_progress" | "completed") | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "startup_failure" + | "stale" + | null + ) + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** + * CodeQL Database + * @description A CodeQL database. + */ + "code-scanning-codeql-database": { + /** @description The ID of the CodeQL database. */ + id: number; + /** @description The name of the CodeQL database. */ + name: string; + /** @description The language of the CodeQL database. */ + language: string; + uploader: components["schemas"]["simple-user"]; + /** @description The MIME type of the CodeQL database file. */ + content_type: string; + /** @description The size of the CodeQL database file in bytes. */ + size: number; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * Format: uri + * @description The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + */ + url: string; + }; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string | null; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string | null; + target_url: string | null; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + } & { + content: unknown; + encoding: unknown; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + /** @enum {string} */ + type: "dir" | "file" | "submodule" | "symlink"; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + /** @enum {string} */ + type: "file"; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + /** @enum {string} */ + type: "symlink"; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Submodule Content + * @description An object describing a submodule + */ + "content-submodule": { + /** @enum {string} */ + type: "submodule"; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + }; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + /** + * @description Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + * @enum {string} + */ + scope: "unknown" | "runtime" | "development"; + }[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: Partial & Partial & Partial; + }; + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { [key: string]: components["schemas"]["dependency"] }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. */ + manifests?: { [key: string]: components["schemas"]["manifest"] }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy-settings": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + protection_rules?: (Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + }>)[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + "deployment-branch-policy": { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number; + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string; + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: { + /** @example "foo@bar.com" */ + email?: string; + /** @example "foo" */ + password?: string; + /** @example "roomer" */ + room?: string; + /** @example "foo" */ + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + /** @example "sha256" */ + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + /** @example "abc" */ + token?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** @example 1 */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + added_by?: string | null; + last_used?: string | null; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + * @example https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + * @example hello-world.github.io + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + * @example monalisa-1231a2312sa32-23sda74.drafts.github.io + */ + preview_url?: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + web_commit_signoff_required?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string | null; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + /** @description An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. */ + "secret-scanning-alert-resolution-comment": string | null; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + /** @description Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. */ + "secret-scanning-location-issue-title": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_title_url: string; + }; + /** @description Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. */ + "secret-scanning-location-issue-body": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_body_url: string; + }; + /** @description Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. */ + "secret-scanning-location-issue-comment": { + /** + * Format: uri + * @description The API URL to get the issue comment where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + */ + issue_comment_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: "commit" | "issue_title" | "issue_body" | "issue_comment"; + details: + | components["schemas"]["secret-scanning-location-commit"] + | components["schemas"]["secret-scanning-location-issue-title"] + | components["schemas"]["secret-scanning-location-issue-body"] + | components["schemas"]["secret-scanning-location-issue-comment"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + has_discussions?: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Codespace + * @description A codespace. + */ + "codespace-with-full-repository": { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["full-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * SSH Signing Key + * @description A public SSH key used to sign Git commits + */ + "ssh-signing-key": { + key: string; + id: number; + title: string; + /** Format: date-time */ + created_at: string; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + /** + * Simple Installation + * @description The GitHub App installation. This property is included when the event is configured for and sent to a GitHub App. + */ + "simple-installation": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + /** + * @description The global node ID of the installation. + * @example MDQ6VXNlcjU4MzIzMQ== + */ + node_id: string; + }; + /** @description A suite of checks performed on the code of a given code change */ + "simple-check-suite": { + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after?: string | null; + app?: components["schemas"]["integration"]; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before?: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion?: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "stale" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at?: string; + /** @example master */ + head_branch?: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha?: string; + /** @example 5 */ + id?: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id?: string; + pull_requests?: components["schemas"]["pull-request-minimal"][]; + repository?: components["schemas"]["minimal-repository"]; + /** + * @example completed + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed" | "pending" | "waiting"; + /** Format: date-time */ + updated_at?: string; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url?: string; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run-with-simple-check-suite": { + app: components["schemas"]["nullable-integration"]; + check_suite: components["schemas"]["simple-check-suite"]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "waiting" + | "pending" + | "startup_failure" + | "stale" + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + deployment?: components["schemas"]["deployment-simple"]; + /** @example https://example.com */ + details_url: string; + /** @example 42 */ + external_id: string; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string; + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + output: { + annotations_count: number; + /** Format: uri */ + annotations_url: string; + summary: string | null; + text: string | null; + title: string | null; + }; + pull_requests: components["schemas"]["pull-request-minimal"][]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "pending"; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + }; + /** + * Projects v2 Item Content Type + * @description The type of content tracked in a project item + * @enum {string} + */ + "projects-v2-item-content-type": "Issue" | "PullRequest" | "DraftIssue"; + /** + * Projects v2 Item + * @description An item belonging to a project + */ + "projects-v2-item": { + id: number; + node_id?: string; + project_node_id?: string; + content_node_id: string; + content_type: components["schemas"]["projects-v2-item-content-type"]; + creator?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + created_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + archived_at: string | null; + }; + /** branch protection rule created event */ + "webhook-branch-protection-rule-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule deleted event */ + "webhook-branch-protection-rule-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule edited event */ + "webhook-branch-protection-rule-edited": { + /** @enum {string} */ + action: "edited"; + /** @description If the action was `edited`, the changes to the rule. */ + changes?: { + admin_enforced?: { + from: boolean | null; + }; + authorized_actor_names?: { + from: string[]; + }; + authorized_actors_only?: { + from: boolean | null; + }; + authorized_dismissal_actors_only?: { + from: boolean | null; + }; + linear_history_requirement_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + required_status_checks?: { + from: string[]; + }; + required_status_checks_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** Check Run Completed Event */ + "webhook-check-run-completed": { + /** @enum {string} */ + action?: "completed"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Completed Event + * @description The check_run.completed webhook encoded with URL encoding + */ + "webhook-check-run-completed-form-encoded": { + /** @description A URL-encoded string of the check_run.completed JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Created Event */ + "webhook-check-run-created": { + /** @enum {string} */ + action?: "created"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Created Event + * @description The check_run.created webhook encoded with URL encoding + */ + "webhook-check-run-created-form-encoded": { + /** @description A URL-encoded string of the check_run.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Requested Action Event */ + "webhook-check-run-requested-action": { + /** @enum {string} */ + action: "requested_action"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** @description The action requested by the user. */ + requested_action?: { + /** @description The integrator reference of the action requested by the user. */ + identifier?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Requested Action Event + * @description The check_run.requested_action webhook encoded with URL encoding + */ + "webhook-check-run-requested-action-form-encoded": { + /** @description A URL-encoded string of the check_run.requested_action JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Re-Requested Event */ + "webhook-check-run-rerequested": { + /** @enum {string} */ + action?: "rerequested"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Re-Requested Event + * @description The check_run.rerequested webhook encoded with URL encoding + */ + "webhook-check-run-rerequested-form-encoded": { + /** @description A URL-encoded string of the check_run.rerequested JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** check_suite completed event */ + "webhook-check-suite-completed": { + /** @enum {string} */ + action: "completed"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_group" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "projects_v2_item" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ( + | "requested" + | "in_progress" + | "completed" + | "queued" + | null + | "pending" + ) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite requested event */ + "webhook-check-suite-requested": { + /** @enum {string} */ + action: "requested"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "secret_scanning_alert_location" + | "projects_v2_item" + | "merge_group" + | "repository_import" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite rerequested event */ + "webhook-check-suite-rerequested": { + /** @enum {string} */ + action: "rerequested"; + actions_meta?: { + rerun_info?: { + plan_id?: string; + job_ids?: string[]; + }; + } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert appeared_in_branch event */ + "webhook-code-scanning-alert-appeared-in-branch": { + /** @enum {string} */ + action: "appeared_in_branch"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert closed_by_user event */ + "webhook-code-scanning-alert-closed-by-user": { + /** @enum {string} */ + action: "closed_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert created event */ + "webhook-code-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string | null; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + fixed_at?: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + } | null; + updated_at?: string | null; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert fixed event */ + "webhook-code-scanning-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Format: uri */ + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened event */ + "webhook-code-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: string | null; + dismissed_by: { [key: string]: unknown } | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: string | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + } | null; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string | null; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened_by_user event */ + "webhook-code-scanning-alert-reopened-by-user": { + /** @enum {string} */ + action: "reopened_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** commit_comment created event */ + "webhook-commit-comment-created": { + /** + * @description The action performed. Can be `created`. + * @enum {string} + */ + action: "created"; + /** @description The [commit comment](https://docs.github.com/rest/reference/repos#get-a-commit-comment) resource. */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + created_at: string; + /** Format: uri */ + html_url: string; + /** @description The ID of the commit comment. */ + id: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the commit comment. */ + node_id: string; + /** @description The relative path of the file to which the comment applies. */ + path: string | null; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** create event */ + "webhook-create": { + /** @description The repository's current description. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The name of the repository's default branch (usually `main`). */ + master_branch: string; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object created in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** delete event */ + "webhook-delete": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object deleted in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert created event */ + "webhook-dependabot-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert dismissed event */ + "webhook-dependabot-alert-dismissed": { + /** @enum {string} */ + action: "dismissed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert fixed event */ + "webhook-dependabot-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reintroduced event */ + "webhook-dependabot-alert-reintroduced": { + /** @enum {string} */ + action: "reintroduced"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reopened event */ + "webhook-dependabot-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key created event */ + "webhook-deploy-key-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key deleted event */ + "webhook-deploy-key-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deployment created event */ + "webhook-deployment-created": { + /** @enum {string} */ + action: "created"; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: { [key: string]: unknown } | string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "workflow_job" + | "pull_request_review_thread" + | "merge_queue_entry" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** deployment_status created event */ + "webhook-deployment-status-created": { + /** @enum {string} */ + action: "created"; + check_run?: { + /** Format: date-time */ + completed_at: string | null; + /** + * @description The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: uri */ + details_url: string; + external_id: string; + /** @description The SHA of the commit that is being checked. */ + head_sha: string; + /** Format: uri */ + html_url: string; + /** @description The id of the check. */ + id: number; + /** @description The name of the check run. */ + name: string; + node_id: string; + /** Format: date-time */ + started_at: string; + /** + * @description The current status of the check run. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting" | "pending"; + /** Format: uri */ + url: string; + } | null; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: (string | { [key: string]: unknown }) | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_queue_entry" + | "workflow_job" + | "pull_request_review_thread" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + /** @description The [deployment status](https://docs.github.com/rest/reference/deployments#list-deployment-statuses). */ + deployment_status: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + deployment_url: string; + /** @description The optional human-readable description added to the status. */ + description: string; + environment: string; + /** Format: uri */ + environment_url?: string; + id: number; + /** Format: uri */ + log_url?: string; + node_id: string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + | "merge_group" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + /** Format: uri */ + repository_url: string; + /** @description The new state. Can be `pending`, `success`, `failure`, or `error`. */ + state: string; + /** @description The optional link added to the status. */ + target_url: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow?: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run?: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** discussion answered event */ + "webhook-discussion-answered": { + /** @enum {string} */ + action: "answered"; + answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** Format: date-time */ + answer_chosen_at: string; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + answer_html_url: string; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion category changed event */ + "webhook-discussion-category-changed": { + /** @enum {string} */ + action: "category_changed"; + changes: { + category: { + from: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment created event */ + "webhook-discussion-comment-created": { + /** @enum {string} */ + action: "created"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment deleted event */ + "webhook-discussion-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment edited event */ + "webhook-discussion-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body: { + from: string; + }; + }; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion created event */ + "webhook-discussion-created": { + /** @enum {string} */ + action: "created"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string | null; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "converting" | "transferring"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion deleted event */ + "webhook-discussion-deleted": { + /** @enum {string} */ + action: "deleted"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion edited event */ + "webhook-discussion-edited": { + /** @enum {string} */ + action: "edited"; + changes?: { + body?: { + from: string; + }; + title?: { + from: string; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion labeled event */ + "webhook-discussion-labeled": { + /** @enum {string} */ + action: "labeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion locked event */ + "webhook-discussion-locked": { + /** @enum {string} */ + action: "locked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string; + answer_chosen_at?: string | null; + answer_chosen_by?: { [key: string]: unknown } | null; + answer_html_url?: string | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: true; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "locked"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion pinned event */ + "webhook-discussion-pinned": { + /** @enum {string} */ + action: "pinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion transferred event */ + "webhook-discussion-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** Discussion */ + new_discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unanswered event */ + "webhook-discussion-unanswered": { + /** @enum {string} */ + action: "unanswered"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + old_answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** discussion unlabeled event */ + "webhook-discussion-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unlocked event */ + "webhook-discussion-unlocked": { + /** @enum {string} */ + action: "unlocked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at?: unknown | null; + answer_chosen_by?: unknown | null; + answer_html_url?: unknown | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unpinned event */ + "webhook-discussion-unpinned": { + /** @enum {string} */ + action: "unpinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * fork event + * @description A user forks a repository. + */ + "webhook-fork": { + enterprise?: components["schemas"]["enterprise"]; + /** @description The created [`repository`](https://docs.github.com/rest/reference/repos#get-a-repository) resource. */ + forkee: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } & { + allow_forking?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + /** @enum {boolean} */ + fork?: true; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: unknown | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + public?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (unknown | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + }; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** github_app_authorization revoked event */ + "webhook-github-app-authorization-revoked": { + /** @enum {string} */ + action: "revoked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** gollum event */ + "webhook-gollum": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pages that were updated. */ + pages: { + /** + * @description The action that was performed on the page. Can be `created` or `edited`. + * @enum {string} + */ + action: "created" | "edited"; + /** + * Format: uri + * @description Points to the HTML wiki page. + */ + html_url: string; + /** @description The name of the page. */ + page_name: string; + /** @description The latest commit SHA of the page. */ + sha: string; + summary: string | null; + /** @description The current page title. */ + title: string; + }[]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** installation created event */ + "webhook-installation-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** User */ + requester?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation deleted event */ + "webhook-installation-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation new_permissions_accepted event */ + "webhook-installation-new-permissions-accepted": { + /** @enum {string} */ + action: "new_permissions_accepted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories added event */ + "webhook-installation-repositories-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name?: string; + /** @description Unique identifier of the repository */ + id?: number; + /** @description The name of the repository. */ + name?: string; + node_id?: string; + /** @description Whether the repository is private or public. */ + private?: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories removed event */ + "webhook-installation-repositories-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation suspend event */ + "webhook-installation-suspend": { + /** @enum {string} */ + action: "suspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + "webhook-installation-target-renamed": { + account: { + avatar_url: string; + created_at?: string; + description?: unknown | null; + events_url?: string; + followers?: number; + followers_url?: string; + following?: number; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + has_organization_projects?: boolean; + has_repository_projects?: boolean; + hooks_url?: string; + html_url: string; + id: number; + is_verified?: boolean; + issues_url?: string; + login?: string; + members_url?: string; + name?: string; + node_id: string; + organizations_url?: string; + public_gists?: number; + public_members_url?: string; + public_repos?: number; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + slug?: string; + starred_url?: string; + subscriptions_url?: string; + type?: string; + updated_at?: string; + url?: string; + website_url?: unknown | null; + }; + action: string; + changes: { + login?: { + from: string; + }; + slug?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + target_type: string; + }; + /** installation unsuspend event */ + "webhook-installation-unsuspend": { + /** @enum {string} */ + action: "unsuspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment created event */ + "webhook-issue-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment deleted event */ + "webhook-issue-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment edited event */ + "webhook-issue-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues assigned event */ + "webhook-issues-assigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "assigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues closed event */ + "webhook-issues-closed": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) itself. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "closed" | "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues deleted event */ + "webhook-issues-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues demilestoned event */ + "webhook-issues-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone?: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues edited event */ + "webhook-issues-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the issue. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + title?: { + /** @description The previous version of the title. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues labeled event */ + "webhook-issues-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues locked event */ + "webhook-issues-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "security_and_analysis" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: true; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues milestoned event */ + "webhook-issues-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues opened event */ + "webhook-issues-opened": { + /** @enum {string} */ + action: "opened"; + changes?: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + old_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } | null; + /** + * Repository + * @description A git repository + */ + old_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues pinned event */ + "webhook-issues-pinned": { + /** @enum {string} */ + action: "pinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues reopened event */ + "webhook-issues-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues transferred event */ + "webhook-issues-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + new_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unassigned event */ + "webhook-issues-unassigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlabeled event */ + "webhook-issues-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlocked event */ + "webhook-issues-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason: unknown | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: false; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: unknown | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unpinned event */ + "webhook-issues-unpinned": { + /** @enum {string} */ + action: "unpinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label created event */ + "webhook-label-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** label deleted event */ + "webhook-label-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label edited event */ + "webhook-label-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the label if the action was `edited`. */ + changes?: { + color?: { + /** @description The previous version of the color if the action was `edited`. */ + from: string; + }; + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase cancelled event */ + "webhook-marketplace-purchase-cancelled": { + /** @enum {string} */ + action: "cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase changed event */ + "webhook-marketplace-purchase-changed": { + /** @enum {string} */ + action: "changed"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean | null; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change event */ + "webhook-marketplace-purchase-pending-change": { + /** @enum {string} */ + action: "pending_change"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change_cancelled event */ + "webhook-marketplace-purchase-pending-change-cancelled": { + /** @enum {string} */ + action: "pending_change_cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + next_billing_date: string; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase purchased event */ + "webhook-marketplace-purchase-purchased": { + /** @enum {string} */ + action: "purchased"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member added event */ + "webhook-member-added": { + /** @enum {string} */ + action: "added"; + changes?: { + permission?: { + /** @enum {string} */ + to: "write" | "admin" | "read"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member edited event */ + "webhook-member-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the collaborator permissions */ + changes: { + old_permission?: { + /** @description The previous permissions of the collaborator if the action was edited. */ + from: string; + }; + permission?: { + from?: string | null; + to?: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member removed event */ + "webhook-member-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** membership added event */ + "webhook-membership-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** membership removed event */ + "webhook-membership-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team" | "organization"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + "webhook-merge-group-checks-requested": { + action: string; + installation?: components["schemas"]["simple-installation"]; + /** MergeGroup */ + merge_group: { + /** @description The SHA of the merge group. */ + head_sha: string; + /** @description The full ref of the merge group. */ + head_ref: string; + /** @description The SHA of the merge group's parent commit. */ + base_sha: string; + /** @description The full ref of the branch the merge group will be merged into. */ + base_ref: string; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** meta deleted event */ + "webhook-meta-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + /** @description The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace. */ + hook: { + active: boolean; + config: { + /** @enum {string} */ + content_type: "json" | "form"; + insecure_ssl: string; + secret?: string; + /** Format: uri */ + url: string; + }; + created_at: string; + events: ( + | "*" + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "create" + | "delete" + | "deployment" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "meta" + | "milestone" + | "organization" + | "org_block" + | "package" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "pull_request_review_thread" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_import" + | "repository_vulnerability_alert" + | "secret_scanning_alert" + | "secret_scanning_alert_location" + | "security_and_analysis" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_job" + | "workflow_run" + | "repository_dispatch" + | "projects_v2_item" + )[]; + id: number; + name: string; + type: string; + updated_at: string; + }; + /** @description The id of the modified webhook. */ + hook_id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** milestone closed event */ + "webhook-milestone-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone created event */ + "webhook-milestone-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone deleted event */ + "webhook-milestone-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone edited event */ + "webhook-milestone-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the milestone if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + due_on?: { + /** @description The previous version of the due date if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone opened event */ + "webhook-milestone-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block blocked event */ + "webhook-org-block-blocked": { + /** @enum {string} */ + action: "blocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block unblocked event */ + "webhook-org-block-unblocked": { + /** @enum {string} */ + action: "unblocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization deleted event */ + "webhook-organization-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_added event */ + "webhook-organization-member-added": { + /** @enum {string} */ + action: "member_added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_invited event */ + "webhook-organization-member-invited": { + /** @enum {string} */ + action: "member_invited"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The invitation for the user or email if the action is `member_invited`. */ + invitation: { + /** Format: date-time */ + created_at: string; + email: string | null; + /** Format: date-time */ + failed_at: string | null; + failed_reason: string | null; + id: number; + /** Format: uri */ + invitation_teams_url: string; + /** User */ + inviter: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + login: string | null; + node_id: string; + role: string; + team_count: number; + invitation_source?: string; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** organization member_removed event */ + "webhook-organization-member-removed": { + /** @enum {string} */ + action: "member_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization renamed event */ + "webhook-organization-renamed": { + /** @enum {string} */ + action: "renamed"; + changes?: { + login?: { + from?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package published event */ + "webhook-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string | null; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + } | null; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: { [key: string]: unknown } | null; + bugs?: { [key: string]: unknown } | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: { [key: string]: unknown } | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: { [key: string]: unknown } | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: { [key: string]: unknown }[]; + contributors?: { [key: string]: unknown }[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: { [key: string]: unknown } | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: number | string; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + source_url?: string; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package updated event */ + "webhook-package-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string; + size: number; + state: string; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + /** Format: uri */ + source_url?: string; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** page_build event */ + "webhook-page-build": { + /** @description The [List GitHub Pages builds](https://docs.github.com/rest/reference/repos#list-github-pages-builds) itself. */ + build: { + commit: string | null; + created_at: string; + duration: number; + error: { + message: string | null; + }; + /** User */ + pusher: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + status: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-ping": { + /** + * Webhook + * @description The webhook that is being pinged + */ + hook?: { + /** @description Determines whether the hook is actually triggered for the events it subscribes to. */ + active: boolean; + /** @description Only included for GitHub Apps. When you register a new GitHub App, GitHub sends a ping event to the webhook URL you specified during registration. The GitHub App ID sent in this field is required for authenticating an app. */ + app_id?: number; + config: { + content_type?: components["schemas"]["webhook-config-content-type"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + secret?: components["schemas"]["webhook-config-secret"]; + url?: components["schemas"]["webhook-config-url"]; + }; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + deliveries_url?: string; + /** @description Determines what events the hook is triggered for. Default: ['push']. */ + events: string[]; + /** @description Unique identifier of the webhook. */ + id: number; + last_response?: components["schemas"]["hook-response"]; + /** + * @description The type of webhook. The only valid value is 'web'. + * @enum {string} + */ + name: "web"; + /** Format: uri */ + ping_url?: string; + /** Format: uri */ + test_url?: string; + type: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url?: string; + }; + /** @description The ID of the webhook that triggered the ping. */ + hook_id?: number; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + /** @description Random string of GitHub zen. */ + zen?: string; + }; + /** @description The webhooks ping payload encoded with URL encoding. */ + "webhook-ping-form-encoded": { + /** @description A URL-encoded string of the ping JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** project_card converted event */ + "webhook-project-card-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + note: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card created event */ + "webhook-project-card-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card deleted event */ + "webhook-project-card-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number | null; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card edited event */ + "webhook-project-card-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + note: { + from: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card moved event */ + "webhook-project-card-moved": { + /** @enum {string} */ + action: "moved"; + changes?: { + column_id: { + from: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } & { + after_id: number | null; + archived?: boolean; + column_id?: number; + column_url?: string; + created_at?: string; + creator?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + id?: number; + node_id?: string; + note?: string | null; + project_url?: string; + updated_at?: string; + url?: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project closed event */ + "webhook-project-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_column created event */ + "webhook-project-column-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column deleted event */ + "webhook-project-column-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column edited event */ + "webhook-project-column-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + name?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column moved event */ + "webhook-project-column-moved": { + /** @enum {string} */ + action: "moved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project created event */ + "webhook-project-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project deleted event */ + "webhook-project-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project edited event */ + "webhook-project-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the project if the action was `edited`. */ + changes?: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The changes to the project if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project reopened event */ + "webhook-project-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Archived Event */ + "webhook-projects-v2-item-archived": { + /** @enum {string} */ + action: "archived"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Converted Event */ + "webhook-projects-v2-item-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + content_type?: { + from?: string | null; + to?: string; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Created Event */ + "webhook-projects-v2-item-created": { + /** @enum {string} */ + action: "created"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Deleted Event */ + "webhook-projects-v2-item-deleted": { + /** @enum {string} */ + action: "deleted"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Edited Event */ + "webhook-projects-v2-item-edited": { + /** @enum {string} */ + action: "edited"; + changes?: + | { + field_value: { + field_node_id?: string; + field_type?: string; + }; + } + | { + body: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Reordered Event */ + "webhook-projects-v2-item-reordered": { + /** @enum {string} */ + action: "reordered"; + changes: { + previous_projects_v2_item_node_id?: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Restored Event */ + "webhook-projects-v2-item-restored": { + /** @enum {string} */ + action: "restored"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** public event */ + "webhook-public": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request assigned event */ + "webhook-pull-request-assigned": { + /** @enum {string} */ + action: "assigned"; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_disabled event */ + "webhook-pull-request-auto-merge-disabled": { + /** @enum {string} */ + action: "auto_merge_disabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_enabled event */ + "webhook-pull-request-auto-merge-enabled": { + /** @enum {string} */ + action: "auto_merge_enabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason?: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request closed event */ + "webhook-pull-request-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string | null; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at?: string | null; + merged_by?: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "closed" | "open"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request converted_to_draft event */ + "webhook-pull-request-converted-to-draft": { + /** @enum {string} */ + action: "converted_to_draft"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + /** @enum {boolean} */ + merged: false; + merged_at: unknown | null; + merged_by: unknown | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + state?: string; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request demilestoned event */ + "webhook-pull-request-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request dequeued event */ + "webhook-pull-request-dequeued": { + /** @enum {string} */ + action: "dequeued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request edited event */ + "webhook-pull-request-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment if the action was `edited`. */ + changes: { + base?: { + ref: { + from: string; + }; + sha: { + from: string; + }; + }; + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request enqueued event */ + "webhook-pull-request-enqueued": { + /** @enum {string} */ + action: "enqueued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request labeled event */ + "webhook-pull-request-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request locked event */ + "webhook-pull-request-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request milestoned event */ + "webhook-pull-request-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request opened event */ + "webhook-pull-request-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request ready_for_review event */ + "webhook-pull-request-ready-for-review": { + /** @enum {string} */ + action: "ready_for_review"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request reopened event */ + "webhook-pull-request-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: unknown | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment created event */ + "webhook-pull-request-review-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions?: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment deleted event */ + "webhook-pull-request-review-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment edited event */ + "webhook-pull-request-review-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review dismissed event */ + "webhook-pull-request-review-dismissed": { + /** @enum {string} */ + action: "dismissed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + /** @enum {string} */ + state: "dismissed" | "approved" | "changes_requested"; + /** Format: date-time */ + submitted_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review edited event */ + "webhook-pull-request-review-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_request_removed event */ + "webhook-pull-request-review-request-removed": + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_requested event */ + "webhook-pull-request-review-requested": + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review submitted event */ + "webhook-pull-request-review-submitted": { + /** @enum {string} */ + action: "submitted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_thread resolved event */ + "webhook-pull-request-review-thread-resolved": { + /** @enum {string} */ + action: "resolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request_review_thread unresolved event */ + "webhook-pull-request-review-thread-unresolved": { + /** @enum {string} */ + action: "unresolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request synchronize event */ + "webhook-pull-request-synchronize": { + /** @enum {string} */ + action: "synchronize"; + after: string; + before: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unassigned event */ + "webhook-pull-request-unassigned": { + /** @enum {string} */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request unlabeled event */ + "webhook-pull-request-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unlocked event */ + "webhook-pull-request-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** push event */ + "webhook-push": { + /** @description The SHA of the most recent commit on `ref` after the push. */ + after: string; + base_ref: string | null; + /** @description The SHA of the most recent commit on `ref` before the push. */ + before: string; + /** @description An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/reference/repos#commits) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries. */ + commits: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + }[]; + /** @description URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit. */ + compare: string; + /** @description Whether this push created the `ref`. */ + created: boolean; + /** @description Whether this push deleted the `ref`. */ + deleted: boolean; + enterprise?: components["schemas"]["enterprise"]; + /** @description Whether this push was a force push of the `ref`. */ + forced: boolean; + /** Commit */ + head_commit: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + pusher: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email?: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description The full git ref that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`. */ + ref: string; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sender?: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string | null; + description: string | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author?: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + }; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: (string | { [key: string]: unknown }) | null; + bugs?: (string | { [key: string]: unknown }) | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: (string | { [key: string]: unknown }) | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: (string | { [key: string]: unknown }) | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: string[]; + contributors?: string[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: (string | { [key: string]: unknown }) | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: (string | { [key: string]: unknown } | number) | null; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + prerelease?: boolean; + published_at?: string; + tag_name?: string; + target_commitish?: string; + url?: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + about_url?: string; + name?: string; + type?: string; + url?: string; + vendor?: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-updated": { + action: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string; + description: unknown | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: (unknown | null)[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type?: string; + created_at?: string; + download_url?: string; + id?: number; + md5?: string | null; + name?: string; + sha1?: string | null; + sha256?: string; + size?: number; + state?: string; + updated_at?: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + url: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { [key: string]: unknown } | null; + updated_at: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release created event */ + "webhook-release-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release deleted event */ + "webhook-release-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release edited event */ + "webhook-release-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release prereleased event */ + "webhook-release-prereleased": { + /** @enum {string} */ + action: "prereleased"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + /** + * @description Whether the release is identified as a prerelease or a full release. + * @enum {boolean} + */ + prerelease: true; + published_at?: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release published event */ + "webhook-release-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + /** Format: date-time */ + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release released event */ + "webhook-release-released": { + /** @enum {string} */ + action: "released"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release unpublished event */ + "webhook-release-unpublished": { + /** @enum {string} */ + action: "unpublished"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** repository archived event */ + "webhook-repository-archived": { + /** @enum {string} */ + action: "archived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository created event */ + "webhook-repository-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository deleted event */ + "webhook-repository-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_dispatch event */ + "webhook-repository-dispatch-sample": { + action: string; + branch: string; + client_payload: { [key: string]: unknown } | null; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository edited event */ + "webhook-repository-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + default_branch?: { + from: string; + }; + description?: { + from: string | null; + }; + homepage?: { + from: string | null; + }; + topics?: { + from?: string[] | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_import event */ + "webhook-repository-import": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @enum {string} */ + status: "success" | "cancelled" | "failure"; + }; + /** repository privatized event */ + "webhook-repository-privatized": { + /** @enum {string} */ + action: "privatized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository publicized event */ + "webhook-repository-publicized": { + /** @enum {string} */ + action: "publicized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository renamed event */ + "webhook-repository-renamed": { + /** @enum {string} */ + action: "renamed"; + changes: { + repository: { + name: { + from: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository transferred event */ + "webhook-repository-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + owner: { + from: { + /** Organization */ + organization?: { + /** Format: uri */ + avatar_url: string; + description: string | null; + /** Format: uri */ + events_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url?: string; + id: number; + /** Format: uri */ + issues_url: string; + login: string; + /** Format: uri-template */ + members_url: string; + node_id: string; + /** Format: uri-template */ + public_members_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + url: string; + }; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository unarchived event */ + "webhook-repository-unarchived": { + /** @enum {string} */ + action: "unarchived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert create event */ + "webhook-repository-vulnerability-alert-create": { + /** @enum {string} */ + action: "create"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert dismiss event */ + "webhook-repository-vulnerability-alert-dismiss": { + /** @enum {string} */ + action: "dismiss"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_comment?: string | null; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + dismiss_comment?: string | null; + dismiss_reason: string; + dismissed_at: string; + /** User */ + dismisser: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "dismissed"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert reopen event */ + "webhook-repository-vulnerability-alert-reopen": { + /** @enum {string} */ + action: "reopen"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert resolve event */ + "webhook-repository-vulnerability-alert-resolve": { + /** @enum {string} */ + action: "resolve"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "fixed" | "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert created event */ + "webhook-secret-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created": { + /** @enum {string} */ + action?: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + installation?: components["schemas"]["simple-installation"]; + location: components["schemas"]["secret-scanning-location"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created-form-encoded": { + /** @description A URL-encoded string of the secret_scanning_alert_location.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** secret_scanning_alert reopened event */ + "webhook-secret-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert resolved event */ + "webhook-secret-scanning-alert-resolved": { + /** @enum {string} */ + action: "resolved"; + alert: { + created_at?: components["schemas"]["alert-created-at"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + number?: components["schemas"]["alert-number"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + resolution?: + | ( + | null + | "false_positive" + | "wont_fix" + | "revoked" + | "used_in_tests" + | "pattern_deleted" + | "pattern_edited" + ) + | null; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The secret that was detected. */ + secret?: string; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert revoked event */ + "webhook-secret-scanning-alert-revoked": { + /** @enum {string} */ + action: "revoked"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory published event */ + "webhook-security-advisory-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory updated event */ + "webhook-security-advisory-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory withdrawn event */ + "webhook-security-advisory-withdrawn": { + /** @enum {string} */ + action: "withdrawn"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_and_analysis event */ + "webhook-security-and-analysis": { + changes: { + from?: { + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["full-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** sponsorship cancelled event */ + "webhook-sponsorship-cancelled": { + /** @enum {string} */ + action: "cancelled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship created event */ + "webhook-sponsorship-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship edited event */ + "webhook-sponsorship-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + privacy_level?: { + /** @description The `edited` event types include the details about the change when someone edits a sponsorship to change the privacy. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_cancellation event */ + "webhook-sponsorship-pending-cancellation": { + /** @enum {string} */ + action: "pending_cancellation"; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_tier_change event */ + "webhook-sponsorship-pending-tier-change": { + /** @enum {string} */ + action: "pending_tier_change"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship tier_changed event */ + "webhook-sponsorship-tier-changed": { + /** @enum {string} */ + action: "tier_changed"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** star created event */ + "webhook-star-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: string | null; + }; + /** star deleted event */ + "webhook-star-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: unknown | null; + }; + /** status event */ + "webhook-status": { + /** Format: uri */ + avatar_url?: string | null; + /** @description An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. */ + branches: { + commit: { + sha: string | null; + /** Format: uri */ + url: string | null; + }; + name: string; + protected: boolean; + }[]; + commit: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + comments_url: string; + commit: { + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + comment_count: number; + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification: { + payload: string | null; + /** @enum {string} */ + reason: + | "expired_key" + | "not_signing_key" + | "gpgverify_error" + | "gpgverify_unavailable" + | "unsigned" + | "unknown_signature_type" + | "no_user" + | "unverified_email" + | "bad_email" + | "unknown_key" + | "malformed_signature" + | "invalid" + | "valid" + | "bad_cert" + | "ocsp_pending"; + signature: string | null; + verified: boolean; + }; + }; + /** User */ + committer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + node_id: string; + parents: { + /** Format: uri */ + html_url: string; + sha: string; + /** Format: uri */ + url: string; + }[]; + sha: string; + /** Format: uri */ + url: string; + }; + context: string; + created_at: string; + /** @description The optional human-readable description added to the status. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + /** @description The unique identifier of the status. */ + id: number; + installation?: components["schemas"]["simple-installation"]; + name: string; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The Commit SHA. */ + sha: string; + /** + * @description The new state. Can be `pending`, `success`, `failure`, or `error`. + * @enum {string} + */ + state: "pending" | "success" | "failure" | "error"; + /** @description The optional link added to the status. */ + target_url: string | null; + updated_at: string; + }; + /** team_add event */ + "webhook-team-add": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team added_to_repository event */ + "webhook-team-added-to-repository": { + /** @enum {string} */ + action: "added_to_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team created event */ + "webhook-team-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team deleted event */ + "webhook-team-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team edited event */ + "webhook-team-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the team if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + privacy?: { + /** @description The previous version of the team's privacy if the action was `edited`. */ + from: string; + }; + repository?: { + permissions: { + from: { + /** @description The previous version of the team member's `admin` permission on a repository, if the action was `edited`. */ + admin?: boolean; + /** @description The previous version of the team member's `pull` permission on a repository, if the action was `edited`. */ + pull?: boolean; + /** @description The previous version of the team member's `push` permission on a repository, if the action was `edited`. */ + push?: boolean; + }; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team removed_from_repository event */ + "webhook-team-removed-from-repository": { + /** @enum {string} */ + action: "removed_from_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** watch started event */ + "webhook-watch-started": { + /** @enum {string} */ + action: "started"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** workflow_dispatch event */ + "webhook-workflow-dispatch": { + enterprise?: components["schemas"]["enterprise"]; + inputs: { + name?: string; + number?: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow: string; + }; + /** workflow_job completed event */ + "webhook-workflow-job-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | null + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out" + ) + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out"; + head_sha?: string; + html_url?: string; + id?: number; + labels?: (string | null)[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + status?: string; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps?: ({ [key: string]: unknown } | null)[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job in_progress event */ + "webhook-workflow-job-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("success" | "failure" | null | "cancelled" | "neutral") + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | null | "cancelled") + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string | null; + conclusion?: string | null; + head_sha?: string; + html_url?: string; + id?: number; + labels?: string[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps: { + completed_at: string | null; + conclusion: string | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "pending" | "queued"; + }[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job queued event */ + "webhook-workflow-job-queued": { + /** @enum {string} */ + action: "queued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "completed" | "in_progress" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job waiting event */ + "webhook-workflow-job-waiting": { + /** @enum {string} */ + action: "waiting"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: + | "completed" + | "in_progress" + | "queued" + | "pending" + | "waiting"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_run completed event */ + "webhook-workflow-run-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped"; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run in_progress event */ + "webhook-workflow-run-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "skipped" + | "stale" + ) + | null; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string | null; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run requested event */ + "webhook-workflow-run-requested": { + /** @enum {string} */ + action: "requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + display_title: string; + }; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** Unavailable due to service under maintenance. */ + porter_maintenance: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** A header with no content is returned. */ + no_content: unknown; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "per-page": number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string; + "delivery-id": number; + /** @description Page number of the results to fetch. */ + page: number; + /** @description 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; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + "dependabot-alert-comma-separated-states": string; + /** + * @description A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + "dependabot-alert-comma-separated-severities": string; + /** + * @description A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + "dependabot-alert-comma-separated-ecosystems": string; + /** @description A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + "dependabot-alert-comma-separated-packages": string; + /** @description The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + "dependabot-alert-scope": "development" | "runtime"; + /** + * @description The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + "dependabot-alert-sort": "created" | "updated"; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + "pagination-after": string; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + "pagination-first": number; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + "pagination-last": number; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type": string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution": string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort": "created" | "updated"; + /** @description The security feature to enable or disable. */ + "enterprise-security-product": + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + "enterprise-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** @description 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; + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description The unique identifier of the required workflow. */ + "required-workflow-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The number of results per page (max 30). */ + "variables-per-page": number; + /** @description The name of the variable. */ + "variable-name": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name": components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid": components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description The unique identifier of the hook. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** + * @description The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": + | "dependency_graph" + | "dependabot_alerts" + | "dependabot_security_updates" + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + "org-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The ID of the required workflow that has run at least once in a repository. */ + "repo-required-workflow-id": number; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref": components["schemas"]["code-scanning-ref"]; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key": string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort": + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + "workflow-run-status": + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests": boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id": number; + /** @description Only returns workflow runs that are associated with the specified `head_sha`. */ + "workflow-run-head-sha": string; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name": string; + /** @description Returns check runs with the specified `status`. */ + status: "queued" | "in_progress" | "completed"; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** @description A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + "dependabot-alert-comma-separated-manifests": string; + /** + * @description The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + "dependabot-alert-number": components["schemas"]["alert-number"]; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path": string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per: "" | "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** @description 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"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query": number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + /** @description The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.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. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/get-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["enterprise-security-analysis-settings"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/patch-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." */ + advanced_security_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning)." */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + * To disable this functionality, set this field to `null`. + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + }; + }; + }; + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "dependabot/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/post-security-product-enablement-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["enterprise-security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + enablement: components["parameters"]["enterprise-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + /** 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. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + "gists/list-public": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string; + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** 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. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 50). */ + per_page?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + /** Gets information about a notification thread. */ + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean; + /** @example "http://github.blog" */ + blog?: string; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot alerts is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot security updates is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** @description If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. */ + secret_scanning_push_protection_custom_link?: string; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + "oidc/get-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** A JSON serialized template for OIDC subject claim customization */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + }; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + "oidc/update-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["required-workflow"][]; + }; + }; + }; + }; + }; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/create-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/get-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + }; + }; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/delete-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/update-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path?: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id?: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-selected-repositories-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + /** Resource Not Found */ + 404: unknown; + }; + }; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/set-selected-repos-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories for which the workflow should be required. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/add-selected-repo-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/remove-selected-repo-from-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-org-variables": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["organization-actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/create-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when creating a variable */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/get-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/delete-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/update-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility?: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories that can access the organization variable. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + /** If specified, only code scanning alerts with this severity will be returned. */ + severity?: components["schemas"]["code-scanning-alert-severity"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/set-codespaces-billing": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when successfully modifying permissions. */ + 204: never; + 304: components["responses"]["not_modified"]; + /** Users are neither members nor collaborators of this organization. */ + 400: unknown; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. + * @enum {string} + */ + visibility: + | "disabled" + | "selected_members" + | "all_members" + | "all_members_and_outside_collaborators"; + /** @description The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. */ + selected_usernames?: string[]; + }; + }; + }; + }; + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-org-secret"][]; + }; + }; + }; + }; + }; + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description The ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * * `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** 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. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-codespaces-for-user-in-org": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * 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. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `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. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description 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; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description 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; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.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; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + "orgs/list-security-manager-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-simple"][]; + }; + }; + }; + }; + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/add-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** The organization has reached the maximum number of security manager teams. */ + 409: unknown; + }; + }; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/remove-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description 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` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + */ + permission?: string; + }; + }; + }; + }; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "orgs/enable-or-disable-security-product-on-all-org-repos": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + enablement: components["parameters"]["org-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** 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. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** 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. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/list-columns": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/list-repo-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["repo-required-workflow"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/get-repo-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-required-workflow"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-repo-required-workflow-usage": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.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. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to archive this repository. `false` will unarchive a previously archived repository. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Filters artifacts by exact match on their name field. */ + name?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + "actions/get-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Status response */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/set-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/list-repo-variables": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/create-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/get-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/delete-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/update-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description 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; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + /** + * @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. + * @default false + */ + lock_branch?: boolean; + /** + * @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. + * @default false + */ + allow_fork_syncing?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description 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; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** 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. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. */ + sort?: "created"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/list-codeql-databases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/get-codeql-database": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The language of the CodeQL database. */ + language: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis 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; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + /** + * @description Whether the SARIF file will be validated according to the code scanning specifications. + * This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. + */ + validate?: boolean; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + */ + permission?: string; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). */ + 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 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?: components["parameters"]["since"]; + /** 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; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * **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. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * + * 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` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * 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 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. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + manifest?: components["parameters"]["dependabot-alert-comma-separated-manifests"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** @deprecated **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. */ + page?: number; + /** @deprecated The number of results per page (max 100). */ + per_page?: number; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + "dependabot/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the Dependabot alert. + * A `dismissed_reason` must be provided when setting the state to `dismissed`. + * @enum {string} + */ + state: "dismissed" | "open"; + /** + * @description **Required when `state` is `dismissed`.** A reason for dismissing the alert. + * @enum {string} + */ + dismissed_reason?: + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk"; + /** @description An optional comment associated with dismissing the alert. */ + dismissed_comment?: string; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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 | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/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[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description 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`. + * @default + */ + target_url?: string; + /** + * @description 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: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description 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` */ + auto_inactive?: boolean; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/list-deployment-branch-policies": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number; + branch_policies: components["schemas"]["deployment-branch-policy"][]; + }; + }; + }; + }; + }; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** Response if the same branch name pattern already exists */ + 303: never; + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/update-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/delete-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + /** @description When forking from an existing repository, fork with only the default branch. */ + default_branch_only?: boolean; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description 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[]; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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; + }; + }; + }; + }; + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description 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. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. 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. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** 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://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + }; + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. */ + 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?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description 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 | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "not_planned" | "reopened") | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + "issues/check-user-can-be-assigned-to-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + assignee: string; + }; + }; + responses: { + /** Response if `assignee` can be assigned to `issue_number` */ + 204: never; + /** Response if `assignee` can not be assigned to `issue_number` */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. 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. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. 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. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description 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://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** Lists all notifications for the current user in the specified repository. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * 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. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + "repos/create-pages-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-deployment"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + artifact_url: string; + /** + * @description The target environment for this GitHub Pages deployment. + * @default github-pages + */ + environment?: string; + /** + * @description A unique string that represents the version of the build for this deployment. + * @default GITHUB_SHA + */ + pages_build_version: string; + /** @description The OIDC token issued by GitHub Actions certifying the origin of the deployment. */ + oidc_token: string; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** 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. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description 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; + /** @description 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; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description 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; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description 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; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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 above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description 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://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description 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; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; + }; + }; + }; + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description 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. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * 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. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Bad request, resolution comment is invalid or the resolution was not changed. */ + 400: unknown; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution or resolution comment */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + resolution_comment?: components["schemas"]["secret-scanning-alert-resolution-comment"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description 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 | null; + /** @description A short description of the status. */ + description?: string | null; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + }; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** 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. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description The new name to be given to the repository. */ + new_name?: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/list-environment-variables": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/create-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/get-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/delete-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/update-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + "search/code": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + "search/topics": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on 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. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **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. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } + | { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }; + }; + }; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/publish-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["codespace-with-full-repository"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the new repository. */ + name?: string; + /** + * @description Whether the new repository should be private. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @example [] + */ + emails: string[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + 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; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** @description 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; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/list-ssh-signing-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/create-ssh-signing-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ + key: string; + }; + }; + }; + }; + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/get-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/delete-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + "users/list-ssh-signing-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get all supported GitHub API versions. */ + "meta/get-all-versions": { + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/auth-action/package.json b/node_modules/@octokit/auth-action/package.json index 4058475..fed8a14 100644 --- a/node_modules/@octokit/auth-action/package.json +++ b/node_modules/@octokit/auth-action/package.json @@ -1,57 +1,14 @@ { - "_from": "@octokit/auth-action@^1.3.1", - "_id": "@octokit/auth-action@1.3.2", - "_inBundle": false, - "_integrity": "sha512-eCFGNq30e8ObTh6fwcmq8JRaGoputPQtPi9PTgbsEo+NPd5JrOoynI2bV7OpePRqgtATp1JRWC0y/3iXTB11ow==", - "_location": "/@octokit/auth-action", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/auth-action@^1.3.1", - "name": "@octokit/auth-action", - "escapedName": "@octokit%2fauth-action", - "scope": "@octokit", - "rawSpec": "^1.3.1", - "saveSpec": null, - "fetchSpec": "^1.3.1" - }, - "_requiredBy": [ - "/@octokit/auth" - ], - "_resolved": "https://registry.npmjs.org/@octokit/auth-action/-/auth-action-1.3.2.tgz", - "_shasum": "9ef25aff70d78eb98c9ddb6f573bc8a298ca0220", - "_spec": "@octokit/auth-action@^1.3.1", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\auth", - "bugs": { - "url": "https://github.com/octokit/auth-action.js/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@octokit/auth-token": "^2.4.0", - "@octokit/types": "^6.0.3" - }, - "deprecated": false, + "name": "@octokit/auth-action", "description": "GitHub API token authentication for GitHub Actions", - "devDependencies": { - "@octokit/request": "^5.0.1", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.9.0", - "@pika/plugin-ts-standard-pkg": "^0.9.0", - "@types/fetch-mock": "^7.3.1", - "@types/jest": "^26.0.0", - "fetch-mock": "^9.0.0", - "jest": "^26.1.0", - "prettier": "^2.0.5", - "semantic-release": "^17.0.0", - "ts-jest": "^26.1.3", - "typescript": "^4.0.2" - }, + "version": "1.3.4", + "license": "MIT", "files": [ "dist-*/", "bin/" ], - "homepage": "https://github.com/octokit/auth-action.js#readme", + "pika": true, + "sideEffects": false, "keywords": [ "github", "octokit", @@ -59,19 +16,28 @@ "github-action", "api" ], - "license": "MIT", - "main": "dist-node/index.js", - "name": "@octokit/auth-action", - "pika": true, + "repository": "github:octokit/auth-action.js", + "dependencies": { + "@octokit/auth-token": "^3.0.0", + "@octokit/types": "^6.0.3" + }, + "devDependencies": { + "@octokit/request": "^6.0.0", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^27.0.0", + "fetch-mock": "^9.0.0", + "jest": "^27.0.0", + "prettier": "2.7.1", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.2" + }, "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/auth-action.js.git" - }, - "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "version": "1.3.2" + "main": "dist-node/index.js" } diff --git a/node_modules/@octokit/auth-app/README.md b/node_modules/@octokit/auth-app/README.md index 4b069e9..819b3fa 100644 --- a/node_modules/@octokit/auth-app/README.md +++ b/node_modules/@octokit/auth-app/README.md @@ -5,26 +5,37 @@ [![@latest](https://img.shields.io/npm/v/@octokit/auth-app.svg)](https://www.npmjs.com/package/@octokit/auth-app) [![Build Status](https://github.com/octokit/auth-app.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-app.js/actions?query=workflow%3ATest) -`@octokit/auth-app` implements authentication for GitHub Apps using [JSON Web Token](https://jwt.io/) and installation access tokens. - -For other GitHub authentication strategies see [octokit/auth.js](https://github.com/octokit/auth.js). +`@octokit/auth-app` implements authentication for GitHub Apps using [JSON Web Token](https://jwt.io/), installation access tokens, and OAuth user-to-server access tokens. -- [Usage](#usage) -- [`createAppAuth(options)`](#createappauthoptions) -- [`auth(options)`](#authoptions) +- [Standalone usage](#standalone-usage) + - [Authenticate as GitHub App (JSON Web Token)](#authenticate-as-github-app-json-web-token) + - [Authenticate as OAuth App (client ID/client secret)](#authenticate-as-oauth-app-client-idclient-secret) + - [Authenticate as installation](#authenticate-as-installation) + - [Authenticate as user](#authenticate-as-user) +- [Usage with Octokit](#usage-with-octokit) +- [`createAppAuth(options)` or `new Octokit({ auth })`](#createappauthoptions-or-new-octokit-auth-) +- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions) + - [JSON Web Token (JWT) Authentication](#json-web-token-jwt-authentication) + - [OAuth App authentication](#oauth-app-authentication) + - [Installation authentication](#installation-authentication) + - [User authentication (web flow)](#user-authentication-web-flow) + - [User authentication (device flow)](#user-authentication-device-flow) - [Authentication object](#authentication-object) - [JSON Web Token (JWT) authentication](#json-web-token-jwt-authentication) + - [OAuth App authentication](#oauth-app-authentication-1) - [Installation access token authentication](#installation-access-token-authentication) - - [OAuth access token authentication](#oauth-access-token-authentication) + - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) + - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) - [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) - [Implementation details](#implementation-details) - [License](#license) -## Usage +## Standalone usage @@ -32,7 +43,17 @@ For other GitHub authentication strategies see [octokit/auth.js](https://github. Browsers + + +
-Load `@octokit/auth-app` directly from [cdn.skypack.dev](https://cdn.skypack.dev) +⚠️ `@octokit/auth-app` is not meant for usage in the browser. A private key and client secret must not be exposed to users. + +The private keys provided by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You need to convert it first: + +```shell +openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key +``` + +The OAuth APIs to create user-to-server tokens cannot be used because they do not have CORS enabled. + +If you know what you are doing, load `@octokit/auth-app` directly from [cdn.skypack.dev](https://cdn.skypack.dev) ```html +``` + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-app`. Optionally replace `@octokit/core` with a compatible module + +```js +const { Octokit } = require("@octokit/core"); +const { createAppAuth, createOAuthUserAuth } = require("@octokit/auth-app"); +``` + +
+ +```js +const appOctokit = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + }, +}); + +// Send requests as GitHub App +const { slug } = await appOctokit.request("GET /user"); +console.log("authenticated as %s", slug); + +// Send requests as OAuth App +await appOctokit.request("POST /application/{client_id}/token", { + client_id: "1234567890abcdef1234", + access_token: "existingtoken123", +}); +console.log("token is valid"); + +// create a new octokit instance that is authenticated as the user +const userOctokit = await appOctokit.auth({ + type: "oauth-user", + code: "code123", + factory: (options) => { + return new Octokit({ + authStrategy: createOAuthUserAuth, + auth: options, + }); + }, +}); + +// Exchanges the code for the user access token authentication on first request +// and caches the authentication for successive requests +const { + data: { login }, +} = await userOctokit.request("GET /user"); +console.log("Hello, %s!", login); +``` + +In order to create an `octokit` instance that is authenticated as an installation, with automated installation token refresh, set `installationId` as `auth` option + +```js +const installationOctokit = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + installationId: 123, + }, +}); + +// transparently creates an installation access token the first time it is needed +// and refreshes it when it expires +await installationOctokit.request("POST /repos/{owner}/{repo}/issues", { + owner: "octocat", + repo: "hello-world", + title: "title", +}); ``` -## `createAppAuth(options)` +## `createAppAuth(options)` or `new Octokit({ auth })` @@ -166,7 +354,7 @@ const oauthAuthentication = await auth({ type: "oauth", code: "123456" }); string @@ -177,7 +365,7 @@ const oauthAuthentication = await auth({ type: "oauth", code: "123456" }); string @@ -188,7 +376,10 @@ const oauthAuthentication = await auth({ type: "oauth", code: "123456" }); function
- The Client ID of the GitHub App. + The client ID of the GitHub App.
- The Client Secret of the GitHub App. + A client secret for the GitHub App.
- You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the hostname + /api/v3. Example: + +Automatically set to `octokit.request` when using with an `Octokit` constructor. + +For standalone usage, you can pass in your own [`@octokit/request`](https://github.com/octokit/request.js) instance. For usage with enterprise, set `baseUrl` to the hostname + `/api/v3`. Example: ```js const { request } = require("@octokit/request"); @@ -251,7 +442,77 @@ createAppAuth({
-## `auth(options)` +## `auth(options)` or `octokit.auth(options)` + +The async `auth()` method accepts different options depending on your use case + +### JSON Web Token (JWT) Authentication + +Authenticate as the GitHub app to list installations, repositories, and create installation access tokens. + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be either "app". +
+ +### OAuth App authentication + +Create, reset, refresh, delete OAuth user-to-server tokens + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be either "oauth-app". +
+ +### Installation authentication @@ -276,7 +537,7 @@ createAppAuth({ string @@ -287,7 +548,7 @@ createAppAuth({ number @@ -295,12 +556,21 @@ createAppAuth({ repositoryIds + + + + + @@ -311,8 +581,6 @@ createAppAuth({ object @@ -324,9 +592,8 @@ createAppAuth({ function + + +
- Required. Must be either "app", "installation", or "oauth". + Required. Must be "installation".
- Required if type is set to "installation" unless a default installationId was passed to createAppAuth(). ID of installation to retrieve authentication for. + Required unless a default installationId was passed to createAppAuth(). ID of installation to retrieve authentication for.
- array of string + array of numbers + + The id of the repositories that the installation token can access. Also known as a databaseID when querying the repository object in GitHub's GraphQL API. This option is **(recommended)** over repositoryNames when needing to limit the scope of the access token, due to repositoryNames having the possibility of changing. Additionally, you should only include either repositoryIds or repositoryNames, but not both. +
+ repositoryNames + + array of strings - Only relevant if type is set to "installation".
-
- The `id`s of the repositories that the installation token can access. + The name of the repositories that the installation token can access. As mentioned in the repositoryIds description, you should only include either repositoryIds or repositoryNames, but not both.
- Only relevant if type is set to "installation".
-
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.
-Only relevant if `type` is set to `"installation"`. -When the `factory` option is, the `auth({type: "installation", installationId, factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. +The `auth({type: "installation", installationId, factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance: @@ -353,13 +620,85 @@ const installationAuth123 = await appAuth({ boolean - Only relevant if type is set to "installation".
-
- Installation tokens expire after one hour. By default, tokens are cached and returned from cache until expired. To bypass and update a cached token for the given installationId, set refresh to true.
-
- Defaults to false. + +Installation tokens expire after one hour. By default, tokens are cached and returned from cache until expired. To bypass and update a cached token for the given `installationId`, set `refresh` to `true`. + +Defaults to `false`. + +
+ +### User authentication (web flow) + +Exchange code received from the web flow redirect described in [step 2 of GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) + + + + + + + + + + + + + + + + + + + @@ -381,8 +718,6 @@ const installationAuth123 = await appAuth({ string @@ -394,23 +729,17 @@ const installationAuth123 = await appAuth({ string
+ name + + type + + description +
+ type + + string + + Required. Must be "oauth-user".
+ factory + + function + + +The `auth({type: "oauth-user", factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance: + +```js +const { + createAppAuth, + createOAuthUserAuth, +} = require("@octokit/auth-oauth-app"); + +const appAuth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuth = await appAuth({ + type: "oauth-user", + code, + factory: createOAuthUserAuth, +}); + +// will create token upon first call, then cache authentication for successive calls, +// until token needs to be refreshed (if enabled for the GitHub App) +const authentication = await userAuth(); +``` + +
code @@ -368,8 +707,6 @@ const installationAuth123 = await appAuth({ string - Only relevant if type is set to "oauth".
-
The authorization code which was passed as query parameter to the callback URL from the OAuth web application flow.
- Only relevant if type is set to "oauth".
-
The URL in your application where users are sent after authorization. See redirect urls.
- Only relevant if type is set to "oauth".
-
The unguessable random string you provided in Step 1 of the OAuth web application flow.
-## Authentication object - -There are three possible results +### User authentication (device flow) -1. JSON Web Token (JWT) authentication -2. Installation access token authentication -3. OAuth access token authentication +Create a token using [GitHub's device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). -### JSON Web Token (JWT) authentication +The device flow does not require a client secret, but it is required as strategy option for `@octokit/auth-app`, even for the device flow. If you want to implement the device flow without requiring a client secret, use [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme). @@ -435,12 +764,118 @@ There are three possible results string + + + + + + + + + +
- "app" + Required. Must be "oauth-user".
- token + onVerification + + function + + +**Required**. A function that is called once the device and user codes were retrieved. + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = auth({ + type: "oauth-user", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ factory + + function + + +The `auth({type: "oauth-user", factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance: + +```js +const { + createAppAuth, + createOAuthUserAuth, +} = require("@octokit/auth-oauth-app"); + +const appAuth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuth = await appAuth({ + type: "oauth-user", + code, + factory: createOAuthUserAuth, +}); + +// will create token upon first call, then cache authentication for successive calls, +// until token needs to be refreshed (if enabled for the GitHub App) +const authentication = await userAuth(); +``` + +
+ +## Authentication object + +Depending on on the `auth()` call, the resulting authentication object can be one of + +1. JSON Web Token (JWT) authentication +1. OAuth App authentication +1. Installation access token authentication +1. GitHub APP user authentication token with expiring disabled +1. GitHub APP user authentication token with expiring enabled + +### JSON Web Token (JWT) authentication + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "app" +
+ token string @@ -474,6 +909,81 @@ There are three possible results
+### OAuth App authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "oauth-app" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The client ID as passed to the constructor. +
+ clientSecret + + string + + The client secret as passed to the constructor. +
+ headers + + object + + { authorization }. +
+ ### Installation access token authentication @@ -568,6 +1078,17 @@ There are three possible results Only present if repositoryIds option passed to auth(options). + + + + +
+ repositoryNames + + array of strings + + Only present if repositoryNames option passed to auth(options). +
permissions @@ -593,7 +1114,7 @@ There are three possible results
-### OAuth access token authentication +### GitHub APP user authentication token with expiring disabled @@ -621,6 +1142,50 @@ There are three possible results "token" + + + + + + + + + + + + + + + + + + + + + + +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ clientSecret + + string + + One of the app's client secrets +
token @@ -629,7 +1194,38 @@ There are three possible results string - The personal access token + The user access token +
+ +### GitHub APP user authentication token with expiring enabled + + + + + + + + + + + + + + @@ -643,6 +1239,83 @@ There are three possible results "oauth" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token"
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ clientSecret + + string + + One of the app's client secrets +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
@@ -677,7 +1350,7 @@ Note that `auth.hook()` does not create and set an OAuth authentication token. B ```js const { token } = await auth({ - type: "oauth", + type: "oauth-user", code: "123456", }); const requestWithAuth = request.defaults({ @@ -687,12 +1360,37 @@ const requestWithAuth = request.defaults({ }); ``` +## Types + +```ts +import { + // strategy options + StrategyOptions, + // auth options + AuthOptions, + AppAuthOptions, + OAuthAppAuthOptions, + InstallationAuthOptions, + OAuthWebFlowAuthOptions, + OAuthDeviceFlowAuthOptions, + // authentication objects + Authentication, + AppAuthentication, + OAuthAppAuthentication, + InstallationAccessTokenAuthentication, + GitHubAppUserAuthentication, + GitHubAppUserAuthenticationWithExpiration, +} from "@octokit/auth-app"; +``` + ## Implementation details When creating a JSON Web Token, it sets the "issued at time" (iat) to 30s in the past as we have seen people running situations where the GitHub API claimed the iat would be in future. It turned out the clocks on the different machine were not in sync. Installation access tokens are valid for 60 minutes. This library invalidates them after 59 minutes to account for request delays. +All OAuth features are implemented internally using [@octokit/auth-oauth-app](https://github.com/octokit/auth-oauth-app.js/#readme). + ## License [MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/dist-node/index.js b/node_modules/@octokit/auth-app/dist-node/index.js index d0885d7..c514431 100644 --- a/node_modules/@octokit/auth-app/dist-node/index.js +++ b/node_modules/@octokit/auth-app/dist-node/index.js @@ -6,51 +6,24 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau var universalUserAgent = require('universal-user-agent'); var request = require('@octokit/request'); +var authOauthApp = require('@octokit/auth-oauth-app'); +var deprecation = require('deprecation'); var universalGithubAppJwt = require('universal-github-app-jwt'); var LRU = _interopDefault(require('lru-cache')); -var requestError = require('@octokit/request-error'); - -async function getAppAuthentication({ - appId, - privateKey, - timeDifference -}) { - const appAuthentication = await universalGithubAppJwt.githubAppJwt({ - id: +appId, - privateKey, - now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference - }); - return { - type: "app", - token: appAuthentication.token, - appId: appAuthentication.appId, - expiresAt: new Date(appAuthentication.expiration * 1000).toISOString() - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} +var authOauthUser = require('@octokit/auth-oauth-user'); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + keys.push.apply(keys, symbols); } @@ -77,6 +50,21 @@ function _objectSpread2(target) { return target; } +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; @@ -113,6 +101,32 @@ function _objectWithoutProperties(source, excluded) { return target; } +async function getAppAuthentication({ + appId, + privateKey, + timeDifference +}) { + try { + const appAuthentication = await universalGithubAppJwt.githubAppJwt({ + id: +appId, + privateKey, + now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference + }); + return { + type: "app", + token: appAuthentication.token, + appId: appAuthentication.appId, + expiresAt: new Date(appAuthentication.expiration * 1000).toISOString() + }; + } catch (error) { + if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") { + throw new Error("The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'"); + } else { + throw error; + } + } +} + // https://github.com/isaacs/node-lru-cache#readme function getCache() { return new LRU({ @@ -146,6 +160,7 @@ async function get(cache, options) { expiresAt, permissions, repositoryIds: options.repositoryIds, + repositoryNames: options.repositoryNames, singleFileName, repositorySelection: repositorySelection }; @@ -160,11 +175,13 @@ async function set(cache, options, data) { function optionsToCacheKey({ installationId, permissions = {}, - repositoryIds = [] + repositoryIds = [], + repositoryNames = [] }) { const permissionsString = Object.keys(permissions).sort().map(name => permissions[name] === "read" ? name : `${name}!`).join(","); const repositoryIdsString = repositoryIds.sort().join(","); - return [installationId, repositoryIdsString, permissionsString].filter(Boolean).join("|"); + const repositoryNamesString = repositoryNames.join(","); + return [installationId, repositoryIdsString, repositoryNamesString, permissionsString].filter(Boolean).join("|"); } function toTokenAuthentication({ @@ -175,6 +192,7 @@ function toTokenAuthentication({ repositorySelection, permissions, repositoryIds, + repositoryNames, singleFileName }) { return Object.assign({ @@ -188,11 +206,14 @@ function toTokenAuthentication({ repositorySelection }, repositoryIds ? { repositoryIds + } : null, repositoryNames ? { + repositoryNames } : null, singleFileName ? { singleFileName } : null); } +const _excluded = ["type", "factory", "oauthApp"]; async function getInstallationAuthentication(state, options, customRequest) { const installationId = Number(options.installationId || state.installationId); @@ -201,14 +222,16 @@ async function getInstallationAuthentication(state, options, customRequest) { } if (options.factory) { - const { + const _state$options = _objectSpread2(_objectSpread2({}, state), options), + { type, - factory - } = options, - factoryAuthOptions = _objectWithoutProperties(options, ["type", "factory"]); // @ts-ignore if `options.factory` is set, the return type for `auth()` should be `Promise>` + factory, + oauthApp + } = _state$options, + factoryAuthOptions = _objectWithoutProperties(_state$options, _excluded); // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>` - return factory(Object.assign({}, state, factoryAuthOptions)); + return factory(factoryAuthOptions); } const optionsWithInstallationTokenFromState = Object.assign({ @@ -225,6 +248,7 @@ async function getInstallationAuthentication(state, options, customRequest) { expiresAt, permissions, repositoryIds, + repositoryNames, singleFileName, repositorySelection } = result; @@ -236,6 +260,7 @@ async function getInstallationAuthentication(state, options, customRequest) { permissions, repositorySelection, repositoryIds, + repositoryNames, singleFileName }); } @@ -248,15 +273,14 @@ async function getInstallationAuthentication(state, options, customRequest) { token, expires_at: expiresAt, repositories, - permissions, - // @ts-ignore - repository_selection: repositorySelection, - // @ts-ignore + permissions: permissionsOptional, + repository_selection: repositorySelectionOptional, single_file: singleFileName } } = await request("POST /app/installations/{installation_id}/access_tokens", { installation_id: installationId, repository_ids: options.repositoryIds, + repositories: options.repositoryNames, permissions: options.permissions, mediaType: { previews: ["machine-man"] @@ -265,7 +289,14 @@ async function getInstallationAuthentication(state, options, customRequest) { authorization: `bearer ${appAuthentication.token}` } }); + /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */ + + const permissions = permissionsOptional || {}; + /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */ + + const repositorySelection = repositorySelectionOptional || "all"; const repositoryIds = repositories ? repositories.map(r => r.id) : void 0; + const repositoryNames = repositories ? repositories.map(repo => repo.name) : void 0; const createdAt = new Date().toISOString(); await set(state.cache, optionsWithInstallationTokenFromState, { token, @@ -274,6 +305,7 @@ async function getInstallationAuthentication(state, options, customRequest) { repositorySelection, permissions, repositoryIds, + repositoryNames, singleFileName }); return toTokenAuthentication({ @@ -284,67 +316,42 @@ async function getInstallationAuthentication(state, options, customRequest) { repositorySelection, permissions, repositoryIds, + repositoryNames, singleFileName }); } -async function getOAuthAuthentication(state, options, customRequest) { - const request = customRequest || state.request; // The "/login/oauth/access_token" is not part of the REST API hosted on api.github.com, - // instead it’s using the github.com domain. - - const route = /^https:\/\/(api\.)?github\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl) ? "POST https://github.com/login/oauth/access_token" : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace("/api/v3", "/login/oauth/access_token")}`; - const parameters = { - headers: { - accept: `application/json` - }, - client_id: state.clientId, - client_secret: state.clientSecret, - code: options.code, - state: options.state, - redirect_uri: options.redirectUrl - }; - const response = await request(route, parameters); - - if (response.data.error !== undefined) { - throw new requestError.RequestError(`${response.data.error_description} (${response.data.error})`, response.status, { - headers: response.headers, - request: request.endpoint(route, parameters) - }); - } - - const { - data: { - access_token: token - } - } = response; - return { - type: "token", - tokenType: "oauth", - token - }; -} - -async function auth(state, options) { - const { - type - } = options; - - switch (type) { +async function auth(state, authOptions) { + switch (authOptions.type) { case "app": return getAppAuthentication(state); + // @ts-expect-error "oauth" is not supperted in types + + case "oauth": + state.log.warn( // @ts-expect-error `log.warn()` expects string + new deprecation.Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`)); + + case "oauth-app": + return state.oauthApp({ + type: "oauth-app" + }); case "installation": - return getInstallationAuthentication(state, options); + return getInstallationAuthentication(state, _objectSpread2(_objectSpread2({}, authOptions), {}, { + type: "installation" + })); - case "oauth": - return getOAuthAuthentication(state, options); + case "oauth-user": + // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as "WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions" + return state.oauthApp(authOptions); default: - throw new Error(`Invalid auth type: ${type}`); + // @ts-expect-error type is "never" at this point + throw new Error(`Invalid auth type: ${authOptions.type}`); } } -const PATHS = ["/app", "/app/hook/config", "/app/installations", "/app/installations/{installation_id}", "/app/installations/{installation_id}/access_tokens", "/app/installations/{installation_id}/suspended", "/marketplace_listing/accounts/{account_id}", "/marketplace_listing/plan", "/marketplace_listing/plans", "/marketplace_listing/plans/{plan_id}/accounts", "/marketplace_listing/stubbed/accounts/{account_id}", "/marketplace_listing/stubbed/plan", "/marketplace_listing/stubbed/plans", "/marketplace_listing/stubbed/plans/{plan_id}/accounts", "/orgs/{org}/installation", "/repos/{owner}/{repo}/installation", "/users/{username}/installation"]; // CREDIT: Simon Grondin (https://github.com/SGrondin) +const PATHS = ["/app", "/app/hook/config", "/app/hook/deliveries", "/app/hook/deliveries/{delivery_id}", "/app/hook/deliveries/{delivery_id}/attempts", "/app/installations", "/app/installations/{installation_id}", "/app/installations/{installation_id}/access_tokens", "/app/installations/{installation_id}/suspended", "/marketplace_listing/accounts/{account_id}", "/marketplace_listing/plan", "/marketplace_listing/plans", "/marketplace_listing/plans/{plan_id}/accounts", "/marketplace_listing/stubbed/accounts/{account_id}", "/marketplace_listing/stubbed/plan", "/marketplace_listing/stubbed/plans", "/marketplace_listing/stubbed/plans/{plan_id}/accounts", "/orgs/{org}/installation", "/repos/{owner}/{repo}/installation", "/users/{username}/installation"]; // CREDIT: Simon Grondin (https://github.com/SGrondin) // https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js function routeMatcher(paths) { @@ -384,9 +391,14 @@ function isNotTimeSkewError(error) { } async function hook(state, request, route, parameters) { - let endpoint = request.endpoint.merge(route, parameters); + const endpoint = request.endpoint.merge(route, parameters); + const url = endpoint.url; // Do not intercept request to retrieve a new token - if (requiresAppAuth(endpoint.url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { + if (/\/login\/oauth\/access_token$/.test(url)) { + return request(endpoint); + } + + if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { const { token } = await getAppAuthentication(state); @@ -404,11 +416,11 @@ async function hook(state, request, route, parameters) { // Throw the error to be handled upstream. - if (typeof error.headers.date === "undefined") { + if (typeof error.response.headers.date === "undefined") { throw error; } - const diff = Math.floor((Date.parse(error.headers.date) - Date.parse(new Date().toString())) / 1000); + const diff = Math.floor((Date.parse(error.response.headers.date) - Date.parse(new Date().toString())) / 1000); state.log.warn(error.message); state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`); const { @@ -423,10 +435,19 @@ async function hook(state, request, route, parameters) { return response; } + if (authOauthUser.requiresBasicAuth(url)) { + const authentication = await state.oauthApp({ + type: "oauth-app" + }); + endpoint.headers.authorization = authentication.headers.authorization; + return request(endpoint); + } + const { token, createdAt - } = await getInstallationAuthentication(state, {}, request); + } = await getInstallationAuthentication(state, // @ts-expect-error TBD + {}, request); endpoint.headers.authorization = `token ${token}`; return sendRequestWithRetries(state, request, endpoint, createdAt); } @@ -464,28 +485,54 @@ async function sendRequestWithRetries(state, request, options, createdAt, retrie } } -const VERSION = "3.0.0"; +const VERSION = "3.6.1"; + +function createAppAuth(options) { + if (!options.appId) { + throw new Error("[@octokit/auth-app] appId option is required"); + } + + if (!options.privateKey) { + throw new Error("[@octokit/auth-app] privateKey option is required"); + } + + if ("installationId" in options && !options.installationId) { + throw new Error("[@octokit/auth-app] installationId is set to a falsy value"); + } -const createAppAuth = function createAppAuth(options) { const log = Object.assign({ warn: console.warn.bind(console) }, options.log); + const request$1 = options.request || request.request.defaults({ + headers: { + "user-agent": `octokit-auth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } + }); const state = Object.assign({ - request: request.request.defaults({ - headers: { - "user-agent": `octokit-auth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}` - } - }), + request: request$1, cache: getCache() }, options, options.installationId ? { installationId: Number(options.installationId) } : {}, { - log - }); + log, + oauthApp: authOauthApp.createOAuthAppAuth({ + clientType: "github-app", + clientId: options.clientId || "", + clientSecret: options.clientSecret || "", + request: request$1 + }) + }); // @ts-expect-error not worth the extra code to appease TS + return Object.assign(auth.bind(null, state), { hook: hook.bind(null, state) }); -}; +} +Object.defineProperty(exports, 'createOAuthUserAuth', { + enumerable: true, + get: function () { + return authOauthUser.createOAuthUserAuth; + } +}); exports.createAppAuth = createAppAuth; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/dist-node/index.js.map b/node_modules/@octokit/auth-app/dist-node/index.js.map index 9e5fe38..3987878 100644 --- a/node_modules/@octokit/auth-app/dist-node/index.js.map +++ b/node_modules/@octokit/auth-app/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/get-app-authentication.js","../dist-src/cache.js","../dist-src/to-token-authentication.js","../dist-src/get-installation-authentication.js","../dist-src/get-oauth-authentication.js","../dist-src/auth.js","../dist-src/requires-app-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { githubAppJwt } from \"universal-github-app-jwt\";\nexport async function getAppAuthentication({ appId, privateKey, timeDifference, }) {\n const appAuthentication = await githubAppJwt({\n id: +appId,\n privateKey,\n now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference,\n });\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(),\n };\n}\n","// https://github.com/isaacs/node-lru-cache#readme\nimport LRU from \"lru-cache\";\nexport function getCache() {\n return new LRU({\n // cache max. 15000 tokens, that will use less than 10mb memory\n max: 15000,\n // Cache for 1 minute less than GitHub expiry\n maxAge: 1000 * 60 * 59,\n });\n}\nexport async function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName,] = result.split(\"|\");\n const permissions = options.permissions ||\n permissionsString.split(/,/).reduce((permissions, string) => {\n if (/!$/.test(string)) {\n permissions[string.slice(0, -1)] = \"write\";\n }\n else {\n permissions[string] = \"read\";\n }\n return permissions;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n singleFileName,\n repositorySelection: repositorySelection,\n };\n}\nexport async function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions\n ? \"\"\n : Object.keys(data.permissions)\n .map((name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`)\n .join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName,\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], }) {\n const permissionsString = Object.keys(permissions)\n .sort()\n .map((name) => (permissions[name] === \"read\" ? name : `${name}!`))\n .join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n return [installationId, repositoryIdsString, permissionsString]\n .filter(Boolean)\n .join(\"|\");\n}\n","export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, singleFileName, }) {\n return Object.assign({\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection,\n }, repositoryIds ? { repositoryIds } : null, singleFileName ? { singleFileName } : null);\n}\n","import { get, set } from \"./cache\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { toTokenAuthentication } from \"./to-token-authentication\";\nexport async function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\"[@octokit/auth-app] installationId option is required for installation authentication.\");\n }\n if (options.factory) {\n const { type, factory, ...factoryAuthOptions } = options;\n // @ts-ignore if `options.factory` is set, the return type for `auth()` should be `Promise>`\n return factory(Object.assign({}, state, factoryAuthOptions));\n }\n const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options);\n if (!options.refresh) {\n const result = await get(state.cache, optionsWithInstallationTokenFromState);\n if (result) {\n const { token, createdAt, expiresAt, permissions, repositoryIds, singleFileName, repositorySelection, } = result;\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n permissions,\n repositorySelection,\n repositoryIds,\n singleFileName,\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const request = customRequest || state.request;\n const { data: { token, expires_at: expiresAt, repositories, permissions, \n // @ts-ignore\n repository_selection: repositorySelection, \n // @ts-ignore\n single_file: singleFileName, }, } = await request(\"POST /app/installations/{installation_id}/access_tokens\", {\n installation_id: installationId,\n repository_ids: options.repositoryIds,\n permissions: options.permissions,\n mediaType: {\n previews: [\"machine-man\"],\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`,\n },\n });\n const repositoryIds = repositories\n ? repositories.map((r) => r.id)\n : void 0;\n const createdAt = new Date().toISOString();\n await set(state.cache, optionsWithInstallationTokenFromState, {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n singleFileName,\n });\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n singleFileName,\n });\n}\n","import { RequestError } from \"@octokit/request-error\";\nexport async function getOAuthAuthentication(state, options, customRequest) {\n const request = customRequest || state.request;\n // The \"/login/oauth/access_token\" is not part of the REST API hosted on api.github.com,\n // instead it’s using the github.com domain.\n const route = /^https:\\/\\/(api\\.)?github\\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl)\n ? \"POST https://github.com/login/oauth/access_token\"\n : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace(\"/api/v3\", \"/login/oauth/access_token\")}`;\n const parameters = {\n headers: {\n accept: `application/json`,\n },\n client_id: state.clientId,\n client_secret: state.clientSecret,\n code: options.code,\n state: options.state,\n redirect_uri: options.redirectUrl,\n };\n const response = await request(route, parameters);\n if (response.data.error !== undefined) {\n throw new RequestError(`${response.data.error_description} (${response.data.error})`, response.status, {\n headers: response.headers,\n request: request.endpoint(route, parameters),\n });\n }\n const { data: { access_token: token }, } = response;\n return {\n type: \"token\",\n tokenType: \"oauth\",\n token,\n };\n}\n","import { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { getOAuthAuthentication } from \"./get-oauth-authentication\";\nexport async function auth(state, options) {\n const { type } = options;\n switch (type) {\n case \"app\":\n return getAppAuthentication(state);\n case \"installation\":\n return getInstallationAuthentication(state, options);\n case \"oauth\":\n return getOAuthAuthentication(state, options);\n default:\n throw new Error(`Invalid auth type: ${type}`);\n }\n}\n","const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\",\n];\n// CREDIT: Simon Grondin (https://github.com/SGrondin)\n// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js\nfunction routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((p) => p\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nexport function requiresAppAuth(url) {\n return !!url && REGEX.test(url);\n}\n","import { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { requiresAppAuth } from \"./requires-app-auth\";\nconst FIVE_SECONDS_IN_MS = 5 * 1000;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(/'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/) ||\n error.message.match(/'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/));\n}\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n if (requiresAppAuth(endpoint.url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token}`;\n let response;\n try {\n response = await request(endpoint);\n }\n catch (error) {\n // If there's an issue with the expiration, regenerate the token and try again.\n // Otherwise rethrow the error for upstream handling.\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n // If the date header is missing, we can't correct the system time skew.\n // Throw the error to be handled upstream.\n if (typeof error.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor((Date.parse(error.headers.date) - Date.parse(new Date().toString())) /\n 1000);\n state.log.warn(error.message);\n state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);\n const { token } = await getAppAuthentication({\n ...state,\n timeDifference: diff,\n });\n endpoint.headers.authorization = `bearer ${token}`;\n return request(endpoint);\n }\n return response;\n }\n const { token, createdAt } = await getInstallationAuthentication(state, {}, request);\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(state, request, endpoint, createdAt);\n}\n/**\n * Newly created tokens might not be accessible immediately after creation.\n * In case of a 401 response, we retry with an exponential delay until more\n * than five seconds pass since the creation of the token.\n *\n * @see https://github.com/octokit/auth-app.js/issues/65\n */\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);\n try {\n return await request(options);\n }\n catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1000;\n state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\n","export const VERSION = \"3.0.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { getCache } from \"./cache\";\nimport { VERSION } from \"./version\";\nexport const createAppAuth = function createAppAuth(options) {\n const log = Object.assign({\n warn: console.warn.bind(console),\n }, options.log);\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`,\n },\n }),\n cache: getCache(),\n }, options, options.installationId\n ? { installationId: Number(options.installationId) }\n : {}, {\n log,\n });\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n};\n"],"names":["getAppAuthentication","appId","privateKey","timeDifference","appAuthentication","githubAppJwt","id","now","Math","floor","Date","type","token","expiresAt","expiration","toISOString","getCache","LRU","max","maxAge","get","cache","options","cacheKey","optionsToCacheKey","result","createdAt","repositorySelection","permissionsString","singleFileName","split","permissions","reduce","string","test","slice","repositoryIds","set","data","key","Object","keys","map","name","join","value","installationId","sort","repositoryIdsString","filter","Boolean","toTokenAuthentication","assign","tokenType","getInstallationAuthentication","state","customRequest","Number","Error","factory","factoryAuthOptions","optionsWithInstallationTokenFromState","refresh","request","expires_at","repositories","repository_selection","single_file","installation_id","repository_ids","mediaType","previews","headers","authorization","r","getOAuthAuthentication","route","endpoint","DEFAULTS","baseUrl","replace","parameters","accept","client_id","clientId","client_secret","clientSecret","code","redirect_uri","redirectUrl","response","error","undefined","RequestError","error_description","status","access_token","auth","PATHS","routeMatcher","paths","regexes","p","c","startsWith","regex","RegExp","REGEX","requiresAppAuth","url","FIVE_SECONDS_IN_MS","isNotTimeSkewError","message","match","hook","merge","date","diff","parse","toString","log","warn","sendRequestWithRetries","retries","timeSinceTokenCreationInMs","awaitTime","Promise","resolve","setTimeout","VERSION","createAppAuth","console","bind","defaults","getUserAgent"],"mappings":";;;;;;;;;;;;AACO,eAAeA,oBAAf,CAAoC;AAAEC,EAAAA,KAAF;AAASC,EAAAA,UAAT;AAAqBC,EAAAA;AAArB,CAApC,EAA4E;AAC/E,QAAMC,iBAAiB,GAAG,MAAMC,kCAAY,CAAC;AACzCC,IAAAA,EAAE,EAAE,CAACL,KADoC;AAEzCC,IAAAA,UAFyC;AAGzCK,IAAAA,GAAG,EAAEJ,cAAc,IAAIK,IAAI,CAACC,KAAL,CAAWC,IAAI,CAACH,GAAL,KAAa,IAAxB,IAAgCJ;AAHd,GAAD,CAA5C;AAKA,SAAO;AACHQ,IAAAA,IAAI,EAAE,KADH;AAEHC,IAAAA,KAAK,EAAER,iBAAiB,CAACQ,KAFtB;AAGHX,IAAAA,KAAK,EAAEG,iBAAiB,CAACH,KAHtB;AAIHY,IAAAA,SAAS,EAAE,IAAIH,IAAJ,CAASN,iBAAiB,CAACU,UAAlB,GAA+B,IAAxC,EAA8CC,WAA9C;AAJR,GAAP;AAMH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD;AACA,AACO,SAASC,QAAT,GAAoB;AACvB,SAAO,IAAIC,GAAJ,CAAQ;AACX;AACAC,IAAAA,GAAG,EAAE,KAFM;AAGX;AACAC,IAAAA,MAAM,EAAE,OAAO,EAAP,GAAY;AAJT,GAAR,CAAP;AAMH;AACD,AAAO,eAAeC,GAAf,CAAmBC,KAAnB,EAA0BC,OAA1B,EAAmC;AACtC,QAAMC,QAAQ,GAAGC,iBAAiB,CAACF,OAAD,CAAlC;AACA,QAAMG,MAAM,GAAG,MAAMJ,KAAK,CAACD,GAAN,CAAUG,QAAV,CAArB;;AACA,MAAI,CAACE,MAAL,EAAa;AACT;AACH;;AACD,QAAM,CAACb,KAAD,EAAQc,SAAR,EAAmBb,SAAnB,EAA8Bc,mBAA9B,EAAmDC,iBAAnD,EAAsEC,cAAtE,IAAyFJ,MAAM,CAACK,KAAP,CAAa,GAAb,CAA/F;AACA,QAAMC,WAAW,GAAGT,OAAO,CAACS,WAAR,IAChBH,iBAAiB,CAACE,KAAlB,CAAwB,GAAxB,EAA6BE,MAA7B,CAAoC,CAACD,WAAD,EAAcE,MAAd,KAAyB;AACzD,QAAI,KAAKC,IAAL,CAAUD,MAAV,CAAJ,EAAuB;AACnBF,MAAAA,WAAW,CAACE,MAAM,CAACE,KAAP,CAAa,CAAb,EAAgB,CAAC,CAAjB,CAAD,CAAX,GAAmC,OAAnC;AACH,KAFD,MAGK;AACDJ,MAAAA,WAAW,CAACE,MAAD,CAAX,GAAsB,MAAtB;AACH;;AACD,WAAOF,WAAP;AACH,GARD,EAQG,EARH,CADJ;AAUA,SAAO;AACHnB,IAAAA,KADG;AAEHc,IAAAA,SAFG;AAGHb,IAAAA,SAHG;AAIHkB,IAAAA,WAJG;AAKHK,IAAAA,aAAa,EAAEd,OAAO,CAACc,aALpB;AAMHP,IAAAA,cANG;AAOHF,IAAAA,mBAAmB,EAAEA;AAPlB,GAAP;AASH;AACD,AAAO,eAAeU,GAAf,CAAmBhB,KAAnB,EAA0BC,OAA1B,EAAmCgB,IAAnC,EAAyC;AAC5C,QAAMC,GAAG,GAAGf,iBAAiB,CAACF,OAAD,CAA7B;AACA,QAAMM,iBAAiB,GAAGN,OAAO,CAACS,WAAR,GACpB,EADoB,GAEpBS,MAAM,CAACC,IAAP,CAAYH,IAAI,CAACP,WAAjB,EACGW,GADH,CACQC,IAAD,IAAW,GAAEA,IAAK,GAAEL,IAAI,CAACP,WAAL,CAAiBY,IAAjB,MAA2B,OAA3B,GAAqC,GAArC,GAA2C,EAAG,EADzE,EAEGC,IAFH,CAEQ,GAFR,CAFN;AAKA,QAAMC,KAAK,GAAG,CACVP,IAAI,CAAC1B,KADK,EAEV0B,IAAI,CAACZ,SAFK,EAGVY,IAAI,CAACzB,SAHK,EAIVyB,IAAI,CAACX,mBAJK,EAKVC,iBALU,EAMVU,IAAI,CAACT,cANK,EAOZe,IAPY,CAOP,GAPO,CAAd;AAQA,QAAMvB,KAAK,CAACgB,GAAN,CAAUE,GAAV,EAAeM,KAAf,CAAN;AACH;;AACD,SAASrB,iBAAT,CAA2B;AAAEsB,EAAAA,cAAF;AAAkBf,EAAAA,WAAW,GAAG,EAAhC;AAAoCK,EAAAA,aAAa,GAAG;AAApD,CAA3B,EAAsF;AAClF,QAAMR,iBAAiB,GAAGY,MAAM,CAACC,IAAP,CAAYV,WAAZ,EACrBgB,IADqB,GAErBL,GAFqB,CAEhBC,IAAD,IAAWZ,WAAW,CAACY,IAAD,CAAX,KAAsB,MAAtB,GAA+BA,IAA/B,GAAuC,GAAEA,IAAK,GAFxC,EAGrBC,IAHqB,CAGhB,GAHgB,CAA1B;AAIA,QAAMI,mBAAmB,GAAGZ,aAAa,CAACW,IAAd,GAAqBH,IAArB,CAA0B,GAA1B,CAA5B;AACA,SAAO,CAACE,cAAD,EAAiBE,mBAAjB,EAAsCpB,iBAAtC,EACFqB,MADE,CACKC,OADL,EAEFN,IAFE,CAEG,GAFH,CAAP;AAGH;;AC/DM,SAASO,qBAAT,CAA+B;AAAEL,EAAAA,cAAF;AAAkBlC,EAAAA,KAAlB;AAAyBc,EAAAA,SAAzB;AAAoCb,EAAAA,SAApC;AAA+Cc,EAAAA,mBAA/C;AAAoEI,EAAAA,WAApE;AAAiFK,EAAAA,aAAjF;AAAgGP,EAAAA;AAAhG,CAA/B,EAAkJ;AACrJ,SAAOW,MAAM,CAACY,MAAP,CAAc;AACjBzC,IAAAA,IAAI,EAAE,OADW;AAEjB0C,IAAAA,SAAS,EAAE,cAFM;AAGjBzC,IAAAA,KAHiB;AAIjBkC,IAAAA,cAJiB;AAKjBf,IAAAA,WALiB;AAMjBL,IAAAA,SANiB;AAOjBb,IAAAA,SAPiB;AAQjBc,IAAAA;AARiB,GAAd,EASJS,aAAa,GAAG;AAAEA,IAAAA;AAAF,GAAH,GAAuB,IAThC,EASsCP,cAAc,GAAG;AAAEA,IAAAA;AAAF,GAAH,GAAwB,IAT5E,CAAP;AAUH;;ACRM,eAAeyB,6BAAf,CAA6CC,KAA7C,EAAoDjC,OAApD,EAA6DkC,aAA7D,EAA4E;AAC/E,QAAMV,cAAc,GAAGW,MAAM,CAACnC,OAAO,CAACwB,cAAR,IAA0BS,KAAK,CAACT,cAAjC,CAA7B;;AACA,MAAI,CAACA,cAAL,EAAqB;AACjB,UAAM,IAAIY,KAAJ,CAAU,wFAAV,CAAN;AACH;;AACD,MAAIpC,OAAO,CAACqC,OAAZ,EAAqB;AACjB,UAAM;AAAEhD,MAAAA,IAAF;AAAQgD,MAAAA;AAAR,QAA2CrC,OAAjD;AAAA,UAA0BsC,kBAA1B,4BAAiDtC,OAAjD,uBADiB;;;AAGjB,WAAOqC,OAAO,CAACnB,MAAM,CAACY,MAAP,CAAc,EAAd,EAAkBG,KAAlB,EAAyBK,kBAAzB,CAAD,CAAd;AACH;;AACD,QAAMC,qCAAqC,GAAGrB,MAAM,CAACY,MAAP,CAAc;AAAEN,IAAAA;AAAF,GAAd,EAAkCxB,OAAlC,CAA9C;;AACA,MAAI,CAACA,OAAO,CAACwC,OAAb,EAAsB;AAClB,UAAMrC,MAAM,GAAG,MAAML,GAAG,CAACmC,KAAK,CAAClC,KAAP,EAAcwC,qCAAd,CAAxB;;AACA,QAAIpC,MAAJ,EAAY;AACR,YAAM;AAAEb,QAAAA,KAAF;AAASc,QAAAA,SAAT;AAAoBb,QAAAA,SAApB;AAA+BkB,QAAAA,WAA/B;AAA4CK,QAAAA,aAA5C;AAA2DP,QAAAA,cAA3D;AAA2EF,QAAAA;AAA3E,UAAoGF,MAA1G;AACA,aAAO0B,qBAAqB,CAAC;AACzBL,QAAAA,cADyB;AAEzBlC,QAAAA,KAFyB;AAGzBc,QAAAA,SAHyB;AAIzBb,QAAAA,SAJyB;AAKzBkB,QAAAA,WALyB;AAMzBJ,QAAAA,mBANyB;AAOzBS,QAAAA,aAPyB;AAQzBP,QAAAA;AARyB,OAAD,CAA5B;AAUH;AACJ;;AACD,QAAMzB,iBAAiB,GAAG,MAAMJ,oBAAoB,CAACuD,KAAD,CAApD;AACA,QAAMQ,OAAO,GAAGP,aAAa,IAAID,KAAK,CAACQ,OAAvC;AACA,QAAM;AAAEzB,IAAAA,IAAI,EAAE;AAAE1B,MAAAA,KAAF;AAASoD,MAAAA,UAAU,EAAEnD,SAArB;AAAgCoD,MAAAA,YAAhC;AAA8ClC,MAAAA,WAA9C;AACd;AACAmC,MAAAA,oBAAoB,EAAEvC,mBAFR;AAGd;AACAwC,MAAAA,WAAW,EAAEtC;AAJC;AAAR,MAI8B,MAAMkC,OAAO,CAAC,yDAAD,EAA4D;AACzGK,IAAAA,eAAe,EAAEtB,cADwF;AAEzGuB,IAAAA,cAAc,EAAE/C,OAAO,CAACc,aAFiF;AAGzGL,IAAAA,WAAW,EAAET,OAAO,CAACS,WAHoF;AAIzGuC,IAAAA,SAAS,EAAE;AACPC,MAAAA,QAAQ,EAAE,CAAC,aAAD;AADH,KAJ8F;AAOzGC,IAAAA,OAAO,EAAE;AACLC,MAAAA,aAAa,EAAG,UAASrE,iBAAiB,CAACQ,KAAM;AAD5C;AAPgG,GAA5D,CAJjD;AAeA,QAAMwB,aAAa,GAAG6B,YAAY,GAC5BA,YAAY,CAACvB,GAAb,CAAkBgC,CAAD,IAAOA,CAAC,CAACpE,EAA1B,CAD4B,GAE5B,KAAK,CAFX;AAGA,QAAMoB,SAAS,GAAG,IAAIhB,IAAJ,GAAWK,WAAX,EAAlB;AACA,QAAMsB,GAAG,CAACkB,KAAK,CAAClC,KAAP,EAAcwC,qCAAd,EAAqD;AAC1DjD,IAAAA,KAD0D;AAE1Dc,IAAAA,SAF0D;AAG1Db,IAAAA,SAH0D;AAI1Dc,IAAAA,mBAJ0D;AAK1DI,IAAAA,WAL0D;AAM1DK,IAAAA,aAN0D;AAO1DP,IAAAA;AAP0D,GAArD,CAAT;AASA,SAAOsB,qBAAqB,CAAC;AACzBL,IAAAA,cADyB;AAEzBlC,IAAAA,KAFyB;AAGzBc,IAAAA,SAHyB;AAIzBb,IAAAA,SAJyB;AAKzBc,IAAAA,mBALyB;AAMzBI,IAAAA,WANyB;AAOzBK,IAAAA,aAPyB;AAQzBP,IAAAA;AARyB,GAAD,CAA5B;AAUH;;ACrEM,eAAe8C,sBAAf,CAAsCpB,KAAtC,EAA6CjC,OAA7C,EAAsDkC,aAAtD,EAAqE;AACxE,QAAMO,OAAO,GAAGP,aAAa,IAAID,KAAK,CAACQ,OAAvC,CADwE;AAGxE;;AACA,QAAMa,KAAK,GAAG,kCAAkC1C,IAAlC,CAAuCqB,KAAK,CAACQ,OAAN,CAAcc,QAAd,CAAuBC,QAAvB,CAAgCC,OAAvE,IACR,kDADQ,GAEP,QAAOxB,KAAK,CAACQ,OAAN,CAAcc,QAAd,CAAuBC,QAAvB,CAAgCC,OAAhC,CAAwCC,OAAxC,CAAgD,SAAhD,EAA2D,2BAA3D,CAAwF,EAFtG;AAGA,QAAMC,UAAU,GAAG;AACfT,IAAAA,OAAO,EAAE;AACLU,MAAAA,MAAM,EAAG;AADJ,KADM;AAIfC,IAAAA,SAAS,EAAE5B,KAAK,CAAC6B,QAJF;AAKfC,IAAAA,aAAa,EAAE9B,KAAK,CAAC+B,YALN;AAMfC,IAAAA,IAAI,EAAEjE,OAAO,CAACiE,IANC;AAOfhC,IAAAA,KAAK,EAAEjC,OAAO,CAACiC,KAPA;AAQfiC,IAAAA,YAAY,EAAElE,OAAO,CAACmE;AARP,GAAnB;AAUA,QAAMC,QAAQ,GAAG,MAAM3B,OAAO,CAACa,KAAD,EAAQK,UAAR,CAA9B;;AACA,MAAIS,QAAQ,CAACpD,IAAT,CAAcqD,KAAd,KAAwBC,SAA5B,EAAuC;AACnC,UAAM,IAAIC,yBAAJ,CAAkB,GAAEH,QAAQ,CAACpD,IAAT,CAAcwD,iBAAkB,KAAIJ,QAAQ,CAACpD,IAAT,CAAcqD,KAAM,GAA5E,EAAgFD,QAAQ,CAACK,MAAzF,EAAiG;AACnGvB,MAAAA,OAAO,EAAEkB,QAAQ,CAAClB,OADiF;AAEnGT,MAAAA,OAAO,EAAEA,OAAO,CAACc,QAAR,CAAiBD,KAAjB,EAAwBK,UAAxB;AAF0F,KAAjG,CAAN;AAIH;;AACD,QAAM;AAAE3C,IAAAA,IAAI,EAAE;AAAE0D,MAAAA,YAAY,EAAEpF;AAAhB;AAAR,MAAqC8E,QAA3C;AACA,SAAO;AACH/E,IAAAA,IAAI,EAAE,OADH;AAEH0C,IAAAA,SAAS,EAAE,OAFR;AAGHzC,IAAAA;AAHG,GAAP;AAKH;;AC5BM,eAAeqF,IAAf,CAAoB1C,KAApB,EAA2BjC,OAA3B,EAAoC;AACvC,QAAM;AAAEX,IAAAA;AAAF,MAAWW,OAAjB;;AACA,UAAQX,IAAR;AACI,SAAK,KAAL;AACI,aAAOX,oBAAoB,CAACuD,KAAD,CAA3B;;AACJ,SAAK,cAAL;AACI,aAAOD,6BAA6B,CAACC,KAAD,EAAQjC,OAAR,CAApC;;AACJ,SAAK,OAAL;AACI,aAAOqD,sBAAsB,CAACpB,KAAD,EAAQjC,OAAR,CAA7B;;AACJ;AACI,YAAM,IAAIoC,KAAJ,CAAW,sBAAqB/C,IAAK,EAArC,CAAN;AARR;AAUH;;ACfD,MAAMuF,KAAK,GAAG,CACV,MADU,EAEV,kBAFU,EAGV,oBAHU,EAIV,sCAJU,EAKV,oDALU,EAMV,gDANU,EAOV,4CAPU,EAQV,2BARU,EASV,4BATU,EAUV,+CAVU,EAWV,oDAXU,EAYV,mCAZU,EAaV,oCAbU,EAcV,uDAdU,EAeV,0BAfU,EAgBV,oCAhBU,EAiBV,gCAjBU,CAAd;AAoBA;;AACA,SAASC,YAAT,CAAsBC,KAAtB,EAA6B;AACzB;;AACA;AACJ;AACA;AACA;AACI,QAAMC,OAAO,GAAGD,KAAK,CAAC1D,GAAN,CAAW4D,CAAD,IAAOA,CAAC,CAC7BxE,KAD4B,CACtB,GADsB,EAE5BY,GAF4B,CAEvB6D,CAAD,IAAQA,CAAC,CAACC,UAAF,CAAa,GAAb,IAAoB,SAApB,GAAgCD,CAFhB,EAG5B3D,IAH4B,CAGvB,GAHuB,CAAjB,CAAhB,CANyB;;AAWzB;AACJ;AACA;AACA;;AACI,QAAM6D,KAAK,GAAI,OAAMJ,OAAO,CAAC3D,GAAR,CAAagC,CAAD,IAAQ,MAAKA,CAAE,GAA3B,EAA+B9B,IAA/B,CAAoC,GAApC,CAAyC,SAA9D,CAfyB;;AAiBzB;AACJ;AACA;AACA;AACA;;AAEI,SAAO,IAAI8D,MAAJ,CAAWD,KAAX,EAAkB,GAAlB,CAAP;AACH;;AACD,MAAME,KAAK,GAAGR,YAAY,CAACD,KAAD,CAA1B;AACA,AAAO,SAASU,eAAT,CAAyBC,GAAzB,EAA8B;AACjC,SAAO,CAAC,CAACA,GAAF,IAASF,KAAK,CAACzE,IAAN,CAAW2E,GAAX,CAAhB;AACH;;AC9CD,MAAMC,kBAAkB,GAAG,IAAI,IAA/B;;AACA,SAASC,kBAAT,CAA4BpB,KAA5B,EAAmC;AAC/B,SAAO,EAAEA,KAAK,CAACqB,OAAN,CAAcC,KAAd,CAAoB,uHAApB,KACLtB,KAAK,CAACqB,OAAN,CAAcC,KAAd,CAAoB,oGAApB,CADG,CAAP;AAEH;;AACD,AAAO,eAAeC,IAAf,CAAoB3D,KAApB,EAA2BQ,OAA3B,EAAoCa,KAApC,EAA2CK,UAA3C,EAAuD;AAC1D,MAAIJ,QAAQ,GAAGd,OAAO,CAACc,QAAR,CAAiBsC,KAAjB,CAAuBvC,KAAvB,EAA8BK,UAA9B,CAAf;;AACA,MAAI2B,eAAe,CAAC/B,QAAQ,CAACgC,GAAT,CAAa7B,OAAb,CAAqBjB,OAAO,CAACc,QAAR,CAAiBC,QAAjB,CAA0BC,OAA/C,EAAwD,EAAxD,CAAD,CAAnB,EAAkF;AAC9E,UAAM;AAAEnE,MAAAA;AAAF,QAAY,MAAMZ,oBAAoB,CAACuD,KAAD,CAA5C;AACAsB,IAAAA,QAAQ,CAACL,OAAT,CAAiBC,aAAjB,GAAkC,UAAS7D,KAAM,EAAjD;AACA,QAAI8E,QAAJ;;AACA,QAAI;AACAA,MAAAA,QAAQ,GAAG,MAAM3B,OAAO,CAACc,QAAD,CAAxB;AACH,KAFD,CAGA,OAAOc,KAAP,EAAc;AACV;AACA;AACA,UAAIoB,kBAAkB,CAACpB,KAAD,CAAtB,EAA+B;AAC3B,cAAMA,KAAN;AACH,OALS;AAOV;;;AACA,UAAI,OAAOA,KAAK,CAACnB,OAAN,CAAc4C,IAArB,KAA8B,WAAlC,EAA+C;AAC3C,cAAMzB,KAAN;AACH;;AACD,YAAM0B,IAAI,GAAG7G,IAAI,CAACC,KAAL,CAAW,CAACC,IAAI,CAAC4G,KAAL,CAAW3B,KAAK,CAACnB,OAAN,CAAc4C,IAAzB,IAAiC1G,IAAI,CAAC4G,KAAL,CAAW,IAAI5G,IAAJ,GAAW6G,QAAX,EAAX,CAAlC,IACpB,IADS,CAAb;AAEAhE,MAAAA,KAAK,CAACiE,GAAN,CAAUC,IAAV,CAAe9B,KAAK,CAACqB,OAArB;AACAzD,MAAAA,KAAK,CAACiE,GAAN,CAAUC,IAAV,CAAgB,wEAAuEJ,IAAK,+DAA5F;AACA,YAAM;AAAEzG,QAAAA;AAAF,UAAY,MAAMZ,oBAAoB,mCACrCuD,KADqC;AAExCpD,QAAAA,cAAc,EAAEkH;AAFwB,SAA5C;AAIAxC,MAAAA,QAAQ,CAACL,OAAT,CAAiBC,aAAjB,GAAkC,UAAS7D,KAAM,EAAjD;AACA,aAAOmD,OAAO,CAACc,QAAD,CAAd;AACH;;AACD,WAAOa,QAAP;AACH;;AACD,QAAM;AAAE9E,IAAAA,KAAF;AAASc,IAAAA;AAAT,MAAuB,MAAM4B,6BAA6B,CAACC,KAAD,EAAQ,EAAR,EAAYQ,OAAZ,CAAhE;AACAc,EAAAA,QAAQ,CAACL,OAAT,CAAiBC,aAAjB,GAAkC,SAAQ7D,KAAM,EAAhD;AACA,SAAO8G,sBAAsB,CAACnE,KAAD,EAAQQ,OAAR,EAAiBc,QAAjB,EAA2BnD,SAA3B,CAA7B;AACH;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAegG,sBAAf,CAAsCnE,KAAtC,EAA6CQ,OAA7C,EAAsDzC,OAAtD,EAA+DI,SAA/D,EAA0EiG,OAAO,GAAG,CAApF,EAAuF;AACnF,QAAMC,0BAA0B,GAAG,CAAC,IAAIlH,IAAJ,EAAD,GAAc,CAAC,IAAIA,IAAJ,CAASgB,SAAT,CAAlD;;AACA,MAAI;AACA,WAAO,MAAMqC,OAAO,CAACzC,OAAD,CAApB;AACH,GAFD,CAGA,OAAOqE,KAAP,EAAc;AACV,QAAIA,KAAK,CAACI,MAAN,KAAiB,GAArB,EAA0B;AACtB,YAAMJ,KAAN;AACH;;AACD,QAAIiC,0BAA0B,IAAId,kBAAlC,EAAsD;AAClD,UAAIa,OAAO,GAAG,CAAd,EAAiB;AACbhC,QAAAA,KAAK,CAACqB,OAAN,GAAiB,SAAQW,OAAQ,mBAAkBC,0BAA0B,GAAG,IAAK,uNAArF;AACH;;AACD,YAAMjC,KAAN;AACH;;AACD,MAAEgC,OAAF;AACA,UAAME,SAAS,GAAGF,OAAO,GAAG,IAA5B;AACApE,IAAAA,KAAK,CAACiE,GAAN,CAAUC,IAAV,CAAgB,kGAAiGE,OAAQ,WAAUE,SAAS,GAAG,IAAK,IAApJ;AACA,UAAM,IAAIC,OAAJ,CAAaC,OAAD,IAAaC,UAAU,CAACD,OAAD,EAAUF,SAAV,CAAnC,CAAN;AACA,WAAOH,sBAAsB,CAACnE,KAAD,EAAQQ,OAAR,EAAiBzC,OAAjB,EAA0BI,SAA1B,EAAqCiG,OAArC,CAA7B;AACH;AACJ;;ACzEM,MAAMM,OAAO,GAAG,mBAAhB;;MCMMC,aAAa,GAAG,SAASA,aAAT,CAAuB5G,OAAvB,EAAgC;AACzD,QAAMkG,GAAG,GAAGhF,MAAM,CAACY,MAAP,CAAc;AACtBqE,IAAAA,IAAI,EAAEU,OAAO,CAACV,IAAR,CAAaW,IAAb,CAAkBD,OAAlB;AADgB,GAAd,EAET7G,OAAO,CAACkG,GAFC,CAAZ;AAGA,QAAMjE,KAAK,GAAGf,MAAM,CAACY,MAAP,CAAc;AACxBW,IAAAA,OAAO,EAAEA,eAAO,CAACsE,QAAR,CAAiB;AACtB7D,MAAAA,OAAO,EAAE;AACL,sBAAe,uBAAsByD,OAAQ,IAAGK,+BAAY,EAAG;AAD1D;AADa,KAAjB,CADe;AAMxBjH,IAAAA,KAAK,EAAEL,QAAQ;AANS,GAAd,EAOXM,OAPW,EAOFA,OAAO,CAACwB,cAAR,GACN;AAAEA,IAAAA,cAAc,EAAEW,MAAM,CAACnC,OAAO,CAACwB,cAAT;AAAxB,GADM,GAEN,EATQ,EASJ;AACN0E,IAAAA;AADM,GATI,CAAd;AAYA,SAAOhF,MAAM,CAACY,MAAP,CAAc6C,IAAI,CAACmC,IAAL,CAAU,IAAV,EAAgB7E,KAAhB,CAAd,EAAsC;AACzC2D,IAAAA,IAAI,EAAEA,IAAI,CAACkB,IAAL,CAAU,IAAV,EAAgB7E,KAAhB;AADmC,GAAtC,CAAP;AAGH,CAnBM;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/get-app-authentication.js","../dist-src/cache.js","../dist-src/to-token-authentication.js","../dist-src/get-installation-authentication.js","../dist-src/auth.js","../dist-src/requires-app-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { githubAppJwt } from \"universal-github-app-jwt\";\nexport async function getAppAuthentication({ appId, privateKey, timeDifference, }) {\n try {\n const appAuthentication = await githubAppJwt({\n id: +appId,\n privateKey,\n now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference,\n });\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(),\n };\n }\n catch (error) {\n if (privateKey === \"-----BEGIN RSA PRIVATE KEY-----\") {\n throw new Error(\"The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\\n'\");\n }\n else {\n throw error;\n }\n }\n}\n","// https://github.com/isaacs/node-lru-cache#readme\nimport LRU from \"lru-cache\";\nexport function getCache() {\n return new LRU({\n // cache max. 15000 tokens, that will use less than 10mb memory\n max: 15000,\n // Cache for 1 minute less than GitHub expiry\n maxAge: 1000 * 60 * 59,\n });\n}\nexport async function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName,] = result.split(\"|\");\n const permissions = options.permissions ||\n permissionsString.split(/,/).reduce((permissions, string) => {\n if (/!$/.test(string)) {\n permissions[string.slice(0, -1)] = \"write\";\n }\n else {\n permissions[string] = \"read\";\n }\n return permissions;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n repositoryNames: options.repositoryNames,\n singleFileName,\n repositorySelection: repositorySelection,\n };\n}\nexport async function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions\n ? \"\"\n : Object.keys(data.permissions)\n .map((name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`)\n .join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName,\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], repositoryNames = [], }) {\n const permissionsString = Object.keys(permissions)\n .sort()\n .map((name) => (permissions[name] === \"read\" ? name : `${name}!`))\n .join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n const repositoryNamesString = repositoryNames.join(\",\");\n return [\n installationId,\n repositoryIdsString,\n repositoryNamesString,\n permissionsString,\n ]\n .filter(Boolean)\n .join(\"|\");\n}\n","export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }) {\n return Object.assign({\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection,\n }, repositoryIds ? { repositoryIds } : null, repositoryNames ? { repositoryNames } : null, singleFileName ? { singleFileName } : null);\n}\n","import { get, set } from \"./cache\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { toTokenAuthentication } from \"./to-token-authentication\";\nexport async function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\"[@octokit/auth-app] installationId option is required for installation authentication.\");\n }\n if (options.factory) {\n const { type, factory, oauthApp, ...factoryAuthOptions } = {\n ...state,\n ...options,\n };\n // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>`\n return factory(factoryAuthOptions);\n }\n const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options);\n if (!options.refresh) {\n const result = await get(state.cache, optionsWithInstallationTokenFromState);\n if (result) {\n const { token, createdAt, expiresAt, permissions, repositoryIds, repositoryNames, singleFileName, repositorySelection, } = result;\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n permissions,\n repositorySelection,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const request = customRequest || state.request;\n const { data: { token, expires_at: expiresAt, repositories, permissions: permissionsOptional, repository_selection: repositorySelectionOptional, single_file: singleFileName, }, } = await request(\"POST /app/installations/{installation_id}/access_tokens\", {\n installation_id: installationId,\n repository_ids: options.repositoryIds,\n repositories: options.repositoryNames,\n permissions: options.permissions,\n mediaType: {\n previews: [\"machine-man\"],\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`,\n },\n });\n /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */\n const permissions = permissionsOptional || {};\n /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */\n const repositorySelection = repositorySelectionOptional || \"all\";\n const repositoryIds = repositories\n ? repositories.map((r) => r.id)\n : void 0;\n const repositoryNames = repositories\n ? repositories.map((repo) => repo.name)\n : void 0;\n const createdAt = new Date().toISOString();\n await set(state.cache, optionsWithInstallationTokenFromState, {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n}\n","import { Deprecation } from \"deprecation\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nexport async function auth(state, authOptions) {\n switch (authOptions.type) {\n case \"app\":\n return getAppAuthentication(state);\n // @ts-expect-error \"oauth\" is not supperted in types\n case \"oauth\":\n state.log.warn(\n // @ts-expect-error `log.warn()` expects string\n new Deprecation(`[@octokit/auth-app] {type: \"oauth\"} is deprecated. Use {type: \"oauth-app\"} instead`));\n case \"oauth-app\":\n return state.oauthApp({ type: \"oauth-app\" });\n case \"installation\":\n authOptions;\n return getInstallationAuthentication(state, {\n ...authOptions,\n type: \"installation\",\n });\n case \"oauth-user\":\n // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as \"WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions\"\n return state.oauthApp(authOptions);\n default:\n // @ts-expect-error type is \"never\" at this point\n throw new Error(`Invalid auth type: ${authOptions.type}`);\n }\n}\n","const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/hook/deliveries\",\n \"/app/hook/deliveries/{delivery_id}\",\n \"/app/hook/deliveries/{delivery_id}/attempts\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\",\n];\n// CREDIT: Simon Grondin (https://github.com/SGrondin)\n// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js\nfunction routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((p) => p\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nexport function requiresAppAuth(url) {\n return !!url && REGEX.test(url);\n}\n","import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { requiresAppAuth } from \"./requires-app-auth\";\nconst FIVE_SECONDS_IN_MS = 5 * 1000;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(/'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/) ||\n error.message.match(/'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/));\n}\nexport async function hook(state, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n const url = endpoint.url;\n // Do not intercept request to retrieve a new token\n if (/\\/login\\/oauth\\/access_token$/.test(url)) {\n return request(endpoint);\n }\n if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token}`;\n let response;\n try {\n response = await request(endpoint);\n }\n catch (error) {\n // If there's an issue with the expiration, regenerate the token and try again.\n // Otherwise rethrow the error for upstream handling.\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n // If the date header is missing, we can't correct the system time skew.\n // Throw the error to be handled upstream.\n if (typeof error.response.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor((Date.parse(error.response.headers.date) -\n Date.parse(new Date().toString())) /\n 1000);\n state.log.warn(error.message);\n state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);\n const { token } = await getAppAuthentication({\n ...state,\n timeDifference: diff,\n });\n endpoint.headers.authorization = `bearer ${token}`;\n return request(endpoint);\n }\n return response;\n }\n if (requiresBasicAuth(url)) {\n const authentication = await state.oauthApp({ type: \"oauth-app\" });\n endpoint.headers.authorization = authentication.headers.authorization;\n return request(endpoint);\n }\n const { token, createdAt } = await getInstallationAuthentication(state, \n // @ts-expect-error TBD\n {}, request);\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(state, request, endpoint, createdAt);\n}\n/**\n * Newly created tokens might not be accessible immediately after creation.\n * In case of a 401 response, we retry with an exponential delay until more\n * than five seconds pass since the creation of the token.\n *\n * @see https://github.com/octokit/auth-app.js/issues/65\n */\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);\n try {\n return await request(options);\n }\n catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1000;\n state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\n","export const VERSION = \"3.6.1\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { getCache } from \"./cache\";\nimport { VERSION } from \"./version\";\nexport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport function createAppAuth(options) {\n if (!options.appId) {\n throw new Error(\"[@octokit/auth-app] appId option is required\");\n }\n if (!options.privateKey) {\n throw new Error(\"[@octokit/auth-app] privateKey option is required\");\n }\n if (\"installationId\" in options && !options.installationId) {\n throw new Error(\"[@octokit/auth-app] installationId is set to a falsy value\");\n }\n const log = Object.assign({\n warn: console.warn.bind(console),\n }, options.log);\n const request = options.request ||\n defaultRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const state = Object.assign({\n request,\n cache: getCache(),\n }, options, options.installationId\n ? { installationId: Number(options.installationId) }\n : {}, {\n log,\n oauthApp: createOAuthAppAuth({\n clientType: \"github-app\",\n clientId: options.clientId || \"\",\n clientSecret: options.clientSecret || \"\",\n request,\n }),\n });\n // @ts-expect-error not worth the extra code to appease TS\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["getAppAuthentication","appId","privateKey","timeDifference","appAuthentication","githubAppJwt","id","now","Math","floor","Date","type","token","expiresAt","expiration","toISOString","error","Error","getCache","LRU","max","maxAge","get","cache","options","cacheKey","optionsToCacheKey","result","createdAt","repositorySelection","permissionsString","singleFileName","split","permissions","reduce","string","test","slice","repositoryIds","repositoryNames","set","data","key","Object","keys","map","name","join","value","installationId","sort","repositoryIdsString","repositoryNamesString","filter","Boolean","toTokenAuthentication","assign","tokenType","getInstallationAuthentication","state","customRequest","Number","factory","oauthApp","factoryAuthOptions","optionsWithInstallationTokenFromState","refresh","request","expires_at","repositories","permissionsOptional","repository_selection","repositorySelectionOptional","single_file","installation_id","repository_ids","mediaType","previews","headers","authorization","r","repo","auth","authOptions","log","warn","Deprecation","PATHS","routeMatcher","paths","regexes","p","c","startsWith","regex","RegExp","REGEX","requiresAppAuth","url","FIVE_SECONDS_IN_MS","isNotTimeSkewError","message","match","hook","route","parameters","endpoint","merge","replace","DEFAULTS","baseUrl","response","date","diff","parse","toString","requiresBasicAuth","authentication","sendRequestWithRetries","retries","timeSinceTokenCreationInMs","status","awaitTime","Promise","resolve","setTimeout","VERSION","createAppAuth","console","bind","defaultRequest","defaults","getUserAgent","createOAuthAppAuth","clientType","clientId","clientSecret"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACO,eAAeA,oBAAf,CAAoC;AAAEC,EAAAA,KAAF;AAASC,EAAAA,UAAT;AAAqBC,EAAAA;AAArB,CAApC,EAA4E;AAC/E,MAAI;AACA,UAAMC,iBAAiB,GAAG,MAAMC,kCAAY,CAAC;AACzCC,MAAAA,EAAE,EAAE,CAACL,KADoC;AAEzCC,MAAAA,UAFyC;AAGzCK,MAAAA,GAAG,EAAEJ,cAAc,IAAIK,IAAI,CAACC,KAAL,CAAWC,IAAI,CAACH,GAAL,KAAa,IAAxB,IAAgCJ;AAHd,KAAD,CAA5C;AAKA,WAAO;AACHQ,MAAAA,IAAI,EAAE,KADH;AAEHC,MAAAA,KAAK,EAAER,iBAAiB,CAACQ,KAFtB;AAGHX,MAAAA,KAAK,EAAEG,iBAAiB,CAACH,KAHtB;AAIHY,MAAAA,SAAS,EAAE,IAAIH,IAAJ,CAASN,iBAAiB,CAACU,UAAlB,GAA+B,IAAxC,EAA8CC,WAA9C;AAJR,KAAP;AAMH,GAZD,CAaA,OAAOC,KAAP,EAAc;AACV,QAAId,UAAU,KAAK,iCAAnB,EAAsD;AAClD,YAAM,IAAIe,KAAJ,CAAU,wMAAV,CAAN;AACH,KAFD,MAGK;AACD,YAAMD,KAAN;AACH;AACJ;AACJ;;ACvBD;AACA,AACO,SAASE,QAAT,GAAoB;AACvB,SAAO,IAAIC,GAAJ,CAAQ;AACX;AACAC,IAAAA,GAAG,EAAE,KAFM;AAGX;AACAC,IAAAA,MAAM,EAAE,OAAO,EAAP,GAAY;AAJT,GAAR,CAAP;AAMH;AACD,AAAO,eAAeC,GAAf,CAAmBC,KAAnB,EAA0BC,OAA1B,EAAmC;AACtC,QAAMC,QAAQ,GAAGC,iBAAiB,CAACF,OAAD,CAAlC;AACA,QAAMG,MAAM,GAAG,MAAMJ,KAAK,CAACD,GAAN,CAAUG,QAAV,CAArB;;AACA,MAAI,CAACE,MAAL,EAAa;AACT;AACH;;AACD,QAAM,CAACf,KAAD,EAAQgB,SAAR,EAAmBf,SAAnB,EAA8BgB,mBAA9B,EAAmDC,iBAAnD,EAAsEC,cAAtE,IAAyFJ,MAAM,CAACK,KAAP,CAAa,GAAb,CAA/F;AACA,QAAMC,WAAW,GAAGT,OAAO,CAACS,WAAR,IAChBH,iBAAiB,CAACE,KAAlB,CAAwB,GAAxB,EAA6BE,MAA7B,CAAoC,CAACD,WAAD,EAAcE,MAAd,KAAyB;AACzD,QAAI,KAAKC,IAAL,CAAUD,MAAV,CAAJ,EAAuB;AACnBF,MAAAA,WAAW,CAACE,MAAM,CAACE,KAAP,CAAa,CAAb,EAAgB,CAAC,CAAjB,CAAD,CAAX,GAAmC,OAAnC;AACH,KAFD,MAGK;AACDJ,MAAAA,WAAW,CAACE,MAAD,CAAX,GAAsB,MAAtB;AACH;;AACD,WAAOF,WAAP;AACH,GARD,EAQG,EARH,CADJ;AAUA,SAAO;AACHrB,IAAAA,KADG;AAEHgB,IAAAA,SAFG;AAGHf,IAAAA,SAHG;AAIHoB,IAAAA,WAJG;AAKHK,IAAAA,aAAa,EAAEd,OAAO,CAACc,aALpB;AAMHC,IAAAA,eAAe,EAAEf,OAAO,CAACe,eANtB;AAOHR,IAAAA,cAPG;AAQHF,IAAAA,mBAAmB,EAAEA;AARlB,GAAP;AAUH;AACD,AAAO,eAAeW,GAAf,CAAmBjB,KAAnB,EAA0BC,OAA1B,EAAmCiB,IAAnC,EAAyC;AAC5C,QAAMC,GAAG,GAAGhB,iBAAiB,CAACF,OAAD,CAA7B;AACA,QAAMM,iBAAiB,GAAGN,OAAO,CAACS,WAAR,GACpB,EADoB,GAEpBU,MAAM,CAACC,IAAP,CAAYH,IAAI,CAACR,WAAjB,EACGY,GADH,CACQC,IAAD,IAAW,GAAEA,IAAK,GAAEL,IAAI,CAACR,WAAL,CAAiBa,IAAjB,MAA2B,OAA3B,GAAqC,GAArC,GAA2C,EAAG,EADzE,EAEGC,IAFH,CAEQ,GAFR,CAFN;AAKA,QAAMC,KAAK,GAAG,CACVP,IAAI,CAAC7B,KADK,EAEV6B,IAAI,CAACb,SAFK,EAGVa,IAAI,CAAC5B,SAHK,EAIV4B,IAAI,CAACZ,mBAJK,EAKVC,iBALU,EAMVW,IAAI,CAACV,cANK,EAOZgB,IAPY,CAOP,GAPO,CAAd;AAQA,QAAMxB,KAAK,CAACiB,GAAN,CAAUE,GAAV,EAAeM,KAAf,CAAN;AACH;;AACD,SAAStB,iBAAT,CAA2B;AAAEuB,EAAAA,cAAF;AAAkBhB,EAAAA,WAAW,GAAG,EAAhC;AAAoCK,EAAAA,aAAa,GAAG,EAApD;AAAwDC,EAAAA,eAAe,GAAG;AAA1E,CAA3B,EAA4G;AACxG,QAAMT,iBAAiB,GAAGa,MAAM,CAACC,IAAP,CAAYX,WAAZ,EACrBiB,IADqB,GAErBL,GAFqB,CAEhBC,IAAD,IAAWb,WAAW,CAACa,IAAD,CAAX,KAAsB,MAAtB,GAA+BA,IAA/B,GAAuC,GAAEA,IAAK,GAFxC,EAGrBC,IAHqB,CAGhB,GAHgB,CAA1B;AAIA,QAAMI,mBAAmB,GAAGb,aAAa,CAACY,IAAd,GAAqBH,IAArB,CAA0B,GAA1B,CAA5B;AACA,QAAMK,qBAAqB,GAAGb,eAAe,CAACQ,IAAhB,CAAqB,GAArB,CAA9B;AACA,SAAO,CACHE,cADG,EAEHE,mBAFG,EAGHC,qBAHG,EAIHtB,iBAJG,EAMFuB,MANE,CAMKC,OANL,EAOFP,IAPE,CAOG,GAPH,CAAP;AAQH;;ACtEM,SAASQ,qBAAT,CAA+B;AAAEN,EAAAA,cAAF;AAAkBrC,EAAAA,KAAlB;AAAyBgB,EAAAA,SAAzB;AAAoCf,EAAAA,SAApC;AAA+CgB,EAAAA,mBAA/C;AAAoEI,EAAAA,WAApE;AAAiFK,EAAAA,aAAjF;AAAgGC,EAAAA,eAAhG;AAAiHR,EAAAA;AAAjH,CAA/B,EAAmK;AACtK,SAAOY,MAAM,CAACa,MAAP,CAAc;AACjB7C,IAAAA,IAAI,EAAE,OADW;AAEjB8C,IAAAA,SAAS,EAAE,cAFM;AAGjB7C,IAAAA,KAHiB;AAIjBqC,IAAAA,cAJiB;AAKjBhB,IAAAA,WALiB;AAMjBL,IAAAA,SANiB;AAOjBf,IAAAA,SAPiB;AAQjBgB,IAAAA;AARiB,GAAd,EASJS,aAAa,GAAG;AAAEA,IAAAA;AAAF,GAAH,GAAuB,IAThC,EASsCC,eAAe,GAAG;AAAEA,IAAAA;AAAF,GAAH,GAAyB,IAT9E,EASoFR,cAAc,GAAG;AAAEA,IAAAA;AAAF,GAAH,GAAwB,IAT1H,CAAP;AAUH;;;ACXD,AAGO,eAAe2B,6BAAf,CAA6CC,KAA7C,EAAoDnC,OAApD,EAA6DoC,aAA7D,EAA4E;AAC/E,QAAMX,cAAc,GAAGY,MAAM,CAACrC,OAAO,CAACyB,cAAR,IAA0BU,KAAK,CAACV,cAAjC,CAA7B;;AACA,MAAI,CAACA,cAAL,EAAqB;AACjB,UAAM,IAAIhC,KAAJ,CAAU,wFAAV,CAAN;AACH;;AACD,MAAIO,OAAO,CAACsC,OAAZ,EAAqB;AACjB,6DACOH,KADP,GAEOnC,OAFP;AAAA,UAAM;AAAEb,MAAAA,IAAF;AAAQmD,MAAAA,OAAR;AAAiBC,MAAAA;AAAjB,KAAN;AAAA,UAAoCC,kBAApC,uDADiB;;;AAMjB,WAAOF,OAAO,CAACE,kBAAD,CAAd;AACH;;AACD,QAAMC,qCAAqC,GAAGtB,MAAM,CAACa,MAAP,CAAc;AAAEP,IAAAA;AAAF,GAAd,EAAkCzB,OAAlC,CAA9C;;AACA,MAAI,CAACA,OAAO,CAAC0C,OAAb,EAAsB;AAClB,UAAMvC,MAAM,GAAG,MAAML,GAAG,CAACqC,KAAK,CAACpC,KAAP,EAAc0C,qCAAd,CAAxB;;AACA,QAAItC,MAAJ,EAAY;AACR,YAAM;AAAEf,QAAAA,KAAF;AAASgB,QAAAA,SAAT;AAAoBf,QAAAA,SAApB;AAA+BoB,QAAAA,WAA/B;AAA4CK,QAAAA,aAA5C;AAA2DC,QAAAA,eAA3D;AAA4ER,QAAAA,cAA5E;AAA4FF,QAAAA;AAA5F,UAAqHF,MAA3H;AACA,aAAO4B,qBAAqB,CAAC;AACzBN,QAAAA,cADyB;AAEzBrC,QAAAA,KAFyB;AAGzBgB,QAAAA,SAHyB;AAIzBf,QAAAA,SAJyB;AAKzBoB,QAAAA,WALyB;AAMzBJ,QAAAA,mBANyB;AAOzBS,QAAAA,aAPyB;AAQzBC,QAAAA,eARyB;AASzBR,QAAAA;AATyB,OAAD,CAA5B;AAWH;AACJ;;AACD,QAAM3B,iBAAiB,GAAG,MAAMJ,oBAAoB,CAAC2D,KAAD,CAApD;AACA,QAAMQ,OAAO,GAAGP,aAAa,IAAID,KAAK,CAACQ,OAAvC;AACA,QAAM;AAAE1B,IAAAA,IAAI,EAAE;AAAE7B,MAAAA,KAAF;AAASwD,MAAAA,UAAU,EAAEvD,SAArB;AAAgCwD,MAAAA,YAAhC;AAA8CpC,MAAAA,WAAW,EAAEqC,mBAA3D;AAAgFC,MAAAA,oBAAoB,EAAEC,2BAAtG;AAAmIC,MAAAA,WAAW,EAAE1C;AAAhJ;AAAR,MAA+K,MAAMoC,OAAO,CAAC,yDAAD,EAA4D;AAC1PO,IAAAA,eAAe,EAAEzB,cADyO;AAE1P0B,IAAAA,cAAc,EAAEnD,OAAO,CAACc,aAFkO;AAG1P+B,IAAAA,YAAY,EAAE7C,OAAO,CAACe,eAHoO;AAI1PN,IAAAA,WAAW,EAAET,OAAO,CAACS,WAJqO;AAK1P2C,IAAAA,SAAS,EAAE;AACPC,MAAAA,QAAQ,EAAE,CAAC,aAAD;AADH,KAL+O;AAQ1PC,IAAAA,OAAO,EAAE;AACLC,MAAAA,aAAa,EAAG,UAAS3E,iBAAiB,CAACQ,KAAM;AAD5C;AARiP,GAA5D,CAAlM;AAYA;;AACA,QAAMqB,WAAW,GAAGqC,mBAAmB,IAAI,EAA3C;AACA;;AACA,QAAMzC,mBAAmB,GAAG2C,2BAA2B,IAAI,KAA3D;AACA,QAAMlC,aAAa,GAAG+B,YAAY,GAC5BA,YAAY,CAACxB,GAAb,CAAkBmC,CAAD,IAAOA,CAAC,CAAC1E,EAA1B,CAD4B,GAE5B,KAAK,CAFX;AAGA,QAAMiC,eAAe,GAAG8B,YAAY,GAC9BA,YAAY,CAACxB,GAAb,CAAkBoC,IAAD,IAAUA,IAAI,CAACnC,IAAhC,CAD8B,GAE9B,KAAK,CAFX;AAGA,QAAMlB,SAAS,GAAG,IAAIlB,IAAJ,GAAWK,WAAX,EAAlB;AACA,QAAMyB,GAAG,CAACmB,KAAK,CAACpC,KAAP,EAAc0C,qCAAd,EAAqD;AAC1DrD,IAAAA,KAD0D;AAE1DgB,IAAAA,SAF0D;AAG1Df,IAAAA,SAH0D;AAI1DgB,IAAAA,mBAJ0D;AAK1DI,IAAAA,WAL0D;AAM1DK,IAAAA,aAN0D;AAO1DC,IAAAA,eAP0D;AAQ1DR,IAAAA;AAR0D,GAArD,CAAT;AAUA,SAAOwB,qBAAqB,CAAC;AACzBN,IAAAA,cADyB;AAEzBrC,IAAAA,KAFyB;AAGzBgB,IAAAA,SAHyB;AAIzBf,IAAAA,SAJyB;AAKzBgB,IAAAA,mBALyB;AAMzBI,IAAAA,WANyB;AAOzBK,IAAAA,aAPyB;AAQzBC,IAAAA,eARyB;AASzBR,IAAAA;AATyB,GAAD,CAA5B;AAWH;;AC7EM,eAAemD,IAAf,CAAoBvB,KAApB,EAA2BwB,WAA3B,EAAwC;AAC3C,UAAQA,WAAW,CAACxE,IAApB;AACI,SAAK,KAAL;AACI,aAAOX,oBAAoB,CAAC2D,KAAD,CAA3B;AACJ;;AACA,SAAK,OAAL;AACIA,MAAAA,KAAK,CAACyB,GAAN,CAAUC,IAAV;AAEA,UAAIC,uBAAJ,CAAiB,oFAAjB,CAFA;;AAGJ,SAAK,WAAL;AACI,aAAO3B,KAAK,CAACI,QAAN,CAAe;AAAEpD,QAAAA,IAAI,EAAE;AAAR,OAAf,CAAP;;AACJ,SAAK,cAAL;AACIwE,AACA,aAAOzB,6BAA6B,CAACC,KAAD,oCAC7BwB,WAD6B;AAEhCxE,QAAAA,IAAI,EAAE;AAF0B,SAApC;;AAIJ,SAAK,YAAL;AACI;AACA,aAAOgD,KAAK,CAACI,QAAN,CAAeoB,WAAf,CAAP;;AACJ;AACI;AACA,YAAM,IAAIlE,KAAJ,CAAW,sBAAqBkE,WAAW,CAACxE,IAAK,EAAjD,CAAN;AArBR;AAuBH;;AC3BD,MAAM4E,KAAK,GAAG,CACV,MADU,EAEV,kBAFU,EAGV,sBAHU,EAIV,oCAJU,EAKV,6CALU,EAMV,oBANU,EAOV,sCAPU,EAQV,oDARU,EASV,gDATU,EAUV,4CAVU,EAWV,2BAXU,EAYV,4BAZU,EAaV,+CAbU,EAcV,oDAdU,EAeV,mCAfU,EAgBV,oCAhBU,EAiBV,uDAjBU,EAkBV,0BAlBU,EAmBV,oCAnBU,EAoBV,gCApBU,CAAd;AAuBA;;AACA,SAASC,YAAT,CAAsBC,KAAtB,EAA6B;AACzB;;AACA;AACJ;AACA;AACA;AACI,QAAMC,OAAO,GAAGD,KAAK,CAAC5C,GAAN,CAAW8C,CAAD,IAAOA,CAAC,CAC7B3D,KAD4B,CACtB,GADsB,EAE5Ba,GAF4B,CAEvB+C,CAAD,IAAQA,CAAC,CAACC,UAAF,CAAa,GAAb,IAAoB,SAApB,GAAgCD,CAFhB,EAG5B7C,IAH4B,CAGvB,GAHuB,CAAjB,CAAhB,CANyB;;AAWzB;AACJ;AACA;AACA;;AACI,QAAM+C,KAAK,GAAI,OAAMJ,OAAO,CAAC7C,GAAR,CAAamC,CAAD,IAAQ,MAAKA,CAAE,GAA3B,EAA+BjC,IAA/B,CAAoC,GAApC,CAAyC,SAA9D,CAfyB;;AAiBzB;AACJ;AACA;AACA;AACA;;AAEI,SAAO,IAAIgD,MAAJ,CAAWD,KAAX,EAAkB,GAAlB,CAAP;AACH;;AACD,MAAME,KAAK,GAAGR,YAAY,CAACD,KAAD,CAA1B;AACA,AAAO,SAASU,eAAT,CAAyBC,GAAzB,EAA8B;AACjC,SAAO,CAAC,CAACA,GAAF,IAASF,KAAK,CAAC5D,IAAN,CAAW8D,GAAX,CAAhB;AACH;;AChDD,MAAMC,kBAAkB,GAAG,IAAI,IAA/B;;AACA,SAASC,kBAAT,CAA4BpF,KAA5B,EAAmC;AAC/B,SAAO,EAAEA,KAAK,CAACqF,OAAN,CAAcC,KAAd,CAAoB,uHAApB,KACLtF,KAAK,CAACqF,OAAN,CAAcC,KAAd,CAAoB,oGAApB,CADG,CAAP;AAEH;;AACD,AAAO,eAAeC,IAAf,CAAoB5C,KAApB,EAA2BQ,OAA3B,EAAoCqC,KAApC,EAA2CC,UAA3C,EAAuD;AAC1D,QAAMC,QAAQ,GAAGvC,OAAO,CAACuC,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAjB;AACA,QAAMP,GAAG,GAAGQ,QAAQ,CAACR,GAArB,CAF0D;;AAI1D,MAAI,gCAAgC9D,IAAhC,CAAqC8D,GAArC,CAAJ,EAA+C;AAC3C,WAAO/B,OAAO,CAACuC,QAAD,CAAd;AACH;;AACD,MAAIT,eAAe,CAACC,GAAG,CAACU,OAAJ,CAAYzC,OAAO,CAACuC,QAAR,CAAiBG,QAAjB,CAA0BC,OAAtC,EAA+C,EAA/C,CAAD,CAAnB,EAAyE;AACrE,UAAM;AAAElG,MAAAA;AAAF,QAAY,MAAMZ,oBAAoB,CAAC2D,KAAD,CAA5C;AACA+C,IAAAA,QAAQ,CAAC5B,OAAT,CAAiBC,aAAjB,GAAkC,UAASnE,KAAM,EAAjD;AACA,QAAImG,QAAJ;;AACA,QAAI;AACAA,MAAAA,QAAQ,GAAG,MAAM5C,OAAO,CAACuC,QAAD,CAAxB;AACH,KAFD,CAGA,OAAO1F,KAAP,EAAc;AACV;AACA;AACA,UAAIoF,kBAAkB,CAACpF,KAAD,CAAtB,EAA+B;AAC3B,cAAMA,KAAN;AACH,OALS;AAOV;;;AACA,UAAI,OAAOA,KAAK,CAAC+F,QAAN,CAAejC,OAAf,CAAuBkC,IAA9B,KAAuC,WAA3C,EAAwD;AACpD,cAAMhG,KAAN;AACH;;AACD,YAAMiG,IAAI,GAAGzG,IAAI,CAACC,KAAL,CAAW,CAACC,IAAI,CAACwG,KAAL,CAAWlG,KAAK,CAAC+F,QAAN,CAAejC,OAAf,CAAuBkC,IAAlC,IACrBtG,IAAI,CAACwG,KAAL,CAAW,IAAIxG,IAAJ,GAAWyG,QAAX,EAAX,CADoB,IAEpB,IAFS,CAAb;AAGAxD,MAAAA,KAAK,CAACyB,GAAN,CAAUC,IAAV,CAAerE,KAAK,CAACqF,OAArB;AACA1C,MAAAA,KAAK,CAACyB,GAAN,CAAUC,IAAV,CAAgB,wEAAuE4B,IAAK,+DAA5F;AACA,YAAM;AAAErG,QAAAA;AAAF,UAAY,MAAMZ,oBAAoB,mCACrC2D,KADqC;AAExCxD,QAAAA,cAAc,EAAE8G;AAFwB,SAA5C;AAIAP,MAAAA,QAAQ,CAAC5B,OAAT,CAAiBC,aAAjB,GAAkC,UAASnE,KAAM,EAAjD;AACA,aAAOuD,OAAO,CAACuC,QAAD,CAAd;AACH;;AACD,WAAOK,QAAP;AACH;;AACD,MAAIK,+BAAiB,CAAClB,GAAD,CAArB,EAA4B;AACxB,UAAMmB,cAAc,GAAG,MAAM1D,KAAK,CAACI,QAAN,CAAe;AAAEpD,MAAAA,IAAI,EAAE;AAAR,KAAf,CAA7B;AACA+F,IAAAA,QAAQ,CAAC5B,OAAT,CAAiBC,aAAjB,GAAiCsC,cAAc,CAACvC,OAAf,CAAuBC,aAAxD;AACA,WAAOZ,OAAO,CAACuC,QAAD,CAAd;AACH;;AACD,QAAM;AAAE9F,IAAAA,KAAF;AAASgB,IAAAA;AAAT,MAAuB,MAAM8B,6BAA6B,CAACC,KAAD;AAEhE,IAFgE,EAE5DQ,OAF4D,CAAhE;AAGAuC,EAAAA,QAAQ,CAAC5B,OAAT,CAAiBC,aAAjB,GAAkC,SAAQnE,KAAM,EAAhD;AACA,SAAO0G,sBAAsB,CAAC3D,KAAD,EAAQQ,OAAR,EAAiBuC,QAAjB,EAA2B9E,SAA3B,CAA7B;AACH;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe0F,sBAAf,CAAsC3D,KAAtC,EAA6CQ,OAA7C,EAAsD3C,OAAtD,EAA+DI,SAA/D,EAA0E2F,OAAO,GAAG,CAApF,EAAuF;AACnF,QAAMC,0BAA0B,GAAG,CAAC,IAAI9G,IAAJ,EAAD,GAAc,CAAC,IAAIA,IAAJ,CAASkB,SAAT,CAAlD;;AACA,MAAI;AACA,WAAO,MAAMuC,OAAO,CAAC3C,OAAD,CAApB;AACH,GAFD,CAGA,OAAOR,KAAP,EAAc;AACV,QAAIA,KAAK,CAACyG,MAAN,KAAiB,GAArB,EAA0B;AACtB,YAAMzG,KAAN;AACH;;AACD,QAAIwG,0BAA0B,IAAIrB,kBAAlC,EAAsD;AAClD,UAAIoB,OAAO,GAAG,CAAd,EAAiB;AACbvG,QAAAA,KAAK,CAACqF,OAAN,GAAiB,SAAQkB,OAAQ,mBAAkBC,0BAA0B,GAAG,IAAK,uNAArF;AACH;;AACD,YAAMxG,KAAN;AACH;;AACD,MAAEuG,OAAF;AACA,UAAMG,SAAS,GAAGH,OAAO,GAAG,IAA5B;AACA5D,IAAAA,KAAK,CAACyB,GAAN,CAAUC,IAAV,CAAgB,kGAAiGkC,OAAQ,WAAUG,SAAS,GAAG,IAAK,IAApJ;AACA,UAAM,IAAIC,OAAJ,CAAaC,OAAD,IAAaC,UAAU,CAACD,OAAD,EAAUF,SAAV,CAAnC,CAAN;AACA,WAAOJ,sBAAsB,CAAC3D,KAAD,EAAQQ,OAAR,EAAiB3C,OAAjB,EAA0BI,SAA1B,EAAqC2F,OAArC,CAA7B;AACH;AACJ;;ACvFM,MAAMO,OAAO,GAAG,mBAAhB;;ACQA,SAASC,aAAT,CAAuBvG,OAAvB,EAAgC;AACnC,MAAI,CAACA,OAAO,CAACvB,KAAb,EAAoB;AAChB,UAAM,IAAIgB,KAAJ,CAAU,8CAAV,CAAN;AACH;;AACD,MAAI,CAACO,OAAO,CAACtB,UAAb,EAAyB;AACrB,UAAM,IAAIe,KAAJ,CAAU,mDAAV,CAAN;AACH;;AACD,MAAI,oBAAoBO,OAApB,IAA+B,CAACA,OAAO,CAACyB,cAA5C,EAA4D;AACxD,UAAM,IAAIhC,KAAJ,CAAU,4DAAV,CAAN;AACH;;AACD,QAAMmE,GAAG,GAAGzC,MAAM,CAACa,MAAP,CAAc;AACtB6B,IAAAA,IAAI,EAAE2C,OAAO,CAAC3C,IAAR,CAAa4C,IAAb,CAAkBD,OAAlB;AADgB,GAAd,EAETxG,OAAO,CAAC4D,GAFC,CAAZ;AAGA,QAAMjB,SAAO,GAAG3C,OAAO,CAAC2C,OAAR,IACZ+D,eAAc,CAACC,QAAf,CAAwB;AACpBrD,IAAAA,OAAO,EAAE;AACL,oBAAe,uBAAsBgD,OAAQ,IAAGM,+BAAY,EAAG;AAD1D;AADW,GAAxB,CADJ;AAMA,QAAMzE,KAAK,GAAGhB,MAAM,CAACa,MAAP,CAAc;AACxBW,aAAAA,SADwB;AAExB5C,IAAAA,KAAK,EAAEL,QAAQ;AAFS,GAAd,EAGXM,OAHW,EAGFA,OAAO,CAACyB,cAAR,GACN;AAAEA,IAAAA,cAAc,EAAEY,MAAM,CAACrC,OAAO,CAACyB,cAAT;AAAxB,GADM,GAEN,EALQ,EAKJ;AACNmC,IAAAA,GADM;AAENrB,IAAAA,QAAQ,EAAEsE,+BAAkB,CAAC;AACzBC,MAAAA,UAAU,EAAE,YADa;AAEzBC,MAAAA,QAAQ,EAAE/G,OAAO,CAAC+G,QAAR,IAAoB,EAFL;AAGzBC,MAAAA,YAAY,EAAEhH,OAAO,CAACgH,YAAR,IAAwB,EAHb;AAIzBrE,eAAAA;AAJyB,KAAD;AAFtB,GALI,CAAd,CAnBmC;;AAkCnC,SAAOxB,MAAM,CAACa,MAAP,CAAc0B,IAAI,CAAC+C,IAAL,CAAU,IAAV,EAAgBtE,KAAhB,CAAd,EAAsC;AACzC4C,IAAAA,IAAI,EAAEA,IAAI,CAAC0B,IAAL,CAAU,IAAV,EAAgBtE,KAAhB;AADmC,GAAtC,CAAP;AAGH;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/dist-src/auth.js b/node_modules/@octokit/auth-app/dist-src/auth.js index f326186..5e8f943 100644 --- a/node_modules/@octokit/auth-app/dist-src/auth.js +++ b/node_modules/@octokit/auth-app/dist-src/auth.js @@ -1,16 +1,28 @@ +import { Deprecation } from "deprecation"; import { getAppAuthentication } from "./get-app-authentication"; import { getInstallationAuthentication } from "./get-installation-authentication"; -import { getOAuthAuthentication } from "./get-oauth-authentication"; -export async function auth(state, options) { - const { type } = options; - switch (type) { +export async function auth(state, authOptions) { + switch (authOptions.type) { case "app": return getAppAuthentication(state); - case "installation": - return getInstallationAuthentication(state, options); + // @ts-expect-error "oauth" is not supperted in types case "oauth": - return getOAuthAuthentication(state, options); + state.log.warn( + // @ts-expect-error `log.warn()` expects string + new Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`)); + case "oauth-app": + return state.oauthApp({ type: "oauth-app" }); + case "installation": + authOptions; + return getInstallationAuthentication(state, { + ...authOptions, + type: "installation", + }); + case "oauth-user": + // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as "WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions" + return state.oauthApp(authOptions); default: - throw new Error(`Invalid auth type: ${type}`); + // @ts-expect-error type is "never" at this point + throw new Error(`Invalid auth type: ${authOptions.type}`); } } diff --git a/node_modules/@octokit/auth-app/dist-src/cache.js b/node_modules/@octokit/auth-app/dist-src/cache.js index 1a0692d..96b085a 100644 --- a/node_modules/@octokit/auth-app/dist-src/cache.js +++ b/node_modules/@octokit/auth-app/dist-src/cache.js @@ -31,6 +31,7 @@ export async function get(cache, options) { expiresAt, permissions, repositoryIds: options.repositoryIds, + repositoryNames: options.repositoryNames, singleFileName, repositorySelection: repositorySelection, }; @@ -52,13 +53,19 @@ export async function set(cache, options, data) { ].join("|"); await cache.set(key, value); } -function optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], }) { +function optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], repositoryNames = [], }) { const permissionsString = Object.keys(permissions) .sort() .map((name) => (permissions[name] === "read" ? name : `${name}!`)) .join(","); const repositoryIdsString = repositoryIds.sort().join(","); - return [installationId, repositoryIdsString, permissionsString] + const repositoryNamesString = repositoryNames.join(","); + return [ + installationId, + repositoryIdsString, + repositoryNamesString, + permissionsString, + ] .filter(Boolean) .join("|"); } diff --git a/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js b/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js index dabccaa..77a8eb0 100644 --- a/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js +++ b/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js @@ -1,14 +1,24 @@ import { githubAppJwt } from "universal-github-app-jwt"; export async function getAppAuthentication({ appId, privateKey, timeDifference, }) { - const appAuthentication = await githubAppJwt({ - id: +appId, - privateKey, - now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference, - }); - return { - type: "app", - token: appAuthentication.token, - appId: appAuthentication.appId, - expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(), - }; + try { + const appAuthentication = await githubAppJwt({ + id: +appId, + privateKey, + now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference, + }); + return { + type: "app", + token: appAuthentication.token, + appId: appAuthentication.appId, + expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(), + }; + } + catch (error) { + if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") { + throw new Error("The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'"); + } + else { + throw error; + } + } } diff --git a/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js b/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js index ba7e14e..748d818 100644 --- a/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js +++ b/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js @@ -7,15 +7,18 @@ export async function getInstallationAuthentication(state, options, customReques throw new Error("[@octokit/auth-app] installationId option is required for installation authentication."); } if (options.factory) { - const { type, factory, ...factoryAuthOptions } = options; - // @ts-ignore if `options.factory` is set, the return type for `auth()` should be `Promise>` - return factory(Object.assign({}, state, factoryAuthOptions)); + const { type, factory, oauthApp, ...factoryAuthOptions } = { + ...state, + ...options, + }; + // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>` + return factory(factoryAuthOptions); } const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options); if (!options.refresh) { const result = await get(state.cache, optionsWithInstallationTokenFromState); if (result) { - const { token, createdAt, expiresAt, permissions, repositoryIds, singleFileName, repositorySelection, } = result; + const { token, createdAt, expiresAt, permissions, repositoryIds, repositoryNames, singleFileName, repositorySelection, } = result; return toTokenAuthentication({ installationId, token, @@ -24,19 +27,17 @@ export async function getInstallationAuthentication(state, options, customReques permissions, repositorySelection, repositoryIds, + repositoryNames, singleFileName, }); } } const appAuthentication = await getAppAuthentication(state); const request = customRequest || state.request; - const { data: { token, expires_at: expiresAt, repositories, permissions, - // @ts-ignore - repository_selection: repositorySelection, - // @ts-ignore - single_file: singleFileName, }, } = await request("POST /app/installations/{installation_id}/access_tokens", { + const { data: { token, expires_at: expiresAt, repositories, permissions: permissionsOptional, repository_selection: repositorySelectionOptional, single_file: singleFileName, }, } = await request("POST /app/installations/{installation_id}/access_tokens", { installation_id: installationId, repository_ids: options.repositoryIds, + repositories: options.repositoryNames, permissions: options.permissions, mediaType: { previews: ["machine-man"], @@ -45,9 +46,16 @@ export async function getInstallationAuthentication(state, options, customReques authorization: `bearer ${appAuthentication.token}`, }, }); + /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */ + const permissions = permissionsOptional || {}; + /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */ + const repositorySelection = repositorySelectionOptional || "all"; const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0; + const repositoryNames = repositories + ? repositories.map((repo) => repo.name) + : void 0; const createdAt = new Date().toISOString(); await set(state.cache, optionsWithInstallationTokenFromState, { token, @@ -56,6 +64,7 @@ export async function getInstallationAuthentication(state, options, customReques repositorySelection, permissions, repositoryIds, + repositoryNames, singleFileName, }); return toTokenAuthentication({ @@ -66,6 +75,7 @@ export async function getInstallationAuthentication(state, options, customReques repositorySelection, permissions, repositoryIds, + repositoryNames, singleFileName, }); } diff --git a/node_modules/@octokit/auth-app/dist-src/get-oauth-authentication.js b/node_modules/@octokit/auth-app/dist-src/get-oauth-authentication.js deleted file mode 100644 index 1cec075..0000000 --- a/node_modules/@octokit/auth-app/dist-src/get-oauth-authentication.js +++ /dev/null @@ -1,32 +0,0 @@ -import { RequestError } from "@octokit/request-error"; -export async function getOAuthAuthentication(state, options, customRequest) { - const request = customRequest || state.request; - // The "/login/oauth/access_token" is not part of the REST API hosted on api.github.com, - // instead it’s using the github.com domain. - const route = /^https:\/\/(api\.)?github\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl) - ? "POST https://github.com/login/oauth/access_token" - : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace("/api/v3", "/login/oauth/access_token")}`; - const parameters = { - headers: { - accept: `application/json`, - }, - client_id: state.clientId, - client_secret: state.clientSecret, - code: options.code, - state: options.state, - redirect_uri: options.redirectUrl, - }; - const response = await request(route, parameters); - if (response.data.error !== undefined) { - throw new RequestError(`${response.data.error_description} (${response.data.error})`, response.status, { - headers: response.headers, - request: request.endpoint(route, parameters), - }); - } - const { data: { access_token: token }, } = response; - return { - type: "token", - tokenType: "oauth", - token, - }; -} diff --git a/node_modules/@octokit/auth-app/dist-src/hook.js b/node_modules/@octokit/auth-app/dist-src/hook.js index e1380ab..40aab2f 100644 --- a/node_modules/@octokit/auth-app/dist-src/hook.js +++ b/node_modules/@octokit/auth-app/dist-src/hook.js @@ -1,3 +1,4 @@ +import { requiresBasicAuth } from "@octokit/auth-oauth-user"; import { getAppAuthentication } from "./get-app-authentication"; import { getInstallationAuthentication } from "./get-installation-authentication"; import { requiresAppAuth } from "./requires-app-auth"; @@ -7,8 +8,13 @@ function isNotTimeSkewError(error) { error.message.match(/'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/)); } export async function hook(state, request, route, parameters) { - let endpoint = request.endpoint.merge(route, parameters); - if (requiresAppAuth(endpoint.url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { + const endpoint = request.endpoint.merge(route, parameters); + const url = endpoint.url; + // Do not intercept request to retrieve a new token + if (/\/login\/oauth\/access_token$/.test(url)) { + return request(endpoint); + } + if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { const { token } = await getAppAuthentication(state); endpoint.headers.authorization = `bearer ${token}`; let response; @@ -23,10 +29,11 @@ export async function hook(state, request, route, parameters) { } // If the date header is missing, we can't correct the system time skew. // Throw the error to be handled upstream. - if (typeof error.headers.date === "undefined") { + if (typeof error.response.headers.date === "undefined") { throw error; } - const diff = Math.floor((Date.parse(error.headers.date) - Date.parse(new Date().toString())) / + const diff = Math.floor((Date.parse(error.response.headers.date) - + Date.parse(new Date().toString())) / 1000); state.log.warn(error.message); state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`); @@ -39,7 +46,14 @@ export async function hook(state, request, route, parameters) { } return response; } - const { token, createdAt } = await getInstallationAuthentication(state, {}, request); + if (requiresBasicAuth(url)) { + const authentication = await state.oauthApp({ type: "oauth-app" }); + endpoint.headers.authorization = authentication.headers.authorization; + return request(endpoint); + } + const { token, createdAt } = await getInstallationAuthentication(state, + // @ts-expect-error TBD + {}, request); endpoint.headers.authorization = `token ${token}`; return sendRequestWithRetries(state, request, endpoint, createdAt); } diff --git a/node_modules/@octokit/auth-app/dist-src/index.js b/node_modules/@octokit/auth-app/dist-src/index.js index b85020f..99f1097 100644 --- a/node_modules/@octokit/auth-app/dist-src/index.js +++ b/node_modules/@octokit/auth-app/dist-src/index.js @@ -1,26 +1,46 @@ import { getUserAgent } from "universal-user-agent"; -import { request } from "@octokit/request"; +import { request as defaultRequest } from "@octokit/request"; +import { createOAuthAppAuth } from "@octokit/auth-oauth-app"; import { auth } from "./auth"; import { hook } from "./hook"; import { getCache } from "./cache"; import { VERSION } from "./version"; -export const createAppAuth = function createAppAuth(options) { +export { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +export function createAppAuth(options) { + if (!options.appId) { + throw new Error("[@octokit/auth-app] appId option is required"); + } + if (!options.privateKey) { + throw new Error("[@octokit/auth-app] privateKey option is required"); + } + if ("installationId" in options && !options.installationId) { + throw new Error("[@octokit/auth-app] installationId is set to a falsy value"); + } const log = Object.assign({ warn: console.warn.bind(console), }, options.log); - const state = Object.assign({ - request: request.defaults({ + const request = options.request || + defaultRequest.defaults({ headers: { "user-agent": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`, }, - }), + }); + const state = Object.assign({ + request, cache: getCache(), }, options, options.installationId ? { installationId: Number(options.installationId) } : {}, { log, + oauthApp: createOAuthAppAuth({ + clientType: "github-app", + clientId: options.clientId || "", + clientSecret: options.clientSecret || "", + request, + }), }); + // @ts-expect-error not worth the extra code to appease TS return Object.assign(auth.bind(null, state), { hook: hook.bind(null, state), }); -}; +} diff --git a/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js b/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js index 44cacd9..10c5ac7 100644 --- a/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js +++ b/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js @@ -1,6 +1,9 @@ const PATHS = [ "/app", "/app/hook/config", + "/app/hook/deliveries", + "/app/hook/deliveries/{delivery_id}", + "/app/hook/deliveries/{delivery_id}/attempts", "/app/installations", "/app/installations/{installation_id}", "/app/installations/{installation_id}/access_tokens", diff --git a/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js b/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js index 6937122..5aa9a2c 100644 --- a/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js +++ b/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js @@ -1,4 +1,4 @@ -export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, singleFileName, }) { +export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }) { return Object.assign({ type: "token", tokenType: "installation", @@ -8,5 +8,5 @@ export function toTokenAuthentication({ installationId, token, createdAt, expire createdAt, expiresAt, repositorySelection, - }, repositoryIds ? { repositoryIds } : null, singleFileName ? { singleFileName } : null); + }, repositoryIds ? { repositoryIds } : null, repositoryNames ? { repositoryNames } : null, singleFileName ? { singleFileName } : null); } diff --git a/node_modules/@octokit/auth-app/dist-src/version.js b/node_modules/@octokit/auth-app/dist-src/version.js index b9bbf2f..7759783 100644 --- a/node_modules/@octokit/auth-app/dist-src/version.js +++ b/node_modules/@octokit/auth-app/dist-src/version.js @@ -1 +1 @@ -export const VERSION = "3.0.0"; +export const VERSION = "3.6.1"; diff --git a/node_modules/@octokit/auth-app/dist-types/auth.d.ts b/node_modules/@octokit/auth-app/dist-types/auth.d.ts index e7caaad..306bbbd 100644 --- a/node_modules/@octokit/auth-app/dist-types/auth.d.ts +++ b/node_modules/@octokit/auth-app/dist-types/auth.d.ts @@ -1,2 +1,20 @@ -import { AuthOptions, Authentication, State } from "./types"; -export declare function auth(state: State, options: AuthOptions): Promise; +import * as OAuthAppAuth from "@octokit/auth-oauth-app"; +import { State, AppAuthOptions, AppAuthentication, OAuthAppAuthentication, OAuthAppAuthOptions, InstallationAuthOptions, InstallationAccessTokenAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, OAuthWebFlowAuthOptions, OAuthDeviceFlowAuthOptions } from "./types"; +/** GitHub App authentication */ +export declare function auth(state: State, authOptions: AppAuthOptions): Promise; +/** OAuth App authentication */ +export declare function auth(state: State, authOptions: OAuthAppAuthOptions): Promise; +/** Installation authentication */ +export declare function auth(state: State, authOptions: InstallationAuthOptions): Promise; +/** User Authentication via OAuth web flow */ +export declare function auth(state: State, authOptions: OAuthWebFlowAuthOptions): Promise; +/** GitHub App Web flow with `factory` option */ +export declare function auth(state: State, authOptions: OAuthWebFlowAuthOptions & { + factory: OAuthAppAuth.FactoryGitHubWebFlow; +}): Promise; +/** User Authentication via OAuth Device flow */ +export declare function auth(state: State, authOptions: OAuthDeviceFlowAuthOptions): Promise; +/** GitHub App Device flow with `factory` option */ +export declare function auth(state: State, authOptions: OAuthDeviceFlowAuthOptions & { + factory: OAuthAppAuth.FactoryGitHubDeviceFlow; +}): Promise; diff --git a/node_modules/@octokit/auth-app/dist-types/get-oauth-authentication.d.ts b/node_modules/@octokit/auth-app/dist-types/get-oauth-authentication.d.ts deleted file mode 100644 index e9ab2a8..0000000 --- a/node_modules/@octokit/auth-app/dist-types/get-oauth-authentication.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { RequestInterface, OAuthOptions, State, OAuthAccesTokenAuthentication } from "./types"; -export declare function getOAuthAuthentication(state: State, options: OAuthOptions, customRequest?: RequestInterface): Promise; diff --git a/node_modules/@octokit/auth-app/dist-types/index.d.ts b/node_modules/@octokit/auth-app/dist-types/index.d.ts index ffc3cd6..2a93962 100644 --- a/node_modules/@octokit/auth-app/dist-types/index.d.ts +++ b/node_modules/@octokit/auth-app/dist-types/index.d.ts @@ -1,7 +1,4 @@ -import { StrategyInterface, StrategyOptions, AuthOptions, Authentication } from "./types"; -export declare type Types = { - StrategyOptions: StrategyOptions; - AuthOptions: AuthOptions; - Authentication: Authentication; -}; -export declare const createAppAuth: StrategyInterface; +import { AuthInterface, StrategyOptions } from "./types"; +export { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +export { StrategyOptions, AppAuthOptions, OAuthAppAuthOptions, InstallationAuthOptions, OAuthWebFlowAuthOptions, OAuthDeviceFlowAuthOptions, Authentication, AppAuthentication, OAuthAppAuthentication, InstallationAccessTokenAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, } from "./types"; +export declare function createAppAuth(options: StrategyOptions): AuthInterface; diff --git a/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts b/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts index f1f0976..b02ca30 100644 --- a/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts +++ b/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts @@ -1,2 +1,2 @@ import { CacheData, InstallationAccessTokenAuthentication, WithInstallationId } from "./types"; -export declare function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, singleFileName, }: CacheData & WithInstallationId): InstallationAccessTokenAuthentication; +export declare function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }: CacheData & WithInstallationId): InstallationAccessTokenAuthentication; diff --git a/node_modules/@octokit/auth-app/dist-types/types.d.ts b/node_modules/@octokit/auth-app/dist-types/types.d.ts index 4b05782..c675b56 100644 --- a/node_modules/@octokit/auth-app/dist-types/types.d.ts +++ b/node_modules/@octokit/auth-app/dist-types/types.d.ts @@ -1,26 +1,84 @@ import * as OctokitTypes from "@octokit/types"; import LRUCache from "lru-cache"; +import * as OAuthAppAuth from "@octokit/auth-oauth-app"; +declare type OAuthStrategyOptions = { + clientId?: string; + clientSecret?: string; +}; +declare type CommonStrategyOptions = { + appId: number | string; + privateKey: string; + installationId?: number | string; + request?: OctokitTypes.RequestInterface; + cache?: Cache; + log?: { + warn: (message: string, additionalInfo?: object) => any; + [key: string]: any; + }; +}; +export declare type StrategyOptions = OAuthStrategyOptions & CommonStrategyOptions & Record; +export declare type AppAuthOptions = { + type: "app"; +}; +/** +Users SHOULD only enter repositoryIds || repositoryNames. +However, this moduke still passes both to the backend API to +let the API decide how to handle the logic. We just throw the +reponse back to the client making the request. +**/ +export declare type InstallationAuthOptions = { + type: "installation"; + installationId?: number | string; + repositoryIds?: number[]; + repositoryNames?: string[]; + permissions?: Permissions; + refresh?: boolean; + factory?: never; + [key: string]: unknown; +}; +export declare type InstallationAuthOptionsWithFactory = { + type: "installation"; + installationId?: number | string; + repositoryIds?: number[]; + repositoryNames?: string[]; + permissions?: Permissions; + refresh?: boolean; + factory: FactoryInstallation; + [key: string]: unknown; +}; +export declare type OAuthAppAuthOptions = OAuthAppAuth.AppAuthOptions; +export declare type OAuthWebFlowAuthOptions = OAuthAppAuth.WebFlowAuthOptions; +export declare type OAuthDeviceFlowAuthOptions = OAuthAppAuth.GitHubAppDeviceFlowAuthOptions; +export declare type Authentication = AppAuthentication | OAuthAppAuthentication | InstallationAccessTokenAuthentication | GitHubAppUserAuthentication | GitHubAppUserAuthenticationWithExpiration; +export declare type FactoryInstallationOptions = StrategyOptions & Omit; +export interface FactoryInstallation { + (options: FactoryInstallationOptions): T; +} +export interface AuthInterface { + (options: AppAuthOptions): Promise; + (options: OAuthAppAuthOptions): Promise; + (options: InstallationAuthOptions): Promise; + (options: InstallationAuthOptionsWithFactory): Promise; + (options: OAuthWebFlowAuthOptions): Promise; + (options: OAuthDeviceFlowAuthOptions): Promise; + (options: OAuthWebFlowAuthOptions & { + factory: OAuthAppAuth.FactoryGitHubWebFlow; + }): Promise; + (options: OAuthDeviceFlowAuthOptions & { + factory: OAuthAppAuth.FactoryGitHubDeviceFlow; + }): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} export declare type AnyResponse = OctokitTypes.OctokitResponse; export declare type EndpointDefaults = OctokitTypes.EndpointDefaults; export declare type EndpointOptions = OctokitTypes.EndpointOptions; export declare type RequestParameters = OctokitTypes.RequestParameters; export declare type Route = OctokitTypes.Route; export declare type RequestInterface = OctokitTypes.RequestInterface; -export declare type StrategyInterface = OctokitTypes.StrategyInterface<[ - StrategyOptions -], [ - AuthOptions -], Authentication>; export declare type Cache = LRUCache | { get: (key: string) => string; set: (key: string, value: string) => any; }; -export interface AppAuthStrategy { - (options?: StrategyOptions): AppAuth; -} -export interface AppAuth { - (options: AuthOptions): Promise; -} export declare type APP_TYPE = "app"; export declare type TOKEN_TYPE = "token"; export declare type INSTALLATION_TOKEN_TYPE = "installation"; @@ -42,61 +100,26 @@ export declare type InstallationAccessTokenData = { permissions: Permissions; repositorySelection: REPOSITORY_SELECTION; repositoryIds?: number[]; + repositoryNames?: string[]; singleFileName?: string; }; export declare type CacheData = InstallationAccessTokenData; export declare type InstallationAccessTokenAuthentication = InstallationAccessTokenData & { type: TOKEN_TYPE; tokenType: INSTALLATION_TOKEN_TYPE; + installationId: number; }; -export declare type OAuthAccesTokenAuthentication = { - type: TOKEN_TYPE; - tokenType: OAUTH_TOKEN_TYPE; - token: ACCESS_TOKEN; -}; -export declare type Authentication = AppAuthentication | InstallationAccessTokenAuthentication | OAuthAccesTokenAuthentication; -declare type OAuthStrategyOptions = { - clientId?: string; - clientSecret?: string; -}; -declare type CommonStrategyOptions = { - appId: number | string; - privateKey: string; - installationId?: number | string; - request?: OctokitTypes.RequestInterface; - cache?: Cache; - log?: { - warn: (message: string, additionalInfo?: object) => any; - [key: string]: any; - }; -}; -export declare type StrategyOptions = OAuthStrategyOptions & CommonStrategyOptions & { - [key: string]: unknown; -}; +export declare type OAuthAppAuthentication = OAuthAppAuth.AppAuthentication; +export declare type GitHubAppUserAuthentication = OAuthAppAuth.GitHubAppUserAuthentication; +export declare type GitHubAppUserAuthenticationWithExpiration = OAuthAppAuth.GitHubAppUserAuthenticationWithExpiration; export declare type FactoryOptions = Required> & State; -export declare type Permissions = { - [name: string]: string; -}; -export declare type InstallationAuthOptions = { - installationId?: number | string; - repositoryIds?: number[]; - permissions?: Permissions; - refresh?: boolean; - factory?: (options: FactoryOptions) => unknown; - [key: string]: unknown; -}; -export declare type OAuthOptions = { - code?: string; - redirectUrl?: string; - state?: string; -}; -export declare type AuthOptions = InstallationAuthOptions & OAuthOptions & { - type: "app" | "installation" | "oauth"; -}; +export declare type Permissions = Record; export declare type WithInstallationId = { installationId: number; }; export declare type State = Required> & { installationId?: number; -} & OAuthStrategyOptions; +} & OAuthStrategyOptions & { + oauthApp: OAuthAppAuth.GitHubAuthInterface; +}; export {}; diff --git a/node_modules/@octokit/auth-app/dist-types/version.d.ts b/node_modules/@octokit/auth-app/dist-types/version.d.ts index 47f6efe..86a6bbd 100644 --- a/node_modules/@octokit/auth-app/dist-types/version.d.ts +++ b/node_modules/@octokit/auth-app/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "3.0.0"; +export declare const VERSION = "3.6.1"; diff --git a/node_modules/@octokit/auth-app/dist-web/index.js b/node_modules/@octokit/auth-app/dist-web/index.js index ced956b..61f0969 100644 --- a/node_modules/@octokit/auth-app/dist-web/index.js +++ b/node_modules/@octokit/auth-app/dist-web/index.js @@ -1,21 +1,34 @@ import { getUserAgent } from 'universal-user-agent'; import { request } from '@octokit/request'; +import { createOAuthAppAuth } from '@octokit/auth-oauth-app'; +import { Deprecation } from 'deprecation'; import { githubAppJwt } from 'universal-github-app-jwt'; import LRU from 'lru-cache'; -import { RequestError } from '@octokit/request-error'; +import { requiresBasicAuth } from '@octokit/auth-oauth-user'; +export { createOAuthUserAuth } from '@octokit/auth-oauth-user'; async function getAppAuthentication({ appId, privateKey, timeDifference, }) { - const appAuthentication = await githubAppJwt({ - id: +appId, - privateKey, - now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference, - }); - return { - type: "app", - token: appAuthentication.token, - appId: appAuthentication.appId, - expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(), - }; + try { + const appAuthentication = await githubAppJwt({ + id: +appId, + privateKey, + now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference, + }); + return { + type: "app", + token: appAuthentication.token, + appId: appAuthentication.appId, + expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(), + }; + } + catch (error) { + if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") { + throw new Error("The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'"); + } + else { + throw error; + } + } } // https://github.com/isaacs/node-lru-cache#readme @@ -50,6 +63,7 @@ async function get(cache, options) { expiresAt, permissions, repositoryIds: options.repositoryIds, + repositoryNames: options.repositoryNames, singleFileName, repositorySelection: repositorySelection, }; @@ -71,18 +85,24 @@ async function set(cache, options, data) { ].join("|"); await cache.set(key, value); } -function optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], }) { +function optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], repositoryNames = [], }) { const permissionsString = Object.keys(permissions) .sort() .map((name) => (permissions[name] === "read" ? name : `${name}!`)) .join(","); const repositoryIdsString = repositoryIds.sort().join(","); - return [installationId, repositoryIdsString, permissionsString] + const repositoryNamesString = repositoryNames.join(","); + return [ + installationId, + repositoryIdsString, + repositoryNamesString, + permissionsString, + ] .filter(Boolean) .join("|"); } -function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, singleFileName, }) { +function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }) { return Object.assign({ type: "token", tokenType: "installation", @@ -92,7 +112,7 @@ function toTokenAuthentication({ installationId, token, createdAt, expiresAt, re createdAt, expiresAt, repositorySelection, - }, repositoryIds ? { repositoryIds } : null, singleFileName ? { singleFileName } : null); + }, repositoryIds ? { repositoryIds } : null, repositoryNames ? { repositoryNames } : null, singleFileName ? { singleFileName } : null); } async function getInstallationAuthentication(state, options, customRequest) { @@ -101,15 +121,18 @@ async function getInstallationAuthentication(state, options, customRequest) { throw new Error("[@octokit/auth-app] installationId option is required for installation authentication."); } if (options.factory) { - const { type, factory, ...factoryAuthOptions } = options; - // @ts-ignore if `options.factory` is set, the return type for `auth()` should be `Promise>` - return factory(Object.assign({}, state, factoryAuthOptions)); + const { type, factory, oauthApp, ...factoryAuthOptions } = { + ...state, + ...options, + }; + // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>` + return factory(factoryAuthOptions); } const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options); if (!options.refresh) { const result = await get(state.cache, optionsWithInstallationTokenFromState); if (result) { - const { token, createdAt, expiresAt, permissions, repositoryIds, singleFileName, repositorySelection, } = result; + const { token, createdAt, expiresAt, permissions, repositoryIds, repositoryNames, singleFileName, repositorySelection, } = result; return toTokenAuthentication({ installationId, token, @@ -118,19 +141,17 @@ async function getInstallationAuthentication(state, options, customRequest) { permissions, repositorySelection, repositoryIds, + repositoryNames, singleFileName, }); } } const appAuthentication = await getAppAuthentication(state); const request = customRequest || state.request; - const { data: { token, expires_at: expiresAt, repositories, permissions, - // @ts-ignore - repository_selection: repositorySelection, - // @ts-ignore - single_file: singleFileName, }, } = await request("POST /app/installations/{installation_id}/access_tokens", { + const { data: { token, expires_at: expiresAt, repositories, permissions: permissionsOptional, repository_selection: repositorySelectionOptional, single_file: singleFileName, }, } = await request("POST /app/installations/{installation_id}/access_tokens", { installation_id: installationId, repository_ids: options.repositoryIds, + repositories: options.repositoryNames, permissions: options.permissions, mediaType: { previews: ["machine-man"], @@ -139,9 +160,16 @@ async function getInstallationAuthentication(state, options, customRequest) { authorization: `bearer ${appAuthentication.token}`, }, }); + /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */ + const permissions = permissionsOptional || {}; + /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */ + const repositorySelection = repositorySelectionOptional || "all"; const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0; + const repositoryNames = repositories + ? repositories.map((repo) => repo.name) + : void 0; const createdAt = new Date().toISOString(); await set(state.cache, optionsWithInstallationTokenFromState, { token, @@ -150,6 +178,7 @@ async function getInstallationAuthentication(state, options, customRequest) { repositorySelection, permissions, repositoryIds, + repositoryNames, singleFileName, }); return toTokenAuthentication({ @@ -160,59 +189,42 @@ async function getInstallationAuthentication(state, options, customRequest) { repositorySelection, permissions, repositoryIds, + repositoryNames, singleFileName, }); } -async function getOAuthAuthentication(state, options, customRequest) { - const request = customRequest || state.request; - // The "/login/oauth/access_token" is not part of the REST API hosted on api.github.com, - // instead it’s using the github.com domain. - const route = /^https:\/\/(api\.)?github\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl) - ? "POST https://github.com/login/oauth/access_token" - : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace("/api/v3", "/login/oauth/access_token")}`; - const parameters = { - headers: { - accept: `application/json`, - }, - client_id: state.clientId, - client_secret: state.clientSecret, - code: options.code, - state: options.state, - redirect_uri: options.redirectUrl, - }; - const response = await request(route, parameters); - if (response.data.error !== undefined) { - throw new RequestError(`${response.data.error_description} (${response.data.error})`, response.status, { - headers: response.headers, - request: request.endpoint(route, parameters), - }); - } - const { data: { access_token: token }, } = response; - return { - type: "token", - tokenType: "oauth", - token, - }; -} - -async function auth(state, options) { - const { type } = options; - switch (type) { +async function auth(state, authOptions) { + switch (authOptions.type) { case "app": return getAppAuthentication(state); - case "installation": - return getInstallationAuthentication(state, options); + // @ts-expect-error "oauth" is not supperted in types case "oauth": - return getOAuthAuthentication(state, options); + state.log.warn( + // @ts-expect-error `log.warn()` expects string + new Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`)); + case "oauth-app": + return state.oauthApp({ type: "oauth-app" }); + case "installation": + return getInstallationAuthentication(state, { + ...authOptions, + type: "installation", + }); + case "oauth-user": + // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as "WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions" + return state.oauthApp(authOptions); default: - throw new Error(`Invalid auth type: ${type}`); + // @ts-expect-error type is "never" at this point + throw new Error(`Invalid auth type: ${authOptions.type}`); } } const PATHS = [ "/app", "/app/hook/config", + "/app/hook/deliveries", + "/app/hook/deliveries/{delivery_id}", + "/app/hook/deliveries/{delivery_id}/attempts", "/app/installations", "/app/installations/{installation_id}", "/app/installations/{installation_id}/access_tokens", @@ -267,8 +279,13 @@ function isNotTimeSkewError(error) { error.message.match(/'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/)); } async function hook(state, request, route, parameters) { - let endpoint = request.endpoint.merge(route, parameters); - if (requiresAppAuth(endpoint.url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { + const endpoint = request.endpoint.merge(route, parameters); + const url = endpoint.url; + // Do not intercept request to retrieve a new token + if (/\/login\/oauth\/access_token$/.test(url)) { + return request(endpoint); + } + if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { const { token } = await getAppAuthentication(state); endpoint.headers.authorization = `bearer ${token}`; let response; @@ -283,10 +300,11 @@ async function hook(state, request, route, parameters) { } // If the date header is missing, we can't correct the system time skew. // Throw the error to be handled upstream. - if (typeof error.headers.date === "undefined") { + if (typeof error.response.headers.date === "undefined") { throw error; } - const diff = Math.floor((Date.parse(error.headers.date) - Date.parse(new Date().toString())) / + const diff = Math.floor((Date.parse(error.response.headers.date) - + Date.parse(new Date().toString())) / 1000); state.log.warn(error.message); state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`); @@ -299,7 +317,14 @@ async function hook(state, request, route, parameters) { } return response; } - const { token, createdAt } = await getInstallationAuthentication(state, {}, request); + if (requiresBasicAuth(url)) { + const authentication = await state.oauthApp({ type: "oauth-app" }); + endpoint.headers.authorization = authentication.headers.authorization; + return request(endpoint); + } + const { token, createdAt } = await getInstallationAuthentication(state, + // @ts-expect-error TBD + {}, request); endpoint.headers.authorization = `token ${token}`; return sendRequestWithRetries(state, request, endpoint, createdAt); } @@ -333,28 +358,46 @@ async function sendRequestWithRetries(state, request, options, createdAt, retrie } } -const VERSION = "3.0.0"; +const VERSION = "3.6.1"; -const createAppAuth = function createAppAuth(options) { +function createAppAuth(options) { + if (!options.appId) { + throw new Error("[@octokit/auth-app] appId option is required"); + } + if (!options.privateKey) { + throw new Error("[@octokit/auth-app] privateKey option is required"); + } + if ("installationId" in options && !options.installationId) { + throw new Error("[@octokit/auth-app] installationId is set to a falsy value"); + } const log = Object.assign({ warn: console.warn.bind(console), }, options.log); - const state = Object.assign({ - request: request.defaults({ + const request$1 = options.request || + request.defaults({ headers: { "user-agent": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`, }, - }), + }); + const state = Object.assign({ + request: request$1, cache: getCache(), }, options, options.installationId ? { installationId: Number(options.installationId) } : {}, { log, + oauthApp: createOAuthAppAuth({ + clientType: "github-app", + clientId: options.clientId || "", + clientSecret: options.clientSecret || "", + request: request$1, + }), }); + // @ts-expect-error not worth the extra code to appease TS return Object.assign(auth.bind(null, state), { hook: hook.bind(null, state), }); -}; +} export { createAppAuth }; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/dist-web/index.js.map b/node_modules/@octokit/auth-app/dist-web/index.js.map index 6dec13b..979d6f2 100644 --- a/node_modules/@octokit/auth-app/dist-web/index.js.map +++ b/node_modules/@octokit/auth-app/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/get-app-authentication.js","../dist-src/cache.js","../dist-src/to-token-authentication.js","../dist-src/get-installation-authentication.js","../dist-src/get-oauth-authentication.js","../dist-src/auth.js","../dist-src/requires-app-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { githubAppJwt } from \"universal-github-app-jwt\";\nexport async function getAppAuthentication({ appId, privateKey, timeDifference, }) {\n const appAuthentication = await githubAppJwt({\n id: +appId,\n privateKey,\n now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference,\n });\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(),\n };\n}\n","// https://github.com/isaacs/node-lru-cache#readme\nimport LRU from \"lru-cache\";\nexport function getCache() {\n return new LRU({\n // cache max. 15000 tokens, that will use less than 10mb memory\n max: 15000,\n // Cache for 1 minute less than GitHub expiry\n maxAge: 1000 * 60 * 59,\n });\n}\nexport async function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName,] = result.split(\"|\");\n const permissions = options.permissions ||\n permissionsString.split(/,/).reduce((permissions, string) => {\n if (/!$/.test(string)) {\n permissions[string.slice(0, -1)] = \"write\";\n }\n else {\n permissions[string] = \"read\";\n }\n return permissions;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n singleFileName,\n repositorySelection: repositorySelection,\n };\n}\nexport async function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions\n ? \"\"\n : Object.keys(data.permissions)\n .map((name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`)\n .join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName,\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], }) {\n const permissionsString = Object.keys(permissions)\n .sort()\n .map((name) => (permissions[name] === \"read\" ? name : `${name}!`))\n .join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n return [installationId, repositoryIdsString, permissionsString]\n .filter(Boolean)\n .join(\"|\");\n}\n","export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, singleFileName, }) {\n return Object.assign({\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection,\n }, repositoryIds ? { repositoryIds } : null, singleFileName ? { singleFileName } : null);\n}\n","import { get, set } from \"./cache\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { toTokenAuthentication } from \"./to-token-authentication\";\nexport async function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\"[@octokit/auth-app] installationId option is required for installation authentication.\");\n }\n if (options.factory) {\n const { type, factory, ...factoryAuthOptions } = options;\n // @ts-ignore if `options.factory` is set, the return type for `auth()` should be `Promise>`\n return factory(Object.assign({}, state, factoryAuthOptions));\n }\n const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options);\n if (!options.refresh) {\n const result = await get(state.cache, optionsWithInstallationTokenFromState);\n if (result) {\n const { token, createdAt, expiresAt, permissions, repositoryIds, singleFileName, repositorySelection, } = result;\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n permissions,\n repositorySelection,\n repositoryIds,\n singleFileName,\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const request = customRequest || state.request;\n const { data: { token, expires_at: expiresAt, repositories, permissions, \n // @ts-ignore\n repository_selection: repositorySelection, \n // @ts-ignore\n single_file: singleFileName, }, } = await request(\"POST /app/installations/{installation_id}/access_tokens\", {\n installation_id: installationId,\n repository_ids: options.repositoryIds,\n permissions: options.permissions,\n mediaType: {\n previews: [\"machine-man\"],\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`,\n },\n });\n const repositoryIds = repositories\n ? repositories.map((r) => r.id)\n : void 0;\n const createdAt = new Date().toISOString();\n await set(state.cache, optionsWithInstallationTokenFromState, {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n singleFileName,\n });\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n singleFileName,\n });\n}\n","import { RequestError } from \"@octokit/request-error\";\nexport async function getOAuthAuthentication(state, options, customRequest) {\n const request = customRequest || state.request;\n // The \"/login/oauth/access_token\" is not part of the REST API hosted on api.github.com,\n // instead it’s using the github.com domain.\n const route = /^https:\\/\\/(api\\.)?github\\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl)\n ? \"POST https://github.com/login/oauth/access_token\"\n : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace(\"/api/v3\", \"/login/oauth/access_token\")}`;\n const parameters = {\n headers: {\n accept: `application/json`,\n },\n client_id: state.clientId,\n client_secret: state.clientSecret,\n code: options.code,\n state: options.state,\n redirect_uri: options.redirectUrl,\n };\n const response = await request(route, parameters);\n if (response.data.error !== undefined) {\n throw new RequestError(`${response.data.error_description} (${response.data.error})`, response.status, {\n headers: response.headers,\n request: request.endpoint(route, parameters),\n });\n }\n const { data: { access_token: token }, } = response;\n return {\n type: \"token\",\n tokenType: \"oauth\",\n token,\n };\n}\n","import { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { getOAuthAuthentication } from \"./get-oauth-authentication\";\nexport async function auth(state, options) {\n const { type } = options;\n switch (type) {\n case \"app\":\n return getAppAuthentication(state);\n case \"installation\":\n return getInstallationAuthentication(state, options);\n case \"oauth\":\n return getOAuthAuthentication(state, options);\n default:\n throw new Error(`Invalid auth type: ${type}`);\n }\n}\n","const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\",\n];\n// CREDIT: Simon Grondin (https://github.com/SGrondin)\n// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js\nfunction routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((p) => p\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nexport function requiresAppAuth(url) {\n return !!url && REGEX.test(url);\n}\n","import { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { requiresAppAuth } from \"./requires-app-auth\";\nconst FIVE_SECONDS_IN_MS = 5 * 1000;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(/'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/) ||\n error.message.match(/'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/));\n}\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n if (requiresAppAuth(endpoint.url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token}`;\n let response;\n try {\n response = await request(endpoint);\n }\n catch (error) {\n // If there's an issue with the expiration, regenerate the token and try again.\n // Otherwise rethrow the error for upstream handling.\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n // If the date header is missing, we can't correct the system time skew.\n // Throw the error to be handled upstream.\n if (typeof error.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor((Date.parse(error.headers.date) - Date.parse(new Date().toString())) /\n 1000);\n state.log.warn(error.message);\n state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);\n const { token } = await getAppAuthentication({\n ...state,\n timeDifference: diff,\n });\n endpoint.headers.authorization = `bearer ${token}`;\n return request(endpoint);\n }\n return response;\n }\n const { token, createdAt } = await getInstallationAuthentication(state, {}, request);\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(state, request, endpoint, createdAt);\n}\n/**\n * Newly created tokens might not be accessible immediately after creation.\n * In case of a 401 response, we retry with an exponential delay until more\n * than five seconds pass since the creation of the token.\n *\n * @see https://github.com/octokit/auth-app.js/issues/65\n */\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);\n try {\n return await request(options);\n }\n catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1000;\n state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\n","export const VERSION = \"3.0.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { getCache } from \"./cache\";\nimport { VERSION } from \"./version\";\nexport const createAppAuth = function createAppAuth(options) {\n const log = Object.assign({\n warn: console.warn.bind(console),\n }, options.log);\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`,\n },\n }),\n cache: getCache(),\n }, options, options.installationId\n ? { installationId: Number(options.installationId) }\n : {}, {\n log,\n });\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n};\n"],"names":[],"mappings":";;;;;;AACO,eAAe,oBAAoB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,GAAG,EAAE;AACnF,IAAI,MAAM,iBAAiB,GAAG,MAAM,YAAY,CAAC;AACjD,QAAQ,EAAE,EAAE,CAAC,KAAK;AAClB,QAAQ,UAAU;AAClB,QAAQ,GAAG,EAAE,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,cAAc;AAC7E,KAAK,CAAC,CAAC;AACP,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,KAAK;AACnB,QAAQ,KAAK,EAAE,iBAAiB,CAAC,KAAK;AACtC,QAAQ,KAAK,EAAE,iBAAiB,CAAC,KAAK;AACtC,QAAQ,SAAS,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;AAC9E,KAAK,CAAC;AACN;;ACbA;AACA,AACO,SAAS,QAAQ,GAAG;AAC3B,IAAI,OAAO,IAAI,GAAG,CAAC;AACnB;AACA,QAAQ,GAAG,EAAE,KAAK;AAClB;AACA,QAAQ,MAAM,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE;AAC9B,KAAK,CAAC,CAAC;AACP,CAAC;AACD,AAAO,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1C,IAAI,MAAM,QAAQ,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAChD,IAAI,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC7C,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrH,IAAI,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW;AAC3C,QAAQ,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,MAAM,KAAK;AACrE,YAAY,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACnC,gBAAgB,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;AAC3D,aAAa;AACb,iBAAiB;AACjB,gBAAgB,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7C,aAAa;AACb,YAAY,OAAO,WAAW,CAAC;AAC/B,SAAS,EAAE,EAAE,CAAC,CAAC;AACf,IAAI,OAAO;AACX,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,QAAQ,aAAa,EAAE,OAAO,CAAC,aAAa;AAC5C,QAAQ,cAAc;AACtB,QAAQ,mBAAmB,EAAE,mBAAmB;AAChD,KAAK,CAAC;AACN,CAAC;AACD,AAAO,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,GAAG,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAC3C,IAAI,MAAM,iBAAiB,GAAG,OAAO,CAAC,WAAW;AACjD,UAAU,EAAE;AACZ,UAAU,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;AACvC,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACrF,aAAa,IAAI,CAAC,GAAG,CAAC,CAAC;AACvB,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,IAAI,CAAC,KAAK;AAClB,QAAQ,IAAI,CAAC,SAAS;AACtB,QAAQ,IAAI,CAAC,SAAS;AACtB,QAAQ,IAAI,CAAC,mBAAmB;AAChC,QAAQ,iBAAiB;AACzB,QAAQ,IAAI,CAAC,cAAc;AAC3B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,IAAI,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC;AACD,SAAS,iBAAiB,CAAC,EAAE,cAAc,EAAE,WAAW,GAAG,EAAE,EAAE,aAAa,GAAG,EAAE,GAAG,EAAE;AACtF,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;AACtD,SAAS,IAAI,EAAE;AACf,SAAS,GAAG,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,IAAI,CAAC,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1E,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,IAAI,MAAM,mBAAmB,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/D,IAAI,OAAO,CAAC,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,CAAC;AACnE,SAAS,MAAM,CAAC,OAAO,CAAC;AACxB,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC;;AC/DM,SAAS,qBAAqB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,GAAG,EAAE;AACzJ,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC;AACzB,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,SAAS,EAAE,cAAc;AACjC,QAAQ,KAAK;AACb,QAAQ,cAAc;AACtB,QAAQ,WAAW;AACnB,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,mBAAmB;AAC3B,KAAK,EAAE,aAAa,GAAG,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,cAAc,GAAG,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,CAAC;AAC7F,CAAC;;ACRM,eAAe,6BAA6B,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE;AACnF,IAAI,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;AAClF,IAAI,IAAI,CAAC,cAAc,EAAE;AACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;AAClH,KAAK;AACL,IAAI,IAAI,OAAO,CAAC,OAAO,EAAE;AACzB,QAAQ,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,kBAAkB,EAAE,GAAG,OAAO,CAAC;AACjE;AACA,QAAQ,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC;AACrE,KAAK;AACL,IAAI,MAAM,qCAAqC,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7F,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;AAC1B,QAAQ,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,qCAAqC,CAAC,CAAC;AACrF,QAAQ,IAAI,MAAM,EAAE;AACpB,YAAY,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,mBAAmB,GAAG,GAAG,MAAM,CAAC;AAC7H,YAAY,OAAO,qBAAqB,CAAC;AACzC,gBAAgB,cAAc;AAC9B,gBAAgB,KAAK;AACrB,gBAAgB,SAAS;AACzB,gBAAgB,SAAS;AACzB,gBAAgB,WAAW;AAC3B,gBAAgB,mBAAmB;AACnC,gBAAgB,aAAa;AAC7B,gBAAgB,cAAc;AAC9B,aAAa,CAAC,CAAC;AACf,SAAS;AACT,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAChE,IAAI,MAAM,OAAO,GAAG,aAAa,IAAI,KAAK,CAAC,OAAO,CAAC;AACnD,IAAI,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW;AAC3E;AACA,IAAI,oBAAoB,EAAE,mBAAmB;AAC7C;AACA,IAAI,WAAW,EAAE,cAAc,GAAG,GAAG,GAAG,MAAM,OAAO,CAAC,yDAAyD,EAAE;AACjH,QAAQ,eAAe,EAAE,cAAc;AACvC,QAAQ,cAAc,EAAE,OAAO,CAAC,aAAa;AAC7C,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW;AACxC,QAAQ,SAAS,EAAE;AACnB,YAAY,QAAQ,EAAE,CAAC,aAAa,CAAC;AACrC,SAAS;AACT,QAAQ,OAAO,EAAE;AACjB,YAAY,aAAa,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC9D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,MAAM,aAAa,GAAG,YAAY;AACtC,UAAU,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AACvC,UAAU,KAAK,CAAC,CAAC;AACjB,IAAI,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,qCAAqC,EAAE;AAClE,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,mBAAmB;AAC3B,QAAQ,WAAW;AACnB,QAAQ,aAAa;AACrB,QAAQ,cAAc;AACtB,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,qBAAqB,CAAC;AACjC,QAAQ,cAAc;AACtB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,mBAAmB;AAC3B,QAAQ,WAAW;AACnB,QAAQ,aAAa;AACrB,QAAQ,cAAc;AACtB,KAAK,CAAC,CAAC;AACP,CAAC;;ACrEM,eAAe,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE;AAC5E,IAAI,MAAM,OAAO,GAAG,aAAa,IAAI,KAAK,CAAC,OAAO,CAAC;AACnD;AACA;AACA,IAAI,MAAM,KAAK,GAAG,iCAAiC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;AACjG,UAAU,kDAAkD;AAC5D,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC;AAC5G,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,EAAE;AACjB,YAAY,MAAM,EAAE,CAAC,gBAAgB,CAAC;AACtC,SAAS;AACT,QAAQ,SAAS,EAAE,KAAK,CAAC,QAAQ;AACjC,QAAQ,aAAa,EAAE,KAAK,CAAC,YAAY;AACzC,QAAQ,IAAI,EAAE,OAAO,CAAC,IAAI;AAC1B,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK;AAC5B,QAAQ,YAAY,EAAE,OAAO,CAAC,WAAW;AACzC,KAAK,CAAC;AACN,IAAI,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtD,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;AAC3C,QAAQ,MAAM,IAAI,YAAY,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE;AAC/G,YAAY,OAAO,EAAE,QAAQ,CAAC,OAAO;AACrC,YAAY,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;AACxD,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,MAAM,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,GAAG,QAAQ,CAAC;AACxD,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,SAAS,EAAE,OAAO;AAC1B,QAAQ,KAAK;AACb,KAAK,CAAC;AACN,CAAC;;AC5BM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE;AAC3C,IAAI,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;AAC7B,IAAI,QAAQ,IAAI;AAChB,QAAQ,KAAK,KAAK;AAClB,YAAY,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAC/C,QAAQ,KAAK,cAAc;AAC3B,YAAY,OAAO,6BAA6B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjE,QAAQ,KAAK,OAAO;AACpB,YAAY,OAAO,sBAAsB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1D,QAAQ;AACR,YAAY,MAAM,IAAI,KAAK,CAAC,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC1D,KAAK;AACL,CAAC;;ACfD,MAAM,KAAK,GAAG;AACd,IAAI,MAAM;AACV,IAAI,kBAAkB;AACtB,IAAI,oBAAoB;AACxB,IAAI,sCAAsC;AAC1C,IAAI,oDAAoD;AACxD,IAAI,gDAAgD;AACpD,IAAI,4CAA4C;AAChD,IAAI,2BAA2B;AAC/B,IAAI,4BAA4B;AAChC,IAAI,+CAA+C;AACnD,IAAI,oDAAoD;AACxD,IAAI,mCAAmC;AACvC,IAAI,oCAAoC;AACxC,IAAI,uDAAuD;AAC3D,IAAI,0BAA0B;AAC9B,IAAI,oCAAoC;AACxC,IAAI,gCAAgC;AACpC,CAAC,CAAC;AACF;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;AACtC,SAAS,KAAK,CAAC,GAAG,CAAC;AACnB,SAAS,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC;AACxD,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AACD,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;AAClC,AAAO,SAAS,eAAe,CAAC,GAAG,EAAE;AACrC,IAAI,OAAO,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;;AC9CD,MAAM,kBAAkB,GAAG,CAAC,GAAG,IAAI,CAAC;AACpC,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,uHAAuH,CAAC;AACzJ,QAAQ,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,oGAAoG,CAAC,CAAC,CAAC;AACnI,CAAC;AACD,AAAO,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC7D,IAAI,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE;AACtF,QAAQ,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAC5D,QAAQ,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3D,QAAQ,IAAI,QAAQ,CAAC;AACrB,QAAQ,IAAI;AACZ,YAAY,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/C,SAAS;AACT,QAAQ,OAAO,KAAK,EAAE;AACtB;AACA;AACA,YAAY,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE;AAC3C,gBAAgB,MAAM,KAAK,CAAC;AAC5B,aAAa;AACb;AACA;AACA,YAAY,IAAI,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,EAAE;AAC3D,gBAAgB,MAAM,KAAK,CAAC;AAC5B,aAAa;AACb,YAAY,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;AACvG,gBAAgB,IAAI,CAAC,CAAC;AACtB,YAAY,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1C,YAAY,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,qEAAqE,EAAE,IAAI,CAAC,6DAA6D,CAAC,CAAC,CAAC;AACxK,YAAY,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,oBAAoB,CAAC;AACzD,gBAAgB,GAAG,KAAK;AACxB,gBAAgB,cAAc,EAAE,IAAI;AACpC,aAAa,CAAC,CAAC;AACf,YAAY,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,YAAY,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACrC,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK;AACL,IAAI,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,MAAM,6BAA6B,CAAC,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACzF,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,IAAI,OAAO,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GAAG,CAAC,EAAE;AACvF,IAAI,MAAM,0BAA0B,GAAG,CAAC,IAAI,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;AAC1E,IAAI,IAAI;AACR,QAAQ,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;AACtC,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AAClC,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,IAAI,0BAA0B,IAAI,kBAAkB,EAAE;AAC9D,YAAY,IAAI,OAAO,GAAG,CAAC,EAAE;AAC7B,gBAAgB,KAAK,CAAC,OAAO,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,EAAE,0BAA0B,GAAG,IAAI,CAAC,qNAAqN,CAAC,CAAC;AAC5T,aAAa;AACb,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,EAAE,OAAO,CAAC;AAClB,QAAQ,MAAM,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;AACzC,QAAQ,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,+FAA+F,EAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACjK,QAAQ,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACvE,QAAQ,OAAO,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AACnF,KAAK;AACL,CAAC;;ACzEM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACM/B,MAAC,aAAa,GAAG,SAAS,aAAa,CAAC,OAAO,EAAE;AAC7D,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC9B,QAAQ,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;AACxC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACpB,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC;AAClC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAChF,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,KAAK,EAAE,QAAQ,EAAE;AACzB,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,cAAc;AACtC,UAAU,EAAE,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;AAC5D,UAAU,EAAE,EAAE;AACd,QAAQ,GAAG;AACX,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/get-app-authentication.js","../dist-src/cache.js","../dist-src/to-token-authentication.js","../dist-src/get-installation-authentication.js","../dist-src/auth.js","../dist-src/requires-app-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { githubAppJwt } from \"universal-github-app-jwt\";\nexport async function getAppAuthentication({ appId, privateKey, timeDifference, }) {\n try {\n const appAuthentication = await githubAppJwt({\n id: +appId,\n privateKey,\n now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference,\n });\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(),\n };\n }\n catch (error) {\n if (privateKey === \"-----BEGIN RSA PRIVATE KEY-----\") {\n throw new Error(\"The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\\n'\");\n }\n else {\n throw error;\n }\n }\n}\n","// https://github.com/isaacs/node-lru-cache#readme\nimport LRU from \"lru-cache\";\nexport function getCache() {\n return new LRU({\n // cache max. 15000 tokens, that will use less than 10mb memory\n max: 15000,\n // Cache for 1 minute less than GitHub expiry\n maxAge: 1000 * 60 * 59,\n });\n}\nexport async function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName,] = result.split(\"|\");\n const permissions = options.permissions ||\n permissionsString.split(/,/).reduce((permissions, string) => {\n if (/!$/.test(string)) {\n permissions[string.slice(0, -1)] = \"write\";\n }\n else {\n permissions[string] = \"read\";\n }\n return permissions;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n repositoryNames: options.repositoryNames,\n singleFileName,\n repositorySelection: repositorySelection,\n };\n}\nexport async function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions\n ? \"\"\n : Object.keys(data.permissions)\n .map((name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`)\n .join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName,\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], repositoryNames = [], }) {\n const permissionsString = Object.keys(permissions)\n .sort()\n .map((name) => (permissions[name] === \"read\" ? name : `${name}!`))\n .join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n const repositoryNamesString = repositoryNames.join(\",\");\n return [\n installationId,\n repositoryIdsString,\n repositoryNamesString,\n permissionsString,\n ]\n .filter(Boolean)\n .join(\"|\");\n}\n","export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }) {\n return Object.assign({\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection,\n }, repositoryIds ? { repositoryIds } : null, repositoryNames ? { repositoryNames } : null, singleFileName ? { singleFileName } : null);\n}\n","import { get, set } from \"./cache\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { toTokenAuthentication } from \"./to-token-authentication\";\nexport async function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\"[@octokit/auth-app] installationId option is required for installation authentication.\");\n }\n if (options.factory) {\n const { type, factory, oauthApp, ...factoryAuthOptions } = {\n ...state,\n ...options,\n };\n // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>`\n return factory(factoryAuthOptions);\n }\n const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options);\n if (!options.refresh) {\n const result = await get(state.cache, optionsWithInstallationTokenFromState);\n if (result) {\n const { token, createdAt, expiresAt, permissions, repositoryIds, repositoryNames, singleFileName, repositorySelection, } = result;\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n permissions,\n repositorySelection,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const request = customRequest || state.request;\n const { data: { token, expires_at: expiresAt, repositories, permissions: permissionsOptional, repository_selection: repositorySelectionOptional, single_file: singleFileName, }, } = await request(\"POST /app/installations/{installation_id}/access_tokens\", {\n installation_id: installationId,\n repository_ids: options.repositoryIds,\n repositories: options.repositoryNames,\n permissions: options.permissions,\n mediaType: {\n previews: [\"machine-man\"],\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`,\n },\n });\n /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */\n const permissions = permissionsOptional || {};\n /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */\n const repositorySelection = repositorySelectionOptional || \"all\";\n const repositoryIds = repositories\n ? repositories.map((r) => r.id)\n : void 0;\n const repositoryNames = repositories\n ? repositories.map((repo) => repo.name)\n : void 0;\n const createdAt = new Date().toISOString();\n await set(state.cache, optionsWithInstallationTokenFromState, {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n}\n","import { Deprecation } from \"deprecation\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nexport async function auth(state, authOptions) {\n switch (authOptions.type) {\n case \"app\":\n return getAppAuthentication(state);\n // @ts-expect-error \"oauth\" is not supperted in types\n case \"oauth\":\n state.log.warn(\n // @ts-expect-error `log.warn()` expects string\n new Deprecation(`[@octokit/auth-app] {type: \"oauth\"} is deprecated. Use {type: \"oauth-app\"} instead`));\n case \"oauth-app\":\n return state.oauthApp({ type: \"oauth-app\" });\n case \"installation\":\n authOptions;\n return getInstallationAuthentication(state, {\n ...authOptions,\n type: \"installation\",\n });\n case \"oauth-user\":\n // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as \"WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions\"\n return state.oauthApp(authOptions);\n default:\n // @ts-expect-error type is \"never\" at this point\n throw new Error(`Invalid auth type: ${authOptions.type}`);\n }\n}\n","const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/hook/deliveries\",\n \"/app/hook/deliveries/{delivery_id}\",\n \"/app/hook/deliveries/{delivery_id}/attempts\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\",\n];\n// CREDIT: Simon Grondin (https://github.com/SGrondin)\n// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js\nfunction routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((p) => p\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nexport function requiresAppAuth(url) {\n return !!url && REGEX.test(url);\n}\n","import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { requiresAppAuth } from \"./requires-app-auth\";\nconst FIVE_SECONDS_IN_MS = 5 * 1000;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(/'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/) ||\n error.message.match(/'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/));\n}\nexport async function hook(state, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n const url = endpoint.url;\n // Do not intercept request to retrieve a new token\n if (/\\/login\\/oauth\\/access_token$/.test(url)) {\n return request(endpoint);\n }\n if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token}`;\n let response;\n try {\n response = await request(endpoint);\n }\n catch (error) {\n // If there's an issue with the expiration, regenerate the token and try again.\n // Otherwise rethrow the error for upstream handling.\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n // If the date header is missing, we can't correct the system time skew.\n // Throw the error to be handled upstream.\n if (typeof error.response.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor((Date.parse(error.response.headers.date) -\n Date.parse(new Date().toString())) /\n 1000);\n state.log.warn(error.message);\n state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);\n const { token } = await getAppAuthentication({\n ...state,\n timeDifference: diff,\n });\n endpoint.headers.authorization = `bearer ${token}`;\n return request(endpoint);\n }\n return response;\n }\n if (requiresBasicAuth(url)) {\n const authentication = await state.oauthApp({ type: \"oauth-app\" });\n endpoint.headers.authorization = authentication.headers.authorization;\n return request(endpoint);\n }\n const { token, createdAt } = await getInstallationAuthentication(state, \n // @ts-expect-error TBD\n {}, request);\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(state, request, endpoint, createdAt);\n}\n/**\n * Newly created tokens might not be accessible immediately after creation.\n * In case of a 401 response, we retry with an exponential delay until more\n * than five seconds pass since the creation of the token.\n *\n * @see https://github.com/octokit/auth-app.js/issues/65\n */\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);\n try {\n return await request(options);\n }\n catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1000;\n state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\n","export const VERSION = \"3.6.1\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { getCache } from \"./cache\";\nimport { VERSION } from \"./version\";\nexport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport function createAppAuth(options) {\n if (!options.appId) {\n throw new Error(\"[@octokit/auth-app] appId option is required\");\n }\n if (!options.privateKey) {\n throw new Error(\"[@octokit/auth-app] privateKey option is required\");\n }\n if (\"installationId\" in options && !options.installationId) {\n throw new Error(\"[@octokit/auth-app] installationId is set to a falsy value\");\n }\n const log = Object.assign({\n warn: console.warn.bind(console),\n }, options.log);\n const request = options.request ||\n defaultRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const state = Object.assign({\n request,\n cache: getCache(),\n }, options, options.installationId\n ? { installationId: Number(options.installationId) }\n : {}, {\n log,\n oauthApp: createOAuthAppAuth({\n clientType: \"github-app\",\n clientId: options.clientId || \"\",\n clientSecret: options.clientSecret || \"\",\n request,\n }),\n });\n // @ts-expect-error not worth the extra code to appease TS\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["request","defaultRequest"],"mappings":";;;;;;;;;AACO,eAAe,oBAAoB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,GAAG,EAAE;AACnF,IAAI,IAAI;AACR,QAAQ,MAAM,iBAAiB,GAAG,MAAM,YAAY,CAAC;AACrD,YAAY,EAAE,EAAE,CAAC,KAAK;AACtB,YAAY,UAAU;AACtB,YAAY,GAAG,EAAE,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,cAAc;AACjF,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,KAAK;AACvB,YAAY,KAAK,EAAE,iBAAiB,CAAC,KAAK;AAC1C,YAAY,KAAK,EAAE,iBAAiB,CAAC,KAAK;AAC1C,YAAY,SAAS,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;AAClF,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,UAAU,KAAK,iCAAiC,EAAE;AAC9D,YAAY,MAAM,IAAI,KAAK,CAAC,wMAAwM,CAAC,CAAC;AACtO,SAAS;AACT,aAAa;AACb,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,KAAK;AACL;;ACvBA;AACA,AACO,SAAS,QAAQ,GAAG;AAC3B,IAAI,OAAO,IAAI,GAAG,CAAC;AACnB;AACA,QAAQ,GAAG,EAAE,KAAK;AAClB;AACA,QAAQ,MAAM,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE;AAC9B,KAAK,CAAC,CAAC;AACP,CAAC;AACD,AAAO,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1C,IAAI,MAAM,QAAQ,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAChD,IAAI,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC7C,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrH,IAAI,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW;AAC3C,QAAQ,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,MAAM,KAAK;AACrE,YAAY,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACnC,gBAAgB,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;AAC3D,aAAa;AACb,iBAAiB;AACjB,gBAAgB,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7C,aAAa;AACb,YAAY,OAAO,WAAW,CAAC;AAC/B,SAAS,EAAE,EAAE,CAAC,CAAC;AACf,IAAI,OAAO;AACX,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,QAAQ,aAAa,EAAE,OAAO,CAAC,aAAa;AAC5C,QAAQ,eAAe,EAAE,OAAO,CAAC,eAAe;AAChD,QAAQ,cAAc;AACtB,QAAQ,mBAAmB,EAAE,mBAAmB;AAChD,KAAK,CAAC;AACN,CAAC;AACD,AAAO,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,GAAG,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAC3C,IAAI,MAAM,iBAAiB,GAAG,OAAO,CAAC,WAAW;AACjD,UAAU,EAAE;AACZ,UAAU,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;AACvC,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACrF,aAAa,IAAI,CAAC,GAAG,CAAC,CAAC;AACvB,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,IAAI,CAAC,KAAK;AAClB,QAAQ,IAAI,CAAC,SAAS;AACtB,QAAQ,IAAI,CAAC,SAAS;AACtB,QAAQ,IAAI,CAAC,mBAAmB;AAChC,QAAQ,iBAAiB;AACzB,QAAQ,IAAI,CAAC,cAAc;AAC3B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,IAAI,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC;AACD,SAAS,iBAAiB,CAAC,EAAE,cAAc,EAAE,WAAW,GAAG,EAAE,EAAE,aAAa,GAAG,EAAE,EAAE,eAAe,GAAG,EAAE,GAAG,EAAE;AAC5G,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;AACtD,SAAS,IAAI,EAAE;AACf,SAAS,GAAG,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,IAAI,CAAC,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1E,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,IAAI,MAAM,mBAAmB,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/D,IAAI,MAAM,qBAAqB,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5D,IAAI,OAAO;AACX,QAAQ,cAAc;AACtB,QAAQ,mBAAmB;AAC3B,QAAQ,qBAAqB;AAC7B,QAAQ,iBAAiB;AACzB,KAAK;AACL,SAAS,MAAM,CAAC,OAAO,CAAC;AACxB,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC;;ACtEM,SAAS,qBAAqB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,GAAG,EAAE;AAC1K,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC;AACzB,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,SAAS,EAAE,cAAc;AACjC,QAAQ,KAAK;AACb,QAAQ,cAAc;AACtB,QAAQ,WAAW;AACnB,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,mBAAmB;AAC3B,KAAK,EAAE,aAAa,GAAG,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,eAAe,GAAG,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,cAAc,GAAG,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,CAAC;AAC3I,CAAC;;ACRM,eAAe,6BAA6B,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE;AACnF,IAAI,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;AAClF,IAAI,IAAI,CAAC,cAAc,EAAE;AACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;AAClH,KAAK;AACL,IAAI,IAAI,OAAO,CAAC,OAAO,EAAE;AACzB,QAAQ,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,GAAG;AACnE,YAAY,GAAG,KAAK;AACpB,YAAY,GAAG,OAAO;AACtB,SAAS,CAAC;AACV;AACA,QAAQ,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC3C,KAAK;AACL,IAAI,MAAM,qCAAqC,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7F,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;AAC1B,QAAQ,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,qCAAqC,CAAC,CAAC;AACrF,QAAQ,IAAI,MAAM,EAAE;AACpB,YAAY,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,GAAG,GAAG,MAAM,CAAC;AAC9I,YAAY,OAAO,qBAAqB,CAAC;AACzC,gBAAgB,cAAc;AAC9B,gBAAgB,KAAK;AACrB,gBAAgB,SAAS;AACzB,gBAAgB,SAAS;AACzB,gBAAgB,WAAW;AAC3B,gBAAgB,mBAAmB;AACnC,gBAAgB,aAAa;AAC7B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc;AAC9B,aAAa,CAAC,CAAC;AACf,SAAS;AACT,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAChE,IAAI,MAAM,OAAO,GAAG,aAAa,IAAI,KAAK,CAAC,OAAO,CAAC;AACnD,IAAI,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,WAAW,EAAE,cAAc,GAAG,GAAG,GAAG,MAAM,OAAO,CAAC,yDAAyD,EAAE;AAClQ,QAAQ,eAAe,EAAE,cAAc;AACvC,QAAQ,cAAc,EAAE,OAAO,CAAC,aAAa;AAC7C,QAAQ,YAAY,EAAE,OAAO,CAAC,eAAe;AAC7C,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW;AACxC,QAAQ,SAAS,EAAE;AACnB,YAAY,QAAQ,EAAE,CAAC,aAAa,CAAC;AACrC,SAAS;AACT,QAAQ,OAAO,EAAE;AACjB,YAAY,aAAa,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC9D,SAAS;AACT,KAAK,CAAC,CAAC;AACP;AACA,IAAI,MAAM,WAAW,GAAG,mBAAmB,IAAI,EAAE,CAAC;AAClD;AACA,IAAI,MAAM,mBAAmB,GAAG,2BAA2B,IAAI,KAAK,CAAC;AACrE,IAAI,MAAM,aAAa,GAAG,YAAY;AACtC,UAAU,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AACvC,UAAU,KAAK,CAAC,CAAC;AACjB,IAAI,MAAM,eAAe,GAAG,YAAY;AACxC,UAAU,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;AAC/C,UAAU,KAAK,CAAC,CAAC;AACjB,IAAI,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,qCAAqC,EAAE;AAClE,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,mBAAmB;AAC3B,QAAQ,WAAW;AACnB,QAAQ,aAAa;AACrB,QAAQ,eAAe;AACvB,QAAQ,cAAc;AACtB,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,qBAAqB,CAAC;AACjC,QAAQ,cAAc;AACtB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,mBAAmB;AAC3B,QAAQ,WAAW;AACnB,QAAQ,aAAa;AACrB,QAAQ,eAAe;AACvB,QAAQ,cAAc;AACtB,KAAK,CAAC,CAAC;AACP,CAAC;;AC7EM,eAAe,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;AAC/C,IAAI,QAAQ,WAAW,CAAC,IAAI;AAC5B,QAAQ,KAAK,KAAK;AAClB,YAAY,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAC/C;AACA,QAAQ,KAAK,OAAO;AACpB,YAAY,KAAK,CAAC,GAAG,CAAC,IAAI;AAC1B;AACA,YAAY,IAAI,WAAW,CAAC,CAAC,kFAAkF,CAAC,CAAC,CAAC,CAAC;AACnH,QAAQ,KAAK,WAAW;AACxB,YAAY,OAAO,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AACzD,QAAQ,KAAK,cAAc;AAC3B,AACA,YAAY,OAAO,6BAA6B,CAAC,KAAK,EAAE;AACxD,gBAAgB,GAAG,WAAW;AAC9B,gBAAgB,IAAI,EAAE,cAAc;AACpC,aAAa,CAAC,CAAC;AACf,QAAQ,KAAK,YAAY;AACzB;AACA,YAAY,OAAO,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC/C,QAAQ;AACR;AACA,YAAY,MAAM,IAAI,KAAK,CAAC,CAAC,mBAAmB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtE,KAAK;AACL,CAAC;;AC3BD,MAAM,KAAK,GAAG;AACd,IAAI,MAAM;AACV,IAAI,kBAAkB;AACtB,IAAI,sBAAsB;AAC1B,IAAI,oCAAoC;AACxC,IAAI,6CAA6C;AACjD,IAAI,oBAAoB;AACxB,IAAI,sCAAsC;AAC1C,IAAI,oDAAoD;AACxD,IAAI,gDAAgD;AACpD,IAAI,4CAA4C;AAChD,IAAI,2BAA2B;AAC/B,IAAI,4BAA4B;AAChC,IAAI,+CAA+C;AACnD,IAAI,oDAAoD;AACxD,IAAI,mCAAmC;AACvC,IAAI,oCAAoC;AACxC,IAAI,uDAAuD;AAC3D,IAAI,0BAA0B;AAC9B,IAAI,oCAAoC;AACxC,IAAI,gCAAgC;AACpC,CAAC,CAAC;AACF;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;AACtC,SAAS,KAAK,CAAC,GAAG,CAAC;AACnB,SAAS,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC;AACxD,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AACD,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;AAClC,AAAO,SAAS,eAAe,CAAC,GAAG,EAAE;AACrC,IAAI,OAAO,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;;AChDD,MAAM,kBAAkB,GAAG,CAAC,GAAG,IAAI,CAAC;AACpC,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,uHAAuH,CAAC;AACzJ,QAAQ,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,oGAAoG,CAAC,CAAC,CAAC;AACnI,CAAC;AACD,AAAO,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D,IAAI,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC7B;AACA,IAAI,IAAI,+BAA+B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AACnD,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,IAAI,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE;AAC7E,QAAQ,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAC5D,QAAQ,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3D,QAAQ,IAAI,QAAQ,CAAC;AACrB,QAAQ,IAAI;AACZ,YAAY,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/C,SAAS;AACT,QAAQ,OAAO,KAAK,EAAE;AACtB;AACA;AACA,YAAY,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE;AAC3C,gBAAgB,MAAM,KAAK,CAAC;AAC5B,aAAa;AACb;AACA;AACA,YAAY,IAAI,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,EAAE;AACpE,gBAAgB,MAAM,KAAK,CAAC;AAC5B,aAAa;AACb,YAAY,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;AAC5E,gBAAgB,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;AACjD,gBAAgB,IAAI,CAAC,CAAC;AACtB,YAAY,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1C,YAAY,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,qEAAqE,EAAE,IAAI,CAAC,6DAA6D,CAAC,CAAC,CAAC;AACxK,YAAY,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,oBAAoB,CAAC;AACzD,gBAAgB,GAAG,KAAK;AACxB,gBAAgB,cAAc,EAAE,IAAI;AACpC,aAAa,CAAC,CAAC;AACf,YAAY,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,YAAY,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACrC,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK;AACL,IAAI,IAAI,iBAAiB,CAAC,GAAG,CAAC,EAAE;AAChC,QAAQ,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAC3E,QAAQ,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC,aAAa,CAAC;AAC9E,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,MAAM,6BAA6B,CAAC,KAAK;AAC1E;AACA,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AACjB,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,IAAI,OAAO,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GAAG,CAAC,EAAE;AACvF,IAAI,MAAM,0BAA0B,GAAG,CAAC,IAAI,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;AAC1E,IAAI,IAAI;AACR,QAAQ,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;AACtC,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AAClC,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,IAAI,0BAA0B,IAAI,kBAAkB,EAAE;AAC9D,YAAY,IAAI,OAAO,GAAG,CAAC,EAAE;AAC7B,gBAAgB,KAAK,CAAC,OAAO,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,EAAE,0BAA0B,GAAG,IAAI,CAAC,qNAAqN,CAAC,CAAC;AAC5T,aAAa;AACb,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,EAAE,OAAO,CAAC;AAClB,QAAQ,MAAM,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;AACzC,QAAQ,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,+FAA+F,EAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACjK,QAAQ,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACvE,QAAQ,OAAO,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AACnF,KAAK;AACL,CAAC;;ACvFM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACQpC,SAAS,aAAa,CAAC,OAAO,EAAE;AACvC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;AACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;AACxE,KAAK;AACL,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;AAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AAC7E,KAAK;AACL,IAAI,IAAI,gBAAgB,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;AAChE,QAAQ,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;AACtF,KAAK;AACL,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC9B,QAAQ,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;AACxC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACpB,IAAI,MAAMA,SAAO,GAAG,OAAO,CAAC,OAAO;AACnC,QAAQC,OAAc,CAAC,QAAQ,CAAC;AAChC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAChF,aAAa;AACb,SAAS,CAAC,CAAC;AACX,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,iBAAQD,SAAO;AACf,QAAQ,KAAK,EAAE,QAAQ,EAAE;AACzB,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,cAAc;AACtC,UAAU,EAAE,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;AAC5D,UAAU,EAAE,EAAE;AACd,QAAQ,GAAG;AACX,QAAQ,QAAQ,EAAE,kBAAkB,CAAC;AACrC,YAAY,UAAU,EAAE,YAAY;AACpC,YAAY,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,EAAE;AAC5C,YAAY,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;AACpD,qBAAYA,SAAO;AACnB,SAAS,CAAC;AACV,KAAK,CAAC,CAAC;AACP;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/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/auth-app/node_modules/@octokit/auth-oauth-app/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/README.md new file mode 100644 index 0000000..27ed15b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/README.md @@ -0,0 +1,1054 @@ +# auth-oauth-app.js + +> GitHub OAuth App authentication for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-app.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-app) +[![Build Status](https://github.com/octokit/auth-oauth-app.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-app.js/actions?query=workflow%3ATest) + +`@octokit/auth-oauth-app` is implementing one of [GitHub’s authentication strategies](https://github.com/octokit/auth.js). + +It implements authentication using an OAuth app’s client ID and secret as well as creating user access tokens GitHub's OAuth [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) and [device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). + + + +- [Standalone Usage](#standalone-usage) + - [Authenticate as app](#authenticate-as-app) + - [Authenticate user using OAuth Web Flow](#authenticate-user-using-oauth-web-flow) + - [Authenticate user using OAuth Device flow](#authenticate-user-using-oauth-device-flow) +- [Usage with Octokit](#usage-with-octokit) +- [`createOAuthAppAuth(options)` or `new Octokit({ auth })`](#createoauthappauthoptions-or-new-octokit-auth-) +- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions) + - [Client ID/Client Secret Basic authentication](#client-idclient-secret-basic-authentication) + - [OAuth web flow](#oauth-web-flow) + - [OAuth device flow](#oauth-device-flow) +- [Authentication object](#authentication-object) + - [OAuth App authentication](#oauth-app-authentication) + - [OAuth user access token authentication](#oauth-user-access-token-authentication) + - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) + - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [Implementation details](#implementation-details) +- [License](#license) + + + +## Standalone Usage + + + + + + +
+Browsers + + +⚠️ `@octokit/auth-oauth-app` is not meant for usage in the browser. The OAuth APIs to create tokens do not have CORS enabled, and a client secret must not be exposed to the client. + +If you know what you are doing, load `@octokit/auth-oauth-app` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+Node + + +Install with npm install @octokit/auth-oauth-app + +```js +const { createOAuthAppAuth } = require("@octokit/auth-oauth-app"); +// or: import { createOAuthAppAuth } from "@octokit/auth-oauth-app"; +``` + +
+ +### Authenticate as app + +```js +const auth = createOAuthAppAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const appAuthentication = await auth({ + type: "oauth-app", +}); +``` + +resolves with + +```json +{ + "type": "oauth-app", + "clientId": "1234567890abcdef1234", + "clientSecret": "1234567890abcdef1234567890abcdef12345678", + "headers": { + "authorization": "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6MTIzNDU2Nzg5MGFiY2RlZjEyMzQ1Njc4OTBhYmNkZWYxMjM0NTY3OA==" + } +} +``` + +### Authenticate user using OAuth Web Flow + +Exchange code from GitHub's OAuth web flow, see https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github + +```js +const auth = createOAuthAppAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuthenticationFromWebFlow = await auth({ + type: "oauth-user", + code: "random123", + state: "mystate123", +}); +``` + +resolves with + +```json +{ + "clientType": "oauth-app", + "clientId": "1234567890abcdef1234", + "clientSecret": "1234567890abcdef1234567890abcdef12345678", + "type": "token", + "tokenType": "oauth", + "token": "useraccesstoken123", + "scopes": [] +} +``` + +### Authenticate user using OAuth Device flow + +Pass an asynchronous `onVerification()` method which will be called with the response from step 1 of the device flow. In that function you have to prompt the user to enter the user code at the provided verification URL. + +`auth()` will not resolve until the user entered the code and granted access to the app. + +See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github + +```js +const auth = createOAuthAppAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuthenticationFromDeviceFlow = await auth({ + async onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); +``` + +resolves with + +```json +{ + "clientType": "oauth-app", + "clientId": "1234567890abcdef1234", + "clientSecret": "1234567890abcdef1234567890abcdef12345678", + "type": "token", + "tokenType": "oauth", + "token": "useraccesstoken123", + "scopes": [] +} +``` + +## Usage with Octokit + + + + + + +
+ +Browsers + + + +⚠️ `@octokit/auth-oauth-app` is not meant for usage in the browser. The OAuth APIs to create tokens do not have CORS enabled, and a client secret must not be exposed to the client. + +If you know what you are doing, load `@octokit/auth-oauth-app` and `@octokit/core` (or a compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-oauth-app`. Optionally replace `@octokit/core` with a compatible module + +```js +const { Octokit } = require("@octokit/core"); +const { + createOAuthAppAuth, + createOAuthUserAuth, +} = require("@octokit/auth-oauth-app"); +``` + +
+ +```js +const appOctokit = new Octokit({ + authStrategy: createOAuthAppAuth, + auth: { + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + }, +}); + +// Send requests as app +await appOctokit.request("POST /application/{client_id}/token", { + client_id: "1234567890abcdef1234", + access_token: "existingtoken123", +}); +console.log("token is valid"); + +// create a new octokit instance that is authenticated as the user +const userOctokit = await appOctokit.auth({ + type: "oauth-user", + code: "code123", + factory: (options) => { + return new Octokit({ + authStrategy: createOAuthUserAuth, + auth: options, + }); + }, +}); + +// Exchanges the code for the user access token authentication on first request +// and caches the authentication for successive requests +const { + data: { login }, +} = await userOctokit.request("GET /user"); +console.log("Hello, %s!", login); +``` + +## `createOAuthAppAuth(options)` or `new Octokit({ auth })` + +The `createOAuthAppAuth` method accepts a single `options` object as argument. The same set of options can be passed as `auth` to the `Octokit` constructor when setting `authStrategy: createOAuthAppAuth` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Find your OAuth app’s Client ID in your account’s developer settings. +
+ clientSecret + + string + + Required. Find your OAuth app’s Client Secret in your account’s developer settings. +
+ clientType + + string + + Must be set to either "oauth-app" or "github-app". Defaults to "oauth-app" +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +## `auth(options)` or `octokit.auth(options)` + +The async `auth()` method returned by `createOAuthAppAuth(options)` accepts different options depending on your use case + +### Client ID/Client Secret Basic authentication + +All REST API routes starting with `/applications/{client_id}` need to be authenticated using the OAuth/GitHub App's Client ID and a client secret. + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth-app" +
+ +### OAuth web flow + +Exchange `code` for a user access token. See [Web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth-user". +
+ code + + string + + Required. The authorization code which was passed as query parameter to the callback URL from the OAuth web application flow. +
+ redirectUrl + + string + + The URL in your application where users are sent after authorization. See redirect urls. +
+ state + + string + + The unguessable random string you provided in Step 1 of the OAuth web application flow. +
+ factory + + function + + +When the `factory` option is, the `auth({type: "oauth-user", code, factory })` call with resolve with whatever the `factory` function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility. + +```js +const { + createOAuthAppAuth, + createOAuthUserAuth, +} = require("@octokit/auth-oauth-app"); + +const appAuth = createOAuthAppAuth({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuth = await appAuth({ + type: "oauth-user", + code, + factory: createOAuthUserAuth, +}); + +// will create token upon first call, then cache authentication for successive calls, +// until token needs to be refreshed (if enabled for the GitHub App) +const authentication = await userAuth(); +``` + +
+ +### OAuth device flow + +Create a user access token without an http redirect. See [Device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). + +The device flow does not require a client secret, but it is required as strategy option for `@octokit/auth-oauth-app`, even for the device flow. If you want to implement the device flow without requiring a client secret, use [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth-user". +
+ onVerification + + function + + +**Required**. A function that is called once the device and user codes were retrieved. + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = auth({ + type: "oauth-user", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ scopes + + array of strings + + Only relevant if the clientType strategy option is set to "oauth-app".Array of OAuth scope names that the user access token should be granted. Defaults to no scopes ([]). +
+ factory + + function + + +When the `factory` option is, the `auth({type: "oauth-user", code, factory })` call with resolve with whatever the `factory` function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility. + +```js +const { + createOAuthAppAuth, + createOAuthUserAuth, +} = require("@octokit/auth-oauth-app"); + +const appAuth = createOAuthAppAuth({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuth = await appAuth({ + type: "oauth-user", + onVerification, + factory: createOAuthUserAuth, +}); + +// will create token upon first call, then cache authentication for successive calls, +// until token needs to be refreshed (if enabled for the GitHub App) +const authentication = await userAuth(); +``` + +
+ +## Authentication object + +The async `auth(options)` method to one of four possible authentication objects + +1. **OAuth App authentication** for `auth({ type: "oauth-app" })` +2. **OAuth user access token authentication** for `auth({ type: "oauth-app" })` and App is an OAuth App (OAuth user access token) +3. **GitHub APP user authentication token with expiring disabled** for `auth({ type: "oauth-app" })` and App is a GitHub App (user-to-server token) +4. **GitHub APP user authentication token with expiring enabled** for `auth({ type: "oauth-app" })` and App is a GitHub App (user-to-server token) + +### OAuth App authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "oauth-app" +
+ clientType + + string + + "oauth-app" or "github-app" +
+ clientId + + string + + The client ID as passed to the constructor. +
+ clientSecret + + string + + The client secret as passed to the constructor. +
+ headers + + object + + { authorization }. +
+ +### OAuth user access token authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub APP user authentication token with expiring disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ clientSecret + + string + + One of the app's client secrets +
+ token + + string + + The user access token +
+ +### GitHub APP user authentication token with expiring enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ clientSecret + + string + + One of the app's client secrets +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly using `clientId` and `clientSecret` as basic auth for the API endpoints that support it. It throws an error in other cases. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: user } = await auth.hook( + request, + "POST /applications/{client_id}/token", + { + client_id: "1234567890abcdef1234", + access_token: "token123", + } +); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: user } = await requestWithAuth( + "POST /applications/{client_id}/token", + { + client_id: "1234567890abcdef1234", + access_token: "token123", + } +); +``` + +## Types + +```ts +import { + // strategy options + OAuthAppStrategyOptions, + GitHubAppStrategyOptions, + // auth options + AppAuthOptions, + WebFlowAuthOptions, + OAuthAppDeviceFlowAuthOptions, + GitHubAppDeviceFlowAuthOptions, + // auth interfaces + OAuthAppAuthInterface, + GitHubAuthInterface, + // authentication object + AppAuthentication, + OAuthAppUserAuthentication, + GitHubAppUserAuthentication, + GitHubAppUserAuthenticationWithExpiration, +} from "@octokit/auth-oauth-app"; +``` + +## Implementation details + +Client ID and secret can be passed as Basic auth in the `Authorization` header in order to get a higher rate limit compared to unauthenticated requests. This is meant for the use on servers only: never expose an OAuth client secret on a client such as a web application! + +`auth.hook` will set the correct authentication header automatically based on the request URL. For all [OAuth Application endpoints](https://developer.github.com/v3/apps/oauth_applications/), the `Authorization` header is set to basic auth. For all other endpoints and token is retrieved and used in the `Authorization` header. The token is cached and used for succeeding requests. + +To reset the cached access token, you can do this + +```js +const { token } = await auth({ type: "oauth-user" }); +await auth.hook(request, "POST /applications/{client_id}/token", { + client_id: "1234567890abcdef1234", + access_token: token, +}); +``` + +The internally cached token will be replaced and used for succeeding requests. See also ["the REST API documentation"](https://developer.github.com/v3/oauth_authorizations/). + +See also: [octokit/oauth-authorization-url.js](https://github.com/octokit/oauth-authorization-url.js). + +## License + +[MIT](LICENSE) + +``` + +``` diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-node/index.js new file mode 100644 index 0000000..cb55558 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-node/index.js @@ -0,0 +1,186 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var universalUserAgent = require('universal-user-agent'); +var request = require('@octokit/request'); +var btoa = _interopDefault(require('btoa-lite')); +var authOauthUser = require('@octokit/auth-oauth-user'); + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +const _excluded = ["type"]; +async function auth(state, authOptions) { + if (authOptions.type === "oauth-app") { + return { + type: "oauth-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + headers: { + authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}` + } + }; + } + + if ("factory" in authOptions) { + const _authOptions$state = _objectSpread2(_objectSpread2({}, authOptions), state), + options = _objectWithoutProperties(_authOptions$state, _excluded); // @ts-expect-error TODO: `option` cannot be never, is this a bug? + + + return authOptions.factory(options); + } + + const common = _objectSpread2({ + clientId: state.clientId, + clientSecret: state.clientSecret, + request: state.request + }, authOptions); // TS: Look what you made me do + + + const userAuth = state.clientType === "oauth-app" ? await authOauthUser.createOAuthUserAuth(_objectSpread2(_objectSpread2({}, common), {}, { + clientType: state.clientType + })) : await authOauthUser.createOAuthUserAuth(_objectSpread2(_objectSpread2({}, common), {}, { + clientType: state.clientType + })); + return userAuth(); +} + +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); // Do not intercept OAuth Web/Device flow request + + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + + if (state.clientType === "github-app" && !authOauthUser.requiresBasicAuth(endpoint.url)) { + throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`); + } + + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + + try { + return await request(endpoint); + } catch (error) { + /* istanbul ignore if */ + if (error.status !== 401) throw error; + error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`; + throw error; + } +} + +const VERSION = "4.3.4"; + +function createOAuthAppAuth(options) { + const state = Object.assign({ + request: request.request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } + }), + clientType: "oauth-app" + }, options); // @ts-expect-error not worth the extra code to appease TS + + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} + +Object.defineProperty(exports, 'createOAuthUserAuth', { + enumerable: true, + get: function () { + return authOauthUser.createOAuthUserAuth; + } +}); +exports.createOAuthAppAuth = createOAuthAppAuth; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map new file mode 100644 index 0000000..1c964a5 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import btoa from \"btoa-lite\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport async function auth(state, authOptions) {\n if (authOptions.type === \"oauth-app\") {\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n headers: {\n authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`,\n },\n };\n }\n if (\"factory\" in authOptions) {\n const { type, ...options } = {\n ...authOptions,\n ...state,\n };\n // @ts-expect-error TODO: `option` cannot be never, is this a bug?\n return authOptions.factory(options);\n }\n const common = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.request,\n ...authOptions,\n };\n // TS: Look what you made me do\n const userAuth = state.clientType === \"oauth-app\"\n ? await createOAuthUserAuth({\n ...common,\n clientType: state.clientType,\n })\n : await createOAuthUserAuth({\n ...common,\n clientType: state.clientType,\n });\n return userAuth();\n}\n","import btoa from \"btoa-lite\";\nimport { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (state.clientType === \"github-app\" && !requiresBasicAuth(endpoint.url)) {\n throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than \"/applications/{client_id}/**\". \"${endpoint.method} ${endpoint.url}\" is not supported.`);\n }\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n try {\n return await request(endpoint);\n }\n catch (error) {\n /* istanbul ignore if */\n if (error.status !== 401)\n throw error;\n error.message = `[@octokit/auth-oauth-app] \"${endpoint.method} ${endpoint.url}\" does not support clientId/clientSecret basic authentication.`;\n throw error;\n }\n}\n","export const VERSION = \"4.3.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport function createOAuthAppAuth(options) {\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n }),\n clientType: \"oauth-app\",\n }, options);\n // @ts-expect-error not worth the extra code to appease TS\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["auth","state","authOptions","type","clientId","clientSecret","clientType","headers","authorization","btoa","options","factory","common","request","userAuth","createOAuthUserAuth","hook","route","parameters","endpoint","merge","test","url","requiresBasicAuth","Error","method","credentials","error","status","message","VERSION","createOAuthAppAuth","Object","assign","defaults","getUserAgent","bind"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,eAAeA,IAAf,CAAoBC,KAApB,EAA2BC,WAA3B,EAAwC;AAC3C,MAAIA,WAAW,CAACC,IAAZ,KAAqB,WAAzB,EAAsC;AAClC,WAAO;AACHA,MAAAA,IAAI,EAAE,WADH;AAEHC,MAAAA,QAAQ,EAAEH,KAAK,CAACG,QAFb;AAGHC,MAAAA,YAAY,EAAEJ,KAAK,CAACI,YAHjB;AAIHC,MAAAA,UAAU,EAAEL,KAAK,CAACK,UAJf;AAKHC,MAAAA,OAAO,EAAE;AACLC,QAAAA,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAER,KAAK,CAACG,QAAS,IAAGH,KAAK,CAACI,YAAa,EAAzC,CAA4C;AADnE;AALN,KAAP;AASH;;AACD,MAAI,aAAaH,WAAjB,EAA8B;AAC1B,iEACOA,WADP,GAEOD,KAFP;AAAA,UAAiBS,OAAjB,2DAD0B;;;AAM1B,WAAOR,WAAW,CAACS,OAAZ,CAAoBD,OAApB,CAAP;AACH;;AACD,QAAME,MAAM;AACRR,IAAAA,QAAQ,EAAEH,KAAK,CAACG,QADR;AAERC,IAAAA,YAAY,EAAEJ,KAAK,CAACI,YAFZ;AAGRQ,IAAAA,OAAO,EAAEZ,KAAK,CAACY;AAHP,KAILX,WAJK,CAAZ,CApB2C;;;AA2B3C,QAAMY,QAAQ,GAAGb,KAAK,CAACK,UAAN,KAAqB,WAArB,GACX,MAAMS,iCAAmB,mCACpBH,MADoB;AAEvBN,IAAAA,UAAU,EAAEL,KAAK,CAACK;AAFK,KADd,GAKX,MAAMS,iCAAmB,mCACpBH,MADoB;AAEvBN,IAAAA,UAAU,EAAEL,KAAK,CAACK;AAFK,KAL/B;AASA,SAAOQ,QAAQ,EAAf;AACH;;ACrCM,eAAeE,IAAf,CAAoBf,KAApB,EAA2BY,OAA3B,EAAoCI,KAApC,EAA2CC,UAA3C,EAAuD;AAC1D,MAAIC,QAAQ,GAAGN,OAAO,CAACM,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAf,CAD0D;;AAG1D,MAAI,+CAA+CG,IAA/C,CAAoDF,QAAQ,CAACG,GAA7D,CAAJ,EAAuE;AACnE,WAAOT,OAAO,CAACM,QAAD,CAAd;AACH;;AACD,MAAIlB,KAAK,CAACK,UAAN,KAAqB,YAArB,IAAqC,CAACiB,+BAAiB,CAACJ,QAAQ,CAACG,GAAV,CAA3D,EAA2E;AACvE,UAAM,IAAIE,KAAJ,CAAW,8JAA6JL,QAAQ,CAACM,MAAO,IAAGN,QAAQ,CAACG,GAAI,qBAAxM,CAAN;AACH;;AACD,QAAMI,WAAW,GAAGjB,IAAI,CAAE,GAAER,KAAK,CAACG,QAAS,IAAGH,KAAK,CAACI,YAAa,EAAzC,CAAxB;AACAc,EAAAA,QAAQ,CAACZ,OAAT,CAAiBC,aAAjB,GAAkC,SAAQkB,WAAY,EAAtD;;AACA,MAAI;AACA,WAAO,MAAMb,OAAO,CAACM,QAAD,CAApB;AACH,GAFD,CAGA,OAAOQ,KAAP,EAAc;AACV;AACA,QAAIA,KAAK,CAACC,MAAN,KAAiB,GAArB,EACI,MAAMD,KAAN;AACJA,IAAAA,KAAK,CAACE,OAAN,GAAiB,8BAA6BV,QAAQ,CAACM,MAAO,IAAGN,QAAQ,CAACG,GAAI,gEAA9E;AACA,UAAMK,KAAN;AACH;AACJ;;ACvBM,MAAMG,OAAO,GAAG,mBAAhB;;ACMA,SAASC,kBAAT,CAA4BrB,OAA5B,EAAqC;AACxC,QAAMT,KAAK,GAAG+B,MAAM,CAACC,MAAP,CAAc;AACxBpB,IAAAA,OAAO,EAAEA,eAAO,CAACqB,QAAR,CAAiB;AACtB3B,MAAAA,OAAO,EAAE;AACL,sBAAe,6BAA4BuB,OAAQ,IAAGK,+BAAY,EAAG;AADhE;AADa,KAAjB,CADe;AAMxB7B,IAAAA,UAAU,EAAE;AANY,GAAd,EAOXI,OAPW,CAAd,CADwC;;AAUxC,SAAOsB,MAAM,CAACC,MAAP,CAAcjC,IAAI,CAACoC,IAAL,CAAU,IAAV,EAAgBnC,KAAhB,CAAd,EAAsC;AACzCe,IAAAA,IAAI,EAAEA,IAAI,CAACoB,IAAL,CAAU,IAAV,EAAgBnC,KAAhB;AADmC,GAAtC,CAAP;AAGH;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/auth.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/auth.js new file mode 100644 index 0000000..23c4e60 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/auth.js @@ -0,0 +1,40 @@ +import btoa from "btoa-lite"; +import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +export async function auth(state, authOptions) { + if (authOptions.type === "oauth-app") { + return { + type: "oauth-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + headers: { + authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`, + }, + }; + } + if ("factory" in authOptions) { + const { type, ...options } = { + ...authOptions, + ...state, + }; + // @ts-expect-error TODO: `option` cannot be never, is this a bug? + return authOptions.factory(options); + } + const common = { + clientId: state.clientId, + clientSecret: state.clientSecret, + request: state.request, + ...authOptions, + }; + // TS: Look what you made me do + const userAuth = state.clientType === "oauth-app" + ? await createOAuthUserAuth({ + ...common, + clientType: state.clientType, + }) + : await createOAuthUserAuth({ + ...common, + clientType: state.clientType, + }); + return userAuth(); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/hook.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/hook.js new file mode 100644 index 0000000..6c0c848 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/hook.js @@ -0,0 +1,24 @@ +import btoa from "btoa-lite"; +import { requiresBasicAuth } from "@octokit/auth-oauth-user"; +export async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); + // Do not intercept OAuth Web/Device flow request + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (state.clientType === "github-app" && !requiresBasicAuth(endpoint.url)) { + throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`); + } + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + try { + return await request(endpoint); + } + catch (error) { + /* istanbul ignore if */ + if (error.status !== 401) + throw error; + error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`; + throw error; + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/index.js new file mode 100644 index 0000000..4eeb7be --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/index.js @@ -0,0 +1,20 @@ +import { getUserAgent } from "universal-user-agent"; +import { request } from "@octokit/request"; +import { auth } from "./auth"; +import { hook } from "./hook"; +import { VERSION } from "./version"; +export { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +export function createOAuthAppAuth(options) { + const state = Object.assign({ + request: request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, + }, + }), + clientType: "oauth-app", + }, options); + // @ts-expect-error not worth the extra code to appease TS + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state), + }); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/types.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/version.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/version.js new file mode 100644 index 0000000..a3c27c8 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "4.3.4"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts new file mode 100644 index 0000000..7180962 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts @@ -0,0 +1,18 @@ +import { OAuthAppState, GitHubAppState, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, FactoryOAuthAppWebFlow, FactoryOAuthAppDeviceFlow, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration } from "./types"; +export declare function auth(state: OAuthAppState | GitHubAppState, authOptions: AppAuthOptions): Promise; +export declare function auth(state: OAuthAppState, authOptions: WebFlowAuthOptions): Promise; +export declare function auth(state: OAuthAppState, authOptions: WebFlowAuthOptions & { + factory: FactoryOAuthAppWebFlow; +}): Promise; +export declare function auth(state: OAuthAppState, authOptions: OAuthAppDeviceFlowAuthOptions): Promise; +export declare function auth(state: OAuthAppState, authOptions: OAuthAppDeviceFlowAuthOptions & { + factory: FactoryOAuthAppDeviceFlow; +}): Promise; +export declare function auth(state: GitHubAppState, authOptions: WebFlowAuthOptions): Promise; +export declare function auth(state: GitHubAppState, authOptions: WebFlowAuthOptions & { + factory: FactoryGitHubWebFlow; +}): Promise; +export declare function auth(state: GitHubAppState, authOptions: GitHubAppDeviceFlowAuthOptions): Promise; +export declare function auth(state: GitHubAppState, authOptions: GitHubAppDeviceFlowAuthOptions & { + factory: FactoryGitHubDeviceFlow; +}): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts new file mode 100644 index 0000000..12fdfa2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts @@ -0,0 +1,3 @@ +import { EndpointOptions, RequestParameters, Route, RequestInterface, OctokitResponse } from "@octokit/types"; +import { OAuthAppState, GitHubAppState } from "./types"; +export declare function hook(state: OAuthAppState | GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts new file mode 100644 index 0000000..68ba65a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts @@ -0,0 +1,5 @@ +import { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAuthInterface } from "./types"; +export { OAuthAppStrategyOptions, GitHubAppStrategyOptions, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, OAuthAppAuthInterface, GitHubAuthInterface, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, } from "./types"; +export { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +export declare function createOAuthAppAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; +export declare function createOAuthAppAuth(options: GitHubAppStrategyOptions): GitHubAuthInterface; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts new file mode 100644 index 0000000..a986ea9 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts @@ -0,0 +1,98 @@ +import { EndpointOptions, RequestParameters, Route, RequestInterface, OctokitResponse } from "@octokit/types"; +import * as AuthOAuthUser from "@octokit/auth-oauth-user"; +import * as DeviceTypes from "@octokit/auth-oauth-device"; +export declare type ClientType = "oauth-app" | "github-app"; +export declare type OAuthAppStrategyOptions = { + clientType?: "oauth-app"; + clientId: string; + clientSecret: string; + request?: RequestInterface; +}; +export declare type GitHubAppStrategyOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + request?: RequestInterface; +}; +export declare type AppAuthOptions = { + type: "oauth-app"; +}; +export declare type WebFlowAuthOptions = { + type: "oauth-user"; + code: string; + redirectUrl?: string; + state?: string; +}; +export declare type OAuthAppDeviceFlowAuthOptions = { + type: "oauth-user"; + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; + scopes?: string[]; +}; +export declare type GitHubAppDeviceFlowAuthOptions = { + type: "oauth-user"; + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; +}; +export declare type AppAuthentication = { + type: "oauth-app"; + clientId: string; + clientSecret: string; + clientType: ClientType; + headers: { + authorization: string; + }; +}; +export declare type OAuthAppUserAuthentication = AuthOAuthUser.OAuthAppAuthentication; +export declare type GitHubAppUserAuthentication = AuthOAuthUser.GitHubAppAuthentication; +export declare type GitHubAppUserAuthenticationWithExpiration = AuthOAuthUser.GitHubAppAuthenticationWithExpiration; +export declare type FactoryOAuthAppWebFlowOptions = OAuthAppStrategyOptions & Omit & { + clientType: "oauth-app"; +}; +export declare type FactoryOAuthAppDeviceFlowOptions = OAuthAppStrategyOptions & Omit & { + clientType: "oauth-app"; +}; +export declare type FactoryGitHubAppWebFlowOptions = GitHubAppStrategyOptions & Omit; +export declare type FactoryGitHubAppDeviceFlowOptions = GitHubAppStrategyOptions & Omit; +export interface FactoryOAuthAppWebFlow { + (options: FactoryOAuthAppWebFlowOptions): T; +} +export interface FactoryOAuthAppDeviceFlow { + (options: FactoryOAuthAppDeviceFlowOptions): T; +} +export interface FactoryGitHubWebFlow { + (options: FactoryGitHubAppWebFlowOptions): T; +} +export interface FactoryGitHubDeviceFlow { + (options: FactoryGitHubAppDeviceFlowOptions): T; +} +export interface OAuthAppAuthInterface { + (options: AppAuthOptions): Promise; + (options: WebFlowAuthOptions & { + factory: FactoryOAuthAppWebFlow; + }): Promise; + (options: OAuthAppDeviceFlowAuthOptions & { + factory: FactoryOAuthAppDeviceFlow; + }): Promise; + (options: WebFlowAuthOptions): Promise; + (options: OAuthAppDeviceFlowAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export interface GitHubAuthInterface { + (options?: AppAuthOptions): Promise; + (options: WebFlowAuthOptions & { + factory: FactoryGitHubWebFlow; + }): Promise; + (options: GitHubAppDeviceFlowAuthOptions & { + factory: FactoryGitHubDeviceFlow; + }): Promise; + (options?: WebFlowAuthOptions): Promise; + (options?: GitHubAppDeviceFlowAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export declare type OAuthAppState = OAuthAppStrategyOptions & { + clientType: "oauth-app"; + request: RequestInterface; +}; +export declare type GitHubAppState = GitHubAppStrategyOptions & { + clientType: "github-app"; + request: RequestInterface; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts new file mode 100644 index 0000000..9c57a41 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "4.3.4"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-web/index.js new file mode 100644 index 0000000..96df710 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-web/index.js @@ -0,0 +1,87 @@ +import { getUserAgent } from 'universal-user-agent'; +import { request } from '@octokit/request'; +import btoa from 'btoa-lite'; +import { createOAuthUserAuth, requiresBasicAuth } from '@octokit/auth-oauth-user'; +export { createOAuthUserAuth } from '@octokit/auth-oauth-user'; + +async function auth(state, authOptions) { + if (authOptions.type === "oauth-app") { + return { + type: "oauth-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + headers: { + authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`, + }, + }; + } + if ("factory" in authOptions) { + const { type, ...options } = { + ...authOptions, + ...state, + }; + // @ts-expect-error TODO: `option` cannot be never, is this a bug? + return authOptions.factory(options); + } + const common = { + clientId: state.clientId, + clientSecret: state.clientSecret, + request: state.request, + ...authOptions, + }; + // TS: Look what you made me do + const userAuth = state.clientType === "oauth-app" + ? await createOAuthUserAuth({ + ...common, + clientType: state.clientType, + }) + : await createOAuthUserAuth({ + ...common, + clientType: state.clientType, + }); + return userAuth(); +} + +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); + // Do not intercept OAuth Web/Device flow request + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (state.clientType === "github-app" && !requiresBasicAuth(endpoint.url)) { + throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`); + } + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + try { + return await request(endpoint); + } + catch (error) { + /* istanbul ignore if */ + if (error.status !== 401) + throw error; + error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`; + throw error; + } +} + +const VERSION = "4.3.4"; + +function createOAuthAppAuth(options) { + const state = Object.assign({ + request: request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, + }, + }), + clientType: "oauth-app", + }, options); + // @ts-expect-error not worth the extra code to appease TS + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state), + }); +} + +export { createOAuthAppAuth }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map new file mode 100644 index 0000000..cbdcd0e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import btoa from \"btoa-lite\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport async function auth(state, authOptions) {\n if (authOptions.type === \"oauth-app\") {\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n headers: {\n authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`,\n },\n };\n }\n if (\"factory\" in authOptions) {\n const { type, ...options } = {\n ...authOptions,\n ...state,\n };\n // @ts-expect-error TODO: `option` cannot be never, is this a bug?\n return authOptions.factory(options);\n }\n const common = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.request,\n ...authOptions,\n };\n // TS: Look what you made me do\n const userAuth = state.clientType === \"oauth-app\"\n ? await createOAuthUserAuth({\n ...common,\n clientType: state.clientType,\n })\n : await createOAuthUserAuth({\n ...common,\n clientType: state.clientType,\n });\n return userAuth();\n}\n","import btoa from \"btoa-lite\";\nimport { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (state.clientType === \"github-app\" && !requiresBasicAuth(endpoint.url)) {\n throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than \"/applications/{client_id}/**\". \"${endpoint.method} ${endpoint.url}\" is not supported.`);\n }\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n try {\n return await request(endpoint);\n }\n catch (error) {\n /* istanbul ignore if */\n if (error.status !== 401)\n throw error;\n error.message = `[@octokit/auth-oauth-app] \"${endpoint.method} ${endpoint.url}\" does not support clientId/clientSecret basic authentication.`;\n throw error;\n }\n}\n","export const VERSION = \"4.3.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport function createOAuthAppAuth(options) {\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n }),\n clientType: \"oauth-app\",\n }, options);\n // @ts-expect-error not worth the extra code to appease TS\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":[],"mappings":";;;;;;AAEO,eAAe,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;AAC/C,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,WAAW,EAAE;AAC1C,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,WAAW;AAC7B,YAAY,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACpC,YAAY,YAAY,EAAE,KAAK,CAAC,YAAY;AAC5C,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,YAAY,OAAO,EAAE;AACrB,gBAAgB,aAAa,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,aAAa;AACb,SAAS,CAAC;AACV,KAAK;AACL,IAAI,IAAI,SAAS,IAAI,WAAW,EAAE;AAClC,QAAQ,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAG;AACrC,YAAY,GAAG,WAAW;AAC1B,YAAY,GAAG,KAAK;AACpB,SAAS,CAAC;AACV;AACA,QAAQ,OAAO,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC5C,KAAK;AACL,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAChC,QAAQ,YAAY,EAAE,KAAK,CAAC,YAAY;AACxC,QAAQ,OAAO,EAAE,KAAK,CAAC,OAAO;AAC9B,QAAQ,GAAG,WAAW;AACtB,KAAK,CAAC;AACN;AACA,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,KAAK,WAAW;AACrD,UAAU,MAAM,mBAAmB,CAAC;AACpC,YAAY,GAAG,MAAM;AACrB,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,SAAS,CAAC;AACV,UAAU,MAAM,mBAAmB,CAAC;AACpC,YAAY,GAAG,MAAM;AACrB,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,SAAS,CAAC,CAAC;AACX,IAAI,OAAO,QAAQ,EAAE,CAAC;AACtB;;ACrCO,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,8CAA8C,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC3E,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,YAAY,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC/E,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,2JAA2J,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC;AAC5O,KAAK;AACL,IAAI,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AACxE,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAC5D,IAAI,IAAI;AACR,QAAQ,OAAO,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AACvC,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB;AACA,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG;AAChC,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,KAAK,CAAC,OAAO,GAAG,CAAC,2BAA2B,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;AACtJ,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL,CAAC;;ACvBM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACMpC,SAAS,kBAAkB,CAAC,OAAO,EAAE;AAC5C,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC;AAClC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACtF,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,UAAU,EAAE,WAAW;AAC/B,KAAK,EAAE,OAAO,CAAC,CAAC;AAChB;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/LICENSE new file mode 100644 index 0000000..57049d0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/README.md new file mode 100644 index 0000000..0f32390 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/README.md @@ -0,0 +1,1032 @@ +# auth-oauth-user.js + +> Octokit authentication strategy for OAuth user authentication + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-user.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-user) +[![Build Status](https://github.com/octokit/auth-oauth-user.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-user.js/actions?query=workflow%3ATest+branch%3Amain) + +**Important:** `@octokit/auth-oauth-user` requires your app's `client_secret`, which must not be exposed. If you are looking for an OAuth user authentication strategy that can be used on a client (browser, IoT, CLI), check out [`@octokit/auth-oauth-user-client`](https://github.com/octokit/auth-oauth-user-client.js#readme). Note that `@octokit/auth-oauth-user-client` requires a backend. The only exception is [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme) which does not require the `client_secret`, but does not work in browsers due to CORS constraints. + +
+Table of contents + + + +- [Features](#features) +- [Standalone usage](#standalone-usage) + - [Exchange code from OAuth web flow](#exchange-code-from-oauth-web-flow) + - [OAuth Device flow](#oauth-device-flow) + - [Use an existing authentication](#use-an-existing-authentication) +- [Usage with Octokit](#usage-with-octokit) +- [`createOAuthUserAuth(options)` or `new Octokit({ auth })`](#createoauthuserauthoptions-or-new-octokit-auth-) + - [When using GitHub's OAuth web flow](#when-using-githubs-oauth-web-flow) + - [When using GitHub's OAuth device flow](#when-using-githubs-oauth-device-flow) + - [When passing an existing authentication object](#when-passing-an-existing-authentication-object) +- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions) +- [Authentication object](#authentication-object) + - [OAuth APP authentication token](#oauth-app-authentication-token) + - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) + - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [Contributing](#contributing) +- [License](#license) + + + +
+ +## Features + +- Code for token exchange from [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) +- [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow) +- Caches token for succesive calls +- Auto-refreshing for [expiring user access tokens](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens) +- Applies the correct authentication strategy based on the request URL when using with `Octokit` +- Token verification +- Token reset +- Token invalidation +- Application grant revocation + +## Standalone usage + + + + + + +
+ +Browsers + + + +Load `@octokit/auth-oauth-user` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/auth-oauth-user` + +```js +const { createOAuthUserAuth } = require("@octokit/auth-oauth-user"); +``` + +
+ +### Exchange code from OAuth web flow + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + code: "code123", + // optional + state: "state123", + redirectUrl: "https://acme-inc.com/login", +}); + +// Exchanges the code for the user access token authentication on first call +// and caches the authentication for successive calls +const { token } = await auth(); +``` + +About [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) + +### OAuth Device flow + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +// resolves once the user entered the `user_code` on `verification_uri` +const { token } = await auth(); +``` + +About [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow) + +### Use an existing authentication + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + clientType: "oauth-app", + token: "token123", +}); + +// will return the passed authentication +const { token } = await auth(); +``` + +See [Authentication object](#authentication-object). + +## Usage with Octokit + + + + + + +
+ +Browsers + + + +`@octokit/auth-oauth-user` cannot be used in the browser. It requires `clientSecret` to be set which must not be exposed to clients, and some of the OAuth APIs it uses do not support CORS. + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-oauth-user`. Optionally replace `@octokit/core` with a compatible module + +```js +const { Octokit } = require("@octokit/core"); +const { createOAuthUserAuth } = require("@octokit/auth-oauth-user"); +``` + +
+ +```js +const octokit = new Octokit({ + authStrategy: createOAuthUserAuth, + auth: { + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + code: "code123", + }, +}); + +// Exchanges the code for the user access token authentication on first request +// and caches the authentication for successive requests +const { + data: { login }, +} = await octokit.request("GET /user"); +console.log("Hello, %s!", login); +``` + +## `createOAuthUserAuth(options)` or `new Octokit({ auth })` + +The `createOAuthUserAuth` method accepts a single `options` object as argument. The same set of options can be passed as `auth` to the `Octokit` constructor when setting `authStrategy: createOAuthUserAuth` + +### When using GitHub's OAuth web flow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page. +
+ clientType + + string + + Either "oauth-app" or "github-app". Defaults to "oauth-app". +
+ code + + string + + +**Required.** The authorization code which was passed as query parameter to the callback URL from [GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow). + +
+ state + + string + + +The unguessable random string you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity). + +
+ redirectUrl + + string + + +The redirect_uri parameter you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity). + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### When using GitHub's OAuth device flow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. The clientSecret is not needed for the OAuth device flow itself, but it is required for resetting, refreshing, and invalidating a token. Find the Client Secret on your app's settings page. +
+ clientType + + string + + Either "oauth-app" or "github-app". Defaults to "oauth-app". +
+ onVerification + + function + + +**Required**. A function that is called once the device and user codes were retrieved + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### When passing an existing authentication object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Either "oauth-app" or "github". +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page. +
+ token + + string + + Required. The user access token +
+ scopes + + array of strings + + Required if clientType is set to "oauth-app". Array of OAuth scope names the token was granted +
+ refreshToken + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. +
+ expiresAt + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +## `auth(options)` or `octokit.auth(options)` + +The async `auth()` method is returned by `createOAuthUserAuth(options)` or set on the `octokit` instance when the `Octokit` constructor was called with `authStrategy: createOAuthUserAuth`. + +Once `auth()` receives a valid authentication object it caches it in memory and uses it for subsequent calls. It also caches if the token is invalid and no longer tries to send any requests. If the authentication is using a refresh token, a new token will be requested as needed. Calling `auth({ type: "reset" })` will replace the internally cached authentication. + +Resolves with an [authentication object](#authentication-object). + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + +Without setting `type` auth will return the current authentication object, or exchange the `code` from the strategy options on first call. If the current authentication token is expired, the tokens will be refreshed. + +Possible values for `type` are + +- `"get"`: returns the token from internal state and creates it if none was created yet +- `"check"`: sends request to verify the validity of the current token +- `"reset"`: invalidates current token and replaces it with a new one +- `"refresh"`: GitHub Apps only, and only if expiring user tokens are enabled. +- `"delete"`: invalidates current token +- `"deleteAuthorization"`: revokes OAuth access for application. All tokens for the current user created by the same app are invalidated. The user will be prompted to grant access again during the next OAuth web flow. + +
+ +## Authentication object + +There are three possible results + +1. [OAuth APP authentication token](#oauth-app-authentication-token) +1. [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) +1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +### OAuth APP authentication token + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ onTokenCreated + + function + + callback invoked when a token is "reset" or "refreshed" +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +### GitHub APP user authentication token with expiring disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ onTokenCreated + + function + + callback invoked when a token is "reset" or "refreshed" +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +### GitHub APP user authentication token with expiring enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: user } = await auth.hook(request, "GET /user"); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: user } = await requestWithAuth("GET /user"); +``` + +## Types + +```ts +import { + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, + GitHubAppAuthOptions, + GitHubAppStrategyOptions, + GitHubAppStrategyOptionsDeviceFlow, + GitHubAppStrategyOptionsExistingAuthentication, + GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, + GitHubAppStrategyOptionsWebFlow, + OAuthAppAuthentication, + OAuthAppAuthOptions, + OAuthAppStrategyOptions, + OAuthAppStrategyOptionsDeviceFlow, + OAuthAppStrategyOptionsExistingAuthentication, + OAuthAppStrategyOptionsWebFlow, +} from "@octokit/auth-oauth-user"; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-node/index.js new file mode 100644 index 0000000..dd473d9 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-node/index.js @@ -0,0 +1,243 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var universalUserAgent = require('universal-user-agent'); +var request = require('@octokit/request'); +var authOauthDevice = require('@octokit/auth-oauth-device'); +var oauthMethods = require('@octokit/oauth-methods'); +var btoa = _interopDefault(require('btoa-lite')); + +const VERSION = "2.1.1"; + +// @ts-nocheck there is only place for one of us in this file. And it's not you, TS +async function getAuthentication(state) { + // handle code exchange form OAuth Web Flow + if ("code" in state.strategyOptions) { + const { + authentication + } = await oauthMethods.exchangeWebFlowCode({ + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request + }); + return { + type: "token", + tokenType: "oauth", + ...authentication + }; + } + // handle OAuth device flow + if ("onVerification" in state.strategyOptions) { + const deviceAuth = authOauthDevice.createOAuthDeviceAuth({ + clientType: state.clientType, + clientId: state.clientId, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request + }); + const authentication = await deviceAuth({ + type: "oauth" + }); + return { + clientSecret: state.clientSecret, + ...authentication + }; + } + // use existing authentication + if ("token" in state.strategyOptions) { + return { + type: "token", + tokenType: "oauth", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions + }; + } + throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); +} + +async function auth(state, options = {}) { + if (!state.authentication) { + // This is what TS makes us do ¯\_(ツ)_/¯ + state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state); + } + if (state.authentication.invalid) { + throw new Error("[@octokit/auth-oauth-user] Token is invalid"); + } + const currentAuthentication = state.authentication; + // (auto) refresh for user-to-server tokens + if ("expiresAt" in currentAuthentication) { + if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) { + const { + authentication + } = await oauthMethods.refreshToken({ + clientType: "github-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + refreshToken: currentAuthentication.refreshToken, + request: state.request + }); + state.authentication = { + tokenType: "oauth", + type: "token", + ...authentication + }; + } + } + // throw error for invalid refresh call + if (options.type === "refresh") { + var _state$onTokenCreated; + if (state.clientType === "oauth-app") { + throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens"); + } + if (!currentAuthentication.hasOwnProperty("expiresAt")) { + throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); + } + await ((_state$onTokenCreated = state.onTokenCreated) === null || _state$onTokenCreated === void 0 ? void 0 : _state$onTokenCreated.call(state, state.authentication, { + type: options.type + })); + } + // check or reset token + if (options.type === "check" || options.type === "reset") { + const method = options.type === "check" ? oauthMethods.checkToken : oauthMethods.resetToken; + try { + const { + authentication + } = await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request + }); + state.authentication = { + tokenType: "oauth", + type: "token", + // @ts-expect-error TBD + ...authentication + }; + if (options.type === "reset") { + var _state$onTokenCreated2; + await ((_state$onTokenCreated2 = state.onTokenCreated) === null || _state$onTokenCreated2 === void 0 ? void 0 : _state$onTokenCreated2.call(state, state.authentication, { + type: options.type + })); + } + return state.authentication; + } catch (error) { + // istanbul ignore else + if (error.status === 404) { + error.message = "[@octokit/auth-oauth-user] Token is invalid"; + // @ts-expect-error TBD + state.authentication.invalid = true; + } + throw error; + } + } + // invalidate + if (options.type === "delete" || options.type === "deleteAuthorization") { + const method = options.type === "delete" ? oauthMethods.deleteToken : oauthMethods.deleteAuthorization; + try { + await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request + }); + } catch (error) { + // istanbul ignore if + if (error.status !== 404) throw error; + } + state.authentication.invalid = true; + return state.authentication; + } + return state.authentication; +} + +/** + * The following endpoints require an OAuth App to authenticate using its client_id and client_secret. + * + * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token + * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token + * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token + * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token + * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization + * + * deprecated: + * + * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization + * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization + * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application + * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application + */ +const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; +function requiresBasicAuth(url) { + return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); +} + +async function hook(state, request, route, parameters = {}) { + const endpoint = request.endpoint.merge(route, parameters); + // Do not intercept OAuth Web/Device flow request + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (requiresBasicAuth(endpoint.url)) { + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + return request(endpoint); + } + // TS makes us do this ¯\_(ツ)_/¯ + const { + token + } = state.clientType === "oauth-app" ? await auth({ + ...state, + request + }) : await auth({ + ...state, + request + }); + endpoint.headers.authorization = "token " + token; + return request(endpoint); +} + +function createOAuthUserAuth({ + clientId, + clientSecret, + clientType = "oauth-app", + request: request$1 = request.request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } + }), + onTokenCreated, + ...strategyOptions +}) { + const state = Object.assign({ + clientType, + clientId, + clientSecret, + onTokenCreated, + strategyOptions, + request: request$1 + }); + // @ts-expect-error not worth the extra code needed to appease TS + return Object.assign(auth.bind(null, state), { + // @ts-expect-error not worth the extra code needed to appease TS + hook: hook.bind(null, state) + }); +} +createOAuthUserAuth.VERSION = VERSION; + +exports.createOAuthUserAuth = createOAuthUserAuth; +exports.requiresBasicAuth = requiresBasicAuth; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map new file mode 100644 index 0000000..e95ade9 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-authentication.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.1.1\";\n","// @ts-nocheck there is only place for one of us in this file. And it's not you, TS\nimport { createOAuthDeviceAuth } from \"@octokit/auth-oauth-device\";\nimport { exchangeWebFlowCode } from \"@octokit/oauth-methods\";\nexport async function getAuthentication(state) {\n // handle code exchange form OAuth Web Flow\n if (\"code\" in state.strategyOptions) {\n const { authentication } = await exchangeWebFlowCode({\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions,\n request: state.request,\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n // handle OAuth device flow\n if (\"onVerification\" in state.strategyOptions) {\n const deviceAuth = createOAuthDeviceAuth({\n clientType: state.clientType,\n clientId: state.clientId,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions,\n request: state.request,\n });\n const authentication = await deviceAuth({\n type: \"oauth\",\n });\n return {\n clientSecret: state.clientSecret,\n ...authentication,\n };\n }\n // use existing authentication\n if (\"token\" in state.strategyOptions) {\n return {\n type: \"token\",\n tokenType: \"oauth\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions,\n };\n }\n throw new Error(\"[@octokit/auth-oauth-user] Invalid strategy options\");\n}\n","import { getAuthentication } from \"./get-authentication\";\nimport { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from \"@octokit/oauth-methods\";\nexport async function auth(state, options = {}) {\n if (!state.authentication) {\n // This is what TS makes us do ¯\\_(ツ)_/¯\n state.authentication =\n state.clientType === \"oauth-app\"\n ? await getAuthentication(state)\n : await getAuthentication(state);\n }\n if (state.authentication.invalid) {\n throw new Error(\"[@octokit/auth-oauth-user] Token is invalid\");\n }\n const currentAuthentication = state.authentication;\n // (auto) refresh for user-to-server tokens\n if (\"expiresAt\" in currentAuthentication) {\n if (options.type === \"refresh\" ||\n new Date(currentAuthentication.expiresAt) < new Date()) {\n const { authentication } = await refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n refreshToken: currentAuthentication.refreshToken,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n ...authentication,\n };\n }\n }\n // throw error for invalid refresh call\n if (options.type === \"refresh\") {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\"[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens\");\n }\n if (!currentAuthentication.hasOwnProperty(\"expiresAt\")) {\n throw new Error(\"[@octokit/auth-oauth-user] Refresh token missing\");\n }\n await state.onTokenCreated?.(state.authentication, {\n type: options.type,\n });\n }\n // check or reset token\n if (options.type === \"check\" || options.type === \"reset\") {\n const method = options.type === \"check\" ? checkToken : resetToken;\n try {\n const { authentication } = await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n // @ts-expect-error TBD\n ...authentication,\n };\n if (options.type === \"reset\") {\n await state.onTokenCreated?.(state.authentication, {\n type: options.type,\n });\n }\n return state.authentication;\n }\n catch (error) {\n // istanbul ignore else\n if (error.status === 404) {\n error.message = \"[@octokit/auth-oauth-user] Token is invalid\";\n // @ts-expect-error TBD\n state.authentication.invalid = true;\n }\n throw error;\n }\n }\n // invalidate\n if (options.type === \"delete\" || options.type === \"deleteAuthorization\") {\n const method = options.type === \"delete\" ? deleteToken : deleteAuthorization;\n try {\n await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n }\n catch (error) {\n // istanbul ignore if\n if (error.status !== 404)\n throw error;\n }\n state.authentication.invalid = true;\n return state.authentication;\n }\n return state.authentication;\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token\n * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token\n * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[^/]+\\/(token|grant)s?/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { auth } from \"./auth\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters = {}) {\n const endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n return request(endpoint);\n }\n // TS makes us do this ¯\\_(ツ)_/¯\n const { token } = state.clientType === \"oauth-app\"\n ? await auth({ ...state, request })\n : await auth({ ...state, request });\n endpoint.headers.authorization = \"token \" + token;\n return request(endpoint);\n}\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { VERSION } from \"./version\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport function createOAuthUserAuth({ clientId, clientSecret, clientType = \"oauth-app\", request = octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n}), onTokenCreated, ...strategyOptions }) {\n const state = Object.assign({\n clientType,\n clientId,\n clientSecret,\n onTokenCreated,\n strategyOptions,\n request,\n });\n // @ts-expect-error not worth the extra code needed to appease TS\n return Object.assign(auth.bind(null, state), {\n // @ts-expect-error not worth the extra code needed to appease TS\n hook: hook.bind(null, state),\n });\n}\ncreateOAuthUserAuth.VERSION = VERSION;\n"],"names":["VERSION","getAuthentication","state","strategyOptions","authentication","exchangeWebFlowCode","clientId","clientSecret","clientType","onTokenCreated","request","type","tokenType","deviceAuth","createOAuthDeviceAuth","Error","auth","options","invalid","currentAuthentication","Date","expiresAt","refreshToken","hasOwnProperty","method","checkToken","resetToken","token","error","status","message","deleteToken","deleteAuthorization","ROUTES_REQUIRING_BASIC_AUTH","requiresBasicAuth","url","test","hook","route","parameters","endpoint","merge","credentials","btoa","headers","authorization","createOAuthUserAuth","octokitRequest","defaults","getUserAgent","Object","assign","bind"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA1C;AACA,AAEO,eAAeC,iBAAiB,CAACC,KAAK,EAAE;;EAE3C,IAAI,MAAM,IAAIA,KAAK,CAACC,eAAe,EAAE;IACjC,MAAM;MAAEC;KAAgB,GAAG,MAAMC,gCAAmB,CAAC;MACjDC,QAAQ,EAAEJ,KAAK,CAACI,QAAQ;MACxBC,YAAY,EAAEL,KAAK,CAACK,YAAY;MAChCC,UAAU,EAAEN,KAAK,CAACM,UAAU;MAC5BC,cAAc,EAAEP,KAAK,CAACO,cAAc;MACpC,GAAGP,KAAK,CAACC,eAAe;MACxBO,OAAO,EAAER,KAAK,CAACQ;KAClB,CAAC;IACF,OAAO;MACHC,IAAI,EAAE,OAAO;MACbC,SAAS,EAAE,OAAO;MAClB,GAAGR;KACN;;;EAGL,IAAI,gBAAgB,IAAIF,KAAK,CAACC,eAAe,EAAE;IAC3C,MAAMU,UAAU,GAAGC,qCAAqB,CAAC;MACrCN,UAAU,EAAEN,KAAK,CAACM,UAAU;MAC5BF,QAAQ,EAAEJ,KAAK,CAACI,QAAQ;MACxBG,cAAc,EAAEP,KAAK,CAACO,cAAc;MACpC,GAAGP,KAAK,CAACC,eAAe;MACxBO,OAAO,EAAER,KAAK,CAACQ;KAClB,CAAC;IACF,MAAMN,cAAc,GAAG,MAAMS,UAAU,CAAC;MACpCF,IAAI,EAAE;KACT,CAAC;IACF,OAAO;MACHJ,YAAY,EAAEL,KAAK,CAACK,YAAY;MAChC,GAAGH;KACN;;;EAGL,IAAI,OAAO,IAAIF,KAAK,CAACC,eAAe,EAAE;IAClC,OAAO;MACHQ,IAAI,EAAE,OAAO;MACbC,SAAS,EAAE,OAAO;MAClBN,QAAQ,EAAEJ,KAAK,CAACI,QAAQ;MACxBC,YAAY,EAAEL,KAAK,CAACK,YAAY;MAChCC,UAAU,EAAEN,KAAK,CAACM,UAAU;MAC5BC,cAAc,EAAEP,KAAK,CAACO,cAAc;MACpC,GAAGP,KAAK,CAACC;KACZ;;EAEL,MAAM,IAAIY,KAAK,CAAC,qDAAqD,CAAC;AAC1E;;AChDO,eAAeC,IAAI,CAACd,KAAK,EAAEe,OAAO,GAAG,EAAE,EAAE;EAC5C,IAAI,CAACf,KAAK,CAACE,cAAc,EAAE;;IAEvBF,KAAK,CAACE,cAAc,GAChBF,KAAK,CAACM,UAAU,KAAK,WAAW,GAC1B,MAAMP,iBAAiB,CAACC,KAAK,CAAC,GAC9B,MAAMD,iBAAiB,CAACC,KAAK,CAAC;;EAE5C,IAAIA,KAAK,CAACE,cAAc,CAACc,OAAO,EAAE;IAC9B,MAAM,IAAIH,KAAK,CAAC,6CAA6C,CAAC;;EAElE,MAAMI,qBAAqB,GAAGjB,KAAK,CAACE,cAAc;;EAElD,IAAI,WAAW,IAAIe,qBAAqB,EAAE;IACtC,IAAIF,OAAO,CAACN,IAAI,KAAK,SAAS,IAC1B,IAAIS,IAAI,CAACD,qBAAqB,CAACE,SAAS,CAAC,GAAG,IAAID,IAAI,EAAE,EAAE;MACxD,MAAM;QAAEhB;OAAgB,GAAG,MAAMkB,yBAAY,CAAC;QAC1Cd,UAAU,EAAE,YAAY;QACxBF,QAAQ,EAAEJ,KAAK,CAACI,QAAQ;QACxBC,YAAY,EAAEL,KAAK,CAACK,YAAY;QAChCe,YAAY,EAAEH,qBAAqB,CAACG,YAAY;QAChDZ,OAAO,EAAER,KAAK,CAACQ;OAClB,CAAC;MACFR,KAAK,CAACE,cAAc,GAAG;QACnBQ,SAAS,EAAE,OAAO;QAClBD,IAAI,EAAE,OAAO;QACb,GAAGP;OACN;;;;EAIT,IAAIa,OAAO,CAACN,IAAI,KAAK,SAAS,EAAE;IAAA;IAC5B,IAAIT,KAAK,CAACM,UAAU,KAAK,WAAW,EAAE;MAClC,MAAM,IAAIO,KAAK,CAAC,sEAAsE,CAAC;;IAE3F,IAAI,CAACI,qBAAqB,CAACI,cAAc,CAAC,WAAW,CAAC,EAAE;MACpD,MAAM,IAAIR,KAAK,CAAC,kDAAkD,CAAC;;IAEvE,gCAAMb,KAAK,CAACO,cAAc,0DAApB,2BAAAP,KAAK,EAAkBA,KAAK,CAACE,cAAc,EAAE;MAC/CO,IAAI,EAAEM,OAAO,CAACN;KACjB,CAAC;;;EAGN,IAAIM,OAAO,CAACN,IAAI,KAAK,OAAO,IAAIM,OAAO,CAACN,IAAI,KAAK,OAAO,EAAE;IACtD,MAAMa,MAAM,GAAGP,OAAO,CAACN,IAAI,KAAK,OAAO,GAAGc,uBAAU,GAAGC,uBAAU;IACjE,IAAI;MACA,MAAM;QAAEtB;OAAgB,GAAG,MAAMoB,MAAM,CAAC;;QAEpChB,UAAU,EAAEN,KAAK,CAACM,UAAU;QAC5BF,QAAQ,EAAEJ,KAAK,CAACI,QAAQ;QACxBC,YAAY,EAAEL,KAAK,CAACK,YAAY;QAChCoB,KAAK,EAAEzB,KAAK,CAACE,cAAc,CAACuB,KAAK;QACjCjB,OAAO,EAAER,KAAK,CAACQ;OAClB,CAAC;MACFR,KAAK,CAACE,cAAc,GAAG;QACnBQ,SAAS,EAAE,OAAO;QAClBD,IAAI,EAAE,OAAO;;QAEb,GAAGP;OACN;MACD,IAAIa,OAAO,CAACN,IAAI,KAAK,OAAO,EAAE;QAAA;QAC1B,iCAAMT,KAAK,CAACO,cAAc,2DAApB,4BAAAP,KAAK,EAAkBA,KAAK,CAACE,cAAc,EAAE;UAC/CO,IAAI,EAAEM,OAAO,CAACN;SACjB,CAAC;;MAEN,OAAOT,KAAK,CAACE,cAAc;KAC9B,CACD,OAAOwB,KAAK,EAAE;;MAEV,IAAIA,KAAK,CAACC,MAAM,KAAK,GAAG,EAAE;QACtBD,KAAK,CAACE,OAAO,GAAG,6CAA6C;;QAE7D5B,KAAK,CAACE,cAAc,CAACc,OAAO,GAAG,IAAI;;MAEvC,MAAMU,KAAK;;;;EAInB,IAAIX,OAAO,CAACN,IAAI,KAAK,QAAQ,IAAIM,OAAO,CAACN,IAAI,KAAK,qBAAqB,EAAE;IACrE,MAAMa,MAAM,GAAGP,OAAO,CAACN,IAAI,KAAK,QAAQ,GAAGoB,wBAAW,GAAGC,gCAAmB;IAC5E,IAAI;MACA,MAAMR,MAAM,CAAC;;QAEThB,UAAU,EAAEN,KAAK,CAACM,UAAU;QAC5BF,QAAQ,EAAEJ,KAAK,CAACI,QAAQ;QACxBC,YAAY,EAAEL,KAAK,CAACK,YAAY;QAChCoB,KAAK,EAAEzB,KAAK,CAACE,cAAc,CAACuB,KAAK;QACjCjB,OAAO,EAAER,KAAK,CAACQ;OAClB,CAAC;KACL,CACD,OAAOkB,KAAK,EAAE;;MAEV,IAAIA,KAAK,CAACC,MAAM,KAAK,GAAG,EACpB,MAAMD,KAAK;;IAEnB1B,KAAK,CAACE,cAAc,CAACc,OAAO,GAAG,IAAI;IACnC,OAAOhB,KAAK,CAACE,cAAc;;EAE/B,OAAOF,KAAK,CAACE,cAAc;AAC/B;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM6B,2BAA2B,GAAG,wCAAwC;AAC5E,AAAO,SAASC,iBAAiB,CAACC,GAAG,EAAE;EACnC,OAAOA,GAAG,IAAIF,2BAA2B,CAACG,IAAI,CAACD,GAAG,CAAC;AACvD;;AChBO,eAAeE,IAAI,CAACnC,KAAK,EAAEQ,OAAO,EAAE4B,KAAK,EAAEC,UAAU,GAAG,EAAE,EAAE;EAC/D,MAAMC,QAAQ,GAAG9B,OAAO,CAAC8B,QAAQ,CAACC,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;;EAE1D,IAAI,8CAA8C,CAACH,IAAI,CAACI,QAAQ,CAACL,GAAG,CAAC,EAAE;IACnE,OAAOzB,OAAO,CAAC8B,QAAQ,CAAC;;EAE5B,IAAIN,iBAAiB,CAACM,QAAQ,CAACL,GAAG,CAAC,EAAE;IACjC,MAAMO,WAAW,GAAGC,IAAI,CAAE,GAAEzC,KAAK,CAACI,QAAS,IAAGJ,KAAK,CAACK,YAAa,EAAC,CAAC;IACnEiC,QAAQ,CAACI,OAAO,CAACC,aAAa,GAAI,SAAQH,WAAY,EAAC;IACvD,OAAOhC,OAAO,CAAC8B,QAAQ,CAAC;;;EAG5B,MAAM;IAAEb;GAAO,GAAGzB,KAAK,CAACM,UAAU,KAAK,WAAW,GAC5C,MAAMQ,IAAI,CAAC;IAAE,GAAGd,KAAK;IAAEQ;GAAS,CAAC,GACjC,MAAMM,IAAI,CAAC;IAAE,GAAGd,KAAK;IAAEQ;GAAS,CAAC;EACvC8B,QAAQ,CAACI,OAAO,CAACC,aAAa,GAAG,QAAQ,GAAGlB,KAAK;EACjD,OAAOjB,OAAO,CAAC8B,QAAQ,CAAC;AAC5B;;ACdO,SAASM,mBAAmB,CAAC;EAAExC,QAAQ;EAAEC,YAAY;EAAEC,UAAU,GAAG,WAAW;WAAEE,SAAO,GAAGqC,eAAc,CAACC,QAAQ,CAAC;IACtHJ,OAAO,EAAE;MACL,YAAY,EAAG,6BAA4B5C,OAAQ,IAAGiD,+BAAY,EAAG;;GAE5E,CAAC;EAAExC,cAAc;EAAE,GAAGN;AAAgB,CAAC,EAAE;EACtC,MAAMD,KAAK,GAAGgD,MAAM,CAACC,MAAM,CAAC;IACxB3C,UAAU;IACVF,QAAQ;IACRC,YAAY;IACZE,cAAc;IACdN,eAAe;aACfO;GACH,CAAC;;EAEF,OAAOwC,MAAM,CAACC,MAAM,CAACnC,IAAI,CAACoC,IAAI,CAAC,IAAI,EAAElD,KAAK,CAAC,EAAE;;IAEzCmC,IAAI,EAAEA,IAAI,CAACe,IAAI,CAAC,IAAI,EAAElD,KAAK;GAC9B,CAAC;AACN;AACA4C,mBAAmB,CAAC9C,OAAO,GAAGA,OAAO;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/auth.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/auth.js new file mode 100644 index 0000000..5e7e9bf --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/auth.js @@ -0,0 +1,102 @@ +import { getAuthentication } from "./get-authentication"; +import { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from "@octokit/oauth-methods"; +export async function auth(state, options = {}) { + if (!state.authentication) { + // This is what TS makes us do ¯\_(ツ)_/¯ + state.authentication = + state.clientType === "oauth-app" + ? await getAuthentication(state) + : await getAuthentication(state); + } + if (state.authentication.invalid) { + throw new Error("[@octokit/auth-oauth-user] Token is invalid"); + } + const currentAuthentication = state.authentication; + // (auto) refresh for user-to-server tokens + if ("expiresAt" in currentAuthentication) { + if (options.type === "refresh" || + new Date(currentAuthentication.expiresAt) < new Date()) { + const { authentication } = await refreshToken({ + clientType: "github-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + refreshToken: currentAuthentication.refreshToken, + request: state.request, + }); + state.authentication = { + tokenType: "oauth", + type: "token", + ...authentication, + }; + } + } + // throw error for invalid refresh call + if (options.type === "refresh") { + if (state.clientType === "oauth-app") { + throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens"); + } + if (!currentAuthentication.hasOwnProperty("expiresAt")) { + throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); + } + await state.onTokenCreated?.(state.authentication, { + type: options.type, + }); + } + // check or reset token + if (options.type === "check" || options.type === "reset") { + const method = options.type === "check" ? checkToken : resetToken; + try { + const { authentication } = await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request, + }); + state.authentication = { + tokenType: "oauth", + type: "token", + // @ts-expect-error TBD + ...authentication, + }; + if (options.type === "reset") { + await state.onTokenCreated?.(state.authentication, { + type: options.type, + }); + } + return state.authentication; + } + catch (error) { + // istanbul ignore else + if (error.status === 404) { + error.message = "[@octokit/auth-oauth-user] Token is invalid"; + // @ts-expect-error TBD + state.authentication.invalid = true; + } + throw error; + } + } + // invalidate + if (options.type === "delete" || options.type === "deleteAuthorization") { + const method = options.type === "delete" ? deleteToken : deleteAuthorization; + try { + await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request, + }); + } + catch (error) { + // istanbul ignore if + if (error.status !== 404) + throw error; + } + state.authentication.invalid = true; + return state.authentication; + } + return state.authentication; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js new file mode 100644 index 0000000..a0248a7 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js @@ -0,0 +1,51 @@ +// @ts-nocheck there is only place for one of us in this file. And it's not you, TS +import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device"; +import { exchangeWebFlowCode } from "@octokit/oauth-methods"; +export async function getAuthentication(state) { + // handle code exchange form OAuth Web Flow + if ("code" in state.strategyOptions) { + const { authentication } = await exchangeWebFlowCode({ + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request, + }); + return { + type: "token", + tokenType: "oauth", + ...authentication, + }; + } + // handle OAuth device flow + if ("onVerification" in state.strategyOptions) { + const deviceAuth = createOAuthDeviceAuth({ + clientType: state.clientType, + clientId: state.clientId, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request, + }); + const authentication = await deviceAuth({ + type: "oauth", + }); + return { + clientSecret: state.clientSecret, + ...authentication, + }; + } + // use existing authentication + if ("token" in state.strategyOptions) { + return { + type: "token", + tokenType: "oauth", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + }; + } + throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/hook.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/hook.js new file mode 100644 index 0000000..8977ac4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/hook.js @@ -0,0 +1,21 @@ +import btoa from "btoa-lite"; +import { auth } from "./auth"; +import { requiresBasicAuth } from "./requires-basic-auth"; +export async function hook(state, request, route, parameters = {}) { + const endpoint = request.endpoint.merge(route, parameters); + // Do not intercept OAuth Web/Device flow request + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (requiresBasicAuth(endpoint.url)) { + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + return request(endpoint); + } + // TS makes us do this ¯\_(ツ)_/¯ + const { token } = state.clientType === "oauth-app" + ? await auth({ ...state, request }) + : await auth({ ...state, request }); + endpoint.headers.authorization = "token " + token; + return request(endpoint); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/index.js new file mode 100644 index 0000000..19a9a43 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/index.js @@ -0,0 +1,26 @@ +import { getUserAgent } from "universal-user-agent"; +import { request as octokitRequest } from "@octokit/request"; +import { VERSION } from "./version"; +import { auth } from "./auth"; +import { hook } from "./hook"; +export { requiresBasicAuth } from "./requires-basic-auth"; +export function createOAuthUserAuth({ clientId, clientSecret, clientType = "oauth-app", request = octokitRequest.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, + }, +}), onTokenCreated, ...strategyOptions }) { + const state = Object.assign({ + clientType, + clientId, + clientSecret, + onTokenCreated, + strategyOptions, + request, + }); + // @ts-expect-error not worth the extra code needed to appease TS + return Object.assign(auth.bind(null, state), { + // @ts-expect-error not worth the extra code needed to appease TS + hook: hook.bind(null, state), + }); +} +createOAuthUserAuth.VERSION = VERSION; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js new file mode 100644 index 0000000..d10f02c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js @@ -0,0 +1,20 @@ +/** + * The following endpoints require an OAuth App to authenticate using its client_id and client_secret. + * + * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token + * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token + * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token + * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token + * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization + * + * deprecated: + * + * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization + * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization + * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application + * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application + */ +const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; +export function requiresBasicAuth(url) { + return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/types.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/version.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/version.js new file mode 100644 index 0000000..b74d991 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "2.1.1"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts new file mode 100644 index 0000000..d85f08b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts @@ -0,0 +1,3 @@ +import { OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, OAuthAppState, GitHubAppState } from "./types"; +export declare function auth(state: OAuthAppState, options?: OAuthAppAuthOptions): Promise; +export declare function auth(state: GitHubAppState, options?: GitHubAppAuthOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts new file mode 100644 index 0000000..359accb --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts @@ -0,0 +1,3 @@ +import { OAuthAppState, GitHubAppState, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration } from "./types"; +export declare function getAuthentication(state: OAuthAppState): Promise; +export declare function getAuthentication(state: GitHubAppState): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts new file mode 100644 index 0000000..9af56b2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts @@ -0,0 +1,6 @@ +import { EndpointOptions, OctokitResponse, RequestInterface, RequestParameters, Route } from "@octokit/types"; +import { OAuthAppState, GitHubAppState } from "./types"; +type AnyResponse = OctokitResponse; +export declare function hook(state: OAuthAppState, request: RequestInterface, route: Route | EndpointOptions, parameters: RequestParameters): Promise; +export declare function hook(state: GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters: RequestParameters): Promise; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts new file mode 100644 index 0000000..59d69f4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts @@ -0,0 +1,8 @@ +import { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAppAuthInterface } from "./types"; +export { OAuthAppStrategyOptionsWebFlow, GitHubAppStrategyOptionsWebFlow, OAuthAppStrategyOptionsDeviceFlow, GitHubAppStrategyOptionsDeviceFlow, OAuthAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types"; +export { requiresBasicAuth } from "./requires-basic-auth"; +export declare function createOAuthUserAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; +export declare function createOAuthUserAuth(options: GitHubAppStrategyOptions): GitHubAppAuthInterface; +export declare namespace createOAuthUserAuth { + var VERSION: string; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts new file mode 100644 index 0000000..c7a90ea --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts @@ -0,0 +1 @@ +export declare function requiresBasicAuth(url: string | undefined): boolean | "" | undefined; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts new file mode 100644 index 0000000..61be2ae --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts @@ -0,0 +1,114 @@ +import * as OctokitTypes from "@octokit/types"; +import * as DeviceTypes from "@octokit/auth-oauth-device"; +import * as OAuthMethodsTypes from "@octokit/oauth-methods"; +export type ClientType = "oauth-app" | "github-app"; +export type WebFlowOptions = { + code: string; + state?: string; + redirectUrl?: string; +}; +type CommonAppStrategyOptions = { + clientType?: ClientType; + clientId: string; + clientSecret: string; + request?: OctokitTypes.RequestInterface; + onTokenCreated?: OnToketCreatedCallback; +}; +type CommonOAuthAppStrategyOptions = { + clientType?: "oauth-app"; +} & CommonAppStrategyOptions; +type CommonGitHubAppStrategyOptions = { + clientType?: "github-app"; +} & CommonAppStrategyOptions; +type OAuthAppDeviceFlowOptions = { + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; + scopes?: string[]; +}; +type GitHubDeviceFlowOptions = { + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; +}; +type ExistingOAuthAppAuthenticationOptions = { + clientType: "oauth-app"; + token: string; + scopes: string[]; +}; +type ExistingGitHubAppAuthenticationOptions = { + token: string; +}; +type ExistingGitHubAppAuthenticationWithExpirationOptions = { + token: string; + refreshToken: string; + expiresAt: string; + refreshTokenExpiresAt: string; +}; +export type OAuthAppStrategyOptionsWebFlow = CommonOAuthAppStrategyOptions & WebFlowOptions; +export type GitHubAppStrategyOptionsWebFlow = CommonGitHubAppStrategyOptions & WebFlowOptions; +export type OAuthAppStrategyOptionsDeviceFlow = CommonOAuthAppStrategyOptions & OAuthAppDeviceFlowOptions; +export type GitHubAppStrategyOptionsDeviceFlow = CommonGitHubAppStrategyOptions & GitHubDeviceFlowOptions; +export type OAuthAppStrategyOptionsExistingAuthentication = CommonOAuthAppStrategyOptions & ExistingOAuthAppAuthenticationOptions; +export type GitHubAppStrategyOptionsExistingAuthentication = CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationOptions; +export type GitHubAppStrategyOptionsExistingAuthenticationWithExpiration = CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationWithExpirationOptions; +export type OAuthAppStrategyOptions = OAuthAppStrategyOptionsWebFlow | OAuthAppStrategyOptionsDeviceFlow | OAuthAppStrategyOptionsExistingAuthentication; +export type GitHubAppStrategyOptions = GitHubAppStrategyOptionsWebFlow | GitHubAppStrategyOptionsDeviceFlow | GitHubAppStrategyOptionsExistingAuthentication | GitHubAppStrategyOptionsExistingAuthenticationWithExpiration; +export type OAuthAppAuthentication = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.OAuthAppAuthentication; +export type GitHubAppAuthentication = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.GitHubAppAuthentication; +export type GitHubAppAuthenticationWithExpiration = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.GitHubAppAuthenticationWithExpiration; +export interface OAuthAppAuthInterface { + (options?: OAuthAppAuthOptions): Promise; + hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>; +} +export interface GitHubAppAuthInterface { + (options?: GitHubAppAuthOptions): Promise; + hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>; +} +type OnToketCreatedCallback = (authentication: OAuthAppAuthentication | GitHubAppAuthentication | GitHubAppAuthenticationWithExpiration | undefined, options: OAuthAppAuthOptions | GitHubAppAuthOptions) => void | Promise; +export type OAuthAppState = { + clientId: string; + clientSecret: string; + clientType: "oauth-app"; + request: OctokitTypes.RequestInterface; + onTokenCreated?: CommonAppStrategyOptions["onTokenCreated"]; + strategyOptions: WebFlowOptions | OAuthAppDeviceFlowOptions | ExistingOAuthAppAuthenticationOptions; + authentication?: OAuthAppAuthentication & { + invalid?: true; + }; +}; +type GitHubAppStateAuthentication = GitHubAppAuthentication & { + invalid?: true; +}; +type GitHubAppStateAuthenticationWIthExpiration = GitHubAppAuthenticationWithExpiration & { + invalid?: true; +}; +export type GitHubAppState = { + clientId: string; + clientSecret: string; + clientType: "github-app"; + request: OctokitTypes.RequestInterface; + onTokenCreated?: CommonAppStrategyOptions["onTokenCreated"]; + strategyOptions: WebFlowOptions | GitHubDeviceFlowOptions | ExistingGitHubAppAuthenticationOptions | ExistingGitHubAppAuthenticationWithExpirationOptions; + authentication?: GitHubAppStateAuthentication | GitHubAppStateAuthenticationWIthExpiration; +}; +export type State = OAuthAppState | GitHubAppState; +export type WebFlowState = { + clientId: string; + clientSecret: string; + clientType: ClientType; + request: OctokitTypes.RequestInterface; + strategyOptions: WebFlowOptions; +}; +export type OAuthAppAuthOptions = { + type?: "get" | "check" | "reset" | "delete" | "deleteAuthorization"; +}; +export type GitHubAppAuthOptions = { + type?: "get" | "check" | "reset" | "refresh" | "delete" | "deleteAuthorization"; +}; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts new file mode 100644 index 0000000..fcd2c21 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.1.1"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-web/index.js new file mode 100644 index 0000000..afa639d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-web/index.js @@ -0,0 +1,222 @@ +import { getUserAgent } from 'universal-user-agent'; +import { request } from '@octokit/request'; +import { createOAuthDeviceAuth } from '@octokit/auth-oauth-device'; +import { exchangeWebFlowCode, refreshToken, checkToken, resetToken, deleteToken, deleteAuthorization } from '@octokit/oauth-methods'; +import btoa from 'btoa-lite'; + +const VERSION = "2.1.1"; + +// @ts-nocheck there is only place for one of us in this file. And it's not you, TS +async function getAuthentication(state) { + // handle code exchange form OAuth Web Flow + if ("code" in state.strategyOptions) { + const { authentication } = await exchangeWebFlowCode({ + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request, + }); + return { + type: "token", + tokenType: "oauth", + ...authentication, + }; + } + // handle OAuth device flow + if ("onVerification" in state.strategyOptions) { + const deviceAuth = createOAuthDeviceAuth({ + clientType: state.clientType, + clientId: state.clientId, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request, + }); + const authentication = await deviceAuth({ + type: "oauth", + }); + return { + clientSecret: state.clientSecret, + ...authentication, + }; + } + // use existing authentication + if ("token" in state.strategyOptions) { + return { + type: "token", + tokenType: "oauth", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + }; + } + throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); +} + +async function auth(state, options = {}) { + if (!state.authentication) { + // This is what TS makes us do ¯\_(ツ)_/¯ + state.authentication = + state.clientType === "oauth-app" + ? await getAuthentication(state) + : await getAuthentication(state); + } + if (state.authentication.invalid) { + throw new Error("[@octokit/auth-oauth-user] Token is invalid"); + } + const currentAuthentication = state.authentication; + // (auto) refresh for user-to-server tokens + if ("expiresAt" in currentAuthentication) { + if (options.type === "refresh" || + new Date(currentAuthentication.expiresAt) < new Date()) { + const { authentication } = await refreshToken({ + clientType: "github-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + refreshToken: currentAuthentication.refreshToken, + request: state.request, + }); + state.authentication = { + tokenType: "oauth", + type: "token", + ...authentication, + }; + } + } + // throw error for invalid refresh call + if (options.type === "refresh") { + if (state.clientType === "oauth-app") { + throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens"); + } + if (!currentAuthentication.hasOwnProperty("expiresAt")) { + throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); + } + await state.onTokenCreated?.(state.authentication, { + type: options.type, + }); + } + // check or reset token + if (options.type === "check" || options.type === "reset") { + const method = options.type === "check" ? checkToken : resetToken; + try { + const { authentication } = await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request, + }); + state.authentication = { + tokenType: "oauth", + type: "token", + // @ts-expect-error TBD + ...authentication, + }; + if (options.type === "reset") { + await state.onTokenCreated?.(state.authentication, { + type: options.type, + }); + } + return state.authentication; + } + catch (error) { + // istanbul ignore else + if (error.status === 404) { + error.message = "[@octokit/auth-oauth-user] Token is invalid"; + // @ts-expect-error TBD + state.authentication.invalid = true; + } + throw error; + } + } + // invalidate + if (options.type === "delete" || options.type === "deleteAuthorization") { + const method = options.type === "delete" ? deleteToken : deleteAuthorization; + try { + await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request, + }); + } + catch (error) { + // istanbul ignore if + if (error.status !== 404) + throw error; + } + state.authentication.invalid = true; + return state.authentication; + } + return state.authentication; +} + +/** + * The following endpoints require an OAuth App to authenticate using its client_id and client_secret. + * + * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token + * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token + * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token + * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token + * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization + * + * deprecated: + * + * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization + * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization + * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application + * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application + */ +const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; +function requiresBasicAuth(url) { + return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); +} + +async function hook(state, request, route, parameters = {}) { + const endpoint = request.endpoint.merge(route, parameters); + // Do not intercept OAuth Web/Device flow request + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (requiresBasicAuth(endpoint.url)) { + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + return request(endpoint); + } + // TS makes us do this ¯\_(ツ)_/¯ + const { token } = state.clientType === "oauth-app" + ? await auth({ ...state, request }) + : await auth({ ...state, request }); + endpoint.headers.authorization = "token " + token; + return request(endpoint); +} + +function createOAuthUserAuth({ clientId, clientSecret, clientType = "oauth-app", request: request$1 = request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, + }, +}), onTokenCreated, ...strategyOptions }) { + const state = Object.assign({ + clientType, + clientId, + clientSecret, + onTokenCreated, + strategyOptions, + request: request$1, + }); + // @ts-expect-error not worth the extra code needed to appease TS + return Object.assign(auth.bind(null, state), { + // @ts-expect-error not worth the extra code needed to appease TS + hook: hook.bind(null, state), + }); +} +createOAuthUserAuth.VERSION = VERSION; + +export { createOAuthUserAuth, requiresBasicAuth }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map new file mode 100644 index 0000000..0d517c2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-authentication.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.1.1\";\n","// @ts-nocheck there is only place for one of us in this file. And it's not you, TS\nimport { createOAuthDeviceAuth } from \"@octokit/auth-oauth-device\";\nimport { exchangeWebFlowCode } from \"@octokit/oauth-methods\";\nexport async function getAuthentication(state) {\n // handle code exchange form OAuth Web Flow\n if (\"code\" in state.strategyOptions) {\n const { authentication } = await exchangeWebFlowCode({\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions,\n request: state.request,\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n // handle OAuth device flow\n if (\"onVerification\" in state.strategyOptions) {\n const deviceAuth = createOAuthDeviceAuth({\n clientType: state.clientType,\n clientId: state.clientId,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions,\n request: state.request,\n });\n const authentication = await deviceAuth({\n type: \"oauth\",\n });\n return {\n clientSecret: state.clientSecret,\n ...authentication,\n };\n }\n // use existing authentication\n if (\"token\" in state.strategyOptions) {\n return {\n type: \"token\",\n tokenType: \"oauth\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions,\n };\n }\n throw new Error(\"[@octokit/auth-oauth-user] Invalid strategy options\");\n}\n","import { getAuthentication } from \"./get-authentication\";\nimport { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from \"@octokit/oauth-methods\";\nexport async function auth(state, options = {}) {\n if (!state.authentication) {\n // This is what TS makes us do ¯\\_(ツ)_/¯\n state.authentication =\n state.clientType === \"oauth-app\"\n ? await getAuthentication(state)\n : await getAuthentication(state);\n }\n if (state.authentication.invalid) {\n throw new Error(\"[@octokit/auth-oauth-user] Token is invalid\");\n }\n const currentAuthentication = state.authentication;\n // (auto) refresh for user-to-server tokens\n if (\"expiresAt\" in currentAuthentication) {\n if (options.type === \"refresh\" ||\n new Date(currentAuthentication.expiresAt) < new Date()) {\n const { authentication } = await refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n refreshToken: currentAuthentication.refreshToken,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n ...authentication,\n };\n }\n }\n // throw error for invalid refresh call\n if (options.type === \"refresh\") {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\"[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens\");\n }\n if (!currentAuthentication.hasOwnProperty(\"expiresAt\")) {\n throw new Error(\"[@octokit/auth-oauth-user] Refresh token missing\");\n }\n await state.onTokenCreated?.(state.authentication, {\n type: options.type,\n });\n }\n // check or reset token\n if (options.type === \"check\" || options.type === \"reset\") {\n const method = options.type === \"check\" ? checkToken : resetToken;\n try {\n const { authentication } = await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n // @ts-expect-error TBD\n ...authentication,\n };\n if (options.type === \"reset\") {\n await state.onTokenCreated?.(state.authentication, {\n type: options.type,\n });\n }\n return state.authentication;\n }\n catch (error) {\n // istanbul ignore else\n if (error.status === 404) {\n error.message = \"[@octokit/auth-oauth-user] Token is invalid\";\n // @ts-expect-error TBD\n state.authentication.invalid = true;\n }\n throw error;\n }\n }\n // invalidate\n if (options.type === \"delete\" || options.type === \"deleteAuthorization\") {\n const method = options.type === \"delete\" ? deleteToken : deleteAuthorization;\n try {\n await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n }\n catch (error) {\n // istanbul ignore if\n if (error.status !== 404)\n throw error;\n }\n state.authentication.invalid = true;\n return state.authentication;\n }\n return state.authentication;\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token\n * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token\n * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[^/]+\\/(token|grant)s?/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { auth } from \"./auth\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters = {}) {\n const endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n return request(endpoint);\n }\n // TS makes us do this ¯\\_(ツ)_/¯\n const { token } = state.clientType === \"oauth-app\"\n ? await auth({ ...state, request })\n : await auth({ ...state, request });\n endpoint.headers.authorization = \"token \" + token;\n return request(endpoint);\n}\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { VERSION } from \"./version\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport function createOAuthUserAuth({ clientId, clientSecret, clientType = \"oauth-app\", request = octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n}), onTokenCreated, ...strategyOptions }) {\n const state = Object.assign({\n clientType,\n clientId,\n clientSecret,\n onTokenCreated,\n strategyOptions,\n request,\n });\n // @ts-expect-error not worth the extra code needed to appease TS\n return Object.assign(auth.bind(null, state), {\n // @ts-expect-error not worth the extra code needed to appease TS\n hook: hook.bind(null, state),\n });\n}\ncreateOAuthUserAuth.VERSION = VERSION;\n"],"names":["request","octokitRequest"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C;AACA,AAEO,eAAe,iBAAiB,CAAC,KAAK,EAAE;AAC/C;AACA,IAAI,IAAI,MAAM,IAAI,KAAK,CAAC,eAAe,EAAE;AACzC,QAAQ,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,mBAAmB,CAAC;AAC7D,YAAY,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACpC,YAAY,YAAY,EAAE,KAAK,CAAC,YAAY;AAC5C,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,YAAY,cAAc,EAAE,KAAK,CAAC,cAAc;AAChD,YAAY,GAAG,KAAK,CAAC,eAAe;AACpC,YAAY,OAAO,EAAE,KAAK,CAAC,OAAO;AAClC,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,OAAO;AACzB,YAAY,SAAS,EAAE,OAAO;AAC9B,YAAY,GAAG,cAAc;AAC7B,SAAS,CAAC;AACV,KAAK;AACL;AACA,IAAI,IAAI,gBAAgB,IAAI,KAAK,CAAC,eAAe,EAAE;AACnD,QAAQ,MAAM,UAAU,GAAG,qBAAqB,CAAC;AACjD,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,YAAY,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACpC,YAAY,cAAc,EAAE,KAAK,CAAC,cAAc;AAChD,YAAY,GAAG,KAAK,CAAC,eAAe;AACpC,YAAY,OAAO,EAAE,KAAK,CAAC,OAAO;AAClC,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC;AAChD,YAAY,IAAI,EAAE,OAAO;AACzB,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO;AACf,YAAY,YAAY,EAAE,KAAK,CAAC,YAAY;AAC5C,YAAY,GAAG,cAAc;AAC7B,SAAS,CAAC;AACV,KAAK;AACL;AACA,IAAI,IAAI,OAAO,IAAI,KAAK,CAAC,eAAe,EAAE;AAC1C,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,OAAO;AACzB,YAAY,SAAS,EAAE,OAAO;AAC9B,YAAY,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACpC,YAAY,YAAY,EAAE,KAAK,CAAC,YAAY;AAC5C,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,YAAY,cAAc,EAAE,KAAK,CAAC,cAAc;AAChD,YAAY,GAAG,KAAK,CAAC,eAAe;AACpC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAC3E,CAAC;;AChDM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE;AAChD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE;AAC/B;AACA,QAAQ,KAAK,CAAC,cAAc;AAC5B,YAAY,KAAK,CAAC,UAAU,KAAK,WAAW;AAC5C,kBAAkB,MAAM,iBAAiB,CAAC,KAAK,CAAC;AAChD,kBAAkB,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAC;AACjD,KAAK;AACL,IAAI,IAAI,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE;AACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;AACvE,KAAK;AACL,IAAI,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC;AACvD;AACA,IAAI,IAAI,WAAW,IAAI,qBAAqB,EAAE;AAC9C,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;AACtC,YAAY,IAAI,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,EAAE,EAAE;AACpE,YAAY,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,YAAY,CAAC;AAC1D,gBAAgB,UAAU,EAAE,YAAY;AACxC,gBAAgB,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACxC,gBAAgB,YAAY,EAAE,KAAK,CAAC,YAAY;AAChD,gBAAgB,YAAY,EAAE,qBAAqB,CAAC,YAAY;AAChE,gBAAgB,OAAO,EAAE,KAAK,CAAC,OAAO;AACtC,aAAa,CAAC,CAAC;AACf,YAAY,KAAK,CAAC,cAAc,GAAG;AACnC,gBAAgB,SAAS,EAAE,OAAO;AAClC,gBAAgB,IAAI,EAAE,OAAO;AAC7B,gBAAgB,GAAG,cAAc;AACjC,aAAa,CAAC;AACd,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE;AACpC,QAAQ,IAAI,KAAK,CAAC,UAAU,KAAK,WAAW,EAAE;AAC9C,YAAY,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;AACpG,SAAS;AACT,QAAQ,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;AAChE,YAAY,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AAChF,SAAS;AACT,QAAQ,MAAM,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,EAAE;AAC3D,YAAY,IAAI,EAAE,OAAO,CAAC,IAAI;AAC9B,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE;AAC9D,QAAQ,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,KAAK,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;AAC1E,QAAQ,IAAI;AACZ,YAAY,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC;AACpD;AACA,gBAAgB,UAAU,EAAE,KAAK,CAAC,UAAU;AAC5C,gBAAgB,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACxC,gBAAgB,YAAY,EAAE,KAAK,CAAC,YAAY;AAChD,gBAAgB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK;AACjD,gBAAgB,OAAO,EAAE,KAAK,CAAC,OAAO;AACtC,aAAa,CAAC,CAAC;AACf,YAAY,KAAK,CAAC,cAAc,GAAG;AACnC,gBAAgB,SAAS,EAAE,OAAO;AAClC,gBAAgB,IAAI,EAAE,OAAO;AAC7B;AACA,gBAAgB,GAAG,cAAc;AACjC,aAAa,CAAC;AACd,YAAY,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE;AAC1C,gBAAgB,MAAM,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,EAAE;AACnE,oBAAoB,IAAI,EAAE,OAAO,CAAC,IAAI;AACtC,iBAAiB,CAAC,CAAC;AACnB,aAAa;AACb,YAAY,OAAO,KAAK,CAAC,cAAc,CAAC;AACxC,SAAS;AACT,QAAQ,OAAO,KAAK,EAAE;AACtB;AACA,YAAY,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AACtC,gBAAgB,KAAK,CAAC,OAAO,GAAG,6CAA6C,CAAC;AAC9E;AACA,gBAAgB,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC;AACpD,aAAa;AACb,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,qBAAqB,EAAE;AAC7E,QAAQ,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,KAAK,QAAQ,GAAG,WAAW,GAAG,mBAAmB,CAAC;AACrF,QAAQ,IAAI;AACZ,YAAY,MAAM,MAAM,CAAC;AACzB;AACA,gBAAgB,UAAU,EAAE,KAAK,CAAC,UAAU;AAC5C,gBAAgB,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACxC,gBAAgB,YAAY,EAAE,KAAK,CAAC,YAAY;AAChD,gBAAgB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK;AACjD,gBAAgB,OAAO,EAAE,KAAK,CAAC,OAAO;AACtC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,OAAO,KAAK,EAAE;AACtB;AACA,YAAY,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG;AACpC,gBAAgB,MAAM,KAAK,CAAC;AAC5B,SAAS;AACT,QAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC;AAC5C,QAAQ,OAAO,KAAK,CAAC,cAAc,CAAC;AACpC,KAAK;AACL,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC;AAChC,CAAC;;ACrGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,2BAA2B,GAAG,wCAAwC,CAAC;AAC7E,AAAO,SAAS,iBAAiB,CAAC,GAAG,EAAE;AACvC,IAAI,OAAO,GAAG,IAAI,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;;AChBM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,GAAG,EAAE,EAAE;AACnE,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D;AACA,IAAI,IAAI,8CAA8C,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC3E,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,IAAI,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACzC,QAAQ,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAC5E,QAAQ,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAChE,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL;AACA,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,UAAU,KAAK,WAAW;AACtD,UAAU,MAAM,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,CAAC;AAC3C,UAAU,MAAM,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5C,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,QAAQ,GAAG,KAAK,CAAC;AACtD,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACdM,SAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,GAAG,WAAW,WAAEA,SAAO,GAAGC,OAAc,CAAC,QAAQ,CAAC;AAC1H,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC9E,KAAK;AACL,CAAC,CAAC,EAAE,cAAc,EAAE,GAAG,eAAe,EAAE,EAAE;AAC1C,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,UAAU;AAClB,QAAQ,QAAQ;AAChB,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,QAAQ,eAAe;AACvB,iBAAQD,SAAO;AACf,KAAK,CAAC,CAAC;AACP;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD;AACA,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;AACD,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/LICENSE new file mode 100644 index 0000000..57049d0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/README.md new file mode 100644 index 0000000..2fbe50d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/README.md @@ -0,0 +1,656 @@ +# auth-oauth-device.js + +> GitHub OAuth Device authentication strategy for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-device.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-device) +[![Build Status](https://github.com/octokit/auth-oauth-device.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-device.js/actions?query=workflow%3ATest+branch%3Amain) + +`@octokit/auth-oauth-device` is implementing one of [GitHub’s OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). + + + +- [Usage](#usage) + - [For OAuth Apps](#for-oauth-apps) + - [For GitHub Apps](#for-github-apps) +- [`createOAuthDeviceAuth(options)`](#createoauthdeviceauthoptions) +- [`auth(options)`](#authoptions) +- [Authentication object](#authentication-object) + - [OAuth APP user authentication](#oauth-app-user-authentication) + - [GitHub APP user authentication with expiring tokens disabled](#github-app-user-authentication-with-expiring-tokens-disabled) + - [GitHub APP user authentication with expiring tokens enabled](#github-app-user-authentication-with-expiring-tokens-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [How it works](#how-it-works) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + + + + + + +
+ +Browsers + + + +Load `@octokit/auth-oauth-device` directly from [cdn.pika.dev](https://cdn.pika.dev) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-oauth-device` + +```js +const { createOAuthDeviceAuth } = require("@octokit/auth-oauth-device"); +``` + +
+ +### For OAuth Apps + +```js +const auth = createOAuthDeviceAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["public_repo"], + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +const tokenAuthentication = await auth({ + type: "oauth", +}); +// resolves with +// { +// type: "token", +// tokenType: "oauth", +// clientType: "oauth-app", +// clientId: "1234567890abcdef1234", +// token: "...", /* the created oauth token */ +// scopes: [] /* depend on request scopes by OAuth app */ +// } +``` + +### For GitHub Apps + +GitHub Apps do not support `scopes`. Client IDs of GitHub Apps have a `lv1.` prefix. If the GitHub App has expiring user tokens enabled, the resulting `authentication` object has extra properties related to expiration and refreshing the token. + +```js +const auth = createOAuthDeviceAuth({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +const tokenAuthentication = await auth({ + type: "oauth", +}); +// resolves with +// { +// type: "token", +// tokenType: "oauth", +// clientType: "github-app", +// clientId: "lv1.1234567890abcdef", +// token: "...", /* the created oauth token */ +// } +// or if expiring user tokens are enabled +// { +// type: "token", +// tokenType: "oauth", +// clientType: "github-app", +// clientId: "lv1.1234567890abcdef", +// token: "...", /* the created oauth token */ +// refreshToken: "...", +// expiresAt: "2022-01-01T08:00:0.000Z", +// refreshTokenExpiresAt: "2021-07-01T00:00:0.000Z", +// } +``` + +## `createOAuthDeviceAuth(options)` + +The `createOAuthDeviceAuth` method accepts a single `options` parameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Find your OAuth app’s Client ID in your account’s developer settings. +
+ onVerification + + function + + Required. A function that is called once the device and user codes were retrieved + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = createOAuthDeviceAuth({ + clientId: "1234567890abcdef1234", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ clientType + + string + + +Must be either `oauth-app` or `github-app`. Defaults to `oauth-app`. + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthDeviceAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ scopes + + array of strings + + +Only relavant if `clientType` is set to `"oauth-app"`. + +Array of scope names enabled for the token. Defaults to `[]`. See [available scopes](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes). + +
+ +## `auth(options)` + +The async `auth()` method returned by `createOAuthDeviceAuth(options)` accepts the following options + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth" +
+ scopes + + array of strings + + +Only relevant if the `clientType` strategy options was set to `"oauth-app"` + +Array of scope names enabled for the token. Defaults to what was set in the [strategy options](#createoauthdeviceauthoptions). See available scopes + +
+ refresh + + boolean + + +Defaults to `false`. When set to `false`, calling `auth(options)` will resolve with a token that was previously created for the same scopes if it exists. If set to `true` a new token will always be created. + +
+ +## Authentication object + +The async `auth(options)` method resolves to one of three possible objects + +1. OAuth APP user authentication +1. GitHub APP user authentication with expiring tokens disabled +1. GitHub APP user authentication with expiring tokens enabled + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +### OAuth APP user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The personal access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub APP user authentication with expiring tokens disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The personal access token +
+ +### GitHub APP user authentication with expiring tokens enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: user } = await auth.hook(request, "GET /user"); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: user } = await requestWithAuth("GET /user"); +``` + +## Types + +```ts +import { + OAuthAppStrategyOptions, + OAuthAppAuthOptions, + OAuthAppAuthentication, + GitHubAppStrategyOptions, + GitHubAppAuthOptions, + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, +} from "@octokit/auth-oauth-device"; +``` + +## How it works + +GitHub's OAuth Device flow is different from the web flow in two ways + +1. It does not require a URL redirect, which makes it great for devices and CLI apps +2. It does not require the OAuth client secret, which means there is no user-owned server component required. + +The flow has 3 parts (see [GitHub documentation](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow)) + +1. `@octokit/auth-oauth-device` requests a device and user code +2. Then the user has to open https://github.com/login/device (or it's GitHub Enterprise Server equivalent) and enter the user code +3. While the user enters the code, `@octokit/auth-oauth-device` is sending requests in the background to retrieve the OAuth access token. Once the user completed step 2, the request will succeed and the token will be returned + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-node/index.js new file mode 100644 index 0000000..f6e1334 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-node/index.js @@ -0,0 +1,145 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var universalUserAgent = require('universal-user-agent'); +var request = require('@octokit/request'); +var oauthMethods = require('@octokit/oauth-methods'); + +async function getOAuthAccessToken(state, options) { + const cachedAuthentication = getCachedAuthentication(state, options.auth); + if (cachedAuthentication) return cachedAuthentication; + // Step 1: Request device and user codes + // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github + const { + data: verification + } = await oauthMethods.createDeviceCode({ + clientType: state.clientType, + clientId: state.clientId, + request: options.request || state.request, + // @ts-expect-error the extra code to make TS happy is not worth it + scopes: options.auth.scopes || state.scopes + }); + // Step 2: User must enter the user code on https://github.com/login/device + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser + await state.onVerification(verification); + // Step 3: Exchange device code for access token + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device + const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification); + state.authentication = authentication; + return authentication; +} +function getCachedAuthentication(state, auth) { + if (auth.refresh === true) return false; + if (!state.authentication) return false; + if (state.clientType === "github-app") { + return state.authentication; + } + const authentication = state.authentication; + const newScope = ("scopes" in auth && auth.scopes || state.scopes).join(" "); + const currentScope = authentication.scopes.join(" "); + return newScope === currentScope ? authentication : false; +} +async function wait(seconds) { + await new Promise(resolve => setTimeout(resolve, seconds * 1000)); +} +async function waitForAccessToken(request, clientId, clientType, verification) { + try { + const options = { + clientId, + request, + code: verification.device_code + }; + // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME + const { + authentication + } = clientType === "oauth-app" ? await oauthMethods.exchangeDeviceCode({ + ...options, + clientType: "oauth-app" + }) : await oauthMethods.exchangeDeviceCode({ + ...options, + clientType: "github-app" + }); + return { + type: "token", + tokenType: "oauth", + ...authentication + }; + } catch (error) { + // istanbul ignore if + // @ts-ignore + if (!error.response) throw error; + // @ts-ignore + const errorType = error.response.data.error; + if (errorType === "authorization_pending") { + await wait(verification.interval); + return waitForAccessToken(request, clientId, clientType, verification); + } + if (errorType === "slow_down") { + await wait(verification.interval + 5); + return waitForAccessToken(request, clientId, clientType, verification); + } + throw error; + } +} + +async function auth(state, authOptions) { + return getOAuthAccessToken(state, { + auth: authOptions + }); +} + +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); + // Do not intercept request to retrieve codes or token + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + const { + token + } = await getOAuthAccessToken(state, { + request, + auth: { + type: "oauth" + } + }); + endpoint.headers.authorization = `token ${token}`; + return request(endpoint); +} + +const VERSION = "4.0.4"; + +function createOAuthDeviceAuth(options) { + const requestWithDefaults = options.request || request.request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } + }); + const { + request: request$1 = requestWithDefaults, + ...otherOptions + } = options; + const state = options.clientType === "github-app" ? { + ...otherOptions, + clientType: "github-app", + request: request$1 + } : { + ...otherOptions, + clientType: "oauth-app", + request: request$1, + scopes: options.scopes || [] + }; + if (!options.clientId) { + throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + if (!options.onVerification) { + throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯ + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} + +exports.createOAuthDeviceAuth = createOAuthDeviceAuth; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map new file mode 100644 index 0000000..532b962 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { createDeviceCode, exchangeDeviceCode } from \"@octokit/oauth-methods\";\nexport async function getOAuthAccessToken(state, options) {\n const cachedAuthentication = getCachedAuthentication(state, options.auth);\n if (cachedAuthentication)\n return cachedAuthentication;\n // Step 1: Request device and user codes\n // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github\n const { data: verification } = await createDeviceCode({\n clientType: state.clientType,\n clientId: state.clientId,\n request: options.request || state.request,\n // @ts-expect-error the extra code to make TS happy is not worth it\n scopes: options.auth.scopes || state.scopes,\n });\n // Step 2: User must enter the user code on https://github.com/login/device\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser\n await state.onVerification(verification);\n // Step 3: Exchange device code for access token\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device\n const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);\n state.authentication = authentication;\n return authentication;\n}\nfunction getCachedAuthentication(state, auth) {\n if (auth.refresh === true)\n return false;\n if (!state.authentication)\n return false;\n if (state.clientType === \"github-app\") {\n return state.authentication;\n }\n const authentication = state.authentication;\n const newScope = ((\"scopes\" in auth && auth.scopes) || state.scopes).join(\" \");\n const currentScope = authentication.scopes.join(\" \");\n return newScope === currentScope ? authentication : false;\n}\nasync function wait(seconds) {\n await new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n}\nasync function waitForAccessToken(request, clientId, clientType, verification) {\n try {\n const options = {\n clientId,\n request,\n code: verification.device_code,\n };\n // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME\n const { authentication } = clientType === \"oauth-app\"\n ? await exchangeDeviceCode({\n ...options,\n clientType: \"oauth-app\",\n })\n : await exchangeDeviceCode({\n ...options,\n clientType: \"github-app\",\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n catch (error) {\n // istanbul ignore if\n // @ts-ignore\n if (!error.response)\n throw error;\n // @ts-ignore\n const errorType = error.response.data.error;\n if (errorType === \"authorization_pending\") {\n await wait(verification.interval);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n if (errorType === \"slow_down\") {\n await wait(verification.interval + 5);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n throw error;\n }\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n return getOAuthAccessToken(state, {\n auth: authOptions,\n });\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve codes or token\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n const { token } = await getOAuthAccessToken(state, {\n request,\n auth: { type: \"oauth\" },\n });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"4.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport function createOAuthDeviceAuth(options) {\n const requestWithDefaults = options.request ||\n octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const { request = requestWithDefaults, ...otherOptions } = options;\n const state = options.clientType === \"github-app\"\n ? {\n ...otherOptions,\n clientType: \"github-app\",\n request,\n }\n : {\n ...otherOptions,\n clientType: \"oauth-app\",\n request,\n scopes: options.scopes || [],\n };\n if (!options.clientId) {\n throw new Error('[@octokit/auth-oauth-device] \"clientId\" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n if (!options.onVerification) {\n throw new Error('[@octokit/auth-oauth-device] \"onVerification\" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n // @ts-ignore too much for tsc / ts-jest ¯\\_(ツ)_/¯\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["getOAuthAccessToken","state","options","cachedAuthentication","getCachedAuthentication","auth","data","verification","createDeviceCode","clientType","clientId","request","scopes","onVerification","authentication","waitForAccessToken","refresh","newScope","join","currentScope","wait","seconds","Promise","resolve","setTimeout","code","device_code","exchangeDeviceCode","type","tokenType","error","response","errorType","interval","authOptions","hook","route","parameters","endpoint","merge","test","url","token","headers","authorization","VERSION","createOAuthDeviceAuth","requestWithDefaults","octokitRequest","defaults","getUserAgent","otherOptions","Error","Object","assign","bind"],"mappings":";;;;;;;;AACO,eAAeA,mBAAmB,CAACC,KAAK,EAAEC,OAAO,EAAE;EACtD,MAAMC,oBAAoB,GAAGC,uBAAuB,CAACH,KAAK,EAAEC,OAAO,CAACG,IAAI,CAAC;EACzE,IAAIF,oBAAoB,EACpB,OAAOA,oBAAoB;;;EAG/B,MAAM;IAAEG,IAAI,EAAEC;GAAc,GAAG,MAAMC,6BAAgB,CAAC;IAClDC,UAAU,EAAER,KAAK,CAACQ,UAAU;IAC5BC,QAAQ,EAAET,KAAK,CAACS,QAAQ;IACxBC,OAAO,EAAET,OAAO,CAACS,OAAO,IAAIV,KAAK,CAACU,OAAO;;IAEzCC,MAAM,EAAEV,OAAO,CAACG,IAAI,CAACO,MAAM,IAAIX,KAAK,CAACW;GACxC,CAAC;;;EAGF,MAAMX,KAAK,CAACY,cAAc,CAACN,YAAY,CAAC;;;EAGxC,MAAMO,cAAc,GAAG,MAAMC,kBAAkB,CAACb,OAAO,CAACS,OAAO,IAAIV,KAAK,CAACU,OAAO,EAAEV,KAAK,CAACS,QAAQ,EAAET,KAAK,CAACQ,UAAU,EAAEF,YAAY,CAAC;EACjIN,KAAK,CAACa,cAAc,GAAGA,cAAc;EACrC,OAAOA,cAAc;AACzB;AACA,SAASV,uBAAuB,CAACH,KAAK,EAAEI,IAAI,EAAE;EAC1C,IAAIA,IAAI,CAACW,OAAO,KAAK,IAAI,EACrB,OAAO,KAAK;EAChB,IAAI,CAACf,KAAK,CAACa,cAAc,EACrB,OAAO,KAAK;EAChB,IAAIb,KAAK,CAACQ,UAAU,KAAK,YAAY,EAAE;IACnC,OAAOR,KAAK,CAACa,cAAc;;EAE/B,MAAMA,cAAc,GAAGb,KAAK,CAACa,cAAc;EAC3C,MAAMG,QAAQ,GAAG,CAAE,QAAQ,IAAIZ,IAAI,IAAIA,IAAI,CAACO,MAAM,IAAKX,KAAK,CAACW,MAAM,EAAEM,IAAI,CAAC,GAAG,CAAC;EAC9E,MAAMC,YAAY,GAAGL,cAAc,CAACF,MAAM,CAACM,IAAI,CAAC,GAAG,CAAC;EACpD,OAAOD,QAAQ,KAAKE,YAAY,GAAGL,cAAc,GAAG,KAAK;AAC7D;AACA,eAAeM,IAAI,CAACC,OAAO,EAAE;EACzB,MAAM,IAAIC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEF,OAAO,GAAG,IAAI,CAAC,CAAC;AACvE;AACA,eAAeN,kBAAkB,CAACJ,OAAO,EAAED,QAAQ,EAAED,UAAU,EAAEF,YAAY,EAAE;EAC3E,IAAI;IACA,MAAML,OAAO,GAAG;MACZQ,QAAQ;MACRC,OAAO;MACPc,IAAI,EAAElB,YAAY,CAACmB;KACtB;;IAED,MAAM;MAAEZ;KAAgB,GAAGL,UAAU,KAAK,WAAW,GAC/C,MAAMkB,+BAAkB,CAAC;MACvB,GAAGzB,OAAO;MACVO,UAAU,EAAE;KACf,CAAC,GACA,MAAMkB,+BAAkB,CAAC;MACvB,GAAGzB,OAAO;MACVO,UAAU,EAAE;KACf,CAAC;IACN,OAAO;MACHmB,IAAI,EAAE,OAAO;MACbC,SAAS,EAAE,OAAO;MAClB,GAAGf;KACN;GACJ,CACD,OAAOgB,KAAK,EAAE;;;IAGV,IAAI,CAACA,KAAK,CAACC,QAAQ,EACf,MAAMD,KAAK;;IAEf,MAAME,SAAS,GAAGF,KAAK,CAACC,QAAQ,CAACzB,IAAI,CAACwB,KAAK;IAC3C,IAAIE,SAAS,KAAK,uBAAuB,EAAE;MACvC,MAAMZ,IAAI,CAACb,YAAY,CAAC0B,QAAQ,CAAC;MACjC,OAAOlB,kBAAkB,CAACJ,OAAO,EAAED,QAAQ,EAAED,UAAU,EAAEF,YAAY,CAAC;;IAE1E,IAAIyB,SAAS,KAAK,WAAW,EAAE;MAC3B,MAAMZ,IAAI,CAACb,YAAY,CAAC0B,QAAQ,GAAG,CAAC,CAAC;MACrC,OAAOlB,kBAAkB,CAACJ,OAAO,EAAED,QAAQ,EAAED,UAAU,EAAEF,YAAY,CAAC;;IAE1E,MAAMuB,KAAK;;AAEnB;;AC9EO,eAAezB,IAAI,CAACJ,KAAK,EAAEiC,WAAW,EAAE;EAC3C,OAAOlC,mBAAmB,CAACC,KAAK,EAAE;IAC9BI,IAAI,EAAE6B;GACT,CAAC;AACN;;ACJO,eAAeC,IAAI,CAAClC,KAAK,EAAEU,OAAO,EAAEyB,KAAK,EAAEC,UAAU,EAAE;EAC1D,IAAIC,QAAQ,GAAG3B,OAAO,CAAC2B,QAAQ,CAACC,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;;EAExD,IAAI,8CAA8C,CAACG,IAAI,CAACF,QAAQ,CAACG,GAAG,CAAC,EAAE;IACnE,OAAO9B,OAAO,CAAC2B,QAAQ,CAAC;;EAE5B,MAAM;IAAEI;GAAO,GAAG,MAAM1C,mBAAmB,CAACC,KAAK,EAAE;IAC/CU,OAAO;IACPN,IAAI,EAAE;MAAEuB,IAAI,EAAE;;GACjB,CAAC;EACFU,QAAQ,CAACK,OAAO,CAACC,aAAa,GAAI,SAAQF,KAAM,EAAC;EACjD,OAAO/B,OAAO,CAAC2B,QAAQ,CAAC;AAC5B;;ACbO,MAAMO,OAAO,GAAG,mBAAmB;;ACKnC,SAASC,qBAAqB,CAAC5C,OAAO,EAAE;EAC3C,MAAM6C,mBAAmB,GAAG7C,OAAO,CAACS,OAAO,IACvCqC,eAAc,CAACC,QAAQ,CAAC;IACpBN,OAAO,EAAE;MACL,YAAY,EAAG,gCAA+BE,OAAQ,IAAGK,+BAAY,EAAG;;GAE/E,CAAC;EACN,MAAM;aAAEvC,SAAO,GAAGoC,mBAAmB;IAAE,GAAGI;GAAc,GAAGjD,OAAO;EAClE,MAAMD,KAAK,GAAGC,OAAO,CAACO,UAAU,KAAK,YAAY,GAC3C;IACE,GAAG0C,YAAY;IACf1C,UAAU,EAAE,YAAY;aACxBE;GACH,GACC;IACE,GAAGwC,YAAY;IACf1C,UAAU,EAAE,WAAW;aACvBE,SAAO;IACPC,MAAM,EAAEV,OAAO,CAACU,MAAM,IAAI;GAC7B;EACL,IAAI,CAACV,OAAO,CAACQ,QAAQ,EAAE;IACnB,MAAM,IAAI0C,KAAK,CAAC,oHAAoH,CAAC;;EAEzI,IAAI,CAAClD,OAAO,CAACW,cAAc,EAAE;IACzB,MAAM,IAAIuC,KAAK,CAAC,iIAAiI,CAAC;;;EAGtJ,OAAOC,MAAM,CAACC,MAAM,CAACjD,IAAI,CAACkD,IAAI,CAAC,IAAI,EAAEtD,KAAK,CAAC,EAAE;IACzCkC,IAAI,EAAEA,IAAI,CAACoB,IAAI,CAAC,IAAI,EAAEtD,KAAK;GAC9B,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/auth.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/auth.js new file mode 100644 index 0000000..f62e980 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/auth.js @@ -0,0 +1,6 @@ +import { getOAuthAccessToken } from "./get-oauth-access-token"; +export async function auth(state, authOptions) { + return getOAuthAccessToken(state, { + auth: authOptions, + }); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js new file mode 100644 index 0000000..34e9282 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js @@ -0,0 +1,80 @@ +import { createDeviceCode, exchangeDeviceCode } from "@octokit/oauth-methods"; +export async function getOAuthAccessToken(state, options) { + const cachedAuthentication = getCachedAuthentication(state, options.auth); + if (cachedAuthentication) + return cachedAuthentication; + // Step 1: Request device and user codes + // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github + const { data: verification } = await createDeviceCode({ + clientType: state.clientType, + clientId: state.clientId, + request: options.request || state.request, + // @ts-expect-error the extra code to make TS happy is not worth it + scopes: options.auth.scopes || state.scopes, + }); + // Step 2: User must enter the user code on https://github.com/login/device + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser + await state.onVerification(verification); + // Step 3: Exchange device code for access token + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device + const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification); + state.authentication = authentication; + return authentication; +} +function getCachedAuthentication(state, auth) { + if (auth.refresh === true) + return false; + if (!state.authentication) + return false; + if (state.clientType === "github-app") { + return state.authentication; + } + const authentication = state.authentication; + const newScope = (("scopes" in auth && auth.scopes) || state.scopes).join(" "); + const currentScope = authentication.scopes.join(" "); + return newScope === currentScope ? authentication : false; +} +async function wait(seconds) { + await new Promise((resolve) => setTimeout(resolve, seconds * 1000)); +} +async function waitForAccessToken(request, clientId, clientType, verification) { + try { + const options = { + clientId, + request, + code: verification.device_code, + }; + // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME + const { authentication } = clientType === "oauth-app" + ? await exchangeDeviceCode({ + ...options, + clientType: "oauth-app", + }) + : await exchangeDeviceCode({ + ...options, + clientType: "github-app", + }); + return { + type: "token", + tokenType: "oauth", + ...authentication, + }; + } + catch (error) { + // istanbul ignore if + // @ts-ignore + if (!error.response) + throw error; + // @ts-ignore + const errorType = error.response.data.error; + if (errorType === "authorization_pending") { + await wait(verification.interval); + return waitForAccessToken(request, clientId, clientType, verification); + } + if (errorType === "slow_down") { + await wait(verification.interval + 5); + return waitForAccessToken(request, clientId, clientType, verification); + } + throw error; + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/hook.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/hook.js new file mode 100644 index 0000000..76f9a55 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/hook.js @@ -0,0 +1,14 @@ +import { getOAuthAccessToken } from "./get-oauth-access-token"; +export async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); + // Do not intercept request to retrieve codes or token + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + const { token } = await getOAuthAccessToken(state, { + request, + auth: { type: "oauth" }, + }); + endpoint.headers.authorization = `token ${token}`; + return request(endpoint); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/index.js new file mode 100644 index 0000000..b9e6980 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/index.js @@ -0,0 +1,36 @@ +import { getUserAgent } from "universal-user-agent"; +import { request as octokitRequest } from "@octokit/request"; +import { auth } from "./auth"; +import { hook } from "./hook"; +import { VERSION } from "./version"; +export function createOAuthDeviceAuth(options) { + const requestWithDefaults = options.request || + octokitRequest.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`, + }, + }); + const { request = requestWithDefaults, ...otherOptions } = options; + const state = options.clientType === "github-app" + ? { + ...otherOptions, + clientType: "github-app", + request, + } + : { + ...otherOptions, + clientType: "oauth-app", + request, + scopes: options.scopes || [], + }; + if (!options.clientId) { + throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + if (!options.onVerification) { + throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯ + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state), + }); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/types.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/version.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/version.js new file mode 100644 index 0000000..3063274 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "4.0.4"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts new file mode 100644 index 0000000..935ab95 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts @@ -0,0 +1,2 @@ +import { OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, OAuthAppState, GitHubAppState } from "./types"; +export declare function auth(state: OAuthAppState | GitHubAppState, authOptions: OAuthAppAuthOptions | GitHubAppAuthOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts new file mode 100644 index 0000000..2bbe941 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts @@ -0,0 +1,6 @@ +import { RequestInterface } from "@octokit/types"; +import { OAuthAppState, GitHubAppState, OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication } from "./types"; +export declare function getOAuthAccessToken(state: OAuthAppState | GitHubAppState, options: { + request?: RequestInterface; + auth: OAuthAppAuthOptions | GitHubAppAuthOptions; +}): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts new file mode 100644 index 0000000..f9803e4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts @@ -0,0 +1,3 @@ +import { RequestInterface, OctokitResponse, EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { OAuthAppState, GitHubAppState } from "./types"; +export declare function hook(state: OAuthAppState | GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts new file mode 100644 index 0000000..4b1b734 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts @@ -0,0 +1,4 @@ +import { GitHubAppAuthInterface, GitHubAppStrategyOptions, OAuthAppAuthInterface, OAuthAppStrategyOptions } from "./types"; +export { OAuthAppStrategyOptions, OAuthAppAuthOptions, OAuthAppAuthentication, GitHubAppStrategyOptions, GitHubAppAuthOptions, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types"; +export declare function createOAuthDeviceAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; +export declare function createOAuthDeviceAuth(options: GitHubAppStrategyOptions): GitHubAppAuthInterface; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts new file mode 100644 index 0000000..544f329 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts @@ -0,0 +1,68 @@ +import { RequestInterface, Route, EndpointOptions, RequestParameters, OctokitResponse } from "@octokit/types"; +import * as OAuthMethodsTypes from "@octokit/oauth-methods"; +export type ClientType = "oauth-app" | "github-app"; +export type OAuthAppStrategyOptions = { + clientId: string; + clientType?: "oauth-app"; + onVerification: OnVerificationCallback; + scopes?: string[]; + request?: RequestInterface; +}; +export type GitHubAppStrategyOptions = { + clientId: string; + clientType: "github-app"; + onVerification: OnVerificationCallback; + request?: RequestInterface; +}; +export interface OAuthAppAuthInterface { + (options: OAuthAppAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export interface GitHubAppAuthInterface { + (options: GitHubAppAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export type OAuthAppAuthOptions = { + type: "oauth"; + scopes?: string[]; + refresh?: boolean; +}; +export type GitHubAppAuthOptions = { + type: "oauth"; + refresh?: boolean; +}; +export type OAuthAppAuthentication = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export type GitHubAppAuthentication = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export type GitHubAppAuthenticationWithExpiration = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export type Verification = { + device_code: string; + user_code: string; + verification_uri: string; + expires_in: number; + interval: number; +}; +export type OnVerificationCallback = (verification: Verification) => any | Promise; +export type OAuthAppState = { + clientId: string; + clientType: "oauth-app"; + onVerification: OnVerificationCallback; + scopes: string[]; + request: RequestInterface; + authentication?: OAuthAppAuthentication; +}; +export type GitHubAppState = { + clientId: string; + clientType: "github-app"; + onVerification: OnVerificationCallback; + request: RequestInterface; + authentication?: GitHubAppAuthentication | GitHubAppAuthenticationWithExpiration; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts new file mode 100644 index 0000000..9cd74fe --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "4.0.4"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-web/index.js new file mode 100644 index 0000000..4af5e84 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-web/index.js @@ -0,0 +1,140 @@ +import { getUserAgent } from 'universal-user-agent'; +import { request } from '@octokit/request'; +import { createDeviceCode, exchangeDeviceCode } from '@octokit/oauth-methods'; + +async function getOAuthAccessToken(state, options) { + const cachedAuthentication = getCachedAuthentication(state, options.auth); + if (cachedAuthentication) + return cachedAuthentication; + // Step 1: Request device and user codes + // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github + const { data: verification } = await createDeviceCode({ + clientType: state.clientType, + clientId: state.clientId, + request: options.request || state.request, + // @ts-expect-error the extra code to make TS happy is not worth it + scopes: options.auth.scopes || state.scopes, + }); + // Step 2: User must enter the user code on https://github.com/login/device + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser + await state.onVerification(verification); + // Step 3: Exchange device code for access token + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device + const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification); + state.authentication = authentication; + return authentication; +} +function getCachedAuthentication(state, auth) { + if (auth.refresh === true) + return false; + if (!state.authentication) + return false; + if (state.clientType === "github-app") { + return state.authentication; + } + const authentication = state.authentication; + const newScope = (("scopes" in auth && auth.scopes) || state.scopes).join(" "); + const currentScope = authentication.scopes.join(" "); + return newScope === currentScope ? authentication : false; +} +async function wait(seconds) { + await new Promise((resolve) => setTimeout(resolve, seconds * 1000)); +} +async function waitForAccessToken(request, clientId, clientType, verification) { + try { + const options = { + clientId, + request, + code: verification.device_code, + }; + // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME + const { authentication } = clientType === "oauth-app" + ? await exchangeDeviceCode({ + ...options, + clientType: "oauth-app", + }) + : await exchangeDeviceCode({ + ...options, + clientType: "github-app", + }); + return { + type: "token", + tokenType: "oauth", + ...authentication, + }; + } + catch (error) { + // istanbul ignore if + // @ts-ignore + if (!error.response) + throw error; + // @ts-ignore + const errorType = error.response.data.error; + if (errorType === "authorization_pending") { + await wait(verification.interval); + return waitForAccessToken(request, clientId, clientType, verification); + } + if (errorType === "slow_down") { + await wait(verification.interval + 5); + return waitForAccessToken(request, clientId, clientType, verification); + } + throw error; + } +} + +async function auth(state, authOptions) { + return getOAuthAccessToken(state, { + auth: authOptions, + }); +} + +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); + // Do not intercept request to retrieve codes or token + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + const { token } = await getOAuthAccessToken(state, { + request, + auth: { type: "oauth" }, + }); + endpoint.headers.authorization = `token ${token}`; + return request(endpoint); +} + +const VERSION = "4.0.4"; + +function createOAuthDeviceAuth(options) { + const requestWithDefaults = options.request || + request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`, + }, + }); + const { request: request$1 = requestWithDefaults, ...otherOptions } = options; + const state = options.clientType === "github-app" + ? { + ...otherOptions, + clientType: "github-app", + request: request$1, + } + : { + ...otherOptions, + clientType: "oauth-app", + request: request$1, + scopes: options.scopes || [], + }; + if (!options.clientId) { + throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + if (!options.onVerification) { + throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯ + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state), + }); +} + +export { createOAuthDeviceAuth }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map new file mode 100644 index 0000000..17ab110 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { createDeviceCode, exchangeDeviceCode } from \"@octokit/oauth-methods\";\nexport async function getOAuthAccessToken(state, options) {\n const cachedAuthentication = getCachedAuthentication(state, options.auth);\n if (cachedAuthentication)\n return cachedAuthentication;\n // Step 1: Request device and user codes\n // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github\n const { data: verification } = await createDeviceCode({\n clientType: state.clientType,\n clientId: state.clientId,\n request: options.request || state.request,\n // @ts-expect-error the extra code to make TS happy is not worth it\n scopes: options.auth.scopes || state.scopes,\n });\n // Step 2: User must enter the user code on https://github.com/login/device\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser\n await state.onVerification(verification);\n // Step 3: Exchange device code for access token\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device\n const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);\n state.authentication = authentication;\n return authentication;\n}\nfunction getCachedAuthentication(state, auth) {\n if (auth.refresh === true)\n return false;\n if (!state.authentication)\n return false;\n if (state.clientType === \"github-app\") {\n return state.authentication;\n }\n const authentication = state.authentication;\n const newScope = ((\"scopes\" in auth && auth.scopes) || state.scopes).join(\" \");\n const currentScope = authentication.scopes.join(\" \");\n return newScope === currentScope ? authentication : false;\n}\nasync function wait(seconds) {\n await new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n}\nasync function waitForAccessToken(request, clientId, clientType, verification) {\n try {\n const options = {\n clientId,\n request,\n code: verification.device_code,\n };\n // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME\n const { authentication } = clientType === \"oauth-app\"\n ? await exchangeDeviceCode({\n ...options,\n clientType: \"oauth-app\",\n })\n : await exchangeDeviceCode({\n ...options,\n clientType: \"github-app\",\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n catch (error) {\n // istanbul ignore if\n // @ts-ignore\n if (!error.response)\n throw error;\n // @ts-ignore\n const errorType = error.response.data.error;\n if (errorType === \"authorization_pending\") {\n await wait(verification.interval);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n if (errorType === \"slow_down\") {\n await wait(verification.interval + 5);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n throw error;\n }\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n return getOAuthAccessToken(state, {\n auth: authOptions,\n });\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve codes or token\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n const { token } = await getOAuthAccessToken(state, {\n request,\n auth: { type: \"oauth\" },\n });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"4.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport function createOAuthDeviceAuth(options) {\n const requestWithDefaults = options.request ||\n octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const { request = requestWithDefaults, ...otherOptions } = options;\n const state = options.clientType === \"github-app\"\n ? {\n ...otherOptions,\n clientType: \"github-app\",\n request,\n }\n : {\n ...otherOptions,\n clientType: \"oauth-app\",\n request,\n scopes: options.scopes || [],\n };\n if (!options.clientId) {\n throw new Error('[@octokit/auth-oauth-device] \"clientId\" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n if (!options.onVerification) {\n throw new Error('[@octokit/auth-oauth-device] \"onVerification\" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n // @ts-ignore too much for tsc / ts-jest ¯\\_(ツ)_/¯\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["octokitRequest","request"],"mappings":";;;;AACO,eAAe,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1D,IAAI,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9E,IAAI,IAAI,oBAAoB;AAC5B,QAAQ,OAAO,oBAAoB,CAAC;AACpC;AACA;AACA,IAAI,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,MAAM,gBAAgB,CAAC;AAC1D,QAAQ,UAAU,EAAE,KAAK,CAAC,UAAU;AACpC,QAAQ,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAChC,QAAQ,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO;AACjD;AACA,QAAQ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM;AACnD,KAAK,CAAC,CAAC;AACP;AACA;AACA,IAAI,MAAM,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;AAC7C;AACA;AACA,IAAI,MAAM,cAAc,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AACtI,IAAI,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;AAC1C,IAAI,OAAO,cAAc,CAAC;AAC1B,CAAC;AACD,SAAS,uBAAuB,CAAC,KAAK,EAAE,IAAI,EAAE;AAC9C,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI;AAC7B,QAAQ,OAAO,KAAK,CAAC;AACrB,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc;AAC7B,QAAQ,OAAO,KAAK,CAAC;AACrB,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,YAAY,EAAE;AAC3C,QAAQ,OAAO,KAAK,CAAC,cAAc,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;AAChD,IAAI,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACnF,IAAI,MAAM,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzD,IAAI,OAAO,QAAQ,KAAK,YAAY,GAAG,cAAc,GAAG,KAAK,CAAC;AAC9D,CAAC;AACD,eAAe,IAAI,CAAC,OAAO,EAAE;AAC7B,IAAI,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;AACxE,CAAC;AACD,eAAe,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE;AAC/E,IAAI,IAAI;AACR,QAAQ,MAAM,OAAO,GAAG;AACxB,YAAY,QAAQ;AACpB,YAAY,OAAO;AACnB,YAAY,IAAI,EAAE,YAAY,CAAC,WAAW;AAC1C,SAAS,CAAC;AACV;AACA,QAAQ,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,KAAK,WAAW;AAC7D,cAAc,MAAM,kBAAkB,CAAC;AACvC,gBAAgB,GAAG,OAAO;AAC1B,gBAAgB,UAAU,EAAE,WAAW;AACvC,aAAa,CAAC;AACd,cAAc,MAAM,kBAAkB,CAAC;AACvC,gBAAgB,GAAG,OAAO;AAC1B,gBAAgB,UAAU,EAAE,YAAY;AACxC,aAAa,CAAC,CAAC;AACf,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,OAAO;AACzB,YAAY,SAAS,EAAE,OAAO;AAC9B,YAAY,GAAG,cAAc;AAC7B,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ;AAC3B,YAAY,MAAM,KAAK,CAAC;AACxB;AACA,QAAQ,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;AACpD,QAAQ,IAAI,SAAS,KAAK,uBAAuB,EAAE;AACnD,YAAY,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC9C,YAAY,OAAO,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AACnF,SAAS;AACT,QAAQ,IAAI,SAAS,KAAK,WAAW,EAAE;AACvC,YAAY,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;AAClD,YAAY,OAAO,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AACnF,SAAS;AACT,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL;;AC9EO,eAAe,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;AAC/C,IAAI,OAAO,mBAAmB,CAAC,KAAK,EAAE;AACtC,QAAQ,IAAI,EAAE,WAAW;AACzB,KAAK,CAAC,CAAC;AACP,CAAC;;ACJM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,8CAA8C,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC3E,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE;AACvD,QAAQ,OAAO;AACf,QAAQ,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;AAC/B,KAAK,CAAC,CAAC;AACP,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACbM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACKpC,SAAS,qBAAqB,CAAC,OAAO,EAAE;AAC/C,IAAI,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO;AAC/C,QAAQA,OAAc,CAAC,QAAQ,CAAC;AAChC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACzF,aAAa;AACb,SAAS,CAAC,CAAC;AACX,IAAI,MAAM,WAAEC,SAAO,GAAG,mBAAmB,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;AACvE,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,KAAK,YAAY;AACrD,UAAU;AACV,YAAY,GAAG,YAAY;AAC3B,YAAY,UAAU,EAAE,YAAY;AACpC,qBAAYA,SAAO;AACnB,SAAS;AACT,UAAU;AACV,YAAY,GAAG,YAAY;AAC3B,YAAY,UAAU,EAAE,WAAW;AACnC,qBAAYA,SAAO;AACnB,YAAY,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;AACxC,SAAS,CAAC;AACV,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;AAC3B,QAAQ,MAAM,IAAI,KAAK,CAAC,oHAAoH,CAAC,CAAC;AAC9I,KAAK;AACL,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;AACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,iIAAiI,CAAC,CAAC;AAC3J,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/package.json new file mode 100644 index 0000000..b7b4a52 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/auth-oauth-device/package.json @@ -0,0 +1,51 @@ +{ + "name": "@octokit/auth-oauth-device", + "description": "GitHub OAuth Device authentication strategy for JavaScript", + "version": "4.0.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "github:octokit/auth-oauth-device.js", + "dependencies": { + "@octokit/oauth-methods": "^2.0.0", + "@octokit/request": "^6.0.0", + "@octokit/types": "^9.0.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/tsconfig": "^1.0.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.2", + "@pika/plugin-build-web": "^0.9.2", + "@pika/plugin-ts-standard-pkg": "^0.9.2", + "@types/jest": "^29.0.0", + "@types/node": "^18.0.0", + "fetch-mock": "^9.11.0", + "jest": "^29.0.0", + "prettier": "2.8.3", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^29.0.0", + "typescript": "^4.2.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/README.md new file mode 100644 index 0000000..82a82a1 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/README.md @@ -0,0 +1,553 @@ +# 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://github.com/octokit/request.js/workflows/Test/badge.svg)](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%3Amain) + +`@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) when the runtime has no native `fetch` API). + + + + + +- [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) +- [Authentication](#authentication) +- [request()](#request) +- [`request.defaults()`](#requestdefaults) +- [`request.endpoint`](#requestendpoint) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter--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: "octokit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"], +}); +``` + +👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) + +😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). + +👍 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). + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from cdn.skypack.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 + +For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) + +```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", +}); +``` + +## Authentication + +The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const requestWithAuth = request.defaults({ + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, +}); +const result = await requestWithAuth("GET /user"); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + appId: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, + mediaType: { + previews: ["machine-man"], + }, +}); + +const { data: app } = await requestWithAuth("GET /app"); +const { data: app } = await requestWithAuth( + "POST /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + title: "Hello from the engine room", + } +); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + **Required**. 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 + + The base URL that route or url will be prefixed with, if they use relative paths. 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 + + 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.log + + object + + Used for internal logging. Defaults to console. +
+ 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. If the request was successful, the promise resolves with an object containing 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 promise is rejected with an `error` object containing 3 keys to help with debugging: + +- `error.status` The http response status code +- `error.request` The request options such as `method`, `url` and `data` +- `error.response` The http response object with `url`, `headers`, and `data` + +If the error is due to an `AbortSignal` being used, the resulting `AbortError` is bubbled up to the caller. + +## `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: + +- [`octokitRequest.endpoint()`](#endpoint) +- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) +- [`octokitRequest.endpoint.merge()`](#endpointdefaults) +- [`octokitRequest.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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-node/index.js new file mode 100644 index 0000000..11ac3f4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,156 @@ +'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 universalUserAgent = require('universal-user-agent'); +var isPlainObject = require('is-plain-object'); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + if (isPlainObject.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 || globalThis.fetch || /* istanbul ignore next */nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)).then(async response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new requestError.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined + }, + request: requestOptions + }); + } + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new requestError.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return getResponseData(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) throw error;else if (error.name === "AbortError") throw error; + throw new requestError.RequestError(error.message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); + +exports.request = request; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-node/index.js.map new file mode 100644 index 0000000..19fd47d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","log","request","console","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","globalThis","nodeFetch","Object","assign","method","redirect","then","keyAndValue","matches","link","match","deprecationLink","pop","warn","sunset","RequestError","statusText","data","undefined","getResponseData","error","toErrorMessage","catch","name","message","contentType","get","test","json","text","getBuffer","errors","map","join","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","parse","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA3B,SAASC,iBAAiB,CAACC,QAAQ,EAAE;EAChD,OAAOA,QAAQ,CAACC,WAAW,EAAE;AACjC;;ACEe,SAASC,YAAY,CAACC,cAAc,EAAE;EACjD,MAAMC,GAAG,GAAGD,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1DD,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1BE,OAAO;EACb,IAAIC,2BAAa,CAACJ,cAAc,CAACK,IAAI,CAAC,IAClCC,KAAK,CAACC,OAAO,CAACP,cAAc,CAACK,IAAI,CAAC,EAAE;IACpCL,cAAc,CAACK,IAAI,GAAGG,IAAI,CAACC,SAAS,CAACT,cAAc,CAACK,IAAI,CAAC;;EAE7D,IAAIK,OAAO,GAAG,EAAE;EAChB,IAAIC,MAAM;EACV,IAAIC,GAAG;EACP,MAAMC,KAAK,GAAIb,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACW,KAAK,IACjEC,UAAU,CAACD,KAAK,8BACWE,SAAS;EACxC,OAAOF,KAAK,CAACb,cAAc,CAACY,GAAG,EAAEI,MAAM,CAACC,MAAM,CAAC;IAC3CC,MAAM,EAAElB,cAAc,CAACkB,MAAM;IAC7Bb,IAAI,EAAEL,cAAc,CAACK,IAAI;IACzBK,OAAO,EAAEV,cAAc,CAACU,OAAO;IAC/BS,QAAQ,EAAEnB,cAAc,CAACmB;GAC5B;;;EAGDnB,cAAc,CAACE,OAAO,CAAC,CAAC,CACnBkB,IAAI,CAAC,MAAOvB,QAAQ,IAAK;IAC1Be,GAAG,GAAGf,QAAQ,CAACe,GAAG;IAClBD,MAAM,GAAGd,QAAQ,CAACc,MAAM;IACxB,KAAK,MAAMU,WAAW,IAAIxB,QAAQ,CAACa,OAAO,EAAE;MACxCA,OAAO,CAACW,WAAW,CAAC,CAAC,CAAC,CAAC,GAAGA,WAAW,CAAC,CAAC,CAAC;;IAE5C,IAAI,aAAa,IAAIX,OAAO,EAAE;MAC1B,MAAMY,OAAO,GAAGZ,OAAO,CAACa,IAAI,IAAIb,OAAO,CAACa,IAAI,CAACC,KAAK,CAAC,8BAA8B,CAAC;MAClF,MAAMC,eAAe,GAAGH,OAAO,IAAIA,OAAO,CAACI,GAAG,EAAE;MAChDzB,GAAG,CAAC0B,IAAI,CAAE,uBAAsB3B,cAAc,CAACkB,MAAO,IAAGlB,cAAc,CAACY,GAAI,qDAAoDF,OAAO,CAACkB,MAAO,GAAEH,eAAe,GAAI,SAAQA,eAAgB,EAAC,GAAG,EAAG,EAAC,CAAC;;IAEzM,IAAId,MAAM,KAAK,GAAG,IAAIA,MAAM,KAAK,GAAG,EAAE;MAClC;;;IAGJ,IAAIX,cAAc,CAACkB,MAAM,KAAK,MAAM,EAAE;MAClC,IAAIP,MAAM,GAAG,GAAG,EAAE;QACd;;MAEJ,MAAM,IAAIkB,yBAAY,CAAChC,QAAQ,CAACiC,UAAU,EAAEnB,MAAM,EAAE;QAChDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAEC;SACT;QACD9B,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,KAAK,GAAG,EAAE;MAChB,MAAM,IAAIkB,yBAAY,CAAC,cAAc,EAAElB,MAAM,EAAE;QAC3Cd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAE,MAAME,eAAe,CAACpC,QAAQ;SACvC;QACDK,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,IAAI,GAAG,EAAE;MACf,MAAMoB,IAAI,GAAG,MAAME,eAAe,CAACpC,QAAQ,CAAC;MAC5C,MAAMqC,KAAK,GAAG,IAAIL,yBAAY,CAACM,cAAc,CAACJ,IAAI,CAAC,EAAEpB,MAAM,EAAE;QACzDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB;SACH;QACD7B,OAAO,EAAEF;OACZ,CAAC;MACF,MAAMkC,KAAK;;IAEf,OAAOD,eAAe,CAACpC,QAAQ,CAAC;GACnC,CAAC,CACGuB,IAAI,CAAEW,IAAI,IAAK;IAChB,OAAO;MACHpB,MAAM;MACNC,GAAG;MACHF,OAAO;MACPqB;KACH;GACJ,CAAC,CACGK,KAAK,CAAEF,KAAK,IAAK;IAClB,IAAIA,KAAK,YAAYL,yBAAY,EAC7B,MAAMK,KAAK,CAAC,KACX,IAAIA,KAAK,CAACG,IAAI,KAAK,YAAY,EAChC,MAAMH,KAAK;IACf,MAAM,IAAIL,yBAAY,CAACK,KAAK,CAACI,OAAO,EAAE,GAAG,EAAE;MACvCpC,OAAO,EAAEF;KACZ,CAAC;GACL,CAAC;AACN;AACA,eAAeiC,eAAe,CAACpC,QAAQ,EAAE;EACrC,MAAM0C,WAAW,GAAG1C,QAAQ,CAACa,OAAO,CAAC8B,GAAG,CAAC,cAAc,CAAC;EACxD,IAAI,mBAAmB,CAACC,IAAI,CAACF,WAAW,CAAC,EAAE;IACvC,OAAO1C,QAAQ,CAAC6C,IAAI,EAAE;;EAE1B,IAAI,CAACH,WAAW,IAAI,wBAAwB,CAACE,IAAI,CAACF,WAAW,CAAC,EAAE;IAC5D,OAAO1C,QAAQ,CAAC8C,IAAI,EAAE;;EAE1B,OAAOC,iBAAS,CAAC/C,QAAQ,CAAC;AAC9B;AACA,SAASsC,cAAc,CAACJ,IAAI,EAAE;EAC1B,IAAI,OAAOA,IAAI,KAAK,QAAQ,EACxB,OAAOA,IAAI;;EAEf,IAAI,SAAS,IAAIA,IAAI,EAAE;IACnB,IAAIzB,KAAK,CAACC,OAAO,CAACwB,IAAI,CAACc,MAAM,CAAC,EAAE;MAC5B,OAAQ,GAAEd,IAAI,CAACO,OAAQ,KAAIP,IAAI,CAACc,MAAM,CAACC,GAAG,CAACtC,IAAI,CAACC,SAAS,CAAC,CAACsC,IAAI,CAAC,IAAI,CAAE,EAAC;;IAE3E,OAAOhB,IAAI,CAACO,OAAO;;;EAGvB,OAAQ,kBAAiB9B,IAAI,CAACC,SAAS,CAACsB,IAAI,CAAE,EAAC;AACnD;;ACzHe,SAASiB,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EAC3D,MAAMC,QAAQ,GAAGF,WAAW,CAACG,QAAQ,CAACF,WAAW,CAAC;EAClD,MAAMG,MAAM,GAAG,UAAUC,KAAK,EAAEC,UAAU,EAAE;IACxC,MAAMC,eAAe,GAAGL,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;IACzD,IAAI,CAACC,eAAe,CAACtD,OAAO,IAAI,CAACsD,eAAe,CAACtD,OAAO,CAACwD,IAAI,EAAE;MAC3D,OAAO3D,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACH,eAAe,CAAC,CAAC;;IAExD,MAAMtD,OAAO,GAAG,CAACoD,KAAK,EAAEC,UAAU,KAAK;MACnC,OAAOxD,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACR,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC,CAAC,CAAC;KACzE;IACDvC,MAAM,CAACC,MAAM,CAACf,OAAO,EAAE;MACnBiD,QAAQ;MACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;KAC7C,CAAC;IACF,OAAOK,eAAe,CAACtD,OAAO,CAACwD,IAAI,CAACxD,OAAO,EAAEsD,eAAe,CAAC;GAChE;EACD,OAAOxC,MAAM,CAACC,MAAM,CAACoC,MAAM,EAAE;IACzBF,QAAQ;IACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;GAC7C,CAAC;AACN;;MCjBajD,OAAO,GAAG8C,YAAY,CAACG,iBAAQ,EAAE;EAC1CzC,OAAO,EAAE;IACL,YAAY,EAAG,sBAAqBf,OAAQ,IAAGkE,+BAAY,EAAG;;AAEtE,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 0000000..223307a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,123 @@ +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) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/get-buffer-response.js new file mode 100644 index 0000000..845a394 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 0000000..2460e99 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 0000000..4b40fe8 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 0000000..e206429 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 0000000..4901c79 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,11 @@ +import { EndpointInterface } from "@octokit/types"; +export default function fetchWrapper(requestOptions: ReturnType & { + redirect?: "error" | "follow" | "manual"; +}): Promise<{ + status: number; + url: string; + headers: { + [header: string]: string; + }; + data: any; +}>; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts new file mode 100644 index 0000000..915b705 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 0000000..1030809 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("@octokit/types").RequestInterface; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 0000000..b45decc --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..0080469 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types"; +export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-web/index.js new file mode 100644 index 0000000..bf549a4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,162 @@ +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 = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +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 }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-web/index.js.map new file mode 100644 index 0000000..b2d1f15 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA3B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACpD,IAAI,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;AACrD,IAAI,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG;AACpE,UAAU,cAAc,CAAC,OAAO,CAAC,GAAG;AACpC,UAAU,OAAO,CAAC;AAClB,IAAI,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;AAC1C,QAAQ,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK;AACL,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK;AACzE,QAAQ,UAAU,CAAC,KAAK;AACxB,mCAAmC,SAAS,CAAC;AAC7C,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACnD,QAAQ,MAAM,EAAE,cAAc,CAAC,MAAM;AACrC,QAAQ,IAAI,EAAE,cAAc,CAAC,IAAI;AACjC,QAAQ,OAAO,EAAE,cAAc,CAAC,OAAO;AACvC,QAAQ,QAAQ,EAAE,cAAc,CAAC,QAAQ;AACzC,KAAK;AACL;AACA;AACA,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC5B,SAAS,IAAI,CAAC,OAAO,QAAQ,KAAK;AAClC,QAAQ,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC3B,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,QAAQ,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;AACpD,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,aAAa,IAAI,OAAO,EAAE;AACtC,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC/F,YAAY,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7D,YAAY,GAAG,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,kDAAkD,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClN,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;AAC9C,YAAY,OAAO;AACnB,SAAS;AACT;AACA,QAAQ,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9C,YAAY,IAAI,MAAM,GAAG,GAAG,EAAE;AAC9B,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;AAChE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,SAAS;AACnC,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;AAC3D,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,MAAM,eAAe,CAAC,QAAQ,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE;AAC3B,YAAY,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;AACzE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI;AACxB,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzC,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK;AACxB,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,GAAG;AACf,YAAY,OAAO;AACnB,YAAY,IAAI;AAChB,SAAS,CAAC;AACV,KAAK,CAAC;AACN,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1B,QAAQ,IAAI,KAAK,YAAY,YAAY;AACzC,YAAY,MAAM,KAAK,CAAC;AACxB,aAAa,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;AAC5C,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;AACnD,YAAY,OAAO,EAAE,cAAc;AACnC,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;AACD,eAAe,eAAe,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC7D,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AAC/C,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACpE,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AACD,SAAS,cAAc,CAAC,IAAI,EAAE;AAC9B,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AAChC,QAAQ,OAAO,IAAI,CAAC;AACpB;AACA,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE;AAC3B,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACxC,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpF,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL;AACA,IAAI,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;;ACzHc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACvD,IAAI,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;AAChD,QAAQ,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;AACvE,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;AAC/C,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AAC/B,YAAY,QAAQ;AACpB,YAAY,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACtE,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,CAAC;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/package.json new file mode 100644 index 0000000..53910ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/package.json @@ -0,0 +1,58 @@ +{ + "name": "@octokit/request", + "description": "Send parameterized requests to GitHub's APIs with sensible defaults in browsers and Node", + "version": "6.2.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "repository": "github:octokit/request.js", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/auth-app": "^4.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^29.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^18.0.0", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^9.3.1", + "jest": "^29.0.0", + "lolex": "^6.0.0", + "prettier": "2.8.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "string-to-arraybuffer": "^1.0.2", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/package.json new file mode 100644 index 0000000..57e6073 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/auth-oauth-user/package.json @@ -0,0 +1,57 @@ +{ + "name": "@octokit/auth-oauth-user", + "description": "Octokit authentication strategy for OAuth clients", + "version": "2.1.1", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "https://github.com/octokit/auth-oauth-user.js", + "dependencies": { + "@octokit/auth-oauth-device": "^4.0.0", + "@octokit/oauth-methods": "^2.0.0", + "@octokit/request": "^6.0.0", + "@octokit/types": "^9.0.0", + "btoa-lite": "^1.0.0", + "universal-user-agent": "^6.0.0" + }, + "peerDependencies": {}, + "devDependencies": { + "@octokit/core": "^4.0.0", + "@octokit/tsconfig": "^1.0.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.2", + "@pika/plugin-build-web": "^0.9.2", + "@pika/plugin-ts-standard-pkg": "^0.9.2", + "@types/btoa-lite": "^1.0.0", + "@types/jest": "^29.0.0", + "@types/node": "^18.0.0", + "fetch-mock": "^9.11.0", + "jest": "^29.0.0", + "mockdate": "^3.0.4", + "prettier": "2.8.3", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^29.0.0", + "typescript": "^4.2.3" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/README.md new file mode 100644 index 0000000..343c456 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/README.md @@ -0,0 +1,71 @@ +# 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://github.com/octokit/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit/request-error.js/actions?query=workflow%3ATest) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.skypack.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, { + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz", + }, + headers: { + authorization: "token secret123", + }, + }, + response: { + status: 500, + url: "https://api.github.com/foo", + headers: { + "x-github-request-id": "1:2:3:4", + }, + data: { + foo: "bar", + }, + }, +}); + +error.message; // Oops +error.status; // 500 +error.request; // { method, url, headers, body } +error.response; // { url, status, headers, data } +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-node/index.js new file mode 100644 index 0000000..c676580 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,65 @@ +'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 logOnceCode = once(deprecation => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + } + }); + } +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-node/index.js.map new file mode 100644 index 0000000..5381b78 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":["logOnceCode","once","deprecation","console","warn","logOnceHeaders","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","headers","response","requestCopy","Object","assign","request","authorization","replace","url","defineProperty","get","Deprecation"],"mappings":";;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACpE,MAAMG,cAAc,GAAGJ,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACvE;AACA;AACA;AACO,MAAMI,YAAY,SAASC,KAAK,CAAC;EACpCC,WAAW,CAACC,OAAO,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACtC,KAAK,CAACF,OAAO,CAAC;;;IAGd,IAAIF,KAAK,CAACK,iBAAiB,EAAE;MACzBL,KAAK,CAACK,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAACJ,WAAW,CAAC;;IAEnD,IAAI,CAACK,IAAI,GAAG,WAAW;IACvB,IAAI,CAACC,MAAM,GAAGJ,UAAU;IACxB,IAAIK,OAAO;IACX,IAAI,SAAS,IAAIJ,OAAO,IAAI,OAAOA,OAAO,CAACI,OAAO,KAAK,WAAW,EAAE;MAChEA,OAAO,GAAGJ,OAAO,CAACI,OAAO;;IAE7B,IAAI,UAAU,IAAIJ,OAAO,EAAE;MACvB,IAAI,CAACK,QAAQ,GAAGL,OAAO,CAACK,QAAQ;MAChCD,OAAO,GAAGJ,OAAO,CAACK,QAAQ,CAACD,OAAO;;;IAGtC,MAAME,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAAC;IACtD,IAAIT,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,EAAE;MACvCJ,WAAW,CAACF,OAAO,GAAGG,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAACL,OAAO,EAAE;QAC7DM,aAAa,EAAEV,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,CAACC,OAAO,CAAC,MAAM,EAAE,aAAa;OACrF,CAAC;;IAENL,WAAW,CAACM,GAAG,GAAGN,WAAW,CAACM;;;KAGzBD,OAAO,CAAC,sBAAsB,EAAE,0BAA0B;;;KAG1DA,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;IAC9D,IAAI,CAACF,OAAO,GAAGH,WAAW;;IAE1BC,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;MAChCC,GAAG,GAAG;QACFzB,WAAW,CAAC,IAAI0B,uBAAW,CAAC,0EAA0E,CAAC,CAAC;QACxG,OAAOhB,UAAU;;KAExB,CAAC;IACFQ,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;MACnCC,GAAG,GAAG;QACFpB,cAAc,CAAC,IAAIqB,uBAAW,CAAC,uFAAuF,CAAC,CAAC;QACxH,OAAOX,OAAO,IAAI,EAAE;;KAE3B,CAAC;;AAEV;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 0000000..5eb1927 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,55 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 0000000..d6e089c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,33 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +import { 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; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + /** + * error response headers + * + * @deprecated `error.headers` is deprecated in favor of `error.response.headers` + */ + headers: ResponseHeaders; + /** + * Response object if a response was received + */ + response?: OctokitResponse; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 0000000..e5e1fab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,9 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +export type RequestErrorOptions = { + /** @deprecated set `response` instead */ + headers?: ResponseHeaders; + request: RequestOptions; +} | { + response: OctokitResponse; + request: RequestOptions; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-web/index.js new file mode 100644 index 0000000..0fb64be --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,59 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} + +export { RequestError }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-web/index.js.map new file mode 100644 index 0000000..78f677f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACxE;AACA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;AAC9C,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;AAChC,QAAQ,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;AACjC,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW,EAAE;AAC5E,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,SAAS;AACT,QAAQ,IAAI,UAAU,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAC7C,YAAY,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/C,SAAS;AACT;AACA,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/D,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;AACnD,YAAY,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;AAC7E,gBAAgB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;AACnG,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;AACzC;AACA;AACA,aAAa,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AACxE;AACA;AACA,aAAa,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;AACvE,QAAQ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AACnC;AACA,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,YAAY,GAAG,GAAG;AAClB,gBAAgB,WAAW,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;AACzH,gBAAgB,OAAO,UAAU,CAAC;AAClC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;AAC/C,YAAY,GAAG,GAAG;AAClB,gBAAgB,cAAc,CAAC,IAAI,WAAW,CAAC,uFAAuF,CAAC,CAAC,CAAC;AACzI,gBAAgB,OAAO,OAAO,IAAI,EAAE,CAAC;AACrC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/package.json new file mode 100644 index 0000000..2215caa --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request-error/package.json @@ -0,0 +1,49 @@ +{ + "name": "@octokit/request-error", + "description": "Error class for Octokit request errors", + "version": "3.0.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "repository": "github:octokit/request-error.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-bundle-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "@types/node": "^18.0.0", + "@types/once": "^1.4.0", + "jest": "^29.0.0", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "2.8.3", + "ts-jest": "^29.0.0", + "typescript": "^4.0.0" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/package.json new file mode 100644 index 0000000..b484d79 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/auth-oauth-app/package.json @@ -0,0 +1,51 @@ +{ + "name": "@octokit/auth-oauth-app", + "description": "GitHub OAuth App authentication for JavaScript", + "version": "4.3.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "octokit", + "authentication", + "oauth", + "api" + ], + "repository": "github:octokit/auth-oauth-app.js", + "dependencies": { + "@octokit/auth-oauth-device": "^3.1.1", + "@octokit/auth-oauth-user": "^2.0.0", + "@octokit/request": "^5.6.3", + "@octokit/types": "^6.0.3", + "@types/btoa-lite": "^1.0.0", + "btoa-lite": "^1.0.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/core": "^4.0.0", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^27.0.0", + "fetch-mock": "^9.0.0", + "jest": "^27.0.0", + "prettier": "2.7.1", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.0" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/README.md new file mode 100644 index 0000000..c7b5232 --- /dev/null +++ b/node_modules/@octokit/auth-app/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://github.com/octokit/endpoint.js/workflows/Test/badge.svg)](https://github.com/octokit/endpoint.js/actions/workflows/test.yml?query=branch%3Amain) + +`@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(route, options)` or `endpoint(options)`](#endpointroute-options-or-endpointoptions) + - [`endpoint.defaults()`](#endpointdefaults) + - [`endpoint.DEFAULTS`](#endpointdefaults) + - [`endpoint.merge(route, options)` or `endpoint.merge(options)`](#endpointmergeroute-options-or-endpointmergeoptions) + - [`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.skypack.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 common 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/auth-app/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-node/index.js new file mode 100644 index 0000000..ef51e39 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-node/index.js @@ -0,0 +1,348 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var isPlainObject = require('is-plain-object'); +var universalUserAgent = 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 mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject.isPlainObject(options[key])) { + if (!(key in defaults)) Object.assign(result, { + [key]: options[key] + });else result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { + [key]: options[key] + }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map(name => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], + result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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 = "7.0.4"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; + +const endpoint = withDefaults(null, DEFAULTS); + +exports.endpoint = endpoint; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-node/index.js.map new file mode 100644 index 0000000..10e5ff9 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","removeUndefinedProperties","obj","undefined","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequest","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;AAAO,SAASA,aAAa,CAACC,MAAM,EAAE;EAClC,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,EAAE;;EAEb,OAAOC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,MAAM,CAAC,CAACC,MAAM,EAAEC,GAAG,KAAK;IAC/CD,MAAM,CAACC,GAAG,CAACC,WAAW,EAAE,CAAC,GAAGN,MAAM,CAACK,GAAG,CAAC;IACvC,OAAOD,MAAM;GAChB,EAAE,EAAE,CAAC;AACV;;ACPO,SAASG,SAAS,CAACC,QAAQ,EAAEC,OAAO,EAAE;EACzC,MAAMC,MAAM,GAAGT,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEH,QAAQ,CAAC;EAC1CP,MAAM,CAACC,IAAI,CAACO,OAAO,CAAC,CAACG,OAAO,CAAEP,GAAG,IAAK;IAClC,IAAIQ,2BAAa,CAACJ,OAAO,CAACJ,GAAG,CAAC,CAAC,EAAE;MAC7B,IAAI,EAAEA,GAAG,IAAIG,QAAQ,CAAC,EAClBP,MAAM,CAACU,MAAM,CAACD,MAAM,EAAE;QAAE,CAACL,GAAG,GAAGI,OAAO,CAACJ,GAAG;OAAG,CAAC,CAAC,KAE/CK,MAAM,CAACL,GAAG,CAAC,GAAGE,SAAS,CAACC,QAAQ,CAACH,GAAG,CAAC,EAAEI,OAAO,CAACJ,GAAG,CAAC,CAAC;KAC3D,MACI;MACDJ,MAAM,CAACU,MAAM,CAACD,MAAM,EAAE;QAAE,CAACL,GAAG,GAAGI,OAAO,CAACJ,GAAG;OAAG,CAAC;;GAErD,CAAC;EACF,OAAOK,MAAM;AACjB;;ACfO,SAASI,yBAAyB,CAACC,GAAG,EAAE;EAC3C,KAAK,MAAMV,GAAG,IAAIU,GAAG,EAAE;IACnB,IAAIA,GAAG,CAACV,GAAG,CAAC,KAAKW,SAAS,EAAE;MACxB,OAAOD,GAAG,CAACV,GAAG,CAAC;;;EAGvB,OAAOU,GAAG;AACd;;ACJO,SAASE,KAAK,CAACT,QAAQ,EAAEU,KAAK,EAAET,OAAO,EAAE;EAC5C,IAAI,OAAOS,KAAK,KAAK,QAAQ,EAAE;IAC3B,IAAI,CAACC,MAAM,EAAEC,GAAG,CAAC,GAAGF,KAAK,CAACG,KAAK,CAAC,GAAG,CAAC;IACpCZ,OAAO,GAAGR,MAAM,CAACU,MAAM,CAACS,GAAG,GAAG;MAAED,MAAM;MAAEC;KAAK,GAAG;MAAEA,GAAG,EAAED;KAAQ,EAAEV,OAAO,CAAC;GAC5E,MACI;IACDA,OAAO,GAAGR,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEO,KAAK,CAAC;;;EAGtCT,OAAO,CAACa,OAAO,GAAGvB,aAAa,CAACU,OAAO,CAACa,OAAO,CAAC;;EAEhDR,yBAAyB,CAACL,OAAO,CAAC;EAClCK,yBAAyB,CAACL,OAAO,CAACa,OAAO,CAAC;EAC1C,MAAMC,aAAa,GAAGhB,SAAS,CAACC,QAAQ,IAAI,EAAE,EAAEC,OAAO,CAAC;;EAExD,IAAID,QAAQ,IAAIA,QAAQ,CAACgB,SAAS,CAACC,QAAQ,CAACC,MAAM,EAAE;IAChDH,aAAa,CAACC,SAAS,CAACC,QAAQ,GAAGjB,QAAQ,CAACgB,SAAS,CAACC,QAAQ,CACzDE,MAAM,CAAEC,OAAO,IAAK,CAACL,aAAa,CAACC,SAAS,CAACC,QAAQ,CAACI,QAAQ,CAACD,OAAO,CAAC,CAAC,CACxEE,MAAM,CAACP,aAAa,CAACC,SAAS,CAACC,QAAQ,CAAC;;EAEjDF,aAAa,CAACC,SAAS,CAACC,QAAQ,GAAGF,aAAa,CAACC,SAAS,CAACC,QAAQ,CAACM,GAAG,CAAEH,OAAO,IAAKA,OAAO,CAACI,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;EACrH,OAAOT,aAAa;AACxB;;ACzBO,SAASU,kBAAkB,CAACb,GAAG,EAAEc,UAAU,EAAE;EAChD,MAAMC,SAAS,GAAG,IAAI,CAACC,IAAI,CAAChB,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;EAC5C,MAAMiB,KAAK,GAAGpC,MAAM,CAACC,IAAI,CAACgC,UAAU,CAAC;EACrC,IAAIG,KAAK,CAACX,MAAM,KAAK,CAAC,EAAE;IACpB,OAAON,GAAG;;EAEd,OAAQA,GAAG,GACPe,SAAS,GACTE,KAAK,CACAN,GAAG,CAAEO,IAAI,IAAK;IACf,IAAIA,IAAI,KAAK,GAAG,EAAE;MACd,OAAQ,IAAI,GAAGJ,UAAU,CAACK,CAAC,CAAClB,KAAK,CAAC,GAAG,CAAC,CAACU,GAAG,CAACS,kBAAkB,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;;IAE5E,OAAQ,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAI,CAAC,CAAE,EAAC;GAC3D,CAAC,CACGG,IAAI,CAAC,GAAG,CAAC;AACtB;;AChBA,MAAMC,gBAAgB,GAAG,YAAY;AACrC,SAASC,cAAc,CAACC,YAAY,EAAE;EAClC,OAAOA,YAAY,CAACZ,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAACX,KAAK,CAAC,GAAG,CAAC;AAC5D;AACA,AAAO,SAASwB,uBAAuB,CAACzB,GAAG,EAAE;EACzC,MAAM0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAK,CAACL,gBAAgB,CAAC;EAC3C,IAAI,CAACI,OAAO,EAAE;IACV,OAAO,EAAE;;EAEb,OAAOA,OAAO,CAACf,GAAG,CAACY,cAAc,CAAC,CAACxC,MAAM,CAAC,CAAC6C,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAAClB,MAAM,CAACmB,CAAC,CAAC,EAAE,EAAE,CAAC;AACxE;;ACVO,SAASC,IAAI,CAAClD,MAAM,EAAEmD,UAAU,EAAE;EACrC,OAAOlD,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CACrB2B,MAAM,CAAEyB,MAAM,IAAK,CAACD,UAAU,CAACtB,QAAQ,CAACuB,MAAM,CAAC,CAAC,CAChDjD,MAAM,CAAC,CAACY,GAAG,EAAEV,GAAG,KAAK;IACtBU,GAAG,CAACV,GAAG,CAAC,GAAGL,MAAM,CAACK,GAAG,CAAC;IACtB,OAAOU,GAAG;GACb,EAAE,EAAE,CAAC;AACV;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASsC,cAAc,CAACC,GAAG,EAAE;EACzB,OAAOA,GAAG,CACLjC,KAAK,CAAC,oBAAoB,CAAC,CAC3BU,GAAG,CAAC,UAAUwB,IAAI,EAAE;IACrB,IAAI,CAAC,cAAc,CAACnB,IAAI,CAACmB,IAAI,CAAC,EAAE;MAC5BA,IAAI,GAAGC,SAAS,CAACD,IAAI,CAAC,CAACvB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;;IAEpE,OAAOuB,IAAI;GACd,CAAC,CACGd,IAAI,CAAC,EAAE,CAAC;AACjB;AACA,SAASgB,gBAAgB,CAACH,GAAG,EAAE;EAC3B,OAAOd,kBAAkB,CAACc,GAAG,CAAC,CAACtB,OAAO,CAAC,UAAU,EAAE,UAAU0B,CAAC,EAAE;IAC5D,OAAO,GAAG,GAAGA,CAAC,CAACC,UAAU,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,WAAW,EAAE;GAC1D,CAAC;AACN;AACA,SAASC,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAE3D,GAAG,EAAE;EACvC2D,KAAK,GACDD,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,GAC9BV,cAAc,CAACW,KAAK,CAAC,GACrBP,gBAAgB,CAACO,KAAK,CAAC;EACjC,IAAI3D,GAAG,EAAE;IACL,OAAOoD,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,GAAG2D,KAAK;GAC7C,MACI;IACD,OAAOA,KAAK;;AAEpB;AACA,SAASC,SAAS,CAACD,KAAK,EAAE;EACtB,OAAOA,KAAK,KAAKhD,SAAS,IAAIgD,KAAK,KAAK,IAAI;AAChD;AACA,SAASE,aAAa,CAACH,QAAQ,EAAE;EAC7B,OAAOA,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG;AACnE;AACA,SAASI,SAAS,CAACC,OAAO,EAAEL,QAAQ,EAAE1D,GAAG,EAAEgE,QAAQ,EAAE;EACjD,IAAIL,KAAK,GAAGI,OAAO,CAAC/D,GAAG,CAAC;IAAEK,MAAM,GAAG,EAAE;EACrC,IAAIuD,SAAS,CAACD,KAAK,CAAC,IAAIA,KAAK,KAAK,EAAE,EAAE;IAClC,IAAI,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,SAAS,EAAE;MAC5BA,KAAK,GAAGA,KAAK,CAACJ,QAAQ,EAAE;MACxB,IAAIS,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;QAC9BL,KAAK,GAAGA,KAAK,CAACM,SAAS,CAAC,CAAC,EAAEC,QAAQ,CAACF,QAAQ,EAAE,EAAE,CAAC,CAAC;;MAEtD3D,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAEE,aAAa,CAACH,QAAQ,CAAC,GAAG1D,GAAG,GAAG,EAAE,CAAC,CAAC;KAChF,MACI;MACD,IAAIgE,QAAQ,KAAK,GAAG,EAAE;QAClB,IAAII,KAAK,CAACC,OAAO,CAACV,KAAK,CAAC,EAAE;UACtBA,KAAK,CAACrC,MAAM,CAACsC,SAAS,CAAC,CAACrD,OAAO,CAAC,UAAUoD,KAAK,EAAE;YAC7CtD,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAEE,aAAa,CAACH,QAAQ,CAAC,GAAG1D,GAAG,GAAG,EAAE,CAAC,CAAC;WAChF,CAAC;SACL,MACI;UACDJ,MAAM,CAACC,IAAI,CAAC8D,KAAK,CAAC,CAACpD,OAAO,CAAC,UAAU+D,CAAC,EAAE;YACpC,IAAIV,SAAS,CAACD,KAAK,CAACW,CAAC,CAAC,CAAC,EAAE;cACrBjE,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAACW,CAAC,CAAC,EAAEA,CAAC,CAAC,CAAC;;WAEtD,CAAC;;OAET,MACI;QACD,MAAMC,GAAG,GAAG,EAAE;QACd,IAAIH,KAAK,CAACC,OAAO,CAACV,KAAK,CAAC,EAAE;UACtBA,KAAK,CAACrC,MAAM,CAACsC,SAAS,CAAC,CAACrD,OAAO,CAAC,UAAUoD,KAAK,EAAE;YAC7CY,GAAG,CAACJ,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAAC,CAAC;WACzC,CAAC;SACL,MACI;UACD/D,MAAM,CAACC,IAAI,CAAC8D,KAAK,CAAC,CAACpD,OAAO,CAAC,UAAU+D,CAAC,EAAE;YACpC,IAAIV,SAAS,CAACD,KAAK,CAACW,CAAC,CAAC,CAAC,EAAE;cACrBC,GAAG,CAACJ,IAAI,CAACf,gBAAgB,CAACkB,CAAC,CAAC,CAAC;cAC7BC,GAAG,CAACJ,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAACW,CAAC,CAAC,CAACf,QAAQ,EAAE,CAAC,CAAC;;WAE3D,CAAC;;QAEN,IAAIM,aAAa,CAACH,QAAQ,CAAC,EAAE;UACzBrD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,GAAGuE,GAAG,CAACnC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC3D,MACI,IAAImC,GAAG,CAAClD,MAAM,KAAK,CAAC,EAAE;UACvBhB,MAAM,CAAC8D,IAAI,CAACI,GAAG,CAACnC,IAAI,CAAC,GAAG,CAAC,CAAC;;;;GAIzC,MACI;IACD,IAAIsB,QAAQ,KAAK,GAAG,EAAE;MAClB,IAAIE,SAAS,CAACD,KAAK,CAAC,EAAE;QAClBtD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,CAAC;;KAEzC,MACI,IAAI2D,KAAK,KAAK,EAAE,KAAKD,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,CAAC,EAAE;MAC7DrD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,CAAC;KAC3C,MACI,IAAI2D,KAAK,KAAK,EAAE,EAAE;MACnBtD,MAAM,CAAC8D,IAAI,CAAC,EAAE,CAAC;;;EAGvB,OAAO9D,MAAM;AACjB;AACA,AAAO,SAASmE,QAAQ,CAACC,QAAQ,EAAE;EAC/B,OAAO;IACHC,MAAM,EAAEA,MAAM,CAACC,IAAI,CAAC,IAAI,EAAEF,QAAQ;GACrC;AACL;AACA,SAASC,MAAM,CAACD,QAAQ,EAAEV,OAAO,EAAE;EAC/B,IAAIa,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;EACnD,OAAOH,QAAQ,CAAC9C,OAAO,CAAC,4BAA4B,EAAE,UAAUkD,CAAC,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACpF,IAAID,UAAU,EAAE;MACZ,IAAIpB,QAAQ,GAAG,EAAE;MACjB,MAAMsB,MAAM,GAAG,EAAE;MACjB,IAAIJ,SAAS,CAACK,OAAO,CAACH,UAAU,CAACI,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;QAChDxB,QAAQ,GAAGoB,UAAU,CAACI,MAAM,CAAC,CAAC,CAAC;QAC/BJ,UAAU,GAAGA,UAAU,CAACK,MAAM,CAAC,CAAC,CAAC;;MAErCL,UAAU,CAAC9D,KAAK,CAAC,IAAI,CAAC,CAACT,OAAO,CAAC,UAAU6E,QAAQ,EAAE;QAC/C,IAAIb,GAAG,GAAG,2BAA2B,CAACc,IAAI,CAACD,QAAQ,CAAC;QACpDJ,MAAM,CAACb,IAAI,CAACL,SAAS,CAACC,OAAO,EAAEL,QAAQ,EAAEa,GAAG,CAAC,CAAC,CAAC,EAAEA,GAAG,CAAC,CAAC,CAAC,IAAIA,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;OACtE,CAAC;MACF,IAAIb,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;QAC9B,IAAI5B,SAAS,GAAG,GAAG;QACnB,IAAI4B,QAAQ,KAAK,GAAG,EAAE;UAClB5B,SAAS,GAAG,GAAG;SAClB,MACI,IAAI4B,QAAQ,KAAK,GAAG,EAAE;UACvB5B,SAAS,GAAG4B,QAAQ;;QAExB,OAAO,CAACsB,MAAM,CAAC3D,MAAM,KAAK,CAAC,GAAGqC,QAAQ,GAAG,EAAE,IAAIsB,MAAM,CAAC5C,IAAI,CAACN,SAAS,CAAC;OACxE,MACI;QACD,OAAOkD,MAAM,CAAC5C,IAAI,CAAC,GAAG,CAAC;;KAE9B,MACI;MACD,OAAOY,cAAc,CAAC+B,OAAO,CAAC;;GAErC,CAAC;AACN;;AC/JO,SAASO,KAAK,CAAClF,OAAO,EAAE;;EAE3B,IAAIU,MAAM,GAAGV,OAAO,CAACU,MAAM,CAAC0C,WAAW,EAAE;;EAEzC,IAAIzC,GAAG,GAAG,CAACX,OAAO,CAACW,GAAG,IAAI,GAAG,EAAEY,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;EAC9D,IAAIV,OAAO,GAAGrB,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEF,OAAO,CAACa,OAAO,CAAC;EAChD,IAAIsE,IAAI;EACR,IAAI1D,UAAU,GAAGgB,IAAI,CAACzC,OAAO,EAAE,CAC3B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,CACd,CAAC;;EAEF,MAAMoF,gBAAgB,GAAGhD,uBAAuB,CAACzB,GAAG,CAAC;EACrDA,GAAG,GAAGyD,QAAQ,CAACzD,GAAG,CAAC,CAAC2D,MAAM,CAAC7C,UAAU,CAAC;EACtC,IAAI,CAAC,OAAO,CAACE,IAAI,CAAChB,GAAG,CAAC,EAAE;IACpBA,GAAG,GAAGX,OAAO,CAACqF,OAAO,GAAG1E,GAAG;;EAE/B,MAAM2E,iBAAiB,GAAG9F,MAAM,CAACC,IAAI,CAACO,OAAO,CAAC,CACzCkB,MAAM,CAAEyB,MAAM,IAAKyC,gBAAgB,CAAChE,QAAQ,CAACuB,MAAM,CAAC,CAAC,CACrDtB,MAAM,CAAC,SAAS,CAAC;EACtB,MAAMkE,mBAAmB,GAAG9C,IAAI,CAAChB,UAAU,EAAE6D,iBAAiB,CAAC;EAC/D,MAAME,eAAe,GAAG,4BAA4B,CAAC7D,IAAI,CAACd,OAAO,CAAC4E,MAAM,CAAC;EACzE,IAAI,CAACD,eAAe,EAAE;IAClB,IAAIxF,OAAO,CAACe,SAAS,CAAC2E,MAAM,EAAE;;MAE1B7E,OAAO,CAAC4E,MAAM,GAAG5E,OAAO,CAAC4E,MAAM,CAC1B7E,KAAK,CAAC,GAAG,CAAC,CACVU,GAAG,CAAEH,OAAO,IAAKA,OAAO,CAACI,OAAO,CAAC,kDAAkD,EAAG,uBAAsBvB,OAAO,CAACe,SAAS,CAAC2E,MAAO,EAAC,CAAC,CAAC,CACxI1D,IAAI,CAAC,GAAG,CAAC;;IAElB,IAAIhC,OAAO,CAACe,SAAS,CAACC,QAAQ,CAACC,MAAM,EAAE;MACnC,MAAM0E,wBAAwB,GAAG9E,OAAO,CAAC4E,MAAM,CAACnD,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE;MAClFzB,OAAO,CAAC4E,MAAM,GAAGE,wBAAwB,CACpCtE,MAAM,CAACrB,OAAO,CAACe,SAAS,CAACC,QAAQ,CAAC,CAClCM,GAAG,CAAEH,OAAO,IAAK;QAClB,MAAMuE,MAAM,GAAG1F,OAAO,CAACe,SAAS,CAAC2E,MAAM,GAChC,IAAG1F,OAAO,CAACe,SAAS,CAAC2E,MAAO,EAAC,GAC9B,OAAO;QACb,OAAQ,0BAAyBvE,OAAQ,WAAUuE,MAAO,EAAC;OAC9D,CAAC,CACG1D,IAAI,CAAC,GAAG,CAAC;;;;;EAKtB,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAACZ,QAAQ,CAACV,MAAM,CAAC,EAAE;IAClCC,GAAG,GAAGa,kBAAkB,CAACb,GAAG,EAAE4E,mBAAmB,CAAC;GACrD,MACI;IACD,IAAI,MAAM,IAAIA,mBAAmB,EAAE;MAC/BJ,IAAI,GAAGI,mBAAmB,CAACK,IAAI;KAClC,MACI;MACD,IAAIpG,MAAM,CAACC,IAAI,CAAC8F,mBAAmB,CAAC,CAACtE,MAAM,EAAE;QACzCkE,IAAI,GAAGI,mBAAmB;;;;;EAKtC,IAAI,CAAC1E,OAAO,CAAC,cAAc,CAAC,IAAI,OAAOsE,IAAI,KAAK,WAAW,EAAE;IACzDtE,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC;;;;EAI/D,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAACO,QAAQ,CAACV,MAAM,CAAC,IAAI,OAAOyE,IAAI,KAAK,WAAW,EAAE;IAClEA,IAAI,GAAG,EAAE;;;EAGb,OAAO3F,MAAM,CAACU,MAAM,CAAC;IAAEQ,MAAM;IAAEC,GAAG;IAAEE;GAAS,EAAE,OAAOsE,IAAI,KAAK,WAAW,GAAG;IAAEA;GAAM,GAAG,IAAI,EAAEnF,OAAO,CAAC6F,OAAO,GAAG;IAAEA,OAAO,EAAE7F,OAAO,CAAC6F;GAAS,GAAG,IAAI,CAAC;AACxJ;;AC3EO,SAASC,oBAAoB,CAAC/F,QAAQ,EAAEU,KAAK,EAAET,OAAO,EAAE;EAC3D,OAAOkF,KAAK,CAAC1E,KAAK,CAACT,QAAQ,EAAEU,KAAK,EAAET,OAAO,CAAC,CAAC;AACjD;;ACDO,SAAS+F,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EACnD,MAAMC,QAAQ,GAAG1F,KAAK,CAACwF,WAAW,EAAEC,WAAW,CAAC;EAChD,MAAME,QAAQ,GAAGL,oBAAoB,CAACvB,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;EAC1D,OAAO1G,MAAM,CAACU,MAAM,CAACiG,QAAQ,EAAE;IAC3BD,QAAQ;IACRnG,QAAQ,EAAEgG,YAAY,CAACxB,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;IAC3C1F,KAAK,EAAEA,KAAK,CAAC+D,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;IACjChB;GACH,CAAC;AACN;;ACZO,MAAMkB,OAAO,GAAG,mBAAmB;;ACE1C,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAC;AACpE;AACA;AACA,AAAO,MAAMJ,QAAQ,GAAG;EACpBxF,MAAM,EAAE,KAAK;EACb2E,OAAO,EAAE,wBAAwB;EACjCxE,OAAO,EAAE;IACL4E,MAAM,EAAE,gCAAgC;IACxC,YAAY,EAAEY;GACjB;EACDtF,SAAS,EAAE;IACP2E,MAAM,EAAE,EAAE;IACV1E,QAAQ,EAAE;;AAElB,CAAC;;MCdYmF,QAAQ,GAAGJ,YAAY,CAAC,IAAI,EAAEG,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/defaults.js new file mode 100644 index 0000000..456e586 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/defaults.js @@ -0,0 +1,17 @@ +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +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/auth-app/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js new file mode 100644 index 0000000..5763758 --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/index.js new file mode 100644 index 0000000..599917f --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/merge.js new file mode 100644 index 0000000..1abcecf --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,26 @@ +import { lowercaseKeys } from "./util/lowercase-keys"; +import { mergeDeep } from "./util/merge-deep"; +import { removeUndefinedProperties } from "./util/remove-undefined-properties"; +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 = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/parse.js new file mode 100644 index 0000000..8cf5885 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/parse.js @@ -0,0 +1,78 @@ +import { addQueryParameters } from "./util/add-query-parameters"; +import { extractUrlVariableNames } from "./util/extract-url-variable-names"; +import { omit } from "./util/omit"; +import { parseUrl } from "./util/url-template"; +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 = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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/auth-app/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js new file mode 100644 index 0000000..d26be31 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,17 @@ +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/auth-app/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js new file mode 100644 index 0000000..3e75db2 --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js new file mode 100644 index 0000000..0780642 --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js new file mode 100644 index 0000000..d92aca3 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js @@ -0,0 +1,16 @@ +import { isPlainObject } from "is-plain-object"; +export function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/omit.js new file mode 100644 index 0000000..6245031 --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js new file mode 100644 index 0000000..6b5ee5f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js @@ -0,0 +1,8 @@ +export function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/url-template.js new file mode 100644 index 0000000..439b3fe --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/util/url-template.js @@ -0,0 +1,164 @@ +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +export function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/version.js new file mode 100644 index 0000000..2d27c3f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "7.0.4"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-src/with-defaults.js new file mode 100644 index 0000000..81baf6c --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/defaults.d.ts new file mode 100644 index 0000000..30fcd20 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults } from "@octokit/types"; +export declare const DEFAULTS: EndpointDefaults; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts new file mode 100644 index 0000000..ff39e5e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts @@ -0,0 +1,3 @@ +import { EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { DEFAULTS } from "./defaults"; +export declare function endpointWithDefaults(defaults: typeof DEFAULTS, route: Route | EndpointOptions, options?: RequestParameters): import("@octokit/types").RequestOptions; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/index.d.ts new file mode 100644 index 0000000..1ede136 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const endpoint: import("@octokit/types").EndpointInterface; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/merge.d.ts new file mode 100644 index 0000000..b75a15e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/merge.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestParameters, Route } from "@octokit/types"; +export declare function merge(defaults: EndpointDefaults | null, route?: Route | RequestParameters, options?: RequestParameters): EndpointDefaults; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/parse.d.ts new file mode 100644 index 0000000..fbe2144 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/parse.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestOptions } from "@octokit/types"; +export declare function parse(options: EndpointDefaults): RequestOptions; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts new file mode 100644 index 0000000..4b192ac --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts new file mode 100644 index 0000000..93586d4 --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts new file mode 100644 index 0000000..1daf307 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts @@ -0,0 +1,5 @@ +export declare function lowercaseKeys(object?: { + [key: string]: any; +}): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts new file mode 100644 index 0000000..914411c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts @@ -0,0 +1 @@ +export declare function mergeDeep(defaults: any, options: any): object; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts new file mode 100644 index 0000000..06927d6 --- /dev/null +++ b/node_modules/@octokit/auth-app/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/auth-app/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts new file mode 100644 index 0000000..92d8d85 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts @@ -0,0 +1 @@ +export declare function removeUndefinedProperties(obj: any): any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts new file mode 100644 index 0000000..5d967ca --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts @@ -0,0 +1,3 @@ +export declare function parseUrl(template: string): { + expand: (context: object) => string; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/version.d.ts new file mode 100644 index 0000000..b9cbe53 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "7.0.4"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..6f5afd1 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestParameters, EndpointDefaults } from "@octokit/types"; +export declare function withDefaults(oldDefaults: EndpointDefaults | null, newDefaults: RequestParameters): EndpointInterface; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-web/index.js new file mode 100644 index 0000000..a31b913 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-web/index.js @@ -0,0 +1,378 @@ +import { isPlainObject } from 'is-plain-object'; +import { getUserAgent } from 'universal-user-agent'; + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } + else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return (url + + separator + + names + .map((name) => { + if (name === "q") { + return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+")); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }) + .join("&")); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object) + .filter((option) => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType", + ]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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 = "7.0.4"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent, + }, + mediaType: { + format: "", + previews: [], + }, +}; + +const endpoint = withDefaults(null, DEFAULTS); + +export { endpoint }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-web/index.js.map new file mode 100644 index 0000000..08201f9 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;AACtC,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AACvD,QAAQ,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAChD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;;ACPO,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;AAC7C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1C,QAAQ,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;AACzC,YAAY,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;AAClC,gBAAgB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/D;AACA,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,SAAS;AACT,aAAa;AACb,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;;ACfM,SAAS,yBAAyB,CAAC,GAAG,EAAE;AAC/C,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AAC3B,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACpC,YAAY,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;ACJM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAChD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7C,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3C,KAAK;AACL;AACA,IAAI,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD;AACA,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,IAAI,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/C,IAAI,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AACxD,QAAQ,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;AACtE,aAAa,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrF,aAAa,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtD,KAAK;AACL,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1H,IAAI,OAAO,aAAa,CAAC;AACzB,CAAC;;ACzBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;AACpD,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AACjD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1C,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK;AAC3B,YAAY,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,gBAAgB,QAAQ,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC1F,aAAa;AACb,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,SAAS,CAAC;AACV,aAAa,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,CAAC;;AChBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,IAAI,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;AAC7C,IAAI,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAChD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;AACzC,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzD,SAAS,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAC9B,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,IAAI,OAAO,GAAG;AACd,SAAS,KAAK,CAAC,oBAAoB,CAAC;AACpC,SAAS,GAAG,CAAC,UAAU,IAAI,EAAE;AAC7B,QAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxC,YAAY,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC7E,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;AACpE,QAAQ,OAAO,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,KAAK,CAAC,CAAC;AACP,CAAC;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;AAC3C,IAAI,KAAK;AACT,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;AAC5C,cAAc,cAAc,CAAC,KAAK,CAAC;AACnC,cAAc,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACtC,IAAI,IAAI,GAAG,EAAE;AACb,QAAQ,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;AACnD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,IAAI,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AACpE,CAAC;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;AACrD,IAAI,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;AAC1C,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1C,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,SAAS,EAAE;AACxC,YAAY,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;AACrC,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AACnE,aAAa;AACb,YAAY,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAC1F,SAAS;AACT,aAAa;AACb,YAAY,IAAI,QAAQ,KAAK,GAAG,EAAE;AAClC,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,aAAa;AACb,iBAAiB;AACjB,gBAAgB,MAAM,GAAG,GAAG,EAAE,CAAC;AAC/B,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,4BAA4B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AACjF,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;AAC7C,oBAAoB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,iBAAiB;AACjB,qBAAqB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3C,oBAAoB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9B,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAClC,gBAAgB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AACnD,aAAa;AACb,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;AACzE,YAAY,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,EAAE;AAC/B,YAAY,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;AACnC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC3C,KAAK,CAAC;AACN,CAAC;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AACnC,IAAI,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;AAC5F,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,QAAQ,GAAG,EAAE,CAAC;AAC9B,YAAY,MAAM,MAAM,GAAG,EAAE,CAAC;AAC9B,YAAY,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;AAChE,gBAAgB,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAChD,gBAAgB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,aAAa;AACb,YAAY,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;AAC/D,gBAAgB,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,gBAAgB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,aAAa,CAAC,CAAC;AACf,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,IAAI,SAAS,GAAG,GAAG,CAAC;AACpC,gBAAgB,IAAI,QAAQ,KAAK,GAAG,EAAE;AACtC,oBAAoB,SAAS,GAAG,GAAG,CAAC;AACpC,iBAAiB;AACjB,qBAAqB,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC3C,oBAAoB,SAAS,GAAG,QAAQ,CAAC;AACzC,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtF,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AAC3C,SAAS;AACT,KAAK,CAAC,CAAC;AACP,CAAC;;AC/JM,SAAS,KAAK,CAAC,OAAO,EAAE;AAC/B;AACA,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;AAC9C;AACA,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACnE,IAAI,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD,IAAI,IAAI,IAAI,CAAC;AACb,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;AAC1D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5B,QAAQ,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AAClD,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9D,SAAS,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,IAAI,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AACpE,IAAI,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;AACtC;AACA,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAC3C,iBAAiB,KAAK,CAAC,GAAG,CAAC;AAC3B,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzJ,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC/C,YAAY,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/F,YAAY,OAAO,CAAC,MAAM,GAAG,wBAAwB;AACrD,iBAAiB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;AACnD,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK;AAClC,gBAAgB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;AACvD,sBAAsB,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACpD,sBAAsB,OAAO,CAAC;AAC9B,gBAAgB,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,aAAa,CAAC;AACd,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC1C,QAAQ,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAC3D,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,mBAAmB,EAAE;AAC3C,YAAY,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;AAC5C,SAAS;AACT,aAAa;AACb,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;AACzD,gBAAgB,IAAI,GAAG,mBAAmB,CAAC;AAC3C,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AACjE,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AACpE,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AAC1E,QAAQ,IAAI,GAAG,EAAE,CAAC;AAClB,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzJ,CAAC;;AC3EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAC/D,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AACvD,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/D,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACzC,QAAQ,KAAK;AACb,KAAK,CAAC,CAAC;AACP,CAAC;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AACrE;AACA;AACA,AAAO,MAAM,QAAQ,GAAG;AACxB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,OAAO,EAAE;AACb,QAAQ,MAAM,EAAE,gCAAgC;AAChD,QAAQ,YAAY,EAAE,SAAS;AAC/B,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,MAAM,EAAE,EAAE;AAClB,QAAQ,QAAQ,EAAE,EAAE;AACpB,KAAK;AACL,CAAC,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/package.json new file mode 100644 index 0000000..2184bb7 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,47 @@ +{ + "name": "@octokit/endpoint", + "description": "Turns REST API endpoints into generic request options", + "version": "7.0.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "repository": "github:octokit/endpoint.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "jest": "^29.0.0", + "prettier": "2.8.3", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/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/auth-app/node_modules/@octokit/oauth-authorization-url/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/README.md new file mode 100644 index 0000000..b032aa5 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/README.md @@ -0,0 +1,281 @@ +# oauth-authorization-url.js + +> Universal library to retrieve GitHub’s identity URL for the OAuth web flow + +[![@latest](https://img.shields.io/npm/v/@octokit/oauth-authorization-url.svg)](https://www.npmjs.com/package/@octokit/oauth-authorization-url) +[![Build Status](https://github.com/octokit/oauth-authorization-url.js/workflows/Test/badge.svg)](https://github.com/octokit/oauth-authorization-url.js/actions?query=workflow%3ATest+branch%3Amaster) + +See [GitHub’s Developer Guide for the OAuth App web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). Note that the [OAuth web application flow for GitHub Apps](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#web-application-flow) is slightly different. GitHub Apps do not support scopes for its user access tokens (they are called user-to-server tokens for GitHub Apps), instead they inherit the user permissions from the GitHub App's registration and the repository/organization access and permissions from the respective installation. + + + +- [Usage](#usage) + - [For OAuth Apps](#for-oauth-apps) + - [For GitHub Apps](#for-github-apps) +- [Options](#options) +- [Result](#result) +- [Types](#types) +- [License](#license) + + + +## Usage + + + + + + + + + + +
+ Browsers + + +Load `@octokit/oauth-authorization-url` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+ Node + + +Install with npm install @octokit/oauth-authorization-url + +```js +const { oauthAuthorizationUrl } = require("@octokit/oauth-authorization-url"); +// or: import { oauthAuthorizationUrl } from "@octokit/oauth-authorization-url"; +``` + +
+ +### For OAuth Apps + +```js +const { + url, + clientId, + redirectUrl, + login, + scopes, + state, +} = oauthAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + redirectUrl: "https://example.com", + login: "octocat", + scopes: ["repo", "admin:org"], + state: "secret123", +}); +``` + +### For GitHub Apps + +```js +const { url, clientId, redirectUrl, login, state } = oauthAuthorizationUrl({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + redirectUrl: "https://example.com", + login: "octocat", + state: "secret123", +}); +``` + +## Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + description +
+ clientId + + Required. The client ID you received from GitHub when you registered. +
+ clientType + + +Must be set to either `"oauth-app"` or `"github-app"`. Defaults to `"oauth-app"`. + +
+ redirectUrl + + The URL in your application where users will be sent after authorization. See Redirect URLs in GitHub’s Developer Guide. +
+ login + + Suggests a specific account to use for signing in and authorizing the app. +
+ scopes + + +Only relevant when `clientType` is set to `"oauth-app"`. + +An array of scope names (or: space-delimited list of scopes). If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. + +Defaults to `[]` if `clientType` is set to `"oauth-app"`. + +
+ state + + An unguessable random string. It is used to protect against cross-site request forgery attacks. + Defaults to Math.random().toString(36).substr(2). +
+ allowSignup + + Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. Use false in the case that a policy prohibits signups. Defaults to true. +
+ baseUrl + + When using GitHub Enterprise Server, set the baseUrl to the origin, e.g. https://github.my-enterprise.com. +
+ +## Result + +`oauthAuthorizationUrl()` returns an object with the following properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + description +
+ allowSignup + + Returns options.allowSignup if it was set. Defaults to true. +
+ clientType + + Returns options.clientType. Defaults to "oauth-app". +
+ clientId + + Returns options.clientId. +
+ login + + Returns options.login if it was set. Defaults to null. +
+ redirectUrl + + Returns options.redirectUrl if it was set. Defaults to null. +
+ scopes + + +Only set if `options.clientType` is set to `"oauth-app"`. + +Returns an array of strings. Returns options.scopes if it was set and turns the string into an array if a string was passed, otherwise []. + +
+ state + + Returns options.state if it was set. Defaults to Defaults to Math.random().toString(36).substr(2). +
+ url + + The authorization URL +
+ +## Types + +```ts +import { + ClientType, + OAuthAppOptions, + OAuthAppResult, + GitHubAppOptions, + GitHubAppResult, +} from "@octokit/oauth-authorization-url"; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-node/index.js new file mode 100644 index 0000000..a739ce7 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-node/index.js @@ -0,0 +1,54 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "" + }; + + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes; + } + + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} + +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state" + }; + let url = base; + Object.keys(map) // Filter out keys that are null and remove the url key + .filter(k => options[k] !== null) // Filter out empty scopes array + .filter(k => { + if (k !== "scopes") return true; + if (options.clientType === "github-app") return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map(key => [map[key], `${options[key]}`]) // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} + +exports.oauthAuthorizationUrl = oauthAuthorizationUrl; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map new file mode 100644 index 0000000..5072026 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["export function oauthAuthorizationUrl(options) {\n const clientType = options.clientType || \"oauth-app\";\n const baseUrl = options.baseUrl || \"https://github.com\";\n const result = {\n clientType,\n allowSignup: options.allowSignup === false ? false : true,\n clientId: options.clientId,\n login: options.login || null,\n redirectUrl: options.redirectUrl || null,\n state: options.state || Math.random().toString(36).substr(2),\n url: \"\",\n };\n if (clientType === \"oauth-app\") {\n const scopes = \"scopes\" in options ? options.scopes : [];\n result.scopes =\n typeof scopes === \"string\"\n ? scopes.split(/[,\\s]+/).filter(Boolean)\n : scopes;\n }\n result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result);\n return result;\n}\nfunction urlBuilderAuthorize(base, options) {\n const map = {\n allowSignup: \"allow_signup\",\n clientId: \"client_id\",\n login: \"login\",\n redirectUrl: \"redirect_uri\",\n scopes: \"scope\",\n state: \"state\",\n };\n let url = base;\n Object.keys(map)\n // Filter out keys that are null and remove the url key\n .filter((k) => options[k] !== null)\n // Filter out empty scopes array\n .filter((k) => {\n if (k !== \"scopes\")\n return true;\n if (options.clientType === \"github-app\")\n return false;\n return !Array.isArray(options[k]) || options[k].length > 0;\n })\n // Map Array with the proper URL parameter names and change the value to a string using template strings\n // @ts-ignore\n .map((key) => [map[key], `${options[key]}`])\n // Finally, build the URL\n .forEach(([key, value], index) => {\n url += index === 0 ? `?` : \"&\";\n url += `${key}=${encodeURIComponent(value)}`;\n });\n return url;\n}\n"],"names":["oauthAuthorizationUrl","options","clientType","baseUrl","result","allowSignup","clientId","login","redirectUrl","state","Math","random","toString","substr","url","scopes","split","filter","Boolean","urlBuilderAuthorize","base","map","Object","keys","k","Array","isArray","length","key","forEach","value","index","encodeURIComponent"],"mappings":";;;;AAAO,SAASA,qBAAT,CAA+BC,OAA/B,EAAwC;AAC3C,QAAMC,UAAU,GAAGD,OAAO,CAACC,UAAR,IAAsB,WAAzC;AACA,QAAMC,OAAO,GAAGF,OAAO,CAACE,OAAR,IAAmB,oBAAnC;AACA,QAAMC,MAAM,GAAG;AACXF,IAAAA,UADW;AAEXG,IAAAA,WAAW,EAAEJ,OAAO,CAACI,WAAR,KAAwB,KAAxB,GAAgC,KAAhC,GAAwC,IAF1C;AAGXC,IAAAA,QAAQ,EAAEL,OAAO,CAACK,QAHP;AAIXC,IAAAA,KAAK,EAAEN,OAAO,CAACM,KAAR,IAAiB,IAJb;AAKXC,IAAAA,WAAW,EAAEP,OAAO,CAACO,WAAR,IAAuB,IALzB;AAMXC,IAAAA,KAAK,EAAER,OAAO,CAACQ,KAAR,IAAiBC,IAAI,CAACC,MAAL,GAAcC,QAAd,CAAuB,EAAvB,EAA2BC,MAA3B,CAAkC,CAAlC,CANb;AAOXC,IAAAA,GAAG,EAAE;AAPM,GAAf;;AASA,MAAIZ,UAAU,KAAK,WAAnB,EAAgC;AAC5B,UAAMa,MAAM,GAAG,YAAYd,OAAZ,GAAsBA,OAAO,CAACc,MAA9B,GAAuC,EAAtD;AACAX,IAAAA,MAAM,CAACW,MAAP,GACI,OAAOA,MAAP,KAAkB,QAAlB,GACMA,MAAM,CAACC,KAAP,CAAa,QAAb,EAAuBC,MAAvB,CAA8BC,OAA9B,CADN,GAEMH,MAHV;AAIH;;AACDX,EAAAA,MAAM,CAACU,GAAP,GAAaK,mBAAmB,CAAE,GAAEhB,OAAQ,wBAAZ,EAAqCC,MAArC,CAAhC;AACA,SAAOA,MAAP;AACH;;AACD,SAASe,mBAAT,CAA6BC,IAA7B,EAAmCnB,OAAnC,EAA4C;AACxC,QAAMoB,GAAG,GAAG;AACRhB,IAAAA,WAAW,EAAE,cADL;AAERC,IAAAA,QAAQ,EAAE,WAFF;AAGRC,IAAAA,KAAK,EAAE,OAHC;AAIRC,IAAAA,WAAW,EAAE,cAJL;AAKRO,IAAAA,MAAM,EAAE,OALA;AAMRN,IAAAA,KAAK,EAAE;AANC,GAAZ;AAQA,MAAIK,GAAG,GAAGM,IAAV;AACAE,EAAAA,MAAM,CAACC,IAAP,CAAYF,GAAZ;AAAA,GAEKJ,MAFL,CAEaO,CAAD,IAAOvB,OAAO,CAACuB,CAAD,CAAP,KAAe,IAFlC;AAAA,GAIKP,MAJL,CAIaO,CAAD,IAAO;AACf,QAAIA,CAAC,KAAK,QAAV,EACI,OAAO,IAAP;AACJ,QAAIvB,OAAO,CAACC,UAAR,KAAuB,YAA3B,EACI,OAAO,KAAP;AACJ,WAAO,CAACuB,KAAK,CAACC,OAAN,CAAczB,OAAO,CAACuB,CAAD,CAArB,CAAD,IAA8BvB,OAAO,CAACuB,CAAD,CAAP,CAAWG,MAAX,GAAoB,CAAzD;AACH,GAVD;AAYI;AAZJ,GAaKN,GAbL,CAaUO,GAAD,IAAS,CAACP,GAAG,CAACO,GAAD,CAAJ,EAAY,GAAE3B,OAAO,CAAC2B,GAAD,CAAM,EAA3B,CAblB;AAAA,GAeKC,OAfL,CAea,CAAC,CAACD,GAAD,EAAME,KAAN,CAAD,EAAeC,KAAf,KAAyB;AAClCjB,IAAAA,GAAG,IAAIiB,KAAK,KAAK,CAAV,GAAe,GAAf,GAAoB,GAA3B;AACAjB,IAAAA,GAAG,IAAK,GAAEc,GAAI,IAAGI,kBAAkB,CAACF,KAAD,CAAQ,EAA3C;AACH,GAlBD;AAmBA,SAAOhB,GAAP;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-src/index.js new file mode 100644 index 0000000..3a0be85 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-src/index.js @@ -0,0 +1,53 @@ +export function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "", + }; + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = + typeof scopes === "string" + ? scopes.split(/[,\s]+/).filter(Boolean) + : scopes; + } + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state", + }; + let url = base; + Object.keys(map) + // Filter out keys that are null and remove the url key + .filter((k) => options[k] !== null) + // Filter out empty scopes array + .filter((k) => { + if (k !== "scopes") + return true; + if (options.clientType === "github-app") + return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) + // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map((key) => [map[key], `${options[key]}`]) + // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-src/types.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts new file mode 100644 index 0000000..b4efd4a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts @@ -0,0 +1,4 @@ +import { OAuthAppOptions, GitHubAppOptions, OAuthAppResult, GitHubAppResult } from "./types"; +export { ClientType, OAuthAppOptions, GitHubAppOptions, OAuthAppResult, GitHubAppResult, } from "./types"; +export declare function oauthAuthorizationUrl(options: OAuthAppOptions): OAuthAppResult; +export declare function oauthAuthorizationUrl(options: GitHubAppOptions): GitHubAppResult; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts new file mode 100644 index 0000000..0dd3ad1 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts @@ -0,0 +1,39 @@ +export declare type ClientType = "oauth-app" | "github-app"; +export declare type OAuthAppOptions = { + clientId: string; + clientType?: "oauth-app"; + allowSignup?: boolean; + login?: string; + scopes?: string | string[]; + redirectUrl?: string; + state?: string; + baseUrl?: string; +}; +export declare type GitHubAppOptions = { + clientId: string; + clientType: "github-app"; + allowSignup?: boolean; + login?: string; + redirectUrl?: string; + state?: string; + baseUrl?: string; +}; +export declare type OAuthAppResult = { + allowSignup: boolean; + clientId: string; + clientType: "oauth-app"; + login: string | null; + redirectUrl: string | null; + scopes: string[]; + state: string; + url: string; +}; +export declare type GitHubAppResult = { + allowSignup: boolean; + clientId: string; + clientType: "github-app"; + login: string | null; + redirectUrl: string | null; + state: string; + url: string; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-web/index.js new file mode 100644 index 0000000..e778a09 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-web/index.js @@ -0,0 +1,56 @@ +function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "", + }; + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = + typeof scopes === "string" + ? scopes.split(/[,\s]+/).filter(Boolean) + : scopes; + } + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state", + }; + let url = base; + Object.keys(map) + // Filter out keys that are null and remove the url key + .filter((k) => options[k] !== null) + // Filter out empty scopes array + .filter((k) => { + if (k !== "scopes") + return true; + if (options.clientType === "github-app") + return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) + // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map((key) => [map[key], `${options[key]}`]) + // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} + +export { oauthAuthorizationUrl }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map new file mode 100644 index 0000000..cad5e93 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["export function oauthAuthorizationUrl(options) {\n const clientType = options.clientType || \"oauth-app\";\n const baseUrl = options.baseUrl || \"https://github.com\";\n const result = {\n clientType,\n allowSignup: options.allowSignup === false ? false : true,\n clientId: options.clientId,\n login: options.login || null,\n redirectUrl: options.redirectUrl || null,\n state: options.state || Math.random().toString(36).substr(2),\n url: \"\",\n };\n if (clientType === \"oauth-app\") {\n const scopes = \"scopes\" in options ? options.scopes : [];\n result.scopes =\n typeof scopes === \"string\"\n ? scopes.split(/[,\\s]+/).filter(Boolean)\n : scopes;\n }\n result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result);\n return result;\n}\nfunction urlBuilderAuthorize(base, options) {\n const map = {\n allowSignup: \"allow_signup\",\n clientId: \"client_id\",\n login: \"login\",\n redirectUrl: \"redirect_uri\",\n scopes: \"scope\",\n state: \"state\",\n };\n let url = base;\n Object.keys(map)\n // Filter out keys that are null and remove the url key\n .filter((k) => options[k] !== null)\n // Filter out empty scopes array\n .filter((k) => {\n if (k !== \"scopes\")\n return true;\n if (options.clientType === \"github-app\")\n return false;\n return !Array.isArray(options[k]) || options[k].length > 0;\n })\n // Map Array with the proper URL parameter names and change the value to a string using template strings\n // @ts-ignore\n .map((key) => [map[key], `${options[key]}`])\n // Finally, build the URL\n .forEach(([key, value], index) => {\n url += index === 0 ? `?` : \"&\";\n url += `${key}=${encodeURIComponent(value)}`;\n });\n return url;\n}\n"],"names":[],"mappings":"AAAO,SAAS,qBAAqB,CAAC,OAAO,EAAE;AAC/C,IAAI,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,WAAW,CAAC;AACzD,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,oBAAoB,CAAC;AAC5D,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,UAAU;AAClB,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW,KAAK,KAAK,GAAG,KAAK,GAAG,IAAI;AACjE,QAAQ,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAClC,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI;AACpC,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI;AAChD,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACpE,QAAQ,GAAG,EAAE,EAAE;AACf,KAAK,CAAC;AACN,IAAI,IAAI,UAAU,KAAK,WAAW,EAAE;AACpC,QAAQ,MAAM,MAAM,GAAG,QAAQ,IAAI,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;AACjE,QAAQ,MAAM,CAAC,MAAM;AACrB,YAAY,OAAO,MAAM,KAAK,QAAQ;AACtC,kBAAkB,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACxD,kBAAkB,MAAM,CAAC;AACzB,KAAK;AACL,IAAI,MAAM,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC,CAAC;AACjF,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,SAAS,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE;AAC5C,IAAI,MAAM,GAAG,GAAG;AAChB,QAAQ,WAAW,EAAE,cAAc;AACnC,QAAQ,QAAQ,EAAE,WAAW;AAC7B,QAAQ,KAAK,EAAE,OAAO;AACtB,QAAQ,WAAW,EAAE,cAAc;AACnC,QAAQ,MAAM,EAAE,OAAO;AACvB,QAAQ,KAAK,EAAE,OAAO;AACtB,KAAK,CAAC;AACN,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC;AACnB,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACpB;AACA,SAAS,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAC3C;AACA,SAAS,MAAM,CAAC,CAAC,CAAC,KAAK;AACvB,QAAQ,IAAI,CAAC,KAAK,QAAQ;AAC1B,YAAY,OAAO,IAAI,CAAC;AACxB,QAAQ,IAAI,OAAO,CAAC,UAAU,KAAK,YAAY;AAC/C,YAAY,OAAO,KAAK,CAAC;AACzB,QAAQ,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACnE,KAAK,CAAC;AACN;AACA;AACA,SAAS,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD;AACA,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK;AAC1C,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AACvC,QAAQ,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,GAAG,CAAC;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/package.json new file mode 100644 index 0000000..f303097 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-authorization-url/package.json @@ -0,0 +1,41 @@ +{ + "name": "@octokit/oauth-authorization-url", + "description": "Universal library to retrieve GitHub’s identity URL for the OAuth web flow", + "version": "5.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "oauth" + ], + "repository": "github:octokit/oauth-authorization-url.js", + "dependencies": {}, + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^27.0.0", + "jest": "^27.0.0", + "pika-plugin-unpkg-field": "^1.0.1", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "unpkg": "dist-web/index.js" +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/LICENSE new file mode 100644 index 0000000..57049d0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 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/auth-app/node_modules/@octokit/oauth-methods/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/README.md new file mode 100644 index 0000000..acaac06 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/README.md @@ -0,0 +1,1607 @@ +# oauth-methods.js + +> Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps + +[![@latest](https://img.shields.io/npm/v/@octokit/oauth-methods.svg)](https://www.npmjs.com/package/@octokit/oauth-methods) +[![Build Status](https://github.com/octokit/oauth-methods.js/workflows/Test/badge.svg)](https://github.com/octokit/oauth-methods.js/actions?query=workflow%3ATest+branch%3Amain) + + + +- [Usage](#usage) + - [OAuth Web Flow](#oauth-web-flow) + - [OAuth Device Flow](#oauth-device-flow) +- [Methods](#methods) + - [`getWebFlowAuthorizationUrl()`](#getwebflowauthorizationurl) + - [`exchangeWebFlowCode()`](#exchangewebflowcode) + - [`createDeviceCode()`](#createdevicecode) + - [`exchangeDeviceCode()`](#exchangedevicecode) + - [`checkToken()`](#checktoken) + - [`refreshToken()`](#refreshtoken) + - [`scopeToken()`](#scopetoken) + - [`resetToken()`](#resettoken) + - [`deleteToken()`](#deletetoken) + - [`deleteAuthorization()`](#deleteauthorization) +- [Authentication object](#authentication-object) + - [OAuth APP authentication](#oauth-app-authentication) + - [GitHub App with non-expiring user authentication](#github-app-with-non-expiring-user-authentication) + - [GitHub App with expiring user authentication](#github-app-with-expiring-user-authentication) +- [Types](#types) +- [Contributing](#contributing) +- [License](#license) + + + +The OAuth endpoints related to user access tokens are not all part of GitHub's REST API and they behave slightly different. The methods exported by `@octokit/normalize the differences so you don't have to. + +## Usage + + + + + + +
+ +Browsers + + + +`@octokit/oauth-methods` is not meant for browser usage. + +Some of the methods will work, but others do not have CORS headers enabled and will fail (`exchangeWebFlowCode()`, `createDeviceCode()`, `exchangeDeviceCode()`, `refreshToken()`). Also the Client Secret should not be exposed to clients as it can be used for a [Person-in-the-middle attack](https://en.wikipedia.org/wiki/Person-in-the-middle_attack). + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/oauth-methods` + +```js +const { + exchangeWebFlowCode, + createDeviceCode, + exchangeDeviceCode, + checkToken, + refreshToken, + scopeToken, + resetToken, + deleteToken, + deleteAuthorization, +} = require("@octokit/oauth-methods"); +``` + +
+ +### OAuth Web Flow + +After a user granted access to an OAuth App or GitHub App on [Step 1 of GitHub's OAuth Web Flow](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#1-request-a-users-github-identity), they get redirected to a URL controlled by your app with a `?code=...` query parameter. + +You can exchange that code for a user access token as described in [Step 2 of GitHub's OAuth Web Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github). + +Setting `clientType` is required because there are slight differences between `"oauth-app"` and `"github-app"`. Most importantly, GitHub Apps do not support scopes. + +```js +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", + scopes: ["repo"], +}); +``` + +`data` is the raw response data. `authentication` is a [User Authentication object](#authentication-object). + +### OAuth Device Flow + +In [step 1 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github), you need to create a device and user code + +```js +const { + data: { device_code, user_code, verification_uri }, +} = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +In [step 2 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser), the user has to enter `user_code` on `verification_uri` (https://github.com/login/device unless you use GitHub Enterprise Server). + +Once the user entered the code and granted access, you can exchange the `device_code` for a user access token in [step 3 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device) + +```js +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: device_code, +}); +``` + +`data` is the raw response data. `authentication` is a [User Authentication object](#authentication-object). + +## Methods + +### `getWebFlowAuthorizationUrl()` + +This is a wrapper around [`@octokit/oauth-authorization-url`](https://github.com/octokit/oauth-authorization-url.js#readme) that accepts a `request` option instead of `baseUrl` for consistency with the other OAuth methods. `getWebFlowAuthorizationUrl()` is a synchronous method and does not send any request. + +```js +const { url } = getWebFlowAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. The client ID you received from GitHub when you registered. +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app". +
+ redirectUrl + + string + + The URL in your application where users will be sent after authorization. See Redirect URLs in GitHub’s Developer Guide. +
+ login + + string + + Suggests a specific account to use for signing in and authorizing the app. +
+ scopes + + array of strings + + +Only relevant if `clientType` is set to `"oauth-app"`. + +An array of scope names (or: space-delimited list of scopes). If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. + +Defaults to `[]`. + +
+ state + + string + + An unguessable random string. It is used to protect against cross-site request forgery attacks. + Defaults to Math.random().toString(36).substr(2). +
+ allowSignup + + boolean + + Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. Use false in the case that a policy prohibits signups. Defaults to true. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { url } = getWebFlowAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +The `getWebFlowAuthorizationUrl` method is synchronous and returns an object with the following properties. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ allowSignup + + boolean + + Returns options.allowSignup if it was set. Defaults to true. +
+ clientType + + string + + Returns options.clientType +
+ clientId + + string + + Returns options.clientId. +
+ login + + string + + Returns options.login if it was set. Defaults to null. +
+ redirectUrl + + string + + Returns options.redirectUrl if it was set. Defaults to null. +
+ scopes + + array of strings + + +Only set if `options.clientType` is set to `"oauth-app"`. + +Returns an array of strings. Returns options.scopes if it was set and turns the string into an array if a string was passed, otherwise []. + +
+ state + + string + + Returns options.state if it was set. Defaults to Math.random().toString(36).substr(2). +
+ url + + string + + The authorization URL +
+ +### `exchangeWebFlowCode()` + +```js +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ code + + string + + Required. The code from GitHub's OAuth flow redirect's ?code=... query parameter +
+ redirectUrl + + string + + The redirectUrl option you passed to getWebFlowAuthorizationUrl() +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /login/oauth/access_token`](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#response) (JSON) with an additional `authentication` key which is the [authentication object](#authentication-object). + +### `createDeviceCode()` + +```js +const { data, authentication } = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ scopes + + array of strings + + +Only permitted if `clientType` is set to `"oauth-app"`. GitHub Apps do not support scopes. + +Array of [scope names](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes) you want to request for the user access token. + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data } = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST https://github.com/login/device/code`](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#response-1) (JSON). + +### `exchangeDeviceCode()` + +```js +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: "code123", +}); +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ code + + string + + Required. The decive_code from the createDeviceCode() response +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: "code123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### `checkToken()` + +```js +const { data, authentication } = await checkToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to check +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await checkToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) with an additional `authentication` key which is the [authentication object](#authentication-object). Note that the `authentication` object will not include the keys for expiring authentication. + +### `refreshToken()` + +Expiring user access tokens are currently in preview. You can [enable them for any of your GitHub apps](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens#configuring-expiring-user-tokens-for-an-existing-github-app). OAuth Apps do not support expiring user access tokens + +When a user access token expires it can be [refreshed using a refresh token](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens). Refreshing a token invalidates the current user access token. + +```js +const { data, authentication } = await refreshToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + refreshToken: "r1.refreshtoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ refreshToken + + string + + Required. The refresh token that was received alongside the user access token. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await refreshToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + refreshToken: "r1.refreshtoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /login/oauth/access_token`](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens#response) with an additional `authentication` key which is the [GitHub App expiring user authentication](#github-app-with-expiring-user-authentication). + +### `scopeToken()` + +```js +const { data, authentication } = await scopeToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", + target: "octokit", + repositories: ["oauth-methods.js"], + permissions: { + issues: "write", + }, +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to "github-app". +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ target + + string + + Required unless targetId is set. The name of the user or organization to scope the user-to-server access token to. +
+ targetId + + integer + + Required unless target is set. The ID of the user or organization to scope the user-to-server access token to. +
+ repositories + + array of strings + + The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified. +
+ repository_ids + + array of integers + + The list of repository IDs to scope the user-to-server access token to. repositories may not be specified if repositories is specified. +
+ permissions + + object + + The permissions granted to the user-to-server access token. See GitHub App Permissions. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await scopeToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + token: "usertoken123", + target: "octokit", + repositories: ["oauth-methods.js"], + permissions: { + issues: "write", + }, + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) with an additional `authentication` key which is the new [authentication object](#authentication-object). + +### `resetToken()` + +```js +const { data, authentication } = await resetToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app". +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to reset +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await resetToken({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) with an additional `authentication` key which is the new [authentication object](#authentication-object). + +### `deleteToken()` + +```js +const { status } = await deleteToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to delete +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await deleteToken({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) (which is an empty `204` response). + +### `deleteAuthorization()` + +```js +const { status } = await deleteAuthorization({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. A valid user access token for the authorization +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await deleteAuthorization({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) (which is an empty `204` response). + +## Authentication object + +The `authentication` object returned by the methods have one of three formats. + +1. [OAuth APP authentication token](#oauth-app-authentication-token) +1. [GitHub APP non-expiring user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) +1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +Note that the `clientSecret` may not be set when using [`exchangeDeviceCode()`](#exchangedevicecode) as `clientSecret` is not required for the OAuth device flow. + +### OAuth APP authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub App with non-expiring user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ +### GitHub App with expiring user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## Types + +```ts +import { + OAuthAppAuthentication, + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, + GetWebFlowAuthorizationUrlOAuthAppOptions, + GetWebFlowAuthorizationUrlGitHubAppOptions, + GetWebFlowAuthorizationUrlOAuthAppResult, + GetWebFlowAuthorizationUrlGitHubAppResult, + CheckTokenOAuthAppOptions, + CheckTokenGitHubAppOptions, + CheckTokenOAuthAppResponse, + CheckTokenGitHubAppResponse, + ExchangeWebFlowCodeOAuthAppOptions, + ExchangeWebFlowCodeGitHubAppOptions, + ExchangeWebFlowCodeOAuthAppResponse, + ExchangeWebFlowCodeGitHubAppResponse, + CreateDeviceCodeOAuthAppOptions, + CreateDeviceCodeGitHubAppOptions, + CreateDeviceCodeDeviceTokenResponse, + ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret, + ExchangeDeviceCodeOAuthAppOptions, + ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret, + ExchangeDeviceCodeGitHubAppOptions, + ExchangeDeviceCodeOAuthAppResponse, + ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret, + ExchangeDeviceCodeGitHubAppResponse, + ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret, + RefreshTokenOptions, + RefreshTokenResponse, + ScopeTokenOptions, + ScopeTokenResponse, + ResetTokenOAuthAppOptions, + ResetTokenGitHubAppOptions, + ResetTokenOAuthAppResponse, + ResetTokenGitHubAppResponse, + DeleteTokenOAuthAppOptions, + DeleteTokenGitHubAppOptions, + DeleteTokenResponse, + DeleteAuthorizationOAuthAppOptions, + DeleteAuthorizationGitHubAppOptions, + DeleteAuthorizationResponse, +} from "@octokit/oauth-methods"; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-node/index.js new file mode 100644 index 0000000..697bb0d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-node/index.js @@ -0,0 +1,281 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var oauthAuthorizationUrl = require('@octokit/oauth-authorization-url'); +var request = require('@octokit/request'); +var requestError = require('@octokit/request-error'); +var btoa = _interopDefault(require('btoa-lite')); + +const VERSION = "2.0.4"; + +function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +async function oauthRequest(request, route, parameters) { + const withOAuthParameters = { + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json" + }, + ...parameters + }; + const response = await request(route, withOAuthParameters); + if ("error" in response.data) { + const error = new requestError.RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { + request: request.endpoint.merge(route, withOAuthParameters), + headers: response.headers + }); + // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved + error.response = response; + throw error; + } + return response; +} + +function getWebFlowAuthorizationUrl({ + request: request$1 = request.request, + ...options +}) { + const baseUrl = requestToOAuthBaseUrl(request$1); + // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\_(ツ)_/¯ + return oauthAuthorizationUrl.oauthAuthorizationUrl({ + ...options, + baseUrl + }); +} + +async function exchangeWebFlowCode(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in), authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in); + } + delete authentication.scopes; + } + return { + ...response, + authentication + }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +async function createDeviceCode(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const parameters = { + client_id: options.clientId + }; + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + return oauthRequest(request$1, "POST /login/device/code", parameters); +} + +async function exchangeDeviceCode(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code" + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp$1(apiTimeInMs, response.data.expires_in), authentication.refreshTokenExpiresAt = toTimestamp$1(apiTimeInMs, response.data.refresh_token_expires_in); + } + delete authentication.scopes; + } + return { + ...response, + authentication + }; +} +function toTimestamp$1(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +async function checkToken(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await request$1("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { + ...response, + authentication + }; +} + +async function refreshToken(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken + }); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp$2(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp$2(apiTimeInMs, response.data.refresh_token_expires_in) + }; + return { + ...response, + authentication + }; +} +function toTimestamp$2(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +async function scopeToken(options) { + const { + request: optionsRequest, + clientType, + clientId, + clientSecret, + token, + ...requestOptions + } = options; + const request$1 = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await request$1("POST /applications/{client_id}/token/scoped", { + headers: { + authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}` + }, + client_id: clientId, + access_token: token, + ...requestOptions + }); + const authentication = Object.assign({ + clientType, + clientId, + clientSecret, + token: response.data.token + }, response.data.expires_at ? { + expiresAt: response.data.expires_at + } : {}); + return { + ...response, + authentication + }; +} + +async function resetToken(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + const response = await request$1("PATCH /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { + ...response, + authentication + }; +} + +async function deleteToken(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request$1("DELETE /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); +} + +async function deleteAuthorization(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request$1("DELETE /applications/{client_id}/grant", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); +} + +exports.VERSION = VERSION; +exports.checkToken = checkToken; +exports.createDeviceCode = createDeviceCode; +exports.deleteAuthorization = deleteAuthorization; +exports.deleteToken = deleteToken; +exports.exchangeDeviceCode = exchangeDeviceCode; +exports.exchangeWebFlowCode = exchangeWebFlowCode; +exports.getWebFlowAuthorizationUrl = getWebFlowAuthorizationUrl; +exports.refreshToken = refreshToken; +exports.resetToken = resetToken; +exports.scopeToken = scopeToken; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-node/index.js.map new file mode 100644 index 0000000..2922653 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/utils.js","../dist-src/get-web-flow-authorization-url.js","../dist-src/exchange-web-flow-code.js","../dist-src/create-device-code.js","../dist-src/exchange-device-code.js","../dist-src/check-token.js","../dist-src/refresh-token.js","../dist-src/scope-token.js","../dist-src/reset-token.js","../dist-src/delete-token.js","../dist-src/delete-authorization.js"],"sourcesContent":["export const VERSION = \"2.0.4\";\n","import { RequestError } from \"@octokit/request-error\";\nexport function requestToOAuthBaseUrl(request) {\n const endpointDefaults = request.endpoint.DEFAULTS;\n return /^https:\\/\\/(api\\.)?github\\.com$/.test(endpointDefaults.baseUrl)\n ? \"https://github.com\"\n : endpointDefaults.baseUrl.replace(\"/api/v3\", \"\");\n}\nexport async function oauthRequest(request, route, parameters) {\n const withOAuthParameters = {\n baseUrl: requestToOAuthBaseUrl(request),\n headers: {\n accept: \"application/json\",\n },\n ...parameters,\n };\n const response = await request(route, withOAuthParameters);\n if (\"error\" in response.data) {\n const error = new RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, {\n request: request.endpoint.merge(route, withOAuthParameters),\n headers: response.headers,\n });\n // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved\n error.response = response;\n throw error;\n }\n return response;\n}\n","import { oauthAuthorizationUrl, } from \"@octokit/oauth-authorization-url\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { requestToOAuthBaseUrl } from \"./utils\";\nexport function getWebFlowAuthorizationUrl({ request = defaultRequest, ...options }) {\n const baseUrl = requestToOAuthBaseUrl(request);\n // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\\_(ツ)_/¯\n return oauthAuthorizationUrl({\n ...options,\n baseUrl,\n });\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function exchangeWebFlowCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n client_secret: options.clientSecret,\n code: options.code,\n redirect_uri: options.redirectUrl,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.access_token,\n scopes: response.data.scope.split(/\\s+/).filter(Boolean),\n };\n if (options.clientType === \"github-app\") {\n if (\"refresh_token\" in response.data) {\n const apiTimeInMs = new Date(response.headers.date).getTime();\n (authentication.refreshToken = response.data.refresh_token),\n (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)),\n (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in));\n }\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function createDeviceCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const parameters = {\n client_id: options.clientId,\n };\n if (\"scopes\" in options && Array.isArray(options.scopes)) {\n parameters.scope = options.scopes.join(\" \");\n }\n return oauthRequest(request, \"POST /login/device/code\", parameters);\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function exchangeDeviceCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n device_code: options.code,\n grant_type: \"urn:ietf:params:oauth:grant-type:device_code\",\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n token: response.data.access_token,\n scopes: response.data.scope.split(/\\s+/).filter(Boolean),\n };\n if (\"clientSecret\" in options) {\n authentication.clientSecret = options.clientSecret;\n }\n if (options.clientType === \"github-app\") {\n if (\"refresh_token\" in response.data) {\n const apiTimeInMs = new Date(response.headers.date).getTime();\n (authentication.refreshToken = response.data.refresh_token),\n (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)),\n (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in));\n }\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function checkToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await request(\"POST /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: options.token,\n scopes: response.data.scopes,\n };\n if (response.data.expires_at)\n authentication.expiresAt = response.data.expires_at;\n if (options.clientType === \"github-app\") {\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function refreshToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n client_secret: options.clientSecret,\n grant_type: \"refresh_token\",\n refresh_token: options.refreshToken,\n });\n const apiTimeInMs = new Date(response.headers.date).getTime();\n const authentication = {\n clientType: \"github-app\",\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.access_token,\n refreshToken: response.data.refresh_token,\n expiresAt: toTimestamp(apiTimeInMs, response.data.expires_in),\n refreshTokenExpiresAt: toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in),\n };\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function scopeToken(options) {\n const { request: optionsRequest, clientType, clientId, clientSecret, token, ...requestOptions } = options;\n const request = optionsRequest ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await request(\"POST /applications/{client_id}/token/scoped\", {\n headers: {\n authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`,\n },\n client_id: clientId,\n access_token: token,\n ...requestOptions,\n });\n const authentication = Object.assign({\n clientType,\n clientId,\n clientSecret,\n token: response.data.token,\n }, response.data.expires_at ? { expiresAt: response.data.expires_at } : {});\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function resetToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n const response = await request(\"PATCH /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.token,\n scopes: response.data.scopes,\n };\n if (response.data.expires_at)\n authentication.expiresAt = response.data.expires_at;\n if (options.clientType === \"github-app\") {\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function deleteToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n return request(\"DELETE /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function deleteAuthorization(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n return request(\"DELETE /applications/{client_id}/grant\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n}\n"],"names":["VERSION","requestToOAuthBaseUrl","request","endpointDefaults","endpoint","DEFAULTS","test","baseUrl","replace","oauthRequest","route","parameters","withOAuthParameters","headers","accept","response","data","error","RequestError","error_description","error_uri","merge","getWebFlowAuthorizationUrl","defaultRequest","options","oauthAuthorizationUrl","exchangeWebFlowCode","client_id","clientId","client_secret","clientSecret","code","redirect_uri","redirectUrl","authentication","clientType","token","access_token","scopes","scope","split","filter","Boolean","apiTimeInMs","Date","date","getTime","refreshToken","refresh_token","expiresAt","toTimestamp","expires_in","refreshTokenExpiresAt","refresh_token_expires_in","expirationInSeconds","toISOString","createDeviceCode","Array","isArray","join","exchangeDeviceCode","device_code","grant_type","checkToken","authorization","btoa","expires_at","scopeToken","optionsRequest","requestOptions","Object","assign","resetToken","auth","deleteToken","deleteAuthorization"],"mappings":";;;;;;;;;;;MAAaA,OAAO,GAAG;;ACChB,SAASC,qBAAqB,CAACC,OAAO,EAAE;EAC3C,MAAMC,gBAAgB,GAAGD,OAAO,CAACE,QAAQ,CAACC,QAAQ;EAClD,OAAO,iCAAiC,CAACC,IAAI,CAACH,gBAAgB,CAACI,OAAO,CAAC,GACjE,oBAAoB,GACpBJ,gBAAgB,CAACI,OAAO,CAACC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;AACzD;AACA,AAAO,eAAeC,YAAY,CAACP,OAAO,EAAEQ,KAAK,EAAEC,UAAU,EAAE;EAC3D,MAAMC,mBAAmB,GAAG;IACxBL,OAAO,EAAEN,qBAAqB,CAACC,OAAO,CAAC;IACvCW,OAAO,EAAE;MACLC,MAAM,EAAE;KACX;IACD,GAAGH;GACN;EACD,MAAMI,QAAQ,GAAG,MAAMb,OAAO,CAACQ,KAAK,EAAEE,mBAAmB,CAAC;EAC1D,IAAI,OAAO,IAAIG,QAAQ,CAACC,IAAI,EAAE;IAC1B,MAAMC,KAAK,GAAG,IAAIC,yBAAY,CAAE,GAAEH,QAAQ,CAACC,IAAI,CAACG,iBAAkB,KAAIJ,QAAQ,CAACC,IAAI,CAACC,KAAM,KAAIF,QAAQ,CAACC,IAAI,CAACI,SAAU,GAAE,EAAE,GAAG,EAAE;MAC3HlB,OAAO,EAAEA,OAAO,CAACE,QAAQ,CAACiB,KAAK,CAACX,KAAK,EAAEE,mBAAmB,CAAC;MAC3DC,OAAO,EAAEE,QAAQ,CAACF;KACrB,CAAC;;IAEFI,KAAK,CAACF,QAAQ,GAAGA,QAAQ;IACzB,MAAME,KAAK;;EAEf,OAAOF,QAAQ;AACnB;;ACvBO,SAASO,0BAA0B,CAAC;WAAEpB,SAAO,GAAGqB,eAAc;EAAE,GAAGC;AAAQ,CAAC,EAAE;EACjF,MAAMjB,OAAO,GAAGN,qBAAqB,CAACC,SAAO,CAAC;;EAE9C,OAAOuB,2CAAqB,CAAC;IACzB,GAAGD,OAAO;IACVjB;GACH,CAAC;AACN;;ACRO,eAAemB,mBAAmB,CAACF,OAAO,EAAE;EAC/C,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAO,EAAE,gCAAgC,EAAE;IAC3EyB,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BC,aAAa,EAAEL,OAAO,CAACM,YAAY;IACnCC,IAAI,EAAEP,OAAO,CAACO,IAAI;IAClBC,YAAY,EAAER,OAAO,CAACS;GACzB,CAAC;EACF,MAAMC,cAAc,GAAG;IACnBC,UAAU,EAAEX,OAAO,CAACW,UAAU;IAC9BP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BE,YAAY,EAAEN,OAAO,CAACM,YAAY;IAClCM,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACqB,YAAY;IACjCC,MAAM,EAAEvB,QAAQ,CAACC,IAAI,CAACuB,KAAK,CAACC,KAAK,CAAC,KAAK,CAAC,CAACC,MAAM,CAACC,OAAO;GAC1D;EACD,IAAIlB,OAAO,CAACW,UAAU,KAAK,YAAY,EAAE;IACrC,IAAI,eAAe,IAAIpB,QAAQ,CAACC,IAAI,EAAE;MAClC,MAAM2B,WAAW,GAAG,IAAIC,IAAI,CAAC7B,QAAQ,CAACF,OAAO,CAACgC,IAAI,CAAC,CAACC,OAAO,EAAE;MAC5DZ,cAAc,CAACa,YAAY,GAAGhC,QAAQ,CAACC,IAAI,CAACgC,aAAa,EACrDd,cAAc,CAACe,SAAS,GAAGC,WAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACmC,UAAU,CAAC,EAC7EjB,cAAc,CAACkB,qBAAqB,GAAGF,WAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACqC,wBAAwB,CAAE;;IAEjH,OAAOnB,cAAc,CAACI,MAAM;;EAEhC,OAAO;IAAE,GAAGvB,QAAQ;IAAEmB;GAAgB;AAC1C;AACA,SAASgB,WAAW,CAACP,WAAW,EAAEW,mBAAmB,EAAE;EACnD,OAAO,IAAIV,IAAI,CAACD,WAAW,GAAGW,mBAAmB,GAAG,IAAI,CAAC,CAACC,WAAW,EAAE;AAC3E;;AC9BO,eAAeC,gBAAgB,CAAChC,OAAO,EAAE;EAC5C,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMZ,UAAU,GAAG;IACfgB,SAAS,EAAEH,OAAO,CAACI;GACtB;EACD,IAAI,QAAQ,IAAIJ,OAAO,IAAIiC,KAAK,CAACC,OAAO,CAAClC,OAAO,CAACc,MAAM,CAAC,EAAE;IACtD3B,UAAU,CAAC4B,KAAK,GAAGf,OAAO,CAACc,MAAM,CAACqB,IAAI,CAAC,GAAG,CAAC;;EAE/C,OAAOlD,YAAY,CAACP,SAAO,EAAE,yBAAyB,EAAES,UAAU,CAAC;AACvE;;ACXO,eAAeiD,kBAAkB,CAACpC,OAAO,EAAE;EAC9C,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAO,EAAE,gCAAgC,EAAE;IAC3EyB,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BiC,WAAW,EAAErC,OAAO,CAACO,IAAI;IACzB+B,UAAU,EAAE;GACf,CAAC;EACF,MAAM5B,cAAc,GAAG;IACnBC,UAAU,EAAEX,OAAO,CAACW,UAAU;IAC9BP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BQ,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACqB,YAAY;IACjCC,MAAM,EAAEvB,QAAQ,CAACC,IAAI,CAACuB,KAAK,CAACC,KAAK,CAAC,KAAK,CAAC,CAACC,MAAM,CAACC,OAAO;GAC1D;EACD,IAAI,cAAc,IAAIlB,OAAO,EAAE;IAC3BU,cAAc,CAACJ,YAAY,GAAGN,OAAO,CAACM,YAAY;;EAEtD,IAAIN,OAAO,CAACW,UAAU,KAAK,YAAY,EAAE;IACrC,IAAI,eAAe,IAAIpB,QAAQ,CAACC,IAAI,EAAE;MAClC,MAAM2B,WAAW,GAAG,IAAIC,IAAI,CAAC7B,QAAQ,CAACF,OAAO,CAACgC,IAAI,CAAC,CAACC,OAAO,EAAE;MAC5DZ,cAAc,CAACa,YAAY,GAAGhC,QAAQ,CAACC,IAAI,CAACgC,aAAa,EACrDd,cAAc,CAACe,SAAS,GAAGC,aAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACmC,UAAU,CAAC,EAC7EjB,cAAc,CAACkB,qBAAqB,GAAGF,aAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACqC,wBAAwB,CAAE;;IAEjH,OAAOnB,cAAc,CAACI,MAAM;;EAEhC,OAAO;IAAE,GAAGvB,QAAQ;IAAEmB;GAAgB;AAC1C;AACA,SAASgB,aAAW,CAACP,WAAW,EAAEW,mBAAmB,EAAE;EACnD,OAAO,IAAIV,IAAI,CAACD,WAAW,GAAGW,mBAAmB,GAAG,IAAI,CAAC,CAACC,WAAW,EAAE;AAC3E;;AC/BO,eAAeQ,UAAU,CAACvC,OAAO,EAAE;EACtC,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMb,SAAO,CAAC,sCAAsC,EAAE;IACnEW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAAC,CAAE;KAC/E;IACDH,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BS,YAAY,EAAEb,OAAO,CAACY;GACzB,CAAC;EACF,MAAMF,cAAc,GAAG;IACnBC,UAAU,EAAEX,OAAO,CAACW,UAAU;IAC9BP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BE,YAAY,EAAEN,OAAO,CAACM,YAAY;IAClCM,KAAK,EAAEZ,OAAO,CAACY,KAAK;IACpBE,MAAM,EAAEvB,QAAQ,CAACC,IAAI,CAACsB;GACzB;EACD,IAAIvB,QAAQ,CAACC,IAAI,CAACkD,UAAU,EACxBhC,cAAc,CAACe,SAAS,GAAGlC,QAAQ,CAACC,IAAI,CAACkD,UAAU;EACvD,IAAI1C,OAAO,CAACW,UAAU,KAAK,YAAY,EAAE;IACrC,OAAOD,cAAc,CAACI,MAAM;;EAEhC,OAAO;IAAE,GAAGvB,QAAQ;IAAEmB;GAAgB;AAC1C;;ACxBO,eAAea,YAAY,CAACvB,OAAO,EAAE;EACxC,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAO,EAAE,gCAAgC,EAAE;IAC3EyB,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BC,aAAa,EAAEL,OAAO,CAACM,YAAY;IACnCgC,UAAU,EAAE,eAAe;IAC3Bd,aAAa,EAAExB,OAAO,CAACuB;GAC1B,CAAC;EACF,MAAMJ,WAAW,GAAG,IAAIC,IAAI,CAAC7B,QAAQ,CAACF,OAAO,CAACgC,IAAI,CAAC,CAACC,OAAO,EAAE;EAC7D,MAAMZ,cAAc,GAAG;IACnBC,UAAU,EAAE,YAAY;IACxBP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BE,YAAY,EAAEN,OAAO,CAACM,YAAY;IAClCM,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACqB,YAAY;IACjCU,YAAY,EAAEhC,QAAQ,CAACC,IAAI,CAACgC,aAAa;IACzCC,SAAS,EAAEC,aAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACmC,UAAU,CAAC;IAC7DC,qBAAqB,EAAEF,aAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACqC,wBAAwB;GACzF;EACD,OAAO;IAAE,GAAGtC,QAAQ;IAAEmB;GAAgB;AAC1C;AACA,SAASgB,aAAW,CAACP,WAAW,EAAEW,mBAAmB,EAAE;EACnD,OAAO,IAAIV,IAAI,CAACD,WAAW,GAAGW,mBAAmB,GAAG,IAAI,CAAC,CAACC,WAAW,EAAE;AAC3E;;ACxBO,eAAeY,UAAU,CAAC3C,OAAO,EAAE;EACtC,MAAM;IAAEtB,OAAO,EAAEkE,cAAc;IAAEjC,UAAU;IAAEP,QAAQ;IAAEE,YAAY;IAAEM,KAAK;IAAE,GAAGiC;GAAgB,GAAG7C,OAAO;EACzG,MAAMtB,SAAO,GAAGkE,cAAc;EAE1B7C,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMb,SAAO,CAAC,6CAA6C,EAAE;IAC1EW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAErC,QAAS,IAAGE,YAAa,EAAC,CAAE;KAC/D;IACDH,SAAS,EAAEC,QAAQ;IACnBS,YAAY,EAAED,KAAK;IACnB,GAAGiC;GACN,CAAC;EACF,MAAMnC,cAAc,GAAGoC,MAAM,CAACC,MAAM,CAAC;IACjCpC,UAAU;IACVP,QAAQ;IACRE,YAAY;IACZM,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACoB;GACxB,EAAErB,QAAQ,CAACC,IAAI,CAACkD,UAAU,GAAG;IAAEjB,SAAS,EAAElC,QAAQ,CAACC,IAAI,CAACkD;GAAY,GAAG,EAAE,CAAC;EAC3E,OAAO;IAAE,GAAGnD,QAAQ;IAAEmB;GAAgB;AAC1C;;ACpBO,eAAesC,UAAU,CAAChD,OAAO,EAAE;EACtC,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMkD,IAAI,GAAGR,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAAC,CAAC;EAChE,MAAMf,QAAQ,GAAG,MAAMb,SAAO,CAAC,uCAAuC,EAAE;IACpEW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQS,IAAK;KAChC;IACD9C,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BS,YAAY,EAAEb,OAAO,CAACY;GACzB,CAAC;EACF,MAAMF,cAAc,GAAG;IACnBC,UAAU,EAAEX,OAAO,CAACW,UAAU;IAC9BP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BE,YAAY,EAAEN,OAAO,CAACM,YAAY;IAClCM,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACoB,KAAK;IAC1BE,MAAM,EAAEvB,QAAQ,CAACC,IAAI,CAACsB;GACzB;EACD,IAAIvB,QAAQ,CAACC,IAAI,CAACkD,UAAU,EACxBhC,cAAc,CAACe,SAAS,GAAGlC,QAAQ,CAACC,IAAI,CAACkD,UAAU;EACvD,IAAI1C,OAAO,CAACW,UAAU,KAAK,YAAY,EAAE;IACrC,OAAOD,cAAc,CAACI,MAAM;;EAEhC,OAAO;IAAE,GAAGvB,QAAQ;IAAEmB;GAAgB;AAC1C;;ACzBO,eAAewC,WAAW,CAAClD,OAAO,EAAE;EACvC,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMkD,IAAI,GAAGR,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAAC,CAAC;EAChE,OAAO5B,SAAO,CAAC,wCAAwC,EAAE;IACrDW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQS,IAAK;KAChC;IACD9C,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BS,YAAY,EAAEb,OAAO,CAACY;GACzB,CAAC;AACN;;ACZO,eAAeuC,mBAAmB,CAACnD,OAAO,EAAE;EAC/C,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMkD,IAAI,GAAGR,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAAC,CAAC;EAChE,OAAO5B,SAAO,CAAC,wCAAwC,EAAE;IACrDW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQS,IAAK;KAChC;IACD9C,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BS,YAAY,EAAEb,OAAO,CAACY;GACzB,CAAC;AACN;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/check-token.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/check-token.js new file mode 100644 index 0000000..1f65e94 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/check-token.js @@ -0,0 +1,27 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function checkToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await request("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}`, + }, + client_id: options.clientId, + access_token: options.token, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes, + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js new file mode 100644 index 0000000..bdb3b3d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js @@ -0,0 +1,14 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function createDeviceCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const parameters = { + client_id: options.clientId, + }; + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + return oauthRequest(request, "POST /login/device/code", parameters); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js new file mode 100644 index 0000000..ab5ce7d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js @@ -0,0 +1,15 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function deleteAuthorization(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request("DELETE /applications/{client_id}/grant", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/delete-token.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/delete-token.js new file mode 100644 index 0000000..e94ccb9 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/delete-token.js @@ -0,0 +1,15 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function deleteToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request("DELETE /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js new file mode 100644 index 0000000..8e54319 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js @@ -0,0 +1,34 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function exchangeDeviceCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code", + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean), + }; + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + (authentication.refreshToken = response.data.refresh_token), + (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)), + (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in)); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js new file mode 100644 index 0000000..412ad0f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js @@ -0,0 +1,33 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function exchangeWebFlowCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean), + }; + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + (authentication.refreshToken = response.data.refresh_token), + (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)), + (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in)); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js new file mode 100644 index 0000000..e742964 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js @@ -0,0 +1,11 @@ +import { oauthAuthorizationUrl, } from "@octokit/oauth-authorization-url"; +import { request as defaultRequest } from "@octokit/request"; +import { requestToOAuthBaseUrl } from "./utils"; +export function getWebFlowAuthorizationUrl({ request = defaultRequest, ...options }) { + const baseUrl = requestToOAuthBaseUrl(request); + // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\_(ツ)_/¯ + return oauthAuthorizationUrl({ + ...options, + baseUrl, + }); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/index.js new file mode 100644 index 0000000..1337e19 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/index.js @@ -0,0 +1,11 @@ +export { VERSION } from "./version"; +export * from "./get-web-flow-authorization-url"; +export * from "./exchange-web-flow-code"; +export * from "./create-device-code"; +export * from "./exchange-device-code"; +export * from "./check-token"; +export * from "./refresh-token"; +export * from "./scope-token"; +export * from "./reset-token"; +export * from "./delete-token"; +export * from "./delete-authorization"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js new file mode 100644 index 0000000..0ce9bf8 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js @@ -0,0 +1,27 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function refreshToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken, + }); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in), + }; + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/reset-token.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/reset-token.js new file mode 100644 index 0000000..3e87a10 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/reset-token.js @@ -0,0 +1,28 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function resetToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + const response = await request("PATCH /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes, + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/scope-token.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/scope-token.js new file mode 100644 index 0000000..608ab45 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/scope-token.js @@ -0,0 +1,23 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function scopeToken(options) { + const { request: optionsRequest, clientType, clientId, clientSecret, token, ...requestOptions } = options; + const request = optionsRequest || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await request("POST /applications/{client_id}/token/scoped", { + headers: { + authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`, + }, + client_id: clientId, + access_token: token, + ...requestOptions, + }); + const authentication = Object.assign({ + clientType, + clientId, + clientSecret, + token: response.data.token, + }, response.data.expires_at ? { expiresAt: response.data.expires_at } : {}); + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/types.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/utils.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/utils.js new file mode 100644 index 0000000..a2540b0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/utils.js @@ -0,0 +1,27 @@ +import { RequestError } from "@octokit/request-error"; +export function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) + ? "https://github.com" + : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +export async function oauthRequest(request, route, parameters) { + const withOAuthParameters = { + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json", + }, + ...parameters, + }; + const response = await request(route, withOAuthParameters); + if ("error" in response.data) { + const error = new RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { + request: request.endpoint.merge(route, withOAuthParameters), + headers: response.headers, + }); + // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved + error.response = response; + throw error; + } + return response; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/version.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/version.js new file mode 100644 index 0000000..37f4545 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "2.0.4"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts new file mode 100644 index 0000000..234ec3c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts @@ -0,0 +1,24 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +export declare type CheckTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type CheckTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type CheckTokenOAuthAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & { + authentication: OAuthAppAuthentication; +}; +export declare type CheckTokenGitHubAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function checkToken(options: CheckTokenOAuthAppOptions): Promise; +export declare function checkToken(options: CheckTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts new file mode 100644 index 0000000..65c121e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts @@ -0,0 +1,20 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +export declare type CreateDeviceCodeOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + scopes?: string[]; + request?: RequestInterface; +}; +export declare type CreateDeviceCodeGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + request?: RequestInterface; +}; +export declare type CreateDeviceCodeDeviceTokenResponse = OctokitResponse<{ + device_code: string; + user_code: string; + verification_uri: string; + expires_in: number; + interval: number; +}>; +export declare function createDeviceCode(options: CreateDeviceCodeOAuthAppOptions | CreateDeviceCodeGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts new file mode 100644 index 0000000..fee77d1 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts @@ -0,0 +1,18 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +export declare type DeleteAuthorizationOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteAuthorizationGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteAuthorizationResponse = Endpoints["DELETE /applications/{client_id}/grant"]["response"]; +export declare function deleteAuthorization(options: DeleteAuthorizationOAuthAppOptions): Promise; +export declare function deleteAuthorization(options: DeleteAuthorizationGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts new file mode 100644 index 0000000..d777357 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts @@ -0,0 +1,18 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +export declare type DeleteTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteTokenResponse = Endpoints["DELETE /applications/{client_id}/token"]["response"]; +export declare function deleteToken(options: DeleteTokenOAuthAppOptions): Promise; +export declare function deleteToken(options: DeleteTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts new file mode 100644 index 0000000..3528761 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts @@ -0,0 +1,57 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret = { + clientType: "oauth-app"; + clientId: string; + code: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; + scopes?: string[]; +}; +export declare type ExchangeDeviceCodeOAuthAppOptions = ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret & { + clientSecret: string; +}; +export declare type ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret = { + clientType: "github-app"; + clientId: string; + code: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type ExchangeDeviceCodeGitHubAppOptions = ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret & { + clientSecret: string; +}; +declare type OAuthAppAuthenticationWithoutClientSecret = Omit; +declare type GitHubAppAuthenticationWithoutClientSecret = Omit; +declare type GitHubAppAuthenticationWithExpirationWithoutClientSecret = Omit; +export declare type ExchangeDeviceCodeOAuthAppResponse = OctokitResponse & { + authentication: OAuthAppAuthentication; +}; +export declare type ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret = OctokitResponse & { + authentication: OAuthAppAuthenticationWithoutClientSecret; +}; +export declare type ExchangeDeviceCodeGitHubAppResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken; +}; +export declare type ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret = OctokitResponse & { + authentication: GitHubAppAuthenticationWithoutClientSecret | GitHubAppAuthenticationWithExpirationWithoutClientSecret; +}; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeOAuthAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps without clientSecret + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps. `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeGitHubAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps without using `clientSecret`. `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret): Promise; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts new file mode 100644 index 0000000..68b7c6d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts @@ -0,0 +1,32 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type ExchangeWebFlowCodeOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + code: string; + redirectUrl?: string; + request?: RequestInterface; +}; +export declare type ExchangeWebFlowCodeGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + code: string; + redirectUrl?: string; + request?: RequestInterface; +}; +export declare type ExchangeWebFlowCodeOAuthAppResponse = OctokitResponse & { + authentication: OAuthAppAuthentication; +}; +export declare type ExchangeWebFlowCodeGitHubAppResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken; +}; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps. + */ +export declare function exchangeWebFlowCode(options: ExchangeWebFlowCodeOAuthAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps. Note that `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeWebFlowCode(options: ExchangeWebFlowCodeGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts new file mode 100644 index 0000000..c721600 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts @@ -0,0 +1,25 @@ +import { OAuthAppResult, GitHubAppResult } from "@octokit/oauth-authorization-url"; +import { RequestInterface } from "@octokit/types"; +export declare type GetWebFlowAuthorizationUrlOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + allowSignup?: boolean; + login?: string; + scopes?: string | string[]; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type GetWebFlowAuthorizationUrlGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + allowSignup?: boolean; + login?: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type GetWebFlowAuthorizationUrlOAuthAppResult = OAuthAppResult; +export declare type GetWebFlowAuthorizationUrlGitHubAppResult = GitHubAppResult; +export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlOAuthAppOptions): OAuthAppResult; +export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlGitHubAppOptions): GitHubAppResult; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/index.d.ts new file mode 100644 index 0000000..0157ae2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/index.d.ts @@ -0,0 +1,12 @@ +export { VERSION } from "./version"; +export * from "./get-web-flow-authorization-url"; +export * from "./exchange-web-flow-code"; +export * from "./create-device-code"; +export * from "./exchange-device-code"; +export * from "./check-token"; +export * from "./refresh-token"; +export * from "./scope-token"; +export * from "./reset-token"; +export * from "./delete-token"; +export * from "./delete-authorization"; +export { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithRefreshToken, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts new file mode 100644 index 0000000..246e4f3 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts @@ -0,0 +1,13 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { GitHubAppAuthenticationWithRefreshToken, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type RefreshTokenOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + refreshToken: string; + request?: RequestInterface; +}; +export declare type RefreshTokenResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithRefreshToken; +}; +export declare function refreshToken(options: RefreshTokenOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts new file mode 100644 index 0000000..ca5402b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts @@ -0,0 +1,24 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +export declare type ResetTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type ResetTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type ResetTokenOAuthAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & { + authentication: OAuthAppAuthentication; +}; +export declare type ResetTokenGitHubAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function resetToken(options: ResetTokenOAuthAppOptions): Promise; +export declare function resetToken(options: ResetTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts new file mode 100644 index 0000000..d1cb95d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts @@ -0,0 +1,29 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +declare type CommonOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + permissions?: Endpoint["parameters"]["permissions"]; + request?: RequestInterface; +}; +declare type TargetOption = { + target: string; +}; +declare type TargetIdOption = { + target_id: number; +}; +declare type RepositoriesOption = { + repositories?: string[]; +}; +declare type RepositoryIdsOption = { + repository_ids?: number[]; +}; +declare type Endpoint = Endpoints["POST /applications/{client_id}/token/scoped"]; +export declare type ScopeTokenOptions = (CommonOptions & TargetOption & RepositoriesOption) | (CommonOptions & TargetIdOption & RepositoriesOption) | (CommonOptions & TargetOption & RepositoryIdsOption) | (CommonOptions & TargetIdOption & RepositoryIdsOption); +export declare type ScopeTokenResponse = Endpoint["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function scopeToken(options: ScopeTokenOptions): Promise; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/types.d.ts new file mode 100644 index 0000000..afeffee --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/types.d.ts @@ -0,0 +1,58 @@ +export declare type OAuthAppAuthentication = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + scopes: string[]; +}; +export declare type GitHubAppAuthenticationWithExpirationDisabled = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; +}; +export declare type GitHubAppAuthenticationWithExpirationEnabled = GitHubAppAuthenticationWithExpirationDisabled & { + expiresAt: string; +}; +export declare type GitHubAppAuthenticationWithRefreshToken = GitHubAppAuthenticationWithExpirationEnabled & { + refreshToken: string; + refreshTokenExpiresAt: string; +}; +/** + * @deprecated Use `GitHubAppAuthenticationWithExpirationDisabled` or + * `GitHubAppAuthenticationWithExpirationEnabled` instead. + */ +export declare type GitHubAppAuthentication = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; +}; +/** + * @deprecated Use `GitHubAppAuthenticationWithRefreshToken` instead. + */ +export declare type GitHubAppAuthenticationWithExpiration = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + refreshToken: string; + expiresAt: string; + refreshTokenExpiresAt: string; +}; +export declare type OAuthAppCreateTokenResponseData = { + access_token: string; + scope: string; + token_type: "bearer"; +}; +export declare type GitHubAppCreateTokenResponseData = { + access_token: string; + token_type: "bearer"; +}; +export declare type GitHubAppCreateTokenWithExpirationResponseData = { + access_token: string; + token_type: "bearer"; + expires_in: number; + refresh_token: string; + refresh_token_expires_in: number; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts new file mode 100644 index 0000000..ac692f5 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts @@ -0,0 +1,3 @@ +import { RequestInterface } from "@octokit/types"; +export declare function requestToOAuthBaseUrl(request: RequestInterface): string; +export declare function oauthRequest(request: RequestInterface, route: string, parameters: Record): Promise>; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/version.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/version.d.ts new file mode 100644 index 0000000..3ffcc39 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.0.4"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/README.md new file mode 100644 index 0000000..343c456 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/README.md @@ -0,0 +1,71 @@ +# 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://github.com/octokit/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit/request-error.js/actions?query=workflow%3ATest) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.skypack.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, { + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz", + }, + headers: { + authorization: "token secret123", + }, + }, + response: { + status: 500, + url: "https://api.github.com/foo", + headers: { + "x-github-request-id": "1:2:3:4", + }, + data: { + foo: "bar", + }, + }, +}); + +error.message; // Oops +error.status; // 500 +error.request; // { method, url, headers, body } +error.response; // { url, status, headers, data } +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-node/index.js new file mode 100644 index 0000000..c676580 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,65 @@ +'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 logOnceCode = once(deprecation => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + } + }); + } +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-node/index.js.map new file mode 100644 index 0000000..5381b78 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":["logOnceCode","once","deprecation","console","warn","logOnceHeaders","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","headers","response","requestCopy","Object","assign","request","authorization","replace","url","defineProperty","get","Deprecation"],"mappings":";;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACpE,MAAMG,cAAc,GAAGJ,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACvE;AACA;AACA;AACO,MAAMI,YAAY,SAASC,KAAK,CAAC;EACpCC,WAAW,CAACC,OAAO,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACtC,KAAK,CAACF,OAAO,CAAC;;;IAGd,IAAIF,KAAK,CAACK,iBAAiB,EAAE;MACzBL,KAAK,CAACK,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAACJ,WAAW,CAAC;;IAEnD,IAAI,CAACK,IAAI,GAAG,WAAW;IACvB,IAAI,CAACC,MAAM,GAAGJ,UAAU;IACxB,IAAIK,OAAO;IACX,IAAI,SAAS,IAAIJ,OAAO,IAAI,OAAOA,OAAO,CAACI,OAAO,KAAK,WAAW,EAAE;MAChEA,OAAO,GAAGJ,OAAO,CAACI,OAAO;;IAE7B,IAAI,UAAU,IAAIJ,OAAO,EAAE;MACvB,IAAI,CAACK,QAAQ,GAAGL,OAAO,CAACK,QAAQ;MAChCD,OAAO,GAAGJ,OAAO,CAACK,QAAQ,CAACD,OAAO;;;IAGtC,MAAME,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAAC;IACtD,IAAIT,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,EAAE;MACvCJ,WAAW,CAACF,OAAO,GAAGG,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAACL,OAAO,EAAE;QAC7DM,aAAa,EAAEV,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,CAACC,OAAO,CAAC,MAAM,EAAE,aAAa;OACrF,CAAC;;IAENL,WAAW,CAACM,GAAG,GAAGN,WAAW,CAACM;;;KAGzBD,OAAO,CAAC,sBAAsB,EAAE,0BAA0B;;;KAG1DA,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;IAC9D,IAAI,CAACF,OAAO,GAAGH,WAAW;;IAE1BC,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;MAChCC,GAAG,GAAG;QACFzB,WAAW,CAAC,IAAI0B,uBAAW,CAAC,0EAA0E,CAAC,CAAC;QACxG,OAAOhB,UAAU;;KAExB,CAAC;IACFQ,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;MACnCC,GAAG,GAAG;QACFpB,cAAc,CAAC,IAAIqB,uBAAW,CAAC,uFAAuF,CAAC,CAAC;QACxH,OAAOX,OAAO,IAAI,EAAE;;KAE3B,CAAC;;AAEV;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 0000000..5eb1927 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,55 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 0000000..d6e089c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,33 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +import { 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; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + /** + * error response headers + * + * @deprecated `error.headers` is deprecated in favor of `error.response.headers` + */ + headers: ResponseHeaders; + /** + * Response object if a response was received + */ + response?: OctokitResponse; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 0000000..e5e1fab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,9 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +export type RequestErrorOptions = { + /** @deprecated set `response` instead */ + headers?: ResponseHeaders; + request: RequestOptions; +} | { + response: OctokitResponse; + request: RequestOptions; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-web/index.js new file mode 100644 index 0000000..0fb64be --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,59 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} + +export { RequestError }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-web/index.js.map new file mode 100644 index 0000000..78f677f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACxE;AACA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;AAC9C,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;AAChC,QAAQ,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;AACjC,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW,EAAE;AAC5E,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,SAAS;AACT,QAAQ,IAAI,UAAU,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAC7C,YAAY,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/C,SAAS;AACT;AACA,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/D,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;AACnD,YAAY,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;AAC7E,gBAAgB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;AACnG,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;AACzC;AACA;AACA,aAAa,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AACxE;AACA;AACA,aAAa,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;AACvE,QAAQ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AACnC;AACA,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,YAAY,GAAG,GAAG;AAClB,gBAAgB,WAAW,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;AACzH,gBAAgB,OAAO,UAAU,CAAC;AAClC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;AAC/C,YAAY,GAAG,GAAG;AAClB,gBAAgB,cAAc,CAAC,IAAI,WAAW,CAAC,uFAAuF,CAAC,CAAC,CAAC;AACzI,gBAAgB,OAAO,OAAO,IAAI,EAAE,CAAC;AACrC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/package.json new file mode 100644 index 0000000..2215caa --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error/package.json @@ -0,0 +1,49 @@ +{ + "name": "@octokit/request-error", + "description": "Error class for Octokit request errors", + "version": "3.0.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "repository": "github:octokit/request-error.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-bundle-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "@types/node": "^18.0.0", + "@types/once": "^1.4.0", + "jest": "^29.0.0", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "2.8.3", + "ts-jest": "^29.0.0", + "typescript": "^4.0.0" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/README.md new file mode 100644 index 0000000..82a82a1 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/README.md @@ -0,0 +1,553 @@ +# 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://github.com/octokit/request.js/workflows/Test/badge.svg)](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%3Amain) + +`@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) when the runtime has no native `fetch` API). + + + + + +- [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) +- [Authentication](#authentication) +- [request()](#request) +- [`request.defaults()`](#requestdefaults) +- [`request.endpoint`](#requestendpoint) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter--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: "octokit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"], +}); +``` + +👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) + +😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). + +👍 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). + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from cdn.skypack.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 + +For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) + +```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", +}); +``` + +## Authentication + +The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const requestWithAuth = request.defaults({ + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, +}); +const result = await requestWithAuth("GET /user"); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + appId: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, + mediaType: { + previews: ["machine-man"], + }, +}); + +const { data: app } = await requestWithAuth("GET /app"); +const { data: app } = await requestWithAuth( + "POST /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + title: "Hello from the engine room", + } +); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + **Required**. 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 + + The base URL that route or url will be prefixed with, if they use relative paths. 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 + + 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.log + + object + + Used for internal logging. Defaults to console. +
+ 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. If the request was successful, the promise resolves with an object containing 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 promise is rejected with an `error` object containing 3 keys to help with debugging: + +- `error.status` The http response status code +- `error.request` The request options such as `method`, `url` and `data` +- `error.response` The http response object with `url`, `headers`, and `data` + +If the error is due to an `AbortSignal` being used, the resulting `AbortError` is bubbled up to the caller. + +## `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: + +- [`octokitRequest.endpoint()`](#endpoint) +- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) +- [`octokitRequest.endpoint.merge()`](#endpointdefaults) +- [`octokitRequest.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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-node/index.js new file mode 100644 index 0000000..11ac3f4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,156 @@ +'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 universalUserAgent = require('universal-user-agent'); +var isPlainObject = require('is-plain-object'); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + if (isPlainObject.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 || globalThis.fetch || /* istanbul ignore next */nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)).then(async response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new requestError.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined + }, + request: requestOptions + }); + } + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new requestError.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return getResponseData(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) throw error;else if (error.name === "AbortError") throw error; + throw new requestError.RequestError(error.message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); + +exports.request = request; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-node/index.js.map new file mode 100644 index 0000000..19fd47d --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","log","request","console","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","globalThis","nodeFetch","Object","assign","method","redirect","then","keyAndValue","matches","link","match","deprecationLink","pop","warn","sunset","RequestError","statusText","data","undefined","getResponseData","error","toErrorMessage","catch","name","message","contentType","get","test","json","text","getBuffer","errors","map","join","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","parse","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA3B,SAASC,iBAAiB,CAACC,QAAQ,EAAE;EAChD,OAAOA,QAAQ,CAACC,WAAW,EAAE;AACjC;;ACEe,SAASC,YAAY,CAACC,cAAc,EAAE;EACjD,MAAMC,GAAG,GAAGD,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1DD,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1BE,OAAO;EACb,IAAIC,2BAAa,CAACJ,cAAc,CAACK,IAAI,CAAC,IAClCC,KAAK,CAACC,OAAO,CAACP,cAAc,CAACK,IAAI,CAAC,EAAE;IACpCL,cAAc,CAACK,IAAI,GAAGG,IAAI,CAACC,SAAS,CAACT,cAAc,CAACK,IAAI,CAAC;;EAE7D,IAAIK,OAAO,GAAG,EAAE;EAChB,IAAIC,MAAM;EACV,IAAIC,GAAG;EACP,MAAMC,KAAK,GAAIb,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACW,KAAK,IACjEC,UAAU,CAACD,KAAK,8BACWE,SAAS;EACxC,OAAOF,KAAK,CAACb,cAAc,CAACY,GAAG,EAAEI,MAAM,CAACC,MAAM,CAAC;IAC3CC,MAAM,EAAElB,cAAc,CAACkB,MAAM;IAC7Bb,IAAI,EAAEL,cAAc,CAACK,IAAI;IACzBK,OAAO,EAAEV,cAAc,CAACU,OAAO;IAC/BS,QAAQ,EAAEnB,cAAc,CAACmB;GAC5B;;;EAGDnB,cAAc,CAACE,OAAO,CAAC,CAAC,CACnBkB,IAAI,CAAC,MAAOvB,QAAQ,IAAK;IAC1Be,GAAG,GAAGf,QAAQ,CAACe,GAAG;IAClBD,MAAM,GAAGd,QAAQ,CAACc,MAAM;IACxB,KAAK,MAAMU,WAAW,IAAIxB,QAAQ,CAACa,OAAO,EAAE;MACxCA,OAAO,CAACW,WAAW,CAAC,CAAC,CAAC,CAAC,GAAGA,WAAW,CAAC,CAAC,CAAC;;IAE5C,IAAI,aAAa,IAAIX,OAAO,EAAE;MAC1B,MAAMY,OAAO,GAAGZ,OAAO,CAACa,IAAI,IAAIb,OAAO,CAACa,IAAI,CAACC,KAAK,CAAC,8BAA8B,CAAC;MAClF,MAAMC,eAAe,GAAGH,OAAO,IAAIA,OAAO,CAACI,GAAG,EAAE;MAChDzB,GAAG,CAAC0B,IAAI,CAAE,uBAAsB3B,cAAc,CAACkB,MAAO,IAAGlB,cAAc,CAACY,GAAI,qDAAoDF,OAAO,CAACkB,MAAO,GAAEH,eAAe,GAAI,SAAQA,eAAgB,EAAC,GAAG,EAAG,EAAC,CAAC;;IAEzM,IAAId,MAAM,KAAK,GAAG,IAAIA,MAAM,KAAK,GAAG,EAAE;MAClC;;;IAGJ,IAAIX,cAAc,CAACkB,MAAM,KAAK,MAAM,EAAE;MAClC,IAAIP,MAAM,GAAG,GAAG,EAAE;QACd;;MAEJ,MAAM,IAAIkB,yBAAY,CAAChC,QAAQ,CAACiC,UAAU,EAAEnB,MAAM,EAAE;QAChDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAEC;SACT;QACD9B,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,KAAK,GAAG,EAAE;MAChB,MAAM,IAAIkB,yBAAY,CAAC,cAAc,EAAElB,MAAM,EAAE;QAC3Cd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAE,MAAME,eAAe,CAACpC,QAAQ;SACvC;QACDK,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,IAAI,GAAG,EAAE;MACf,MAAMoB,IAAI,GAAG,MAAME,eAAe,CAACpC,QAAQ,CAAC;MAC5C,MAAMqC,KAAK,GAAG,IAAIL,yBAAY,CAACM,cAAc,CAACJ,IAAI,CAAC,EAAEpB,MAAM,EAAE;QACzDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB;SACH;QACD7B,OAAO,EAAEF;OACZ,CAAC;MACF,MAAMkC,KAAK;;IAEf,OAAOD,eAAe,CAACpC,QAAQ,CAAC;GACnC,CAAC,CACGuB,IAAI,CAAEW,IAAI,IAAK;IAChB,OAAO;MACHpB,MAAM;MACNC,GAAG;MACHF,OAAO;MACPqB;KACH;GACJ,CAAC,CACGK,KAAK,CAAEF,KAAK,IAAK;IAClB,IAAIA,KAAK,YAAYL,yBAAY,EAC7B,MAAMK,KAAK,CAAC,KACX,IAAIA,KAAK,CAACG,IAAI,KAAK,YAAY,EAChC,MAAMH,KAAK;IACf,MAAM,IAAIL,yBAAY,CAACK,KAAK,CAACI,OAAO,EAAE,GAAG,EAAE;MACvCpC,OAAO,EAAEF;KACZ,CAAC;GACL,CAAC;AACN;AACA,eAAeiC,eAAe,CAACpC,QAAQ,EAAE;EACrC,MAAM0C,WAAW,GAAG1C,QAAQ,CAACa,OAAO,CAAC8B,GAAG,CAAC,cAAc,CAAC;EACxD,IAAI,mBAAmB,CAACC,IAAI,CAACF,WAAW,CAAC,EAAE;IACvC,OAAO1C,QAAQ,CAAC6C,IAAI,EAAE;;EAE1B,IAAI,CAACH,WAAW,IAAI,wBAAwB,CAACE,IAAI,CAACF,WAAW,CAAC,EAAE;IAC5D,OAAO1C,QAAQ,CAAC8C,IAAI,EAAE;;EAE1B,OAAOC,iBAAS,CAAC/C,QAAQ,CAAC;AAC9B;AACA,SAASsC,cAAc,CAACJ,IAAI,EAAE;EAC1B,IAAI,OAAOA,IAAI,KAAK,QAAQ,EACxB,OAAOA,IAAI;;EAEf,IAAI,SAAS,IAAIA,IAAI,EAAE;IACnB,IAAIzB,KAAK,CAACC,OAAO,CAACwB,IAAI,CAACc,MAAM,CAAC,EAAE;MAC5B,OAAQ,GAAEd,IAAI,CAACO,OAAQ,KAAIP,IAAI,CAACc,MAAM,CAACC,GAAG,CAACtC,IAAI,CAACC,SAAS,CAAC,CAACsC,IAAI,CAAC,IAAI,CAAE,EAAC;;IAE3E,OAAOhB,IAAI,CAACO,OAAO;;;EAGvB,OAAQ,kBAAiB9B,IAAI,CAACC,SAAS,CAACsB,IAAI,CAAE,EAAC;AACnD;;ACzHe,SAASiB,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EAC3D,MAAMC,QAAQ,GAAGF,WAAW,CAACG,QAAQ,CAACF,WAAW,CAAC;EAClD,MAAMG,MAAM,GAAG,UAAUC,KAAK,EAAEC,UAAU,EAAE;IACxC,MAAMC,eAAe,GAAGL,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;IACzD,IAAI,CAACC,eAAe,CAACtD,OAAO,IAAI,CAACsD,eAAe,CAACtD,OAAO,CAACwD,IAAI,EAAE;MAC3D,OAAO3D,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACH,eAAe,CAAC,CAAC;;IAExD,MAAMtD,OAAO,GAAG,CAACoD,KAAK,EAAEC,UAAU,KAAK;MACnC,OAAOxD,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACR,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC,CAAC,CAAC;KACzE;IACDvC,MAAM,CAACC,MAAM,CAACf,OAAO,EAAE;MACnBiD,QAAQ;MACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;KAC7C,CAAC;IACF,OAAOK,eAAe,CAACtD,OAAO,CAACwD,IAAI,CAACxD,OAAO,EAAEsD,eAAe,CAAC;GAChE;EACD,OAAOxC,MAAM,CAACC,MAAM,CAACoC,MAAM,EAAE;IACzBF,QAAQ;IACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;GAC7C,CAAC;AACN;;MCjBajD,OAAO,GAAG8C,YAAY,CAACG,iBAAQ,EAAE;EAC1CzC,OAAO,EAAE;IACL,YAAY,EAAG,sBAAqBf,OAAQ,IAAGkE,+BAAY,EAAG;;AAEtE,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 0000000..223307a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,123 @@ +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) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/get-buffer-response.js new file mode 100644 index 0000000..845a394 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 0000000..2460e99 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 0000000..4b40fe8 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 0000000..e206429 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 0000000..4901c79 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,11 @@ +import { EndpointInterface } from "@octokit/types"; +export default function fetchWrapper(requestOptions: ReturnType & { + redirect?: "error" | "follow" | "manual"; +}): Promise<{ + status: number; + url: string; + headers: { + [header: string]: string; + }; + data: any; +}>; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts new file mode 100644 index 0000000..915b705 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 0000000..1030809 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("@octokit/types").RequestInterface; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 0000000..b45decc --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..0080469 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types"; +export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-web/index.js new file mode 100644 index 0000000..bf549a4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,162 @@ +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 = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +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 }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-web/index.js.map new file mode 100644 index 0000000..b2d1f15 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA3B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACpD,IAAI,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;AACrD,IAAI,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG;AACpE,UAAU,cAAc,CAAC,OAAO,CAAC,GAAG;AACpC,UAAU,OAAO,CAAC;AAClB,IAAI,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;AAC1C,QAAQ,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK;AACL,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK;AACzE,QAAQ,UAAU,CAAC,KAAK;AACxB,mCAAmC,SAAS,CAAC;AAC7C,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACnD,QAAQ,MAAM,EAAE,cAAc,CAAC,MAAM;AACrC,QAAQ,IAAI,EAAE,cAAc,CAAC,IAAI;AACjC,QAAQ,OAAO,EAAE,cAAc,CAAC,OAAO;AACvC,QAAQ,QAAQ,EAAE,cAAc,CAAC,QAAQ;AACzC,KAAK;AACL;AACA;AACA,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC5B,SAAS,IAAI,CAAC,OAAO,QAAQ,KAAK;AAClC,QAAQ,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC3B,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,QAAQ,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;AACpD,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,aAAa,IAAI,OAAO,EAAE;AACtC,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC/F,YAAY,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7D,YAAY,GAAG,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,kDAAkD,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClN,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;AAC9C,YAAY,OAAO;AACnB,SAAS;AACT;AACA,QAAQ,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9C,YAAY,IAAI,MAAM,GAAG,GAAG,EAAE;AAC9B,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;AAChE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,SAAS;AACnC,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;AAC3D,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,MAAM,eAAe,CAAC,QAAQ,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE;AAC3B,YAAY,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;AACzE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI;AACxB,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzC,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK;AACxB,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,GAAG;AACf,YAAY,OAAO;AACnB,YAAY,IAAI;AAChB,SAAS,CAAC;AACV,KAAK,CAAC;AACN,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1B,QAAQ,IAAI,KAAK,YAAY,YAAY;AACzC,YAAY,MAAM,KAAK,CAAC;AACxB,aAAa,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;AAC5C,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;AACnD,YAAY,OAAO,EAAE,cAAc;AACnC,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;AACD,eAAe,eAAe,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC7D,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AAC/C,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACpE,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AACD,SAAS,cAAc,CAAC,IAAI,EAAE;AAC9B,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AAChC,QAAQ,OAAO,IAAI,CAAC;AACpB;AACA,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE;AAC3B,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACxC,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpF,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL;AACA,IAAI,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;;ACzHc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACvD,IAAI,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;AAChD,QAAQ,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;AACvE,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;AAC/C,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AAC/B,YAAY,QAAQ;AACpB,YAAY,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACtE,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,CAAC;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/package.json new file mode 100644 index 0000000..53910ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/request/package.json @@ -0,0 +1,58 @@ +{ + "name": "@octokit/request", + "description": "Send parameterized requests to GitHub's APIs with sensible defaults in browsers and Node", + "version": "6.2.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "repository": "github:octokit/request.js", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/auth-app": "^4.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^29.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^18.0.0", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^9.3.1", + "jest": "^29.0.0", + "lolex": "^6.0.0", + "prettier": "2.8.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "string-to-arraybuffer": "^1.0.2", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..774b76a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "8.2.1"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..83a6ec5 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "8.2.1"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..1217c90 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "8.2.1"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..72ec59e --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3499 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /organizations/{org}/codespaces/secrets/{secret_name}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-a-custom-role + */ + "DELETE /orgs/{org}/custom_roles/{role_id}": Operation<"/orgs/{org}/custom_roles/{role_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#get-github-enterprise-server-statistics + */ + "GET /enterprise-installation/{enterprise_or_org}/server-statistics": Operation<"/enterprise-installation/{enterprise_or_org}/server-statistics", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/cache/usage": Operation<"/enterprises/{enterprise}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions": Operation<"/enterprises/{enterprise}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/organizations": Operation<"/enterprises/{enterprise}/actions/permissions/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/selected-actions": Operation<"/enterprises/{enterprise}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/workflow": Operation<"/enterprises/{enterprise}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners": Operation<"/enterprises/{enterprise}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/downloads": Operation<"/enterprises/{enterprise}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code-scanning/alerts": Operation<"/enterprises/{enterprise}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise + */ + "GET /enterprises/{enterprise}/settings/billing/advanced-security": Operation<"/enterprises/{enterprise}/settings/billing/advanced-security", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-custom-repository-roles-in-an-organization + */ + "GET /organizations/{organization_id}/custom_roles": Operation<"/organizations/{organization_id}/custom_roles", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /organizations/{org}/codespaces/secrets": Operation<"/organizations/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /organizations/{org}/codespaces/secrets/public-key": Operation<"/organizations/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /organizations/{org}/codespaces/secrets/{secret_name}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /organizations/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-fine-grained-permissions-for-an-organization + */ + "GET /orgs/{org}/fine_grained_permissions": Operation<"/orgs/{org}/fine_grained_permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization + */ + "GET /orgs/{org}/settings/billing/advanced-security": Operation<"/orgs/{org}/settings/billing/advanced-security", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs/#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-custom-role + */ + "PATCH /orgs/{org}/custom_roles/{role_id}": Operation<"/orgs/{org}/custom_roles/{role_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos/#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues/#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/registration-token": Operation<"/enterprises/{enterprise}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/remove-token": Operation<"/enterprises/{enterprise}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-a-custom-role + */ + "POST /orgs/{org}/custom_roles": Operation<"/orgs/{org}/custom_roles", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions": Operation<"/enterprises/{enterprise}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-organizations-enabled-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations": Operation<"/enterprises/{enterprise}/actions/permissions/organizations", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/selected-actions": Operation<"/enterprises/{enterprise}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/workflow": Operation<"/enterprises/{enterprise}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /organizations/{org}/codespaces/secrets/{secret_name}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /organizations/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..2f1a3d5 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "8.2.1"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 0000000..c61fbbe --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +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/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 0000000..9da833c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 0000000..3983580 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,20 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public" + }, + "version": "14.0.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "8.0.0" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..f4bd1f0 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,46693 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installations": { + /** + * You must use a [JWT](https://docs.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. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprise-installation/{enterprise_or_org}/server-statistics": { + /** + * Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + get: operations["enterprise-admin/get-server-statistics"]; + }; + "/enterprises/{enterprise}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-github-actions-permissions-enterprise"]; + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-github-actions-permissions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations": { + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise"]; + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/disable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-allowed-actions-enterprise"]; + /** + * Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-allowed-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-enterprise"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-group-from-enterprise"]; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + patch: operations["enterprise-admin/update-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise"]; + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": { + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-in-group-for-enterprise"]; + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-self-hosted-runners-in-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + put: operations["enterprise-admin/add-self-hosted-runner-to-group-for-enterprise"]; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners": { + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-runner-applications-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + post: operations["enterprise-admin/create-registration-token-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["enterprise-admin/create-remove-token-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-for-enterprise"]; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be a member of the enterprise, + * and you must use an access token with the `repo` scope or `security_events` scope. + */ + get: operations["code-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/settings/billing/advanced-security": { + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-billing-ghe"]; + }; + "/events": { + /** 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. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * 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. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** 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. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** 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. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + get: operations["activity/get-thread"]; + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/organizations/{organization_id}/custom_roles": { + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + get: operations["orgs/list-custom-roles"]; + }; + "/organizations/{org}/codespaces/secrets": { + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-org-secrets"]; + }; + "/organizations/{org}/codespaces/secrets/public-key": { + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/get-org-public-key"]; + }; + "/organizations/{org}/codespaces/secrets/{secret_name}": { + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * // Written with ❤️ by PSJ and free to use under The Unlicense. + * const sodium=require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with secret before running the script. + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key. + * + * //Check if libsodium is ready and then proceed. + * + * sodium.ready.then( ()=>{ + * + * // Convert Secret & Base64 key to Uint8Array. + * let binkey= sodium.from_base64(key, sodium.base64_variants.ORIGINAL) //Equivalent of Buffer.from(key, 'base64') + * let binsec= sodium.from_string(secret) // Equivalent of Buffer.from(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes= sodium.crypto_box_seal(binsec,binkey) // Similar to tweetsodium.seal(binsec,binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output=sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) //Equivalent of Buffer.from(encBytes).toString('base64') + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/delete-org-secret"]; + }; + "/organizations/{org}/codespaces/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/set-selected-repos-for-org-secret"]; + }; + "/organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}": { + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/custom_roles": { + /** + * **Note**: This operation is in beta and is subject to change. + * + * Creates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + post: operations["orgs/create-custom-role"]; + }; + "/orgs/{org}/custom_roles/{role_id}": { + /** + * **Note**: This operation is in beta and is subject to change. + * + * Deletes a custom role from an organization. Once the custom role has been deleted, any + * user, team, or invitation with the deleted custom role will be reassigned the inherited role. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + delete: operations["orgs/delete-custom-role"]; + /** + * **Note**: This operation is in beta and subject to change. + * + * Updates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + patch: operations["orgs/update-custom-role"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/fine_grained_permissions": { + /** + * **Note**: This operation is in beta and subject to change. + * + * Lists the fine-grained permissions available for an organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + */ + get: operations["orgs/list-fine-grained-permissions"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** 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`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** 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. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** 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. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/memberships/{username}": { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations["orgs/get-membership-for-user"]; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * 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. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** 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. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/public_members": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** Lists repositories for the specified organization. */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/security-managers": { + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + get: operations["orgs/list-security-manager-teams"]; + }; + "/orgs/{org}/security-managers/teams/{team_slug}": { + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + put: operations["orgs/add-security-manager-team"]; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + delete: operations["orgs/remove-security-manager-team"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/advanced-security": { + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * 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://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/orgs/{org}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** 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: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** 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. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** 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. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** 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. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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: operations["rate-limit/get"]; + }; + "/repos/{owner}/{repo}": { + /** 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: operations["repos/get"]; + /** + * 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, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * 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. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-pull-request-review-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-status-checks-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-all-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations["repos/set-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations["repos/add-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **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: operations["checks/get"]; + /** + * **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. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** 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. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **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. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + get: operations["code-scanning/get-alert"]; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases": { + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/list-codeql-databases"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": { + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/check-collaborator"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + put: operations["repos/add-collaborator"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * 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. + * + * + * 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` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * 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`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * Returns all community profile metrics for a repository. The repository must be public, and cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + get: operations["repos/get-content"]; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * 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. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/get-alert"]; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + patch: operations["dependabot/update-alert"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + get: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * 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. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations["repos/create-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": { + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** 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. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + get: operations["repos/list-webhooks"]; + /** + * 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. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * 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` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * 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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** 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://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** 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. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + put: operations["repos/enable-lfs-for-repo"]; + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** List all notifications for the current user. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + put: operations["repos/update-information-about-pages-site"]; + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + post: operations["repos/create-pages-site"]; + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * 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. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployment": { + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + post: operations["repos/create-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/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. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["pulls/list"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + get: operations["pulls/list-requested-reviewers"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["pulls/request-reviewers"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * 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. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * 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. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. 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. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** 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. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** 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. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** 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://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **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. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * 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. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/ssh_signing_keys": { + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/list-ssh-signing-keys-for-authenticated-user"]; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + post: operations["users/create-ssh-signing-key-for-authenticated-user"]; + }; + "/user/ssh_signing_keys/{ssh_signing_key_id}": { + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/get-ssh-signing-key-for-authenticated-user"]; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + delete: operations["users/delete-ssh-signing-key-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** 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. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/ssh_signing_keys": { + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + get: operations["users/list-ssh-signing-keys-for-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description Simple User + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description Simple User + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise account + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # 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 [EMAIL]. 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/ + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + /** + * Server Statistics Proxy Endpoint + * @description Response of S4 Proxy endpoint that provides GHES statistics + */ + "server-statistics": { + server_id?: string; + collection_date?: string; + schema_version?: string; + ghes_version?: string; + host_name?: string; + github_connect?: { + features_enabled?: string[]; + }; + ghe_stats?: { + comments?: { + total_commit_comments?: number; + total_gist_comments?: number; + total_issue_comments?: number; + total_pull_request_comments?: number; + }; + gists?: { + total_gists?: number; + private_gists?: number; + public_gists?: number; + }; + hooks?: { + total_hooks?: number; + active_hooks?: number; + inactive_hooks?: number; + }; + issues?: { + total_issues?: number; + open_issues?: number; + closed_issues?: number; + }; + milestones?: { + total_milestones?: number; + open_milestones?: number; + closed_milestones?: number; + }; + orgs?: { + total_orgs?: number; + disabled_orgs?: number; + total_teams?: number; + total_team_members?: number; + }; + pages?: { + total_pages?: number; + }; + pulls?: { + total_pulls?: number; + merged_pulls?: number; + mergeable_pulls?: number; + unmergeable_pulls?: number; + }; + repos?: { + total_repos?: number; + root_repos?: number; + fork_repos?: number; + org_repos?: number; + total_pushes?: number; + total_wikis?: number; + }; + users?: { + total_users?: number; + admin_users?: number; + suspended_users?: number; + }; + }; + dormant_users?: { + total_dormant_users?: number; + dormancy_threshold?: string; + }; + }[]; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-organizations": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-enterprise-permissions": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + /** @description The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. */ + selected_organizations_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + /** + * Organization Simple + * @description Organization Simple + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** @description The security alert number. */ + "alert-number": number; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "alert-instances-url": string; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-alert-fixed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-alert-dismissed-at": string | null; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | ("source" | "generated" | "test" | "library") + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + /** + * Simple Repository + * @description Simple Repository + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + "advanced-security-active-committers-user": { + user_login: string; + /** @example 2021-11-03 */ + last_pushed_date: string; + }; + "advanced-security-active-committers-repository": { + /** @example octocat/Hello-World */ + name: string; + /** @example 25 */ + advanced_security_committers: number; + advanced_security_committers_breakdown: components["schemas"]["advanced-security-active-committers-user"][]; + }; + "advanced-security-active-committers": { + /** @example 25 */ + total_advanced_security_committers?: number; + /** @example 2 */ + total_count?: number; + repositories: components["schemas"]["advanced-security-active-committers-repository"][]; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + 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?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * 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. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** @example flat-rate */ + price_model: string; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + /** + * Repository + * @description A git repository + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Custom Repository Role + * @description Custom repository roles created by organization administrators + */ + "organization-custom-repository-role": { + /** @description The unique identifier of the custom role. */ + id: number; + /** @description The name of the custom role. */ + name: string; + /** @description A short description about who this role is for or what permissions it grants. */ + description?: string | null; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role?: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. */ + permissions?: string[]; + organization?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** + * @description Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + * this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + * to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + /** + * @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. + * @example you've used 100% of your spending limit for Codespaces + */ + last_known_stop_notice?: string | null; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + }; + /** + * Organization Fine-Grained Permission + * @description Fine-grained permissions available for the organization + */ + "organization-fine-grained-permission": { + name: string; + description: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Team Organization + * @description Team Organization + */ + "team-organization": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @example true */ + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. `none` means access is only possible from workflows in this repository. + * @enum {string} + */ + access_level: "none" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description Simple Commit + */ + "nullable-simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title: string; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: { [key: string]: unknown } | string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + * @example true + */ + is_alphanumeric: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + 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; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description Simple Commit + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @example completed + * @enum {string|null} + */ + status: ("queued" | "in_progress" | "completed") | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** + * CodeQL Database + * @description A CodeQL database. + */ + "code-scanning-codeql-database": { + /** @description The ID of the CodeQL database. */ + id: number; + /** @description The name of the CodeQL database. */ + name: string; + /** @description The language of the CodeQL database. */ + language: string; + uploader: components["schemas"]["simple-user"]; + /** @description The MIME type of the CodeQL database file. */ + content_type: string; + /** @description The size of the CodeQL database file in bytes. */ + size: number; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * Format: uri + * @description The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + */ + url: string; + }; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string | null; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string | null; + target_url: string | null; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + } & { + content: unknown; + encoding: unknown; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + /** @enum {string} */ + type: "dir" | "file" | "submodule" | "symlink"; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + /** @enum {string} */ + type: "file"; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + /** @enum {string} */ + type: "symlink"; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Submodule Content + * @description An object describing a submodule + */ + "content-submodule": { + /** @enum {string} */ + type: "submodule"; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** + * @description The scope of the vulnerable dependency. + * @enum {string|null} + */ + "dependabot-alert-scope": ("development" | "runtime") | null; + /** + * @description State of a Dependabot alert. + * @enum {string} + */ + "dependabot-alert-state": "dismissed" | "fixed" | "open"; + /** @description The details of the vulnerable package. */ + "dependabot-alert-package": { + ecosystem?: string; + name?: string; + }; + "dependabot-alert-dependency": { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The path to the manifest filename. */ + manifest_path?: string; + scope?: components["schemas"]["dependabot-alert-scope"]; + }; + /** @description The details of the security advisory, including summary, description, and severity. */ + "dependabot-alert-security-advisory": { + ghsa_id: string; + cve_id?: string | null; + summary: string; + description: string; + /** @enum {string} */ + severity: "low" | "medium" | "high" | "critical"; + identifiers: { + /** @enum {string} */ + type: "GHSA" | "CVE"; + value: string; + }[]; + references: { + /** Format: uri */ + url: string; + }[]; + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + /** Format: date-time */ + published_at: string; + /** Format: date-time */ + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + /** Format: date-time */ + withdrawn_at: string | null; + }; + /** @description The details of the vulnerability of a security advisory. */ + "dependabot-alert-security-vulnerability": { + package?: components["schemas"]["dependabot-alert-package"]; + severity?: string; + vulnerable_version_range?: string; + first_patched_version?: { + identifier?: string; + }; + }; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "dependabot-alert-dismissed_at": string | null; + /** + * @description **Required when the `state` is `dismissed`.** The reason for dismissing the Dependabot alert. + * @enum {string|null} + */ + "dependabot-alert-dismissed-reason": + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. The maximum size is 280 characters. */ + "dependabot-alert-dismissed-comment": string | null; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "dependabot-alert-fixed-at": string | null; + "dependabot-alert": { + number: components["schemas"]["alert-number"]; + state: components["schemas"]["dependabot-alert-state"]; + dependency: components["schemas"]["dependabot-alert-dependency"]; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + dismissed_at: components["schemas"]["dependabot-alert-dismissed_at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_reason: components["schemas"]["dependabot-alert-dismissed-reason"]; + dismissed_comment: components["schemas"]["dependabot-alert-dismissed-comment"]; + fixed_at: components["schemas"]["dependabot-alert-fixed-at"]; + }; + /** + * @description Sets the status of the dependabot alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "dependabot-alert-set-state": "dismissed" | "open"; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + /** + * @description Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + * @enum {string} + */ + scope: "unknown" | "runtime" | "development"; + }[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: Partial & Partial & Partial; + }; + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { [key: string]: components["schemas"]["dependency"] }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. */ + manifests?: { [key: string]: components["schemas"]["manifest"] }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy-settings": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + protection_rules?: (Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + }>)[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + "deployment-branch-policy": { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number; + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string; + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: { + /** @example "foo@bar.com" */ + email?: string; + /** @example "foo" */ + password?: string; + /** @example "roomer" */ + room?: string; + /** @example "foo" */ + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + /** @example "sha256" */ + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + /** @example "abc" */ + token?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** @example 1 */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + added_by?: string | null; + last_used?: string | null; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + * @example https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + * @example hello-world.github.io + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + * @example monalisa-1231a2312sa32-23sda74.drafts.github.io + */ + preview_url?: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + web_commit_signoff_required?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + /** @description Sets an optional comment when closing an alert. Must be null when changing `state` to `open`. */ + "secret-scanning-alert-resolution-comment": string | null; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: "commit"; + details: components["schemas"]["secret-scanning-location-commit"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * SSH Signing Key + * @description A public SSH key used to sign Git commits + */ + "ssh-signing-key": { + key: string; + id: number; + title: string; + /** Format: date-time */ + created_at: string; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + /** + * Simple Installation + * @description Simple Installation + */ + "simple-installation": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + /** + * @description The global node ID of the installation. + * @example MDQ6VXNlcjU4MzIzMQ== + */ + node_id: string; + }; + "webhook-merge-group-checks-requested": { + action: string; + installation?: components["schemas"]["simple-installation"]; + merge_group: { + base_ref: string; + head_ref: string; + head_sha: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** A header with no content is returned. */ + no_content: unknown; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "per-page": number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string; + "delivery-id": number; + /** @description Page number of the results to fetch. */ + page: number; + /** @description 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; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The slug version of the enterprise name or the login of an organization. */ + "enterprise-or-org": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name": components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid": components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + "pagination-after": string; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type": string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution": string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort": "created" | "updated"; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** @description 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; + /** @description The unique identifier of the pull request thread. */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The unique identifier of the role. */ + "role-id": number; + /** @description The unique identifier of the hook. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** @description The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": + | "dependency_graph" + | "dependabot_alerts" + | "dependabot_security_updates" + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + "org-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref": components["schemas"]["code-scanning-ref"]; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key": string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort": + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + "workflow-run-status": + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests": boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id": number; + /** @description Only returns workflow runs that are associated with the specified `head_sha`. */ + "workflow-run-head-sha": string; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name": string; + /** @description Returns check runs with the specified `status`. */ + status: "queued" | "in_progress" | "completed"; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + "dependabot-alert-state": string; + /** + * @description A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + "dependabot-alert-severity": string; + /** + * @description A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `rubygems`, `rust` + */ + "dependabot-alert-ecosystem": string; + /** @description A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + "dependabot-alert-package": string; + /** @description A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + "dependabot-alert-manifest": string; + /** @description Scope of the dependency on a Dependabot alert. */ + "dependabot-alert-scope": components["schemas"]["dependabot-alert-scope"]; + /** + * @description The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + "dependabot-alert-sort": "created" | "updated"; + /** @description The number that identifies a Dependabot alert in its repository. You can find this at the end of the URL for a Dependabot alert within GitHub, or in `number` fields in the response from the `GET /repos/{owner}/{repo}/dependabot/alerts` operation. */ + "dependabot-alert-number": components["schemas"]["alert-number"]; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path": string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per: "" | "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** @description 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"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query": number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + /** @description The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.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. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + "enterprise-admin/get-server-statistics": { + parameters: { + path: { + /** The slug version of the enterprise name or the login of an organization. */ + enterprise_or_org: components["parameters"]["enterprise-or-org"]; + }; + query: { + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + date_start?: string; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + date_end?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["server-statistics"]; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "actions/get-actions-cache-usage-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-github-actions-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-enterprise-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-github-actions-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/disable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-allowed-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-allowed-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + "actions/get-github-actions-default-workflow-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Success response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + "actions/set-github-actions-default-workflow-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Success response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-group-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/update-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name?: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runners-in-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-self-hosted-runners-in-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + "enterprise-admin/add-self-hosted-runner-to-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runners-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count?: number; + runners?: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-runner-applications-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + "enterprise-admin/create-registration-token-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "enterprise-admin/create-remove-token-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be a member of the enterprise, + * and you must use an access token with the `repo` scope or `security_events` scope. + */ + "code-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + "billing/get-github-advanced-security-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + /** 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. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + "gists/list-public": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names of files to be updated + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** 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. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 50). */ + per_page?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + "orgs/list-custom-roles": { + parameters: { + path: { + /** The unique identifier of the organization. */ + organization_id: string; + }; + }; + responses: { + /** Response - list of custom role names */ + 200: { + content: { + "application/json": { + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number; + custom_roles?: components["schemas"]["organization-custom-repository-role"][]; + }; + }; + }; + }; + }; + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-org-secret"][]; + }; + }; + }; + }; + }; + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * // Written with ❤️ by PSJ and free to use under The Unlicense. + * const sodium=require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with secret before running the script. + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key. + * + * //Check if libsodium is ready and then proceed. + * + * sodium.ready.then( ()=>{ + * + * // Convert Secret & Base64 key to Uint8Array. + * let binkey= sodium.from_base64(key, sodium.base64_variants.ORIGINAL) //Equivalent of Buffer.from(key, 'base64') + * let binsec= sodium.from_string(secret) // Equivalent of Buffer.from(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes= sodium.crypto_box_seal(binsec,binkey) // Similar to tweetsodium.seal(binsec,binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output=sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) //Equivalent of Buffer.from(encBytes).toString('base64') + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description The ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean; + /** @example "http://github.blog" */ + blog?: string; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot alerts is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot security updates is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * **Note**: This operation is in beta and is subject to change. + * + * Creates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + "orgs/create-custom-role": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-custom-repository-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the custom role. */ + name: string; + /** @description A short description about the intended usage of this role or what permissions it grants. */ + description?: string; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. */ + permissions: string[]; + }; + }; + }; + }; + /** + * **Note**: This operation is in beta and is subject to change. + * + * Deletes a custom role from an organization. Once the custom role has been deleted, any + * user, team, or invitation with the deleted custom role will be reassigned the inherited role. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + "orgs/delete-custom-role": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the role. */ + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Note**: This operation is in beta and subject to change. + * + * Updates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + "orgs/update-custom-role": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the role. */ + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-custom-repository-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the custom role. */ + name?: string; + /** @description A short description about who this role is for or what permissions it grants. */ + description?: string; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role?: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. If specified, these permissions will replace any currently set on the role. */ + permissions?: string[]; + }; + }; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: This operation is in beta and subject to change. + * + * Lists the fine-grained permissions available for an organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + */ + "orgs/list-fine-grained-permissions": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-fine-grained-permission"][]; + }; + }; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * \* `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** 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. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * 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. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `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. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/en/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists repositories for the specified organization. */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + type?: + | "all" + | "public" + | "private" + | "forks" + | "sources" + | "member" + | "internal"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description 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; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description 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; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.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; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + "orgs/list-security-manager-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-simple"][]; + }; + }; + }; + }; + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/add-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** The organization has reached the maximum number of security manager teams. */ + 409: unknown; + }; + }; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/remove-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + "billing/get-github-advanced-security-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description 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` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + */ + permission?: string; + }; + }; + }; + }; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "orgs/enable-or-disable-security-product-on-all-org-repos": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + enablement: components["parameters"]["org-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** 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. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** 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. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/list-columns": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.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. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description 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; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description 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; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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://docs.github.com/rest/reference/checks#output-object) description. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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://docs.github.com/rest/reference/checks#output-object-1) description. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** 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. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. */ + sort?: "created"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/list-codeql-databases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/get-codeql-database": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The language of the CodeQL database. */ + language: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis 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; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + */ + permission?: string; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ + 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 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?: components["parameters"]["since"]; + /** 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; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * **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. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * + * 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` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * Returns all community profile metrics for a repository. The repository must be public, and cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * 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. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-state"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-severity"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-ecosystem"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-package"]; + /** A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + manifest?: components["parameters"]["dependabot-alert-manifest"]; + /** Scope of the dependency on a Dependabot alert. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies a Dependabot alert in its repository. You can find this at the end of the URL for a Dependabot alert within GitHub, or in `number` fields in the response from the `GET /repos/{owner}/{repo}/dependabot/alerts` operation. */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + "dependabot/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies a Dependabot alert in its repository. You can find this at the end of the URL for a Dependabot alert within GitHub, or in `number` fields in the response from the `GET /repos/{owner}/{repo}/dependabot/alerts` operation. */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["dependabot-alert-set-state"]; + dismissed_reason?: components["schemas"]["dependabot-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["dependabot-alert-dismissed-comment"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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 | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/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[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description 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`. + * @default + */ + target_url?: string; + /** + * @description 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: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description 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` */ + auto_inactive?: boolean; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/list-deployment-branch-policies": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number; + branch_policies: components["schemas"]["deployment-branch-policy"][]; + }; + }; + }; + }; + }; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** Response if the same branch name pattern already exists */ + 303: never; + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/update-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/delete-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + /** @description When forking from an existing repository, fork with only the default branch. */ + default_branch_only?: boolean; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description 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[]; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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; + }; + }; + }; + }; + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description 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. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. 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. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + }; + /** + * List issues in a repository. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. */ + 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?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description 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 | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "not_planned" | "reopened") | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. 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. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. 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. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description 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://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** List all notifications for the current user. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean; + /** + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * 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. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + "repos/create-pages-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-deployment"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + artifact_url: string; + /** + * @description The target environment for this GitHub Pages deployment. + * @default github-pages + */ + environment?: string; + /** + * @description A unique string that represents the version of the build for this deployment. + * @default GITHUB_SHA + */ + pages_build_version: string; + /** @description The OIDC token issued by GitHub Actions certifying the origin of the deployment. */ + oidc_token: string; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** 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. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description 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; + /** @description 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; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description 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; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description 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; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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 above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description 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://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description 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; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; + }; + }; + }; + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description 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. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * 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. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Bad request, resolution comment is invalid or the resolution was not changed. */ + 400: unknown; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution or resolution comment */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + resolution_comment?: components["schemas"]["secret-scanning-alert-resolution-comment"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description 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 | null; + /** @description A short description of the status. */ + description?: string | null; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + }; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. 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. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** 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. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + "search/code": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + "search/topics": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on 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. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **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. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } + | { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }; + }; + }; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creaing a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @example [] + */ + emails: string[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + 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; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** @description 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; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/list-ssh-signing-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/create-ssh-signing-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ + key: string; + }; + }; + }; + }; + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/get-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/delete-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + "users/list-ssh-signing-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..c20f3ab --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "8.2.1", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "8.0.1" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^14.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/package.json new file mode 100644 index 0000000..3c7a353 --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/oauth-methods/package.json @@ -0,0 +1,53 @@ +{ + "name": "@octokit/oauth-methods", + "description": "Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps", + "version": "2.0.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "oauth" + ], + "repository": "https://github.com/octokit/oauth-methods.js", + "dependencies": { + "@octokit/oauth-authorization-url": "^5.0.0", + "@octokit/request": "^6.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^8.0.0", + "btoa-lite": "^1.0.0" + }, + "peerDependencies": {}, + "devDependencies": { + "@octokit/tsconfig": "^1.0.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.2", + "@pika/plugin-ts-standard-pkg": "^0.9.2", + "@types/btoa-lite": "^1.0.0", + "@types/jest": "^29.0.0", + "@types/node": "^16.0.0", + "fetch-mock": "^9.11.0", + "jest": "^29.0.0", + "prettier": "2.7.1", + "semantic-release": "^19.0.0", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^29.0.0", + "typescript": "^4.2.3" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js" +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/LICENSE b/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 0000000..c61fbbe --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +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/auth-app/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 0000000..9da833c --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 0000000..26eae6a --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,20 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public" + }, + "version": "16.0.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "10.0.0" + } +} diff --git a/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..806b5bc --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,118413 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installations": { + /** + * You must use a [JWT](https://docs.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. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/code_security_and_analysis": { + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + get: operations["secret-scanning/get-security-analysis-settings-for-enterprise"]; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + patch: operations["secret-scanning/patch-security-analysis-settings-for-enterprise"]; + }; + "/enterprises/{enterprise}/dependabot/alerts": { + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["dependabot/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + post: operations["secret-scanning/post-security-product-enablement-for-enterprise"]; + }; + "/events": { + /** 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. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * 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. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** 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. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + /** Gets information about a notification thread. */ + get: operations["activity/get-thread"]; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/orgs/{org}": { + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + get: operations["oidc/get-oidc-custom-sub-template-for-org"]; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + put: operations["oidc/update-oidc-custom-sub-template-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/required_workflows": { + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflows"]; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + post: operations["actions/create-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}": { + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/get-required-workflow"]; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/delete-required-workflow"]; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + patch: operations["actions/update-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": { + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-selected-repositories-required-workflow"]; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/set-selected-repos-to-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": { + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/add-selected-repo-to-required-workflow"]; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/remove-selected-repo-from-required-workflow"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/actions/variables": { + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-org-variables"]; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + post: operations["actions/create-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}": { + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/get-org-variable"]; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + delete: operations["actions/delete-org-variable"]; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + patch: operations["actions/update-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories": { + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-variable"]; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories/{repository_id}": { + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-variable"]; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-variable"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/codespaces/billing": { + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["codespaces/set-codespaces-billing"]; + }; + "/orgs/{org}/codespaces/secrets": { + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-org-secrets"]; + }; + "/orgs/{org}/codespaces/secrets/public-key": { + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/get-org-public-key"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}": { + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/delete-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/dependabot/alerts": { + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-org"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** 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`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** 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. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** 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. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces": { + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-codespaces-for-user-in-org"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/memberships/{username}": { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations["orgs/get-membership-for-user"]; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * 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. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** 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. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/public_members": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/security-managers": { + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + get: operations["orgs/list-security-manager-teams"]; + }; + "/orgs/{org}/security-managers/teams/{team_slug}": { + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + put: operations["orgs/add-security-manager-team"]; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + delete: operations["orgs/remove-security-manager-team"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/orgs/{org}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** 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: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** 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. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** 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. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** 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. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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: operations["rate-limit/get"]; + }; + "/repos/{org}/{repo}/actions/required_workflows": { + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/list-repo-required-workflows"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": { + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/get-repo-required-workflow"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": { + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-repo-required-workflow-usage"]; + }; + "/repos/{owner}/{repo}": { + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/get"]; + /** + * 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, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + get: operations["actions/get-custom-oidc-sub-claim-for-repo"]; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/set-custom-oidc-sub-claim-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": { + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/variables": { + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/list-repo-variables"]; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + post: operations["actions/create-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/variables/{name}": { + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/get-repo-variable"]; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-repo-variable"]; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * 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. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-pull-request-review-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-status-checks-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-all-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations["repos/set-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations["repos/add-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **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: operations["checks/get"]; + /** + * **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. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** 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. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **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. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-alert"]; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases": { + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/list-codeql-databases"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": { + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/check-collaborator"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + put: operations["repos/add-collaborator"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * 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. + * + * + * 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` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * 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`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + get: operations["repos/get-content"]; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * 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 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. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/get-alert"]; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + patch: operations["dependabot/update-alert"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + get: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * 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. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations["repos/create-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": { + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** 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. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + get: operations["repos/list-webhooks"]; + /** + * 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. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * 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` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * 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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** 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://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": { + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations["issues/check-user-can-be-assigned-to-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** 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. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + put: operations["repos/enable-lfs-for-repo"]; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** Lists all notifications for the current user in the specified repository. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + put: operations["repos/update-information-about-pages-site"]; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + post: operations["repos/create-pages-site"]; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * 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. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployment": { + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + post: operations["repos/create-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/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. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["pulls/list"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + get: operations["pulls/list-requested-reviewers"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["pulls/request-reviewers"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * 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. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * 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. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** 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. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** 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. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** 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://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables": { + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/list-environment-variables"]; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + post: operations["actions/create-environment-variable"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables/{name}": { + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/get-environment-variable"]; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-environment-variable"]; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-environment-variable"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **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. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/publish": { + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/publish-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * 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. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/ssh_signing_keys": { + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/list-ssh-signing-keys-for-authenticated-user"]; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + post: operations["users/create-ssh-signing-key-for-authenticated-user"]; + }; + "/user/ssh_signing_keys/{ssh_signing_key_id}": { + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/get-ssh-signing-key-for-authenticated-user"]; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + delete: operations["users/delete-ssh-signing-key-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** 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. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/ssh_signing_keys": { + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + get: operations["users/list-ssh-signing-keys-for-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/versions": { + /** Get all supported GitHub API versions. */ + get: operations["meta/get-all-versions"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description A GitHub user. + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description A GitHub user. + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise on GitHub. + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for a repository. + * @enum {string} + */ + repository_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for an organization. + * @enum {string} + */ + organization_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A repository on GitHub. + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # 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 [EMAIL]. 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/ + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** Enterprise Security Analysis Settings */ + "enterprise-security-analysis-settings": { + /** + * @description Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to + * this enterprise. + * @example false + */ + advanced_security_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * enterprise. + * @example false + */ + secret_scanning_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this enterprise. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + /** @description The security alert number. */ + "alert-number": number; + /** @description Details for the vulnerable package. */ + "dependabot-alert-package": { + /** @description The package's language or package management ecosystem. */ + ecosystem: string; + /** @description The unique package name within its ecosystem. */ + name: string; + }; + /** @description Details pertaining to one vulnerable version range for the advisory. */ + "dependabot-alert-security-vulnerability": { + package: components["schemas"]["dependabot-alert-package"]; + /** + * @description The severity of the vulnerability. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Conditions that identify vulnerable versions of this vulnerability's package. */ + vulnerable_version_range: string; + /** @description Details pertaining to the package version that patches this vulnerability. */ + first_patched_version: { + /** @description The package version that patches this vulnerability. */ + identifier: string; + } | null; + }; + /** @description Details for the GitHub Security Advisory. */ + "dependabot-alert-security-advisory": { + /** @description The unique GitHub Security Advisory ID assigned to the advisory. */ + ghsa_id: string; + /** @description The unique CVE ID assigned to the advisory. */ + cve_id: string | null; + /** @description A short, plain text summary of the advisory. */ + summary: string; + /** @description A long-form Markdown-supported description of the advisory. */ + description: string; + /** @description Vulnerable version range information for the advisory. */ + vulnerabilities: components["schemas"]["dependabot-alert-security-vulnerability"][]; + /** + * @description The severity of the advisory. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Details for the advisory pertaining to the Common Vulnerability Scoring System. */ + cvss: { + /** @description The overall CVSS score of the advisory. */ + score: number; + /** @description The full CVSS vector string for the advisory. */ + vector_string: string | null; + }; + /** @description Details for the advisory pertaining to Common Weakness Enumeration. */ + cwes: { + /** @description The unique CWE ID. */ + cwe_id: string; + /** @description The short, plain text name of the CWE. */ + name: string; + }[]; + /** @description Values that identify this advisory among security information sources. */ + identifiers: { + /** + * @description The type of advisory identifier. + * @enum {string} + */ + type: "CVE" | "GHSA"; + /** @description The value of the advisory identifer. */ + value: string; + }[]; + /** @description Links to additional advisory information. */ + references: { + /** + * Format: uri + * @description The URL of the reference. + */ + url: string; + }[]; + /** + * Format: date-time + * @description The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + published_at: string; + /** + * Format: date-time + * @description The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + updated_at: string; + /** + * Format: date-time + * @description The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + withdrawn_at: string | null; + }; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-dismissed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-fixed-at": string | null; + /** + * Simple Repository + * @description A GitHub repository. + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert-with-repository": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + /** + * @description A feed of discussions for a given repository. + * @example https://github.com/{user}/{repo}/discussions + */ + repository_discussions_url?: string; + /** + * @description A feed of discussions for a given repository and category. + * @example https://github.com/{user}/{repo}/discussions/categories/{category} + */ + repository_discussions_category_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + repository_discussions?: components["schemas"]["link-with-type"]; + repository_discussions_category?: components["schemas"]["link-with-type"]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + 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?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * 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. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** + * @example FLAT_RATE + * @enum {string} + */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Simple + * @description A GitHub organization. + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** + * @description Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + * this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + * to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + * @example false + */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * Actions OIDC Subject customization + * @description Actions OIDC Subject customization + */ + "oidc-custom-sub": { + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys: string[]; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "required-workflow": { + /** @description Unique identifier for a required workflow */ + id: number; + /** @description Name present in the workflow file */ + name: string; + /** @description Path of the workflow file */ + path: string; + /** + * @description Scope of the required workflow + * @enum {string} + */ + scope: "all" | "selected"; + /** @description Ref at which the workflow file will be selected */ + ref: string; + /** + * @description State of the required workflow + * @enum {string} + */ + state: "active" | "deleted"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/actions/required_workflows/1/repositories + */ + selected_repositories_url?: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + repository: components["schemas"]["minimal-repository"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Actions Variable for an Organization + * @description Organization variable for GitHub Actions. + */ + "organization-actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + /** + * @description Visibility of a variable + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/variables/USERNAME/repositories + */ + selected_repositories_url?: string; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** + * @description Severity of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-severity": + | "critical" + | "high" + | "medium" + | "low" + | "warning" + | "note" + | "error"; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "alert-instances-url": string; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | ("source" | "generated" | "test" | "library") + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + /** + * @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. + * @example you've used 100% of your spending limit for Codespaces + */ + last_known_stop_notice?: string | null; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + /** @example "member" */ + invitation_source?: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on macOS 12 core runner machines. */ + macos_12_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Team Organization + * @description Team Organization + */ + "team-organization": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Repository + * @description A repository on GitHub. + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Required workflow + * @description A GitHub Actions required workflow + */ + "repo-required-workflow": { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example Required CI */ + name: string; + /** @example .github/workflows/required_ci.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: "active" | "deleted"; + source_repository: components["schemas"]["minimal-repository"]; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/sample-org/sample-repo/actions/required_workflows/5 */ + url: string; + /** @example https://github.com/sample-org/source-repo/blob/main/.github/workflows/required_ci.yaml */ + html_url: string; + /** @example https://github.com/sample-org/sample-repo/workflows/required/sample-org/source-repo/.github/workflows/required_ci.yaml/badge.svg */ + badge_url: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads: boolean; + /** @example true */ + has_discussions: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @example true */ + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + /** + * @description The name of the workflow. + * @example Build + */ + workflow_name: string | null; + /** + * @description The name of the current branch. + * @example main + */ + head_branch: string | null; + }; + /** + * Actions OIDC subject customization for a repository + * @description Actions OIDC subject customization for a repository + */ + "oidc-custom-sub-repo": { + /** @description Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. */ + use_default: boolean; + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys?: string[]; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. + * + * `none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repos only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. + * @enum {string} + */ + access_level: "none" | "user" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description A commit. + */ + "nullable-simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title: string; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: { [key: string]: unknown } | string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** Actions Variable */ + "actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + * @example true + */ + is_alphanumeric: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + * @example true + */ + require_last_push_approval?: boolean; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + 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; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + */ + require_last_push_approval?: boolean; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description A commit. + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @example completed + * @enum {string|null} + */ + status: ("queued" | "in_progress" | "completed") | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "startup_failure" + | "stale" + | null + ) + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** + * CodeQL Database + * @description A CodeQL database. + */ + "code-scanning-codeql-database": { + /** @description The ID of the CodeQL database. */ + id: number; + /** @description The name of the CodeQL database. */ + name: string; + /** @description The language of the CodeQL database. */ + language: string; + uploader: components["schemas"]["simple-user"]; + /** @description The MIME type of the CodeQL database file. */ + content_type: string; + /** @description The size of the CodeQL database file in bytes. */ + size: number; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * Format: uri + * @description The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + */ + url: string; + }; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string | null; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string | null; + target_url: string | null; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + } & { + content: unknown; + encoding: unknown; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + /** @enum {string} */ + type: "dir" | "file" | "submodule" | "symlink"; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + /** @enum {string} */ + type: "file"; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + /** @enum {string} */ + type: "symlink"; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Submodule Content + * @description An object describing a submodule + */ + "content-submodule": { + /** @enum {string} */ + type: "submodule"; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + }; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + /** + * @description Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + * @enum {string} + */ + scope: "unknown" | "runtime" | "development"; + }[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: Partial & Partial & Partial; + }; + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { [key: string]: components["schemas"]["dependency"] }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. */ + manifests?: { [key: string]: components["schemas"]["manifest"] }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy-settings": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + protection_rules?: (Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + }>)[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + "deployment-branch-policy": { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number; + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string; + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: { + /** @example "foo@bar.com" */ + email?: string; + /** @example "foo" */ + password?: string; + /** @example "roomer" */ + room?: string; + /** @example "foo" */ + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + /** @example "sha256" */ + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + /** @example "abc" */ + token?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** @example 1 */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + added_by?: string | null; + last_used?: string | null; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + * @example https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + * @example hello-world.github.io + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + * @example monalisa-1231a2312sa32-23sda74.drafts.github.io + */ + preview_url?: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + web_commit_signoff_required?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string | null; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + /** @description An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. */ + "secret-scanning-alert-resolution-comment": string | null; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + /** @description Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. */ + "secret-scanning-location-issue-title": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_title_url: string; + }; + /** @description Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. */ + "secret-scanning-location-issue-body": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_body_url: string; + }; + /** @description Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. */ + "secret-scanning-location-issue-comment": { + /** + * Format: uri + * @description The API URL to get the issue comment where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + */ + issue_comment_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: "commit" | "issue_title" | "issue_body" | "issue_comment"; + details: + | components["schemas"]["secret-scanning-location-commit"] + | components["schemas"]["secret-scanning-location-issue-title"] + | components["schemas"]["secret-scanning-location-issue-body"] + | components["schemas"]["secret-scanning-location-issue-comment"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + has_discussions?: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Codespace + * @description A codespace. + */ + "codespace-with-full-repository": { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["full-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * SSH Signing Key + * @description A public SSH key used to sign Git commits + */ + "ssh-signing-key": { + key: string; + id: number; + title: string; + /** Format: date-time */ + created_at: string; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + /** + * Simple Installation + * @description The GitHub App installation. This property is included when the event is configured for and sent to a GitHub App. + */ + "simple-installation": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + /** + * @description The global node ID of the installation. + * @example MDQ6VXNlcjU4MzIzMQ== + */ + node_id: string; + }; + /** @description A suite of checks performed on the code of a given code change */ + "simple-check-suite": { + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after?: string | null; + app?: components["schemas"]["integration"]; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before?: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion?: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "stale" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at?: string; + /** @example master */ + head_branch?: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha?: string; + /** @example 5 */ + id?: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id?: string; + pull_requests?: components["schemas"]["pull-request-minimal"][]; + repository?: components["schemas"]["minimal-repository"]; + /** + * @example completed + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed" | "pending" | "waiting"; + /** Format: date-time */ + updated_at?: string; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url?: string; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run-with-simple-check-suite": { + app: components["schemas"]["nullable-integration"]; + check_suite: components["schemas"]["simple-check-suite"]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "waiting" + | "pending" + | "startup_failure" + | "stale" + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + deployment?: components["schemas"]["deployment-simple"]; + /** @example https://example.com */ + details_url: string; + /** @example 42 */ + external_id: string; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string; + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + output: { + annotations_count: number; + /** Format: uri */ + annotations_url: string; + summary: string | null; + text: string | null; + title: string | null; + }; + pull_requests: components["schemas"]["pull-request-minimal"][]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "pending"; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + }; + /** + * Projects v2 Item Content Type + * @description The type of content tracked in a project item + * @enum {string} + */ + "projects-v2-item-content-type": "Issue" | "PullRequest" | "DraftIssue"; + /** + * Projects v2 Item + * @description An item belonging to a project + */ + "projects-v2-item": { + id: number; + node_id?: string; + project_node_id?: string; + content_node_id: string; + content_type: components["schemas"]["projects-v2-item-content-type"]; + creator?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + created_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + archived_at: string | null; + }; + /** branch protection rule created event */ + "webhook-branch-protection-rule-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule deleted event */ + "webhook-branch-protection-rule-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule edited event */ + "webhook-branch-protection-rule-edited": { + /** @enum {string} */ + action: "edited"; + /** @description If the action was `edited`, the changes to the rule. */ + changes?: { + admin_enforced?: { + from: boolean | null; + }; + authorized_actor_names?: { + from: string[]; + }; + authorized_actors_only?: { + from: boolean | null; + }; + authorized_dismissal_actors_only?: { + from: boolean | null; + }; + linear_history_requirement_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + required_status_checks?: { + from: string[]; + }; + required_status_checks_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** Check Run Completed Event */ + "webhook-check-run-completed": { + /** @enum {string} */ + action?: "completed"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Completed Event + * @description The check_run.completed webhook encoded with URL encoding + */ + "webhook-check-run-completed-form-encoded": { + /** @description A URL-encoded string of the check_run.completed JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Created Event */ + "webhook-check-run-created": { + /** @enum {string} */ + action?: "created"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Created Event + * @description The check_run.created webhook encoded with URL encoding + */ + "webhook-check-run-created-form-encoded": { + /** @description A URL-encoded string of the check_run.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Requested Action Event */ + "webhook-check-run-requested-action": { + /** @enum {string} */ + action: "requested_action"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** @description The action requested by the user. */ + requested_action?: { + /** @description The integrator reference of the action requested by the user. */ + identifier?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Requested Action Event + * @description The check_run.requested_action webhook encoded with URL encoding + */ + "webhook-check-run-requested-action-form-encoded": { + /** @description A URL-encoded string of the check_run.requested_action JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Re-Requested Event */ + "webhook-check-run-rerequested": { + /** @enum {string} */ + action?: "rerequested"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Re-Requested Event + * @description The check_run.rerequested webhook encoded with URL encoding + */ + "webhook-check-run-rerequested-form-encoded": { + /** @description A URL-encoded string of the check_run.rerequested JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** check_suite completed event */ + "webhook-check-suite-completed": { + /** @enum {string} */ + action: "completed"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_group" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "projects_v2_item" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ( + | "requested" + | "in_progress" + | "completed" + | "queued" + | null + | "pending" + ) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite requested event */ + "webhook-check-suite-requested": { + /** @enum {string} */ + action: "requested"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "secret_scanning_alert_location" + | "projects_v2_item" + | "merge_group" + | "repository_import" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite rerequested event */ + "webhook-check-suite-rerequested": { + /** @enum {string} */ + action: "rerequested"; + actions_meta?: { + rerun_info?: { + plan_id?: string; + job_ids?: string[]; + }; + } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert appeared_in_branch event */ + "webhook-code-scanning-alert-appeared-in-branch": { + /** @enum {string} */ + action: "appeared_in_branch"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert closed_by_user event */ + "webhook-code-scanning-alert-closed-by-user": { + /** @enum {string} */ + action: "closed_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert created event */ + "webhook-code-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string | null; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + fixed_at?: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + } | null; + updated_at?: string | null; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert fixed event */ + "webhook-code-scanning-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Format: uri */ + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened event */ + "webhook-code-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: string | null; + dismissed_by: { [key: string]: unknown } | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: string | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + } | null; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string | null; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened_by_user event */ + "webhook-code-scanning-alert-reopened-by-user": { + /** @enum {string} */ + action: "reopened_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** commit_comment created event */ + "webhook-commit-comment-created": { + /** + * @description The action performed. Can be `created`. + * @enum {string} + */ + action: "created"; + /** @description The [commit comment](https://docs.github.com/rest/reference/repos#get-a-commit-comment) resource. */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + created_at: string; + /** Format: uri */ + html_url: string; + /** @description The ID of the commit comment. */ + id: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the commit comment. */ + node_id: string; + /** @description The relative path of the file to which the comment applies. */ + path: string | null; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** create event */ + "webhook-create": { + /** @description The repository's current description. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The name of the repository's default branch (usually `main`). */ + master_branch: string; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object created in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** delete event */ + "webhook-delete": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object deleted in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert created event */ + "webhook-dependabot-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert dismissed event */ + "webhook-dependabot-alert-dismissed": { + /** @enum {string} */ + action: "dismissed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert fixed event */ + "webhook-dependabot-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reintroduced event */ + "webhook-dependabot-alert-reintroduced": { + /** @enum {string} */ + action: "reintroduced"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reopened event */ + "webhook-dependabot-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key created event */ + "webhook-deploy-key-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key deleted event */ + "webhook-deploy-key-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deployment created event */ + "webhook-deployment-created": { + /** @enum {string} */ + action: "created"; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: { [key: string]: unknown } | string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "workflow_job" + | "pull_request_review_thread" + | "merge_queue_entry" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** deployment_status created event */ + "webhook-deployment-status-created": { + /** @enum {string} */ + action: "created"; + check_run?: { + /** Format: date-time */ + completed_at: string | null; + /** + * @description The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: uri */ + details_url: string; + external_id: string; + /** @description The SHA of the commit that is being checked. */ + head_sha: string; + /** Format: uri */ + html_url: string; + /** @description The id of the check. */ + id: number; + /** @description The name of the check run. */ + name: string; + node_id: string; + /** Format: date-time */ + started_at: string; + /** + * @description The current status of the check run. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting" | "pending"; + /** Format: uri */ + url: string; + } | null; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: (string | { [key: string]: unknown }) | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_queue_entry" + | "workflow_job" + | "pull_request_review_thread" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + /** @description The [deployment status](https://docs.github.com/rest/reference/deployments#list-deployment-statuses). */ + deployment_status: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + deployment_url: string; + /** @description The optional human-readable description added to the status. */ + description: string; + environment: string; + /** Format: uri */ + environment_url?: string; + id: number; + /** Format: uri */ + log_url?: string; + node_id: string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + | "merge_group" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + /** Format: uri */ + repository_url: string; + /** @description The new state. Can be `pending`, `success`, `failure`, or `error`. */ + state: string; + /** @description The optional link added to the status. */ + target_url: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow?: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run?: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** discussion answered event */ + "webhook-discussion-answered": { + /** @enum {string} */ + action: "answered"; + answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** Format: date-time */ + answer_chosen_at: string; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + answer_html_url: string; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion category changed event */ + "webhook-discussion-category-changed": { + /** @enum {string} */ + action: "category_changed"; + changes: { + category: { + from: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment created event */ + "webhook-discussion-comment-created": { + /** @enum {string} */ + action: "created"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment deleted event */ + "webhook-discussion-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment edited event */ + "webhook-discussion-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body: { + from: string; + }; + }; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion created event */ + "webhook-discussion-created": { + /** @enum {string} */ + action: "created"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string | null; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "converting" | "transferring"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion deleted event */ + "webhook-discussion-deleted": { + /** @enum {string} */ + action: "deleted"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion edited event */ + "webhook-discussion-edited": { + /** @enum {string} */ + action: "edited"; + changes?: { + body?: { + from: string; + }; + title?: { + from: string; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion labeled event */ + "webhook-discussion-labeled": { + /** @enum {string} */ + action: "labeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion locked event */ + "webhook-discussion-locked": { + /** @enum {string} */ + action: "locked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string; + answer_chosen_at?: string | null; + answer_chosen_by?: { [key: string]: unknown } | null; + answer_html_url?: string | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: true; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "locked"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion pinned event */ + "webhook-discussion-pinned": { + /** @enum {string} */ + action: "pinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion transferred event */ + "webhook-discussion-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** Discussion */ + new_discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unanswered event */ + "webhook-discussion-unanswered": { + /** @enum {string} */ + action: "unanswered"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + old_answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** discussion unlabeled event */ + "webhook-discussion-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unlocked event */ + "webhook-discussion-unlocked": { + /** @enum {string} */ + action: "unlocked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at?: unknown | null; + answer_chosen_by?: unknown | null; + answer_html_url?: unknown | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unpinned event */ + "webhook-discussion-unpinned": { + /** @enum {string} */ + action: "unpinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * fork event + * @description A user forks a repository. + */ + "webhook-fork": { + enterprise?: components["schemas"]["enterprise"]; + /** @description The created [`repository`](https://docs.github.com/rest/reference/repos#get-a-repository) resource. */ + forkee: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } & { + allow_forking?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + /** @enum {boolean} */ + fork?: true; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: unknown | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + public?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (unknown | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + }; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** github_app_authorization revoked event */ + "webhook-github-app-authorization-revoked": { + /** @enum {string} */ + action: "revoked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** gollum event */ + "webhook-gollum": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pages that were updated. */ + pages: { + /** + * @description The action that was performed on the page. Can be `created` or `edited`. + * @enum {string} + */ + action: "created" | "edited"; + /** + * Format: uri + * @description Points to the HTML wiki page. + */ + html_url: string; + /** @description The name of the page. */ + page_name: string; + /** @description The latest commit SHA of the page. */ + sha: string; + summary: string | null; + /** @description The current page title. */ + title: string; + }[]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** installation created event */ + "webhook-installation-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** User */ + requester?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation deleted event */ + "webhook-installation-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation new_permissions_accepted event */ + "webhook-installation-new-permissions-accepted": { + /** @enum {string} */ + action: "new_permissions_accepted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories added event */ + "webhook-installation-repositories-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name?: string; + /** @description Unique identifier of the repository */ + id?: number; + /** @description The name of the repository. */ + name?: string; + node_id?: string; + /** @description Whether the repository is private or public. */ + private?: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories removed event */ + "webhook-installation-repositories-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation suspend event */ + "webhook-installation-suspend": { + /** @enum {string} */ + action: "suspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + "webhook-installation-target-renamed": { + account: { + avatar_url: string; + created_at?: string; + description?: unknown | null; + events_url?: string; + followers?: number; + followers_url?: string; + following?: number; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + has_organization_projects?: boolean; + has_repository_projects?: boolean; + hooks_url?: string; + html_url: string; + id: number; + is_verified?: boolean; + issues_url?: string; + login?: string; + members_url?: string; + name?: string; + node_id: string; + organizations_url?: string; + public_gists?: number; + public_members_url?: string; + public_repos?: number; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + slug?: string; + starred_url?: string; + subscriptions_url?: string; + type?: string; + updated_at?: string; + url?: string; + website_url?: unknown | null; + }; + action: string; + changes: { + login?: { + from: string; + }; + slug?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + target_type: string; + }; + /** installation unsuspend event */ + "webhook-installation-unsuspend": { + /** @enum {string} */ + action: "unsuspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment created event */ + "webhook-issue-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment deleted event */ + "webhook-issue-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment edited event */ + "webhook-issue-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues assigned event */ + "webhook-issues-assigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "assigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues closed event */ + "webhook-issues-closed": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) itself. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "closed" | "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues deleted event */ + "webhook-issues-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues demilestoned event */ + "webhook-issues-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone?: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues edited event */ + "webhook-issues-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the issue. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + title?: { + /** @description The previous version of the title. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues labeled event */ + "webhook-issues-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues locked event */ + "webhook-issues-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "security_and_analysis" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: true; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues milestoned event */ + "webhook-issues-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues opened event */ + "webhook-issues-opened": { + /** @enum {string} */ + action: "opened"; + changes?: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + old_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } | null; + /** + * Repository + * @description A git repository + */ + old_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues pinned event */ + "webhook-issues-pinned": { + /** @enum {string} */ + action: "pinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues reopened event */ + "webhook-issues-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues transferred event */ + "webhook-issues-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + new_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unassigned event */ + "webhook-issues-unassigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlabeled event */ + "webhook-issues-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlocked event */ + "webhook-issues-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason: unknown | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: false; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: unknown | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unpinned event */ + "webhook-issues-unpinned": { + /** @enum {string} */ + action: "unpinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label created event */ + "webhook-label-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** label deleted event */ + "webhook-label-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label edited event */ + "webhook-label-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the label if the action was `edited`. */ + changes?: { + color?: { + /** @description The previous version of the color if the action was `edited`. */ + from: string; + }; + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase cancelled event */ + "webhook-marketplace-purchase-cancelled": { + /** @enum {string} */ + action: "cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase changed event */ + "webhook-marketplace-purchase-changed": { + /** @enum {string} */ + action: "changed"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean | null; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change event */ + "webhook-marketplace-purchase-pending-change": { + /** @enum {string} */ + action: "pending_change"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change_cancelled event */ + "webhook-marketplace-purchase-pending-change-cancelled": { + /** @enum {string} */ + action: "pending_change_cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + next_billing_date: string; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase purchased event */ + "webhook-marketplace-purchase-purchased": { + /** @enum {string} */ + action: "purchased"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member added event */ + "webhook-member-added": { + /** @enum {string} */ + action: "added"; + changes?: { + permission?: { + /** @enum {string} */ + to: "write" | "admin" | "read"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member edited event */ + "webhook-member-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the collaborator permissions */ + changes: { + old_permission?: { + /** @description The previous permissions of the collaborator if the action was edited. */ + from: string; + }; + permission?: { + from?: string | null; + to?: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member removed event */ + "webhook-member-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** membership added event */ + "webhook-membership-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** membership removed event */ + "webhook-membership-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team" | "organization"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + "webhook-merge-group-checks-requested": { + action: string; + installation?: components["schemas"]["simple-installation"]; + /** MergeGroup */ + merge_group: { + /** @description The SHA of the merge group. */ + head_sha: string; + /** @description The full ref of the merge group. */ + head_ref: string; + /** @description The SHA of the merge group's parent commit. */ + base_sha: string; + /** @description The full ref of the branch the merge group will be merged into. */ + base_ref: string; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** meta deleted event */ + "webhook-meta-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + /** @description The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace. */ + hook: { + active: boolean; + config: { + /** @enum {string} */ + content_type: "json" | "form"; + insecure_ssl: string; + secret?: string; + /** Format: uri */ + url: string; + }; + created_at: string; + events: ( + | "*" + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "create" + | "delete" + | "deployment" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "meta" + | "milestone" + | "organization" + | "org_block" + | "package" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "pull_request_review_thread" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_import" + | "repository_vulnerability_alert" + | "secret_scanning_alert" + | "secret_scanning_alert_location" + | "security_and_analysis" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_job" + | "workflow_run" + | "repository_dispatch" + | "projects_v2_item" + )[]; + id: number; + name: string; + type: string; + updated_at: string; + }; + /** @description The id of the modified webhook. */ + hook_id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** milestone closed event */ + "webhook-milestone-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone created event */ + "webhook-milestone-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone deleted event */ + "webhook-milestone-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone edited event */ + "webhook-milestone-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the milestone if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + due_on?: { + /** @description The previous version of the due date if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone opened event */ + "webhook-milestone-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block blocked event */ + "webhook-org-block-blocked": { + /** @enum {string} */ + action: "blocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block unblocked event */ + "webhook-org-block-unblocked": { + /** @enum {string} */ + action: "unblocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization deleted event */ + "webhook-organization-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_added event */ + "webhook-organization-member-added": { + /** @enum {string} */ + action: "member_added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_invited event */ + "webhook-organization-member-invited": { + /** @enum {string} */ + action: "member_invited"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The invitation for the user or email if the action is `member_invited`. */ + invitation: { + /** Format: date-time */ + created_at: string; + email: string | null; + /** Format: date-time */ + failed_at: string | null; + failed_reason: string | null; + id: number; + /** Format: uri */ + invitation_teams_url: string; + /** User */ + inviter: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + login: string | null; + node_id: string; + role: string; + team_count: number; + invitation_source?: string; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** organization member_removed event */ + "webhook-organization-member-removed": { + /** @enum {string} */ + action: "member_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization renamed event */ + "webhook-organization-renamed": { + /** @enum {string} */ + action: "renamed"; + changes?: { + login?: { + from?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package published event */ + "webhook-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string | null; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + } | null; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: { [key: string]: unknown } | null; + bugs?: { [key: string]: unknown } | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: { [key: string]: unknown } | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: { [key: string]: unknown } | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: { [key: string]: unknown }[]; + contributors?: { [key: string]: unknown }[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: { [key: string]: unknown } | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: number | string; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + source_url?: string; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package updated event */ + "webhook-package-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string; + size: number; + state: string; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + /** Format: uri */ + source_url?: string; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** page_build event */ + "webhook-page-build": { + /** @description The [List GitHub Pages builds](https://docs.github.com/rest/reference/repos#list-github-pages-builds) itself. */ + build: { + commit: string | null; + created_at: string; + duration: number; + error: { + message: string | null; + }; + /** User */ + pusher: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + status: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-ping": { + /** + * Webhook + * @description The webhook that is being pinged + */ + hook?: { + /** @description Determines whether the hook is actually triggered for the events it subscribes to. */ + active: boolean; + /** @description Only included for GitHub Apps. When you register a new GitHub App, GitHub sends a ping event to the webhook URL you specified during registration. The GitHub App ID sent in this field is required for authenticating an app. */ + app_id?: number; + config: { + content_type?: components["schemas"]["webhook-config-content-type"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + secret?: components["schemas"]["webhook-config-secret"]; + url?: components["schemas"]["webhook-config-url"]; + }; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + deliveries_url?: string; + /** @description Determines what events the hook is triggered for. Default: ['push']. */ + events: string[]; + /** @description Unique identifier of the webhook. */ + id: number; + last_response?: components["schemas"]["hook-response"]; + /** + * @description The type of webhook. The only valid value is 'web'. + * @enum {string} + */ + name: "web"; + /** Format: uri */ + ping_url?: string; + /** Format: uri */ + test_url?: string; + type: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url?: string; + }; + /** @description The ID of the webhook that triggered the ping. */ + hook_id?: number; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + /** @description Random string of GitHub zen. */ + zen?: string; + }; + /** @description The webhooks ping payload encoded with URL encoding. */ + "webhook-ping-form-encoded": { + /** @description A URL-encoded string of the ping JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** project_card converted event */ + "webhook-project-card-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + note: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card created event */ + "webhook-project-card-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card deleted event */ + "webhook-project-card-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number | null; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card edited event */ + "webhook-project-card-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + note: { + from: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card moved event */ + "webhook-project-card-moved": { + /** @enum {string} */ + action: "moved"; + changes?: { + column_id: { + from: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } & { + after_id: number | null; + archived?: boolean; + column_id?: number; + column_url?: string; + created_at?: string; + creator?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + id?: number; + node_id?: string; + note?: string | null; + project_url?: string; + updated_at?: string; + url?: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project closed event */ + "webhook-project-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_column created event */ + "webhook-project-column-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column deleted event */ + "webhook-project-column-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column edited event */ + "webhook-project-column-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + name?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column moved event */ + "webhook-project-column-moved": { + /** @enum {string} */ + action: "moved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project created event */ + "webhook-project-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project deleted event */ + "webhook-project-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project edited event */ + "webhook-project-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the project if the action was `edited`. */ + changes?: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The changes to the project if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project reopened event */ + "webhook-project-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Archived Event */ + "webhook-projects-v2-item-archived": { + /** @enum {string} */ + action: "archived"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Converted Event */ + "webhook-projects-v2-item-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + content_type?: { + from?: string | null; + to?: string; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Created Event */ + "webhook-projects-v2-item-created": { + /** @enum {string} */ + action: "created"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Deleted Event */ + "webhook-projects-v2-item-deleted": { + /** @enum {string} */ + action: "deleted"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Edited Event */ + "webhook-projects-v2-item-edited": { + /** @enum {string} */ + action: "edited"; + changes?: + | { + field_value: { + field_node_id?: string; + field_type?: string; + }; + } + | { + body: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Reordered Event */ + "webhook-projects-v2-item-reordered": { + /** @enum {string} */ + action: "reordered"; + changes: { + previous_projects_v2_item_node_id?: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Restored Event */ + "webhook-projects-v2-item-restored": { + /** @enum {string} */ + action: "restored"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** public event */ + "webhook-public": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request assigned event */ + "webhook-pull-request-assigned": { + /** @enum {string} */ + action: "assigned"; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_disabled event */ + "webhook-pull-request-auto-merge-disabled": { + /** @enum {string} */ + action: "auto_merge_disabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_enabled event */ + "webhook-pull-request-auto-merge-enabled": { + /** @enum {string} */ + action: "auto_merge_enabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason?: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request closed event */ + "webhook-pull-request-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string | null; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at?: string | null; + merged_by?: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "closed" | "open"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request converted_to_draft event */ + "webhook-pull-request-converted-to-draft": { + /** @enum {string} */ + action: "converted_to_draft"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + /** @enum {boolean} */ + merged: false; + merged_at: unknown | null; + merged_by: unknown | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + state?: string; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request demilestoned event */ + "webhook-pull-request-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request dequeued event */ + "webhook-pull-request-dequeued": { + /** @enum {string} */ + action: "dequeued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request edited event */ + "webhook-pull-request-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment if the action was `edited`. */ + changes: { + base?: { + ref: { + from: string; + }; + sha: { + from: string; + }; + }; + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request enqueued event */ + "webhook-pull-request-enqueued": { + /** @enum {string} */ + action: "enqueued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request labeled event */ + "webhook-pull-request-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request locked event */ + "webhook-pull-request-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request milestoned event */ + "webhook-pull-request-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request opened event */ + "webhook-pull-request-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request ready_for_review event */ + "webhook-pull-request-ready-for-review": { + /** @enum {string} */ + action: "ready_for_review"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request reopened event */ + "webhook-pull-request-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: unknown | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment created event */ + "webhook-pull-request-review-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions?: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment deleted event */ + "webhook-pull-request-review-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment edited event */ + "webhook-pull-request-review-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review dismissed event */ + "webhook-pull-request-review-dismissed": { + /** @enum {string} */ + action: "dismissed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + /** @enum {string} */ + state: "dismissed" | "approved" | "changes_requested"; + /** Format: date-time */ + submitted_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review edited event */ + "webhook-pull-request-review-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_request_removed event */ + "webhook-pull-request-review-request-removed": + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_requested event */ + "webhook-pull-request-review-requested": + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review submitted event */ + "webhook-pull-request-review-submitted": { + /** @enum {string} */ + action: "submitted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_thread resolved event */ + "webhook-pull-request-review-thread-resolved": { + /** @enum {string} */ + action: "resolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request_review_thread unresolved event */ + "webhook-pull-request-review-thread-unresolved": { + /** @enum {string} */ + action: "unresolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request synchronize event */ + "webhook-pull-request-synchronize": { + /** @enum {string} */ + action: "synchronize"; + after: string; + before: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unassigned event */ + "webhook-pull-request-unassigned": { + /** @enum {string} */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request unlabeled event */ + "webhook-pull-request-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unlocked event */ + "webhook-pull-request-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** push event */ + "webhook-push": { + /** @description The SHA of the most recent commit on `ref` after the push. */ + after: string; + base_ref: string | null; + /** @description The SHA of the most recent commit on `ref` before the push. */ + before: string; + /** @description An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/reference/repos#commits) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries. */ + commits: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + }[]; + /** @description URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit. */ + compare: string; + /** @description Whether this push created the `ref`. */ + created: boolean; + /** @description Whether this push deleted the `ref`. */ + deleted: boolean; + enterprise?: components["schemas"]["enterprise"]; + /** @description Whether this push was a force push of the `ref`. */ + forced: boolean; + /** Commit */ + head_commit: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + pusher: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email?: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description The full git ref that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`. */ + ref: string; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sender?: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string | null; + description: string | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author?: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + }; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: (string | { [key: string]: unknown }) | null; + bugs?: (string | { [key: string]: unknown }) | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: (string | { [key: string]: unknown }) | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: (string | { [key: string]: unknown }) | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: string[]; + contributors?: string[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: (string | { [key: string]: unknown }) | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: (string | { [key: string]: unknown } | number) | null; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + prerelease?: boolean; + published_at?: string; + tag_name?: string; + target_commitish?: string; + url?: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + about_url?: string; + name?: string; + type?: string; + url?: string; + vendor?: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-updated": { + action: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string; + description: unknown | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: (unknown | null)[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type?: string; + created_at?: string; + download_url?: string; + id?: number; + md5?: string | null; + name?: string; + sha1?: string | null; + sha256?: string; + size?: number; + state?: string; + updated_at?: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + url: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { [key: string]: unknown } | null; + updated_at: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release created event */ + "webhook-release-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release deleted event */ + "webhook-release-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release edited event */ + "webhook-release-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release prereleased event */ + "webhook-release-prereleased": { + /** @enum {string} */ + action: "prereleased"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + /** + * @description Whether the release is identified as a prerelease or a full release. + * @enum {boolean} + */ + prerelease: true; + published_at?: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release published event */ + "webhook-release-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + /** Format: date-time */ + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release released event */ + "webhook-release-released": { + /** @enum {string} */ + action: "released"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release unpublished event */ + "webhook-release-unpublished": { + /** @enum {string} */ + action: "unpublished"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** repository archived event */ + "webhook-repository-archived": { + /** @enum {string} */ + action: "archived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository created event */ + "webhook-repository-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository deleted event */ + "webhook-repository-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_dispatch event */ + "webhook-repository-dispatch-sample": { + action: string; + branch: string; + client_payload: { [key: string]: unknown } | null; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository edited event */ + "webhook-repository-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + default_branch?: { + from: string; + }; + description?: { + from: string | null; + }; + homepage?: { + from: string | null; + }; + topics?: { + from?: string[] | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_import event */ + "webhook-repository-import": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @enum {string} */ + status: "success" | "cancelled" | "failure"; + }; + /** repository privatized event */ + "webhook-repository-privatized": { + /** @enum {string} */ + action: "privatized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository publicized event */ + "webhook-repository-publicized": { + /** @enum {string} */ + action: "publicized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository renamed event */ + "webhook-repository-renamed": { + /** @enum {string} */ + action: "renamed"; + changes: { + repository: { + name: { + from: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository transferred event */ + "webhook-repository-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + owner: { + from: { + /** Organization */ + organization?: { + /** Format: uri */ + avatar_url: string; + description: string | null; + /** Format: uri */ + events_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url?: string; + id: number; + /** Format: uri */ + issues_url: string; + login: string; + /** Format: uri-template */ + members_url: string; + node_id: string; + /** Format: uri-template */ + public_members_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + url: string; + }; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository unarchived event */ + "webhook-repository-unarchived": { + /** @enum {string} */ + action: "unarchived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert create event */ + "webhook-repository-vulnerability-alert-create": { + /** @enum {string} */ + action: "create"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert dismiss event */ + "webhook-repository-vulnerability-alert-dismiss": { + /** @enum {string} */ + action: "dismiss"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_comment?: string | null; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + dismiss_comment?: string | null; + dismiss_reason: string; + dismissed_at: string; + /** User */ + dismisser: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "dismissed"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert reopen event */ + "webhook-repository-vulnerability-alert-reopen": { + /** @enum {string} */ + action: "reopen"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert resolve event */ + "webhook-repository-vulnerability-alert-resolve": { + /** @enum {string} */ + action: "resolve"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "fixed" | "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert created event */ + "webhook-secret-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created": { + /** @enum {string} */ + action?: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + installation?: components["schemas"]["simple-installation"]; + location: components["schemas"]["secret-scanning-location"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created-form-encoded": { + /** @description A URL-encoded string of the secret_scanning_alert_location.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** secret_scanning_alert reopened event */ + "webhook-secret-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert resolved event */ + "webhook-secret-scanning-alert-resolved": { + /** @enum {string} */ + action: "resolved"; + alert: { + created_at?: components["schemas"]["alert-created-at"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + number?: components["schemas"]["alert-number"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + resolution?: + | ( + | null + | "false_positive" + | "wont_fix" + | "revoked" + | "used_in_tests" + | "pattern_deleted" + | "pattern_edited" + ) + | null; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The secret that was detected. */ + secret?: string; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert revoked event */ + "webhook-secret-scanning-alert-revoked": { + /** @enum {string} */ + action: "revoked"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory published event */ + "webhook-security-advisory-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory updated event */ + "webhook-security-advisory-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory withdrawn event */ + "webhook-security-advisory-withdrawn": { + /** @enum {string} */ + action: "withdrawn"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_and_analysis event */ + "webhook-security-and-analysis": { + changes: { + from?: { + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["full-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** sponsorship cancelled event */ + "webhook-sponsorship-cancelled": { + /** @enum {string} */ + action: "cancelled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship created event */ + "webhook-sponsorship-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship edited event */ + "webhook-sponsorship-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + privacy_level?: { + /** @description The `edited` event types include the details about the change when someone edits a sponsorship to change the privacy. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_cancellation event */ + "webhook-sponsorship-pending-cancellation": { + /** @enum {string} */ + action: "pending_cancellation"; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_tier_change event */ + "webhook-sponsorship-pending-tier-change": { + /** @enum {string} */ + action: "pending_tier_change"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship tier_changed event */ + "webhook-sponsorship-tier-changed": { + /** @enum {string} */ + action: "tier_changed"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** star created event */ + "webhook-star-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: string | null; + }; + /** star deleted event */ + "webhook-star-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: unknown | null; + }; + /** status event */ + "webhook-status": { + /** Format: uri */ + avatar_url?: string | null; + /** @description An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. */ + branches: { + commit: { + sha: string | null; + /** Format: uri */ + url: string | null; + }; + name: string; + protected: boolean; + }[]; + commit: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + comments_url: string; + commit: { + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + comment_count: number; + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification: { + payload: string | null; + /** @enum {string} */ + reason: + | "expired_key" + | "not_signing_key" + | "gpgverify_error" + | "gpgverify_unavailable" + | "unsigned" + | "unknown_signature_type" + | "no_user" + | "unverified_email" + | "bad_email" + | "unknown_key" + | "malformed_signature" + | "invalid" + | "valid" + | "bad_cert" + | "ocsp_pending"; + signature: string | null; + verified: boolean; + }; + }; + /** User */ + committer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + node_id: string; + parents: { + /** Format: uri */ + html_url: string; + sha: string; + /** Format: uri */ + url: string; + }[]; + sha: string; + /** Format: uri */ + url: string; + }; + context: string; + created_at: string; + /** @description The optional human-readable description added to the status. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + /** @description The unique identifier of the status. */ + id: number; + installation?: components["schemas"]["simple-installation"]; + name: string; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The Commit SHA. */ + sha: string; + /** + * @description The new state. Can be `pending`, `success`, `failure`, or `error`. + * @enum {string} + */ + state: "pending" | "success" | "failure" | "error"; + /** @description The optional link added to the status. */ + target_url: string | null; + updated_at: string; + }; + /** team_add event */ + "webhook-team-add": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team added_to_repository event */ + "webhook-team-added-to-repository": { + /** @enum {string} */ + action: "added_to_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team created event */ + "webhook-team-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team deleted event */ + "webhook-team-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team edited event */ + "webhook-team-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the team if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + privacy?: { + /** @description The previous version of the team's privacy if the action was `edited`. */ + from: string; + }; + repository?: { + permissions: { + from: { + /** @description The previous version of the team member's `admin` permission on a repository, if the action was `edited`. */ + admin?: boolean; + /** @description The previous version of the team member's `pull` permission on a repository, if the action was `edited`. */ + pull?: boolean; + /** @description The previous version of the team member's `push` permission on a repository, if the action was `edited`. */ + push?: boolean; + }; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team removed_from_repository event */ + "webhook-team-removed-from-repository": { + /** @enum {string} */ + action: "removed_from_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** watch started event */ + "webhook-watch-started": { + /** @enum {string} */ + action: "started"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** workflow_dispatch event */ + "webhook-workflow-dispatch": { + enterprise?: components["schemas"]["enterprise"]; + inputs: { + name?: string; + number?: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow: string; + }; + /** workflow_job completed event */ + "webhook-workflow-job-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | null + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out" + ) + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out"; + head_sha?: string; + html_url?: string; + id?: number; + labels?: (string | null)[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + status?: string; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps?: ({ [key: string]: unknown } | null)[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job in_progress event */ + "webhook-workflow-job-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("success" | "failure" | null | "cancelled" | "neutral") + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | null | "cancelled") + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string | null; + conclusion?: string | null; + head_sha?: string; + html_url?: string; + id?: number; + labels?: string[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps: { + completed_at: string | null; + conclusion: string | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "pending" | "queued"; + }[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job queued event */ + "webhook-workflow-job-queued": { + /** @enum {string} */ + action: "queued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "completed" | "in_progress" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job waiting event */ + "webhook-workflow-job-waiting": { + /** @enum {string} */ + action: "waiting"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: + | "completed" + | "in_progress" + | "queued" + | "pending" + | "waiting"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_run completed event */ + "webhook-workflow-run-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped"; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run in_progress event */ + "webhook-workflow-run-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "skipped" + | "stale" + ) + | null; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string | null; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run requested event */ + "webhook-workflow-run-requested": { + /** @enum {string} */ + action: "requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + display_title: string; + }; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** Unavailable due to service under maintenance. */ + porter_maintenance: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** A header with no content is returned. */ + no_content: unknown; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "per-page": number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string; + "delivery-id": number; + /** @description Page number of the results to fetch. */ + page: number; + /** @description 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; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + "dependabot-alert-comma-separated-states": string; + /** + * @description A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + "dependabot-alert-comma-separated-severities": string; + /** + * @description A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + "dependabot-alert-comma-separated-ecosystems": string; + /** @description A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + "dependabot-alert-comma-separated-packages": string; + /** @description The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + "dependabot-alert-scope": "development" | "runtime"; + /** + * @description The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + "dependabot-alert-sort": "created" | "updated"; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + "pagination-after": string; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + "pagination-first": number; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + "pagination-last": number; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type": string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution": string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort": "created" | "updated"; + /** @description The security feature to enable or disable. */ + "enterprise-security-product": + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + "enterprise-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** @description 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; + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description The unique identifier of the required workflow. */ + "required-workflow-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The number of results per page (max 30). */ + "variables-per-page": number; + /** @description The name of the variable. */ + "variable-name": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name": components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid": components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description The unique identifier of the hook. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** + * @description The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": + | "dependency_graph" + | "dependabot_alerts" + | "dependabot_security_updates" + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + "org-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The ID of the required workflow that has run at least once in a repository. */ + "repo-required-workflow-id": number; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref": components["schemas"]["code-scanning-ref"]; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key": string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort": + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + "workflow-run-status": + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests": boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id": number; + /** @description Only returns workflow runs that are associated with the specified `head_sha`. */ + "workflow-run-head-sha": string; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name": string; + /** @description Returns check runs with the specified `status`. */ + status: "queued" | "in_progress" | "completed"; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** @description A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + "dependabot-alert-comma-separated-manifests": string; + /** + * @description The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + "dependabot-alert-number": components["schemas"]["alert-number"]; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path": string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per: "" | "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** @description 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"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query": number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + /** @description The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.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. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/get-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["enterprise-security-analysis-settings"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/patch-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." */ + advanced_security_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning)." */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + * To disable this functionality, set this field to `null`. + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + }; + }; + }; + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "dependabot/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/post-security-product-enablement-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["enterprise-security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + enablement: components["parameters"]["enterprise-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + /** 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. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + "gists/list-public": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string; + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** 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. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 50). */ + per_page?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + /** Gets information about a notification thread. */ + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean; + /** @example "http://github.blog" */ + blog?: string; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot alerts is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot security updates is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** @description If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. */ + secret_scanning_push_protection_custom_link?: string; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + "oidc/get-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** A JSON serialized template for OIDC subject claim customization */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + }; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + "oidc/update-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["required-workflow"][]; + }; + }; + }; + }; + }; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/create-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/get-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + }; + }; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/delete-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/update-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path?: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id?: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-selected-repositories-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + /** Resource Not Found */ + 404: unknown; + }; + }; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/set-selected-repos-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories for which the workflow should be required. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/add-selected-repo-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/remove-selected-repo-from-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-org-variables": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["organization-actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/create-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when creating a variable */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/get-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/delete-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/update-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility?: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories that can access the organization variable. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + /** If specified, only code scanning alerts with this severity will be returned. */ + severity?: components["schemas"]["code-scanning-alert-severity"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/set-codespaces-billing": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when successfully modifying permissions. */ + 204: never; + 304: components["responses"]["not_modified"]; + /** Users are neither members nor collaborators of this organization. */ + 400: unknown; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. + * @enum {string} + */ + visibility: + | "disabled" + | "selected_members" + | "all_members" + | "all_members_and_outside_collaborators"; + /** @description The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. */ + selected_usernames?: string[]; + }; + }; + }; + }; + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-org-secret"][]; + }; + }; + }; + }; + }; + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description The ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * * `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** 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. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-codespaces-for-user-in-org": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * 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. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `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. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description 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; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description 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; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.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; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + "orgs/list-security-manager-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-simple"][]; + }; + }; + }; + }; + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/add-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** The organization has reached the maximum number of security manager teams. */ + 409: unknown; + }; + }; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/remove-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description 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` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + */ + permission?: string; + }; + }; + }; + }; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "orgs/enable-or-disable-security-product-on-all-org-repos": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + enablement: components["parameters"]["org-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** 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. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** 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. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/list-columns": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/list-repo-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["repo-required-workflow"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/get-repo-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-required-workflow"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-repo-required-workflow-usage": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.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. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to archive this repository. `false` will unarchive a previously archived repository. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Filters artifacts by exact match on their name field. */ + name?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + "actions/get-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Status response */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/set-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/list-repo-variables": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/create-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/get-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/delete-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/update-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description 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; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + /** + * @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. + * @default false + */ + lock_branch?: boolean; + /** + * @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. + * @default false + */ + allow_fork_syncing?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description 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; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** 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. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. */ + sort?: "created"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/list-codeql-databases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/get-codeql-database": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The language of the CodeQL database. */ + language: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis 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; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + /** + * @description Whether the SARIF file will be validated according to the code scanning specifications. + * This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. + */ + validate?: boolean; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + */ + permission?: string; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). */ + 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 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?: components["parameters"]["since"]; + /** 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; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * **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. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * + * 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` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * 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 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. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + manifest?: components["parameters"]["dependabot-alert-comma-separated-manifests"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** @deprecated **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. */ + page?: number; + /** @deprecated The number of results per page (max 100). */ + per_page?: number; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + "dependabot/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the Dependabot alert. + * A `dismissed_reason` must be provided when setting the state to `dismissed`. + * @enum {string} + */ + state: "dismissed" | "open"; + /** + * @description **Required when `state` is `dismissed`.** A reason for dismissing the alert. + * @enum {string} + */ + dismissed_reason?: + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk"; + /** @description An optional comment associated with dismissing the alert. */ + dismissed_comment?: string; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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 | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/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[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description 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`. + * @default + */ + target_url?: string; + /** + * @description 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: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description 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` */ + auto_inactive?: boolean; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/list-deployment-branch-policies": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number; + branch_policies: components["schemas"]["deployment-branch-policy"][]; + }; + }; + }; + }; + }; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** Response if the same branch name pattern already exists */ + 303: never; + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/update-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/delete-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + /** @description When forking from an existing repository, fork with only the default branch. */ + default_branch_only?: boolean; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description 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[]; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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; + }; + }; + }; + }; + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description 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. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. 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. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** 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://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + }; + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. */ + 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?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description 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 | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "not_planned" | "reopened") | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + "issues/check-user-can-be-assigned-to-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + assignee: string; + }; + }; + responses: { + /** Response if `assignee` can be assigned to `issue_number` */ + 204: never; + /** Response if `assignee` can not be assigned to `issue_number` */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. 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. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. 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. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description 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://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** Lists all notifications for the current user in the specified repository. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * 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. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + "repos/create-pages-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-deployment"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + artifact_url: string; + /** + * @description The target environment for this GitHub Pages deployment. + * @default github-pages + */ + environment?: string; + /** + * @description A unique string that represents the version of the build for this deployment. + * @default GITHUB_SHA + */ + pages_build_version: string; + /** @description The OIDC token issued by GitHub Actions certifying the origin of the deployment. */ + oidc_token: string; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** 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. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description 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; + /** @description 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; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description 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; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description 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; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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 above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description 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://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description 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; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; + }; + }; + }; + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description 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. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * 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. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Bad request, resolution comment is invalid or the resolution was not changed. */ + 400: unknown; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution or resolution comment */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + resolution_comment?: components["schemas"]["secret-scanning-alert-resolution-comment"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description 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 | null; + /** @description A short description of the status. */ + description?: string | null; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + }; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** 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. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description The new name to be given to the repository. */ + new_name?: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/list-environment-variables": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/create-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/get-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/delete-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/update-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + "search/code": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + "search/topics": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on 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. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **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. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } + | { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }; + }; + }; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/publish-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["codespace-with-full-repository"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the new repository. */ + name?: string; + /** + * @description Whether the new repository should be private. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @example [] + */ + emails: string[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + 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; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** @description 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; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/list-ssh-signing-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/create-ssh-signing-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ + key: string; + }; + }; + }; + }; + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/get-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/delete-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + "users/list-ssh-signing-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get all supported GitHub API versions. */ + "meta/get-all-versions": { + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/auth-app/package.json b/node_modules/@octokit/auth-app/package.json index bf82460..fb4c6bb 100644 --- a/node_modules/@octokit/auth-app/package.json +++ b/node_modules/@octokit/auth-app/package.json @@ -1,35 +1,26 @@ { - "_from": "@octokit/auth-app@^3.0.0", - "_id": "@octokit/auth-app@3.0.0", - "_inBundle": false, - "_integrity": "sha512-7280Oz7zsyF1cRuJEMJGG0H3zenOKY44P2QZRwN/21qRqyI+aQ0wM7IQny6uQk/xow36B7JNu2U2GtcgEdx8iA==", - "_location": "/@octokit/auth-app", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/auth-app@^3.0.0", - "name": "@octokit/auth-app", - "escapedName": "@octokit%2fauth-app", - "scope": "@octokit", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/@octokit/auth" + "name": "@octokit/auth-app", + "description": "GitHub App authentication for JavaScript", + "version": "3.6.1", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-3.0.0.tgz", - "_shasum": "67bb0939588e8edc2be52b6ed957078fc8577faa", - "_spec": "@octokit/auth-app@^3.0.0", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\auth", - "bugs": { - "url": "https://github.com/octokit/auth-app.js/issues" - }, - "bundleDependencies": false, + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "repository": "github:octokit/auth-app.js", "dependencies": { - "@octokit/request": "^5.4.11", - "@octokit/request-error": "^2.0.0", + "@octokit/auth-oauth-app": "^4.3.0", + "@octokit/auth-oauth-user": "^1.2.3", + "@octokit/request": "^5.6.0", + "@octokit/request-error": "^2.1.0", "@octokit/types": "^6.0.3", "@types/lru-cache": "^5.1.0", "deprecation": "^2.3.1", @@ -37,49 +28,28 @@ "universal-github-app-jwt": "^1.0.1", "universal-user-agent": "^6.0.0" }, - "deprecated": false, - "description": "GitHub App authentication for JavaScript", "devDependencies": { "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-web": "^0.9.0", "@pika/plugin-ts-standard-pkg": "^0.9.0", - "@sinonjs/fake-timers": "^7.0.0", + "@sinonjs/fake-timers": "^8.0.0", "@types/fetch-mock": "^7.3.1", - "@types/jest": "^26.0.16", + "@types/jest": "^27.0.0", + "@types/sinonjs__fake-timers": "^6.0.4", "fetch-mock": "^9.0.0", - "jest": "^26.0.1", - "prettier": "^2.0.4", - "semantic-release": "^17.0.0", + "jest": "^27.0.0", + "prettier": "2.4.1", + "semantic-release": "^18.0.0", "semantic-release-plugin-update-version-in-files": "^1.0.0", - "ts-jest": "^26.0.0", + "ts-jest": "^27.0.2", "typescript": "^4.0.2" }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/auth-app.js#readme", - "keywords": [ - "github", - "octokit", - "authentication", - "api" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/auth-app", - "pika": true, "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/auth-app.js.git" - }, - "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "version": "3.0.0" + "main": "dist-node/index.js", + "module": "dist-web/index.js" } diff --git a/node_modules/@octokit/auth-oauth-app/README.md b/node_modules/@octokit/auth-oauth-app/README.md index 6e27a92..a7942d6 100644 --- a/node_modules/@octokit/auth-oauth-app/README.md +++ b/node_modules/@octokit/auth-oauth-app/README.md @@ -13,10 +13,10 @@ It implements authentication using an OAuth app’s client ID and secret as well - [Usage](#usage) - [`createOAuthAppAuth(options)`](#createoauthappauthoptions) -- [`auth()`](#auth) +- [`auth(options)`](#authoptions) - [Authentication object](#authentication-object) - - [OAuth authentication](#oauth-authentication) - - [OAuth access token authentication](#oauth-access-token-authentication) + - [OAuth authentication](#oauth-authentication) + - [OAuth access token authentication](#oauth-access-token-authentication) - [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) - [Implementation details](#implementation-details) - [License](#license) @@ -76,8 +76,8 @@ const appAuthentication = await auth({ // } // } -const tokenAuthentication = await auth({ - type: "token", +const userAuthentication = await auth({ + type: "oauth-user", code: "random123", // code from OAuth web flow, see https://git.io/fhd1D state: "mystate123", }); @@ -189,7 +189,7 @@ createOAuthAppAuth({ -## `auth()` +## `auth(options)` The async `auth()` method returned by `createOAuthAppAuth(options)` accepts the following options @@ -216,7 +216,7 @@ The async `auth()` method returned by `createOAuthAppAuth(options)` accepts the string - Required. Either "oauth-app" or "token". + Required. Either "oauth-app" or "oauth-user". @@ -227,7 +227,7 @@ The async `auth()` method returned by `createOAuthAppAuth(options)` accepts the string - Only relevant if options.type is set to "token". The authorization code which was passed as query parameter to the callback URL from the OAuth web application flow. Defaults to what was set in the strategy options. + Only relevant if options.type is set to "oauth-user". The authorization code which was passed as query parameter to the callback URL from the OAuth web application flow. Defaults to what was set in the strategy options. @@ -238,7 +238,7 @@ The async `auth()` method returned by `createOAuthAppAuth(options)` accepts the string - Only relevant if options.type is set to "token". The URL in your application where users are sent after authorization. See redirect urls. Defaults to what was set in the strategy options. + Only relevant if options.type is set to "oauth-user". The URL in your application where users are sent after authorization. See redirect urls. Defaults to what was set in the strategy options. @@ -249,7 +249,7 @@ The async `auth()` method returned by `createOAuthAppAuth(options)` accepts the string - Only relevant if options.type is set to "token". The unguessable random string you provided in Step 1 of the OAuth web application flow. Defaults to what was set in the strategy options. + Only relevant if options.type is set to "oauth-user". The unguessable random string you provided in Step 1 of the OAuth web application flow. Defaults to what was set in the strategy options. @@ -418,12 +418,12 @@ const { data: user } = await requestWithAuth("GET /user"); Client ID and secret can be passed as Basic auth in the `Authorization` header in order to get a higher rate limit compared to unauthenticated requests. This is meant for the use on servers only: never expose an OAuth client secret on a client such as a web application! -`auth.hook` will set the correct authentication header automatically based on the request URL. For all [OAuth Application endpoints](https://developer.github.com/v3/apps/oauth_applications/), the `Authorization` header is set to basic auth. For all other endpoints and token is retrieved and used in the `Authorization` header. The token is cached and used for succeeding requsets. +`auth.hook` will set the correct authentication header automatically based on the request URL. For all [OAuth Application endpoints](https://developer.github.com/v3/apps/oauth_applications/), the `Authorization` header is set to basic auth. For all other endpoints and token is retrieved and used in the `Authorization` header. The token is cached and used for succeeding requests. To reset the cached access token, you can do this ```js -const { token } = await auth({ type: "token" }); +const { token } = await auth({ type: "oauth-user" }); await auth.hook(request, "POST /applications/{client_id}/token", { client_id: "123", access_token: token, diff --git a/node_modules/@octokit/auth-oauth-app/dist-node/index.js b/node_modules/@octokit/auth-oauth-app/dist-node/index.js index 135ba29..c8c642b 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-node/index.js +++ b/node_modules/@octokit/auth-oauth-app/dist-node/index.js @@ -57,6 +57,10 @@ async function getOAuthAccessToken(state, options) { async function auth(state, authOptions) { if (authOptions.type === "token") { + console.warn(`[@octokit/auth-oauth-app] "{type: 'token'}" is deprecated, use "{type: 'oauth-user'}" instead`); + } + + if (authOptions.type === "token" || authOptions.type === "oauth-user") { const { token, scopes @@ -130,6 +134,7 @@ async function hook(state, request, route, parameters) { return response; } + console.warn(`[@octokit/auth-oauth-app] setting user authentication is deprecated. Use "@octokit/auth-oauth-user" instead`); const { token } = await getOAuthAccessToken(state, { @@ -139,16 +144,24 @@ async function hook(state, request, route, parameters) { return request(endpoint); } -const VERSION = "3.0.8"; +const VERSION = "3.1.1"; +const deprecatedStrategyOptions = ["code", "redirectUrl", "state"]; function createOAuthAppAuth(options) { + const usedDeprecatedOptions = deprecatedStrategyOptions.filter(option => option in options); + + if (usedDeprecatedOptions.length) { + console.warn(`[@octokit/auth-oauth-app] "${usedDeprecatedOptions.join(", ")}" strategy options are deprecated. Use "@octokit/auth-oauth-user" instead`); + } + const state = Object.assign({ request: request.request.defaults({ headers: { "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}` } }) - }, options); + }, options); // @ts-expect-error wtf + return Object.assign(auth.bind(null, state), { hook: hook.bind(null, state) }); diff --git a/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map index e56f79d..fdd9f79 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map +++ b/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { RequestError } from \"@octokit/request-error\";\nexport async function getOAuthAccessToken(state, options) {\n const authOptionsPassed = options.auth\n ? typeof options.auth.code !== \"undefined\"\n : false;\n const authOptions = options.auth && authOptionsPassed ? options.auth : state;\n if (state.token && !authOptionsPassed) {\n return state.token;\n }\n // The \"/login/oauth/access_token\" is not part of the REST API hosted on api.github.com,\n // instead it’s using the github.com domain.\n const route = /^https:\\/\\/(api\\.)?github\\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl)\n ? \"POST https://github.com/login/oauth/access_token\"\n : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace(\"/api/v3\", \"/login/oauth/access_token\")}`;\n const request = options.request || state.request;\n const parameters = {\n headers: {\n accept: \"application/json\",\n },\n client_id: state.clientId,\n client_secret: state.clientSecret,\n code: authOptions.code,\n redirect_uri: authOptions.redirectUrl,\n state: authOptions.state,\n };\n const response = await request(route, parameters);\n if (response.data.error !== undefined) {\n throw new RequestError(`${response.data.error_description} (${response.data.error})`, response.status, {\n headers: response.headers,\n request: request.endpoint(route, parameters),\n });\n }\n const { data } = response;\n const newToken = {\n token: data.access_token,\n scopes: data.scope.split(/,\\s*/).filter(Boolean),\n };\n if (!authOptionsPassed) {\n state.token = newToken;\n }\n return newToken;\n}\n","import btoa from \"btoa-lite\";\nimport { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n if (authOptions.type === \"token\") {\n const { token, scopes } = await getOAuthAccessToken(state, {\n auth: authOptions\n });\n return {\n type: \"token\",\n token,\n tokenType: \"oauth\",\n scopes\n };\n }\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n headers: {\n authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`\n }\n };\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Reset a token\n * - [`DELETE /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[:{]?[\\w_]+\\}?\\/(token|grant)(s\\/[:{]?[\\w_]+\\}?)?($|\\?)/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { getOAuthAccessToken } from \"./get-oauth-access-token\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve a new token\n if (/\\/login\\/oauth\\/access_token$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (!state.code || requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n const response = await request(endpoint);\n // `POST /applications/{client_id}/tokens/{access_token}` (legacy) or\n // `PATCH /applications/{client_id}/token` resets the passed token\n // and returns a new one. If that’s the current request then update internal state.\n // Regex supports both the `{param}` as well as the legacy `:param` notation\n const isLegacyTokenResetRequest = endpoint.method === \"POST\" &&\n /^\\/applications\\/[:{]?[\\w_]+\\}?\\/tokens\\/[:{]?[\\w_]+\\}?$/.test(endpoint.url);\n const isTokenResetRequest = endpoint.method === \"PATCH\" &&\n /^\\/applications\\/[:{]?[\\w_]+\\}?\\/token$/.test(endpoint.url);\n if (isLegacyTokenResetRequest || isTokenResetRequest) {\n state.token = {\n token: response.data.token,\n // @ts-ignore figure this out\n scope: response.data.scopes,\n };\n }\n return response;\n }\n const { token } = await getOAuthAccessToken(state, { request });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"3.0.8\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport function createOAuthAppAuth(options) {\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`\n }\n })\n }, options);\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state)\n });\n}\n"],"names":["getOAuthAccessToken","state","options","authOptionsPassed","auth","code","authOptions","token","route","test","request","endpoint","DEFAULTS","baseUrl","replace","parameters","headers","accept","client_id","clientId","client_secret","clientSecret","redirect_uri","redirectUrl","response","data","error","undefined","RequestError","error_description","status","newToken","access_token","scopes","scope","split","filter","Boolean","type","tokenType","authorization","btoa","ROUTES_REQUIRING_BASIC_AUTH","requiresBasicAuth","url","hook","merge","credentials","isLegacyTokenResetRequest","method","isTokenResetRequest","VERSION","createOAuthAppAuth","Object","assign","defaults","getUserAgent","bind"],"mappings":";;;;;;;;;;;AACO,eAAeA,mBAAf,CAAmCC,KAAnC,EAA0CC,OAA1C,EAAmD;AACtD,QAAMC,iBAAiB,GAAGD,OAAO,CAACE,IAAR,GACpB,OAAOF,OAAO,CAACE,IAAR,CAAaC,IAApB,KAA6B,WADT,GAEpB,KAFN;AAGA,QAAMC,WAAW,GAAGJ,OAAO,CAACE,IAAR,IAAgBD,iBAAhB,GAAoCD,OAAO,CAACE,IAA5C,GAAmDH,KAAvE;;AACA,MAAIA,KAAK,CAACM,KAAN,IAAe,CAACJ,iBAApB,EAAuC;AACnC,WAAOF,KAAK,CAACM,KAAb;AACH,GAPqD;AAStD;;;AACA,QAAMC,KAAK,GAAG,kCAAkCC,IAAlC,CAAuCR,KAAK,CAACS,OAAN,CAAcC,QAAd,CAAuBC,QAAvB,CAAgCC,OAAvE,IACR,kDADQ,GAEP,QAAOZ,KAAK,CAACS,OAAN,CAAcC,QAAd,CAAuBC,QAAvB,CAAgCC,OAAhC,CAAwCC,OAAxC,CAAgD,SAAhD,EAA2D,2BAA3D,CAAwF,EAFtG;AAGA,QAAMJ,OAAO,GAAGR,OAAO,CAACQ,OAAR,IAAmBT,KAAK,CAACS,OAAzC;AACA,QAAMK,UAAU,GAAG;AACfC,IAAAA,OAAO,EAAE;AACLC,MAAAA,MAAM,EAAE;AADH,KADM;AAIfC,IAAAA,SAAS,EAAEjB,KAAK,CAACkB,QAJF;AAKfC,IAAAA,aAAa,EAAEnB,KAAK,CAACoB,YALN;AAMfhB,IAAAA,IAAI,EAAEC,WAAW,CAACD,IANH;AAOfiB,IAAAA,YAAY,EAAEhB,WAAW,CAACiB,WAPX;AAQftB,IAAAA,KAAK,EAAEK,WAAW,CAACL;AARJ,GAAnB;AAUA,QAAMuB,QAAQ,GAAG,MAAMd,OAAO,CAACF,KAAD,EAAQO,UAAR,CAA9B;;AACA,MAAIS,QAAQ,CAACC,IAAT,CAAcC,KAAd,KAAwBC,SAA5B,EAAuC;AACnC,UAAM,IAAIC,yBAAJ,CAAkB,GAAEJ,QAAQ,CAACC,IAAT,CAAcI,iBAAkB,KAAIL,QAAQ,CAACC,IAAT,CAAcC,KAAM,GAA5E,EAAgFF,QAAQ,CAACM,MAAzF,EAAiG;AACnGd,MAAAA,OAAO,EAAEQ,QAAQ,CAACR,OADiF;AAEnGN,MAAAA,OAAO,EAAEA,OAAO,CAACC,QAAR,CAAiBH,KAAjB,EAAwBO,UAAxB;AAF0F,KAAjG,CAAN;AAIH;;AACD,QAAM;AAAEU,IAAAA;AAAF,MAAWD,QAAjB;AACA,QAAMO,QAAQ,GAAG;AACbxB,IAAAA,KAAK,EAAEkB,IAAI,CAACO,YADC;AAEbC,IAAAA,MAAM,EAAER,IAAI,CAACS,KAAL,CAAWC,KAAX,CAAiB,MAAjB,EAAyBC,MAAzB,CAAgCC,OAAhC;AAFK,GAAjB;;AAIA,MAAI,CAAClC,iBAAL,EAAwB;AACpBF,IAAAA,KAAK,CAACM,KAAN,GAAcwB,QAAd;AACH;;AACD,SAAOA,QAAP;AACH;;ACvCM,eAAe3B,IAAf,CAAoBH,KAApB,EAA2BK,WAA3B,EAAwC;AAC3C,MAAIA,WAAW,CAACgC,IAAZ,KAAqB,OAAzB,EAAkC;AAC9B,UAAM;AAAE/B,MAAAA,KAAF;AAAS0B,MAAAA;AAAT,QAAoB,MAAMjC,mBAAmB,CAACC,KAAD,EAAQ;AACvDG,MAAAA,IAAI,EAAEE;AADiD,KAAR,CAAnD;AAGA,WAAO;AACHgC,MAAAA,IAAI,EAAE,OADH;AAEH/B,MAAAA,KAFG;AAGHgC,MAAAA,SAAS,EAAE,OAHR;AAIHN,MAAAA;AAJG,KAAP;AAMH;;AACD,SAAO;AACHK,IAAAA,IAAI,EAAE,WADH;AAEHnB,IAAAA,QAAQ,EAAElB,KAAK,CAACkB,QAFb;AAGHE,IAAAA,YAAY,EAAEpB,KAAK,CAACoB,YAHjB;AAIHL,IAAAA,OAAO,EAAE;AACLwB,MAAAA,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAExC,KAAK,CAACkB,QAAS,IAAGlB,KAAK,CAACoB,YAAa,EAAzC,CAA4C;AADnE;AAJN,GAAP;AAQH;;ACtBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMqB,2BAA2B,GAAG,yEAApC;AACA,AAAO,SAASC,iBAAT,CAA2BC,GAA3B,EAAgC;AACnC,SAAOA,GAAG,IAAIF,2BAA2B,CAACjC,IAA5B,CAAiCmC,GAAjC,CAAd;AACH;;ACfM,eAAeC,IAAf,CAAoB5C,KAApB,EAA2BS,OAA3B,EAAoCF,KAApC,EAA2CO,UAA3C,EAAuD;AAC1D,MAAIJ,QAAQ,GAAGD,OAAO,CAACC,QAAR,CAAiBmC,KAAjB,CAAuBtC,KAAvB,EAA8BO,UAA9B,CAAf,CAD0D;;AAG1D,MAAI,gCAAgCN,IAAhC,CAAqCE,QAAQ,CAACiC,GAA9C,CAAJ,EAAwD;AACpD,WAAOlC,OAAO,CAACC,QAAD,CAAd;AACH;;AACD,MAAI,CAACV,KAAK,CAACI,IAAP,IAAesC,iBAAiB,CAAChC,QAAQ,CAACiC,GAAV,CAApC,EAAoD;AAChD,UAAMG,WAAW,GAAGN,IAAI,CAAE,GAAExC,KAAK,CAACkB,QAAS,IAAGlB,KAAK,CAACoB,YAAa,EAAzC,CAAxB;AACAV,IAAAA,QAAQ,CAACK,OAAT,CAAiBwB,aAAjB,GAAkC,SAAQO,WAAY,EAAtD;AACA,UAAMvB,QAAQ,GAAG,MAAMd,OAAO,CAACC,QAAD,CAA9B,CAHgD;AAKhD;AACA;AACA;;AACA,UAAMqC,yBAAyB,GAAGrC,QAAQ,CAACsC,MAAT,KAAoB,MAApB,IAC9B,2DAA2DxC,IAA3D,CAAgEE,QAAQ,CAACiC,GAAzE,CADJ;AAEA,UAAMM,mBAAmB,GAAGvC,QAAQ,CAACsC,MAAT,KAAoB,OAApB,IACxB,0CAA0CxC,IAA1C,CAA+CE,QAAQ,CAACiC,GAAxD,CADJ;;AAEA,QAAII,yBAAyB,IAAIE,mBAAjC,EAAsD;AAClDjD,MAAAA,KAAK,CAACM,KAAN,GAAc;AACVA,QAAAA,KAAK,EAAEiB,QAAQ,CAACC,IAAT,CAAclB,KADX;AAEV;AACA2B,QAAAA,KAAK,EAAEV,QAAQ,CAACC,IAAT,CAAcQ;AAHX,OAAd;AAKH;;AACD,WAAOT,QAAP;AACH;;AACD,QAAM;AAAEjB,IAAAA;AAAF,MAAY,MAAMP,mBAAmB,CAACC,KAAD,EAAQ;AAAES,IAAAA;AAAF,GAAR,CAA3C;AACAC,EAAAA,QAAQ,CAACK,OAAT,CAAiBwB,aAAjB,GAAkC,SAAQjC,KAAM,EAAhD;AACA,SAAOG,OAAO,CAACC,QAAD,CAAd;AACH;;ACjCM,MAAMwC,OAAO,GAAG,mBAAhB;;ACKA,SAASC,kBAAT,CAA4BlD,OAA5B,EAAqC;AACxC,QAAMD,KAAK,GAAGoD,MAAM,CAACC,MAAP,CAAc;AACxB5C,IAAAA,OAAO,EAAEA,eAAO,CAAC6C,QAAR,CAAiB;AACtBvC,MAAAA,OAAO,EAAE;AACL,sBAAe,6BAA4BmC,OAAQ,IAAGK,+BAAY,EAAG;AADhE;AADa,KAAjB;AADe,GAAd,EAMXtD,OANW,CAAd;AAOA,SAAOmD,MAAM,CAACC,MAAP,CAAclD,IAAI,CAACqD,IAAL,CAAU,IAAV,EAAgBxD,KAAhB,CAAd,EAAsC;AACzC4C,IAAAA,IAAI,EAAEA,IAAI,CAACY,IAAL,CAAU,IAAV,EAAgBxD,KAAhB;AADmC,GAAtC,CAAP;AAGH;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { RequestError } from \"@octokit/request-error\";\nexport async function getOAuthAccessToken(state, options) {\n const authOptionsPassed = options.auth\n ? typeof options.auth.code !== \"undefined\"\n : false;\n const authOptions = options.auth && authOptionsPassed ? options.auth : state;\n if (state.token && !authOptionsPassed) {\n return state.token;\n }\n // The \"/login/oauth/access_token\" is not part of the REST API hosted on api.github.com,\n // instead it’s using the github.com domain.\n const route = /^https:\\/\\/(api\\.)?github\\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl)\n ? \"POST https://github.com/login/oauth/access_token\"\n : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace(\"/api/v3\", \"/login/oauth/access_token\")}`;\n const request = options.request || state.request;\n const parameters = {\n headers: {\n accept: \"application/json\",\n },\n client_id: state.clientId,\n client_secret: state.clientSecret,\n code: authOptions.code,\n redirect_uri: authOptions.redirectUrl,\n state: authOptions.state,\n };\n const response = await request(route, parameters);\n if (response.data.error !== undefined) {\n throw new RequestError(`${response.data.error_description} (${response.data.error})`, response.status, {\n headers: response.headers,\n request: request.endpoint(route, parameters),\n });\n }\n const { data } = response;\n const newToken = {\n token: data.access_token,\n scopes: data.scope.split(/,\\s*/).filter(Boolean),\n };\n if (!authOptionsPassed) {\n state.token = newToken;\n }\n return newToken;\n}\n","import btoa from \"btoa-lite\";\nimport { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n if (authOptions.type === \"token\") {\n console.warn(`[@octokit/auth-oauth-app] \"{type: 'token'}\" is deprecated, use \"{type: 'oauth-user'}\" instead`);\n }\n if (authOptions.type === \"token\" || authOptions.type === \"oauth-user\") {\n const { token, scopes } = await getOAuthAccessToken(state, {\n auth: authOptions,\n });\n return {\n type: \"token\",\n token,\n tokenType: \"oauth\",\n scopes,\n };\n }\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n headers: {\n authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`,\n },\n };\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Reset a token\n * - [`DELETE /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[:{]?[\\w_]+\\}?\\/(token|grant)(s\\/[:{]?[\\w_]+\\}?)?($|\\?)/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { getOAuthAccessToken } from \"./get-oauth-access-token\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve a new token\n if (/\\/login\\/oauth\\/access_token$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (!state.code || requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n const response = await request(endpoint);\n // `POST /applications/{client_id}/tokens/{access_token}` (legacy) or\n // `PATCH /applications/{client_id}/token` resets the passed token\n // and returns a new one. If that’s the current request then update internal state.\n // Regex supports both the `{param}` as well as the legacy `:param` notation\n const isLegacyTokenResetRequest = endpoint.method === \"POST\" &&\n /^\\/applications\\/[:{]?[\\w_]+\\}?\\/tokens\\/[:{]?[\\w_]+\\}?$/.test(endpoint.url);\n const isTokenResetRequest = endpoint.method === \"PATCH\" &&\n /^\\/applications\\/[:{]?[\\w_]+\\}?\\/token$/.test(endpoint.url);\n if (isLegacyTokenResetRequest || isTokenResetRequest) {\n state.token = {\n token: response.data.token,\n // @ts-ignore figure this out\n scope: response.data.scopes,\n };\n }\n return response;\n }\n console.warn(`[@octokit/auth-oauth-app] setting user authentication is deprecated. Use \"@octokit/auth-oauth-user\" instead`);\n const { token } = await getOAuthAccessToken(state, { request });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"3.1.1\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nconst deprecatedStrategyOptions = [\"code\", \"redirectUrl\", \"state\"];\nexport function createOAuthAppAuth(options) {\n const usedDeprecatedOptions = deprecatedStrategyOptions.filter((option) => option in options);\n if (usedDeprecatedOptions.length) {\n console.warn(`[@octokit/auth-oauth-app] \"${usedDeprecatedOptions.join(\", \")}\" strategy options are deprecated. Use \"@octokit/auth-oauth-user\" instead`);\n }\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n }),\n }, options);\n // @ts-expect-error wtf\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["getOAuthAccessToken","state","options","authOptionsPassed","auth","code","authOptions","token","route","test","request","endpoint","DEFAULTS","baseUrl","replace","parameters","headers","accept","client_id","clientId","client_secret","clientSecret","redirect_uri","redirectUrl","response","data","error","undefined","RequestError","error_description","status","newToken","access_token","scopes","scope","split","filter","Boolean","type","console","warn","tokenType","authorization","btoa","ROUTES_REQUIRING_BASIC_AUTH","requiresBasicAuth","url","hook","merge","credentials","isLegacyTokenResetRequest","method","isTokenResetRequest","VERSION","deprecatedStrategyOptions","createOAuthAppAuth","usedDeprecatedOptions","option","length","join","Object","assign","defaults","getUserAgent","bind"],"mappings":";;;;;;;;;;;AACO,eAAeA,mBAAf,CAAmCC,KAAnC,EAA0CC,OAA1C,EAAmD;AACtD,QAAMC,iBAAiB,GAAGD,OAAO,CAACE,IAAR,GACpB,OAAOF,OAAO,CAACE,IAAR,CAAaC,IAApB,KAA6B,WADT,GAEpB,KAFN;AAGA,QAAMC,WAAW,GAAGJ,OAAO,CAACE,IAAR,IAAgBD,iBAAhB,GAAoCD,OAAO,CAACE,IAA5C,GAAmDH,KAAvE;;AACA,MAAIA,KAAK,CAACM,KAAN,IAAe,CAACJ,iBAApB,EAAuC;AACnC,WAAOF,KAAK,CAACM,KAAb;AACH,GAPqD;AAStD;;;AACA,QAAMC,KAAK,GAAG,kCAAkCC,IAAlC,CAAuCR,KAAK,CAACS,OAAN,CAAcC,QAAd,CAAuBC,QAAvB,CAAgCC,OAAvE,IACR,kDADQ,GAEP,QAAOZ,KAAK,CAACS,OAAN,CAAcC,QAAd,CAAuBC,QAAvB,CAAgCC,OAAhC,CAAwCC,OAAxC,CAAgD,SAAhD,EAA2D,2BAA3D,CAAwF,EAFtG;AAGA,QAAMJ,OAAO,GAAGR,OAAO,CAACQ,OAAR,IAAmBT,KAAK,CAACS,OAAzC;AACA,QAAMK,UAAU,GAAG;AACfC,IAAAA,OAAO,EAAE;AACLC,MAAAA,MAAM,EAAE;AADH,KADM;AAIfC,IAAAA,SAAS,EAAEjB,KAAK,CAACkB,QAJF;AAKfC,IAAAA,aAAa,EAAEnB,KAAK,CAACoB,YALN;AAMfhB,IAAAA,IAAI,EAAEC,WAAW,CAACD,IANH;AAOfiB,IAAAA,YAAY,EAAEhB,WAAW,CAACiB,WAPX;AAQftB,IAAAA,KAAK,EAAEK,WAAW,CAACL;AARJ,GAAnB;AAUA,QAAMuB,QAAQ,GAAG,MAAMd,OAAO,CAACF,KAAD,EAAQO,UAAR,CAA9B;;AACA,MAAIS,QAAQ,CAACC,IAAT,CAAcC,KAAd,KAAwBC,SAA5B,EAAuC;AACnC,UAAM,IAAIC,yBAAJ,CAAkB,GAAEJ,QAAQ,CAACC,IAAT,CAAcI,iBAAkB,KAAIL,QAAQ,CAACC,IAAT,CAAcC,KAAM,GAA5E,EAAgFF,QAAQ,CAACM,MAAzF,EAAiG;AACnGd,MAAAA,OAAO,EAAEQ,QAAQ,CAACR,OADiF;AAEnGN,MAAAA,OAAO,EAAEA,OAAO,CAACC,QAAR,CAAiBH,KAAjB,EAAwBO,UAAxB;AAF0F,KAAjG,CAAN;AAIH;;AACD,QAAM;AAAEU,IAAAA;AAAF,MAAWD,QAAjB;AACA,QAAMO,QAAQ,GAAG;AACbxB,IAAAA,KAAK,EAAEkB,IAAI,CAACO,YADC;AAEbC,IAAAA,MAAM,EAAER,IAAI,CAACS,KAAL,CAAWC,KAAX,CAAiB,MAAjB,EAAyBC,MAAzB,CAAgCC,OAAhC;AAFK,GAAjB;;AAIA,MAAI,CAAClC,iBAAL,EAAwB;AACpBF,IAAAA,KAAK,CAACM,KAAN,GAAcwB,QAAd;AACH;;AACD,SAAOA,QAAP;AACH;;ACvCM,eAAe3B,IAAf,CAAoBH,KAApB,EAA2BK,WAA3B,EAAwC;AAC3C,MAAIA,WAAW,CAACgC,IAAZ,KAAqB,OAAzB,EAAkC;AAC9BC,IAAAA,OAAO,CAACC,IAAR,CAAc,+FAAd;AACH;;AACD,MAAIlC,WAAW,CAACgC,IAAZ,KAAqB,OAArB,IAAgChC,WAAW,CAACgC,IAAZ,KAAqB,YAAzD,EAAuE;AACnE,UAAM;AAAE/B,MAAAA,KAAF;AAAS0B,MAAAA;AAAT,QAAoB,MAAMjC,mBAAmB,CAACC,KAAD,EAAQ;AACvDG,MAAAA,IAAI,EAAEE;AADiD,KAAR,CAAnD;AAGA,WAAO;AACHgC,MAAAA,IAAI,EAAE,OADH;AAEH/B,MAAAA,KAFG;AAGHkC,MAAAA,SAAS,EAAE,OAHR;AAIHR,MAAAA;AAJG,KAAP;AAMH;;AACD,SAAO;AACHK,IAAAA,IAAI,EAAE,WADH;AAEHnB,IAAAA,QAAQ,EAAElB,KAAK,CAACkB,QAFb;AAGHE,IAAAA,YAAY,EAAEpB,KAAK,CAACoB,YAHjB;AAIHL,IAAAA,OAAO,EAAE;AACL0B,MAAAA,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAE1C,KAAK,CAACkB,QAAS,IAAGlB,KAAK,CAACoB,YAAa,EAAzC,CAA4C;AADnE;AAJN,GAAP;AAQH;;ACzBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMuB,2BAA2B,GAAG,yEAApC;AACA,AAAO,SAASC,iBAAT,CAA2BC,GAA3B,EAAgC;AACnC,SAAOA,GAAG,IAAIF,2BAA2B,CAACnC,IAA5B,CAAiCqC,GAAjC,CAAd;AACH;;ACfM,eAAeC,IAAf,CAAoB9C,KAApB,EAA2BS,OAA3B,EAAoCF,KAApC,EAA2CO,UAA3C,EAAuD;AAC1D,MAAIJ,QAAQ,GAAGD,OAAO,CAACC,QAAR,CAAiBqC,KAAjB,CAAuBxC,KAAvB,EAA8BO,UAA9B,CAAf,CAD0D;;AAG1D,MAAI,gCAAgCN,IAAhC,CAAqCE,QAAQ,CAACmC,GAA9C,CAAJ,EAAwD;AACpD,WAAOpC,OAAO,CAACC,QAAD,CAAd;AACH;;AACD,MAAI,CAACV,KAAK,CAACI,IAAP,IAAewC,iBAAiB,CAAClC,QAAQ,CAACmC,GAAV,CAApC,EAAoD;AAChD,UAAMG,WAAW,GAAGN,IAAI,CAAE,GAAE1C,KAAK,CAACkB,QAAS,IAAGlB,KAAK,CAACoB,YAAa,EAAzC,CAAxB;AACAV,IAAAA,QAAQ,CAACK,OAAT,CAAiB0B,aAAjB,GAAkC,SAAQO,WAAY,EAAtD;AACA,UAAMzB,QAAQ,GAAG,MAAMd,OAAO,CAACC,QAAD,CAA9B,CAHgD;AAKhD;AACA;AACA;;AACA,UAAMuC,yBAAyB,GAAGvC,QAAQ,CAACwC,MAAT,KAAoB,MAApB,IAC9B,2DAA2D1C,IAA3D,CAAgEE,QAAQ,CAACmC,GAAzE,CADJ;AAEA,UAAMM,mBAAmB,GAAGzC,QAAQ,CAACwC,MAAT,KAAoB,OAApB,IACxB,0CAA0C1C,IAA1C,CAA+CE,QAAQ,CAACmC,GAAxD,CADJ;;AAEA,QAAII,yBAAyB,IAAIE,mBAAjC,EAAsD;AAClDnD,MAAAA,KAAK,CAACM,KAAN,GAAc;AACVA,QAAAA,KAAK,EAAEiB,QAAQ,CAACC,IAAT,CAAclB,KADX;AAEV;AACA2B,QAAAA,KAAK,EAAEV,QAAQ,CAACC,IAAT,CAAcQ;AAHX,OAAd;AAKH;;AACD,WAAOT,QAAP;AACH;;AACDe,EAAAA,OAAO,CAACC,IAAR,CAAc,6GAAd;AACA,QAAM;AAAEjC,IAAAA;AAAF,MAAY,MAAMP,mBAAmB,CAACC,KAAD,EAAQ;AAAES,IAAAA;AAAF,GAAR,CAA3C;AACAC,EAAAA,QAAQ,CAACK,OAAT,CAAiB0B,aAAjB,GAAkC,SAAQnC,KAAM,EAAhD;AACA,SAAOG,OAAO,CAACC,QAAD,CAAd;AACH;;AClCM,MAAM0C,OAAO,GAAG,mBAAhB;;ACKP,MAAMC,yBAAyB,GAAG,CAAC,MAAD,EAAS,aAAT,EAAwB,OAAxB,CAAlC;AACA,AAAO,SAASC,kBAAT,CAA4BrD,OAA5B,EAAqC;AACxC,QAAMsD,qBAAqB,GAAGF,yBAAyB,CAAClB,MAA1B,CAAkCqB,MAAD,IAAYA,MAAM,IAAIvD,OAAvD,CAA9B;;AACA,MAAIsD,qBAAqB,CAACE,MAA1B,EAAkC;AAC9BnB,IAAAA,OAAO,CAACC,IAAR,CAAc,8BAA6BgB,qBAAqB,CAACG,IAAtB,CAA2B,IAA3B,CAAiC,2EAA5E;AACH;;AACD,QAAM1D,KAAK,GAAG2D,MAAM,CAACC,MAAP,CAAc;AACxBnD,IAAAA,OAAO,EAAEA,eAAO,CAACoD,QAAR,CAAiB;AACtB9C,MAAAA,OAAO,EAAE;AACL,sBAAe,6BAA4BqC,OAAQ,IAAGU,+BAAY,EAAG;AADhE;AADa,KAAjB;AADe,GAAd,EAMX7D,OANW,CAAd,CALwC;;AAaxC,SAAO0D,MAAM,CAACC,MAAP,CAAczD,IAAI,CAAC4D,IAAL,CAAU,IAAV,EAAgB/D,KAAhB,CAAd,EAAsC;AACzC8C,IAAAA,IAAI,EAAEA,IAAI,CAACiB,IAAL,CAAU,IAAV,EAAgB/D,KAAhB;AADmC,GAAtC,CAAP;AAGH;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/auth.js b/node_modules/@octokit/auth-oauth-app/dist-src/auth.js index 57a0398..5600645 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-src/auth.js +++ b/node_modules/@octokit/auth-oauth-app/dist-src/auth.js @@ -2,14 +2,17 @@ import btoa from "btoa-lite"; import { getOAuthAccessToken } from "./get-oauth-access-token"; export async function auth(state, authOptions) { if (authOptions.type === "token") { + console.warn(`[@octokit/auth-oauth-app] "{type: 'token'}" is deprecated, use "{type: 'oauth-user'}" instead`); + } + if (authOptions.type === "token" || authOptions.type === "oauth-user") { const { token, scopes } = await getOAuthAccessToken(state, { - auth: authOptions + auth: authOptions, }); return { type: "token", token, tokenType: "oauth", - scopes + scopes, }; } return { @@ -17,7 +20,7 @@ export async function auth(state, authOptions) { clientId: state.clientId, clientSecret: state.clientSecret, headers: { - authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}` - } + authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`, + }, }; } diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/hook.js b/node_modules/@octokit/auth-oauth-app/dist-src/hook.js index ffe9d27..6074425 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-src/hook.js +++ b/node_modules/@octokit/auth-oauth-app/dist-src/hook.js @@ -28,6 +28,7 @@ export async function hook(state, request, route, parameters) { } return response; } + console.warn(`[@octokit/auth-oauth-app] setting user authentication is deprecated. Use "@octokit/auth-oauth-user" instead`); const { token } = await getOAuthAccessToken(state, { request }); endpoint.headers.authorization = `token ${token}`; return request(endpoint); diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/index.js b/node_modules/@octokit/auth-oauth-app/dist-src/index.js index f39916a..b1dc6b1 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-src/index.js +++ b/node_modules/@octokit/auth-oauth-app/dist-src/index.js @@ -3,15 +3,21 @@ import { request } from "@octokit/request"; import { auth } from "./auth"; import { hook } from "./hook"; import { VERSION } from "./version"; +const deprecatedStrategyOptions = ["code", "redirectUrl", "state"]; export function createOAuthAppAuth(options) { + const usedDeprecatedOptions = deprecatedStrategyOptions.filter((option) => option in options); + if (usedDeprecatedOptions.length) { + console.warn(`[@octokit/auth-oauth-app] "${usedDeprecatedOptions.join(", ")}" strategy options are deprecated. Use "@octokit/auth-oauth-user" instead`); + } const state = Object.assign({ request: request.defaults({ headers: { - "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}` - } - }) + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, + }, + }), }, options); + // @ts-expect-error wtf return Object.assign(auth.bind(null, state), { - hook: hook.bind(null, state) + hook: hook.bind(null, state), }); } diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/version.js b/node_modules/@octokit/auth-oauth-app/dist-src/version.js index f652104..08e95e5 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-src/version.js +++ b/node_modules/@octokit/auth-oauth-app/dist-src/version.js @@ -1 +1 @@ -export const VERSION = "3.0.8"; +export const VERSION = "3.1.1"; diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts index 37a3c60..12f4b29 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts +++ b/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts @@ -1,2 +1,7 @@ -import { State, AuthOptions, Authentication } from "./types"; -export declare function auth(state: State, authOptions: AuthOptions): Promise; +import { State, AuthAppOptions, AuthTokenOptions, DeprecatedAuthTokenOptions, Authentication } from "./types"; +export declare function auth(state: State, authOptions: AuthAppOptions): Promise; +export declare function auth(state: State, authOptions: AuthTokenOptions): Promise; +/** + * @deprecated `type: "token"` is deprecate. Use `type: "oauth"` instead + */ +export declare function auth(state: State, authOptions: DeprecatedAuthTokenOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/get-oauth-access-token.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/get-oauth-access-token.d.ts index a305b3b..e8869e4 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-types/get-oauth-access-token.d.ts +++ b/node_modules/@octokit/auth-oauth-app/dist-types/get-oauth-access-token.d.ts @@ -1,5 +1,5 @@ -import { AuthTokenOptions, RequestInterface, State, TokenWithScopes } from "./types"; +import { AuthTokenOptions, DeprecatedAuthTokenOptions, RequestInterface, State, TokenWithScopes } from "./types"; export declare function getOAuthAccessToken(state: State, options: { request?: RequestInterface; - auth?: AuthTokenOptions; + auth?: AuthTokenOptions | DeprecatedAuthTokenOptions; }): Promise; diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts index caa2389..d88342a 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts +++ b/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts @@ -1,9 +1,7 @@ -import { StrategyOptions, AuthOptions, Authentication } from "./types"; +import { StrategyOptions, AuthOptions, Authentication, OAuthAppAuthInterface } from "./types"; export declare type Types = { StrategyOptions: StrategyOptions; AuthOptions: AuthOptions; Authentication: Authentication; }; -export declare function createOAuthAppAuth(options: StrategyOptions): ((authOptions: AuthOptions) => Promise) & { - hook: (request: import("./types").RequestInterface, route: string | import("@octokit/types").EndpointOptions, parameters?: import("@octokit/types").RequestParameters | undefined) => Promise>; -}; +export declare function createOAuthAppAuth(options: StrategyOptions): OAuthAppAuthInterface; diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts index 88986c8..fe5f009 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts +++ b/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts @@ -18,16 +18,23 @@ export declare type StrategyOptions = { state?: string; request?: RequestInterface; }; -declare type AuthAppOptions = { +export declare type AuthAppOptions = { type: "oauth-app"; }; export declare type AuthTokenOptions = { + type: "oauth-user"; + code?: string; + redirectUrl?: string; + state?: string; +}; +/** @deprecated type: "token" is deprecated. Use type: "oauth-user" */ +export declare type DeprecatedAuthTokenOptions = { type: "token"; code?: string; redirectUrl?: string; state?: string; }; -export declare type AuthOptions = AuthAppOptions | AuthTokenOptions; +export declare type AuthOptions = AuthAppOptions | AuthTokenOptions | DeprecatedAuthTokenOptions; export declare type TokenWithScopes = { token: string; scopes: string[]; @@ -49,4 +56,7 @@ export declare type State = StrategyOptions & { request: RequestInterface; token?: TokenWithScopes; }; -export {}; +export interface OAuthAppAuthInterface { + (options?: AuthOptions): Promise; + hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>; +} diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts index 7e206fc..03b6d39 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts +++ b/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "3.0.8"; +export declare const VERSION = "3.1.1"; diff --git a/node_modules/@octokit/auth-oauth-app/dist-web/index.js b/node_modules/@octokit/auth-oauth-app/dist-web/index.js index ebb5401..daa2ba9 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-web/index.js +++ b/node_modules/@octokit/auth-oauth-app/dist-web/index.js @@ -47,14 +47,17 @@ async function getOAuthAccessToken(state, options) { async function auth(state, authOptions) { if (authOptions.type === "token") { + console.warn(`[@octokit/auth-oauth-app] "{type: 'token'}" is deprecated, use "{type: 'oauth-user'}" instead`); + } + if (authOptions.type === "token" || authOptions.type === "oauth-user") { const { token, scopes } = await getOAuthAccessToken(state, { - auth: authOptions + auth: authOptions, }); return { type: "token", token, tokenType: "oauth", - scopes + scopes, }; } return { @@ -62,8 +65,8 @@ async function auth(state, authOptions) { clientId: state.clientId, clientSecret: state.clientSecret, headers: { - authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}` - } + authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`, + }, }; } @@ -114,23 +117,30 @@ async function hook(state, request, route, parameters) { } return response; } + console.warn(`[@octokit/auth-oauth-app] setting user authentication is deprecated. Use "@octokit/auth-oauth-user" instead`); const { token } = await getOAuthAccessToken(state, { request }); endpoint.headers.authorization = `token ${token}`; return request(endpoint); } -const VERSION = "3.0.8"; +const VERSION = "3.1.1"; +const deprecatedStrategyOptions = ["code", "redirectUrl", "state"]; function createOAuthAppAuth(options) { + const usedDeprecatedOptions = deprecatedStrategyOptions.filter((option) => option in options); + if (usedDeprecatedOptions.length) { + console.warn(`[@octokit/auth-oauth-app] "${usedDeprecatedOptions.join(", ")}" strategy options are deprecated. Use "@octokit/auth-oauth-user" instead`); + } const state = Object.assign({ request: request.defaults({ headers: { - "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}` - } - }) + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, + }, + }), }, options); + // @ts-expect-error wtf return Object.assign(auth.bind(null, state), { - hook: hook.bind(null, state) + hook: hook.bind(null, state), }); } diff --git a/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map index bebb526..f4e67a2 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map +++ b/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { RequestError } from \"@octokit/request-error\";\nexport async function getOAuthAccessToken(state, options) {\n const authOptionsPassed = options.auth\n ? typeof options.auth.code !== \"undefined\"\n : false;\n const authOptions = options.auth && authOptionsPassed ? options.auth : state;\n if (state.token && !authOptionsPassed) {\n return state.token;\n }\n // The \"/login/oauth/access_token\" is not part of the REST API hosted on api.github.com,\n // instead it’s using the github.com domain.\n const route = /^https:\\/\\/(api\\.)?github\\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl)\n ? \"POST https://github.com/login/oauth/access_token\"\n : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace(\"/api/v3\", \"/login/oauth/access_token\")}`;\n const request = options.request || state.request;\n const parameters = {\n headers: {\n accept: \"application/json\",\n },\n client_id: state.clientId,\n client_secret: state.clientSecret,\n code: authOptions.code,\n redirect_uri: authOptions.redirectUrl,\n state: authOptions.state,\n };\n const response = await request(route, parameters);\n if (response.data.error !== undefined) {\n throw new RequestError(`${response.data.error_description} (${response.data.error})`, response.status, {\n headers: response.headers,\n request: request.endpoint(route, parameters),\n });\n }\n const { data } = response;\n const newToken = {\n token: data.access_token,\n scopes: data.scope.split(/,\\s*/).filter(Boolean),\n };\n if (!authOptionsPassed) {\n state.token = newToken;\n }\n return newToken;\n}\n","import btoa from \"btoa-lite\";\nimport { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n if (authOptions.type === \"token\") {\n const { token, scopes } = await getOAuthAccessToken(state, {\n auth: authOptions\n });\n return {\n type: \"token\",\n token,\n tokenType: \"oauth\",\n scopes\n };\n }\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n headers: {\n authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`\n }\n };\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Reset a token\n * - [`DELETE /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[:{]?[\\w_]+\\}?\\/(token|grant)(s\\/[:{]?[\\w_]+\\}?)?($|\\?)/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { getOAuthAccessToken } from \"./get-oauth-access-token\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve a new token\n if (/\\/login\\/oauth\\/access_token$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (!state.code || requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n const response = await request(endpoint);\n // `POST /applications/{client_id}/tokens/{access_token}` (legacy) or\n // `PATCH /applications/{client_id}/token` resets the passed token\n // and returns a new one. If that’s the current request then update internal state.\n // Regex supports both the `{param}` as well as the legacy `:param` notation\n const isLegacyTokenResetRequest = endpoint.method === \"POST\" &&\n /^\\/applications\\/[:{]?[\\w_]+\\}?\\/tokens\\/[:{]?[\\w_]+\\}?$/.test(endpoint.url);\n const isTokenResetRequest = endpoint.method === \"PATCH\" &&\n /^\\/applications\\/[:{]?[\\w_]+\\}?\\/token$/.test(endpoint.url);\n if (isLegacyTokenResetRequest || isTokenResetRequest) {\n state.token = {\n token: response.data.token,\n // @ts-ignore figure this out\n scope: response.data.scopes,\n };\n }\n return response;\n }\n const { token } = await getOAuthAccessToken(state, { request });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"3.0.8\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport function createOAuthAppAuth(options) {\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`\n }\n })\n }, options);\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state)\n });\n}\n"],"names":[],"mappings":";;;;;AACO,eAAe,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1D,IAAI,MAAM,iBAAiB,GAAG,OAAO,CAAC,IAAI;AAC1C,UAAU,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW;AAClD,UAAU,KAAK,CAAC;AAChB,IAAI,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,iBAAiB,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;AACjF,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,iBAAiB,EAAE;AAC3C,QAAQ,OAAO,KAAK,CAAC,KAAK,CAAC;AAC3B,KAAK;AACL;AACA;AACA,IAAI,MAAM,KAAK,GAAG,iCAAiC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;AACjG,UAAU,kDAAkD;AAC5D,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC;AAC5G,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;AACrD,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,EAAE;AACjB,YAAY,MAAM,EAAE,kBAAkB;AACtC,SAAS;AACT,QAAQ,SAAS,EAAE,KAAK,CAAC,QAAQ;AACjC,QAAQ,aAAa,EAAE,KAAK,CAAC,YAAY;AACzC,QAAQ,IAAI,EAAE,WAAW,CAAC,IAAI;AAC9B,QAAQ,YAAY,EAAE,WAAW,CAAC,WAAW;AAC7C,QAAQ,KAAK,EAAE,WAAW,CAAC,KAAK;AAChC,KAAK,CAAC;AACN,IAAI,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtD,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;AAC3C,QAAQ,MAAM,IAAI,YAAY,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE;AAC/G,YAAY,OAAO,EAAE,QAAQ,CAAC,OAAO;AACrC,YAAY,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;AACxD,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;AAC9B,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,KAAK,EAAE,IAAI,CAAC,YAAY;AAChC,QAAQ,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACxD,KAAK,CAAC;AACN,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC5B,QAAQ,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;AAC/B,KAAK;AACL,IAAI,OAAO,QAAQ,CAAC;AACpB;;ACvCO,eAAe,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;AAC/C,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,OAAO,EAAE;AACtC,QAAQ,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE;AACnE,YAAY,IAAI,EAAE,WAAW;AAC7B,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,OAAO;AACzB,YAAY,KAAK;AACjB,YAAY,SAAS,EAAE,OAAO;AAC9B,YAAY,MAAM;AAClB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,WAAW;AACzB,QAAQ,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAChC,QAAQ,YAAY,EAAE,KAAK,CAAC,YAAY;AACxC,QAAQ,OAAO,EAAE;AACjB,YAAY,aAAa,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AACrF,SAAS;AACT,KAAK,CAAC;AACN,CAAC;;ACtBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,2BAA2B,GAAG,yEAAyE,CAAC;AAC9G,AAAO,SAAS,iBAAiB,CAAC,GAAG,EAAE;AACvC,IAAI,OAAO,GAAG,IAAI,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;;ACfM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC5D,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACxD,QAAQ,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAC5E,QAAQ,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAChE,QAAQ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjD;AACA;AACA;AACA;AACA,QAAQ,MAAM,yBAAyB,GAAG,QAAQ,CAAC,MAAM,KAAK,MAAM;AACpE,YAAY,0DAA0D,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC1F,QAAQ,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,KAAK,OAAO;AAC/D,YAAY,yCAAyC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACzE,QAAQ,IAAI,yBAAyB,IAAI,mBAAmB,EAAE;AAC9D,YAAY,KAAK,CAAC,KAAK,GAAG;AAC1B,gBAAgB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;AAC1C;AACA,gBAAgB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM;AAC3C,aAAa,CAAC;AACd,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK;AACL,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AACpE,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACjCM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACKpC,SAAS,kBAAkB,CAAC,OAAO,EAAE;AAC5C,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC;AAClC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACtF,aAAa;AACb,SAAS,CAAC;AACV,KAAK,EAAE,OAAO,CAAC,CAAC;AAChB,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { RequestError } from \"@octokit/request-error\";\nexport async function getOAuthAccessToken(state, options) {\n const authOptionsPassed = options.auth\n ? typeof options.auth.code !== \"undefined\"\n : false;\n const authOptions = options.auth && authOptionsPassed ? options.auth : state;\n if (state.token && !authOptionsPassed) {\n return state.token;\n }\n // The \"/login/oauth/access_token\" is not part of the REST API hosted on api.github.com,\n // instead it’s using the github.com domain.\n const route = /^https:\\/\\/(api\\.)?github\\.com$/.test(state.request.endpoint.DEFAULTS.baseUrl)\n ? \"POST https://github.com/login/oauth/access_token\"\n : `POST ${state.request.endpoint.DEFAULTS.baseUrl.replace(\"/api/v3\", \"/login/oauth/access_token\")}`;\n const request = options.request || state.request;\n const parameters = {\n headers: {\n accept: \"application/json\",\n },\n client_id: state.clientId,\n client_secret: state.clientSecret,\n code: authOptions.code,\n redirect_uri: authOptions.redirectUrl,\n state: authOptions.state,\n };\n const response = await request(route, parameters);\n if (response.data.error !== undefined) {\n throw new RequestError(`${response.data.error_description} (${response.data.error})`, response.status, {\n headers: response.headers,\n request: request.endpoint(route, parameters),\n });\n }\n const { data } = response;\n const newToken = {\n token: data.access_token,\n scopes: data.scope.split(/,\\s*/).filter(Boolean),\n };\n if (!authOptionsPassed) {\n state.token = newToken;\n }\n return newToken;\n}\n","import btoa from \"btoa-lite\";\nimport { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n if (authOptions.type === \"token\") {\n console.warn(`[@octokit/auth-oauth-app] \"{type: 'token'}\" is deprecated, use \"{type: 'oauth-user'}\" instead`);\n }\n if (authOptions.type === \"token\" || authOptions.type === \"oauth-user\") {\n const { token, scopes } = await getOAuthAccessToken(state, {\n auth: authOptions,\n });\n return {\n type: \"token\",\n token,\n tokenType: \"oauth\",\n scopes,\n };\n }\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n headers: {\n authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`,\n },\n };\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Reset a token\n * - [`DELETE /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[:{]?[\\w_]+\\}?\\/(token|grant)(s\\/[:{]?[\\w_]+\\}?)?($|\\?)/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { getOAuthAccessToken } from \"./get-oauth-access-token\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve a new token\n if (/\\/login\\/oauth\\/access_token$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (!state.code || requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n const response = await request(endpoint);\n // `POST /applications/{client_id}/tokens/{access_token}` (legacy) or\n // `PATCH /applications/{client_id}/token` resets the passed token\n // and returns a new one. If that’s the current request then update internal state.\n // Regex supports both the `{param}` as well as the legacy `:param` notation\n const isLegacyTokenResetRequest = endpoint.method === \"POST\" &&\n /^\\/applications\\/[:{]?[\\w_]+\\}?\\/tokens\\/[:{]?[\\w_]+\\}?$/.test(endpoint.url);\n const isTokenResetRequest = endpoint.method === \"PATCH\" &&\n /^\\/applications\\/[:{]?[\\w_]+\\}?\\/token$/.test(endpoint.url);\n if (isLegacyTokenResetRequest || isTokenResetRequest) {\n state.token = {\n token: response.data.token,\n // @ts-ignore figure this out\n scope: response.data.scopes,\n };\n }\n return response;\n }\n console.warn(`[@octokit/auth-oauth-app] setting user authentication is deprecated. Use \"@octokit/auth-oauth-user\" instead`);\n const { token } = await getOAuthAccessToken(state, { request });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"3.1.1\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nconst deprecatedStrategyOptions = [\"code\", \"redirectUrl\", \"state\"];\nexport function createOAuthAppAuth(options) {\n const usedDeprecatedOptions = deprecatedStrategyOptions.filter((option) => option in options);\n if (usedDeprecatedOptions.length) {\n console.warn(`[@octokit/auth-oauth-app] \"${usedDeprecatedOptions.join(\", \")}\" strategy options are deprecated. Use \"@octokit/auth-oauth-user\" instead`);\n }\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n }),\n }, options);\n // @ts-expect-error wtf\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":[],"mappings":";;;;;AACO,eAAe,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1D,IAAI,MAAM,iBAAiB,GAAG,OAAO,CAAC,IAAI;AAC1C,UAAU,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW;AAClD,UAAU,KAAK,CAAC;AAChB,IAAI,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,iBAAiB,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;AACjF,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,iBAAiB,EAAE;AAC3C,QAAQ,OAAO,KAAK,CAAC,KAAK,CAAC;AAC3B,KAAK;AACL;AACA;AACA,IAAI,MAAM,KAAK,GAAG,iCAAiC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;AACjG,UAAU,kDAAkD;AAC5D,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC;AAC5G,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;AACrD,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,EAAE;AACjB,YAAY,MAAM,EAAE,kBAAkB;AACtC,SAAS;AACT,QAAQ,SAAS,EAAE,KAAK,CAAC,QAAQ;AACjC,QAAQ,aAAa,EAAE,KAAK,CAAC,YAAY;AACzC,QAAQ,IAAI,EAAE,WAAW,CAAC,IAAI;AAC9B,QAAQ,YAAY,EAAE,WAAW,CAAC,WAAW;AAC7C,QAAQ,KAAK,EAAE,WAAW,CAAC,KAAK;AAChC,KAAK,CAAC;AACN,IAAI,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtD,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;AAC3C,QAAQ,MAAM,IAAI,YAAY,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE;AAC/G,YAAY,OAAO,EAAE,QAAQ,CAAC,OAAO;AACrC,YAAY,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;AACxD,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;AAC9B,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,KAAK,EAAE,IAAI,CAAC,YAAY;AAChC,QAAQ,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACxD,KAAK,CAAC;AACN,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC5B,QAAQ,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;AAC/B,KAAK;AACL,IAAI,OAAO,QAAQ,CAAC;AACpB;;ACvCO,eAAe,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;AAC/C,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,OAAO,EAAE;AACtC,QAAQ,OAAO,CAAC,IAAI,CAAC,CAAC,6FAA6F,CAAC,CAAC,CAAC;AACtH,KAAK;AACL,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,OAAO,IAAI,WAAW,CAAC,IAAI,KAAK,YAAY,EAAE;AAC3E,QAAQ,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE;AACnE,YAAY,IAAI,EAAE,WAAW;AAC7B,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,OAAO;AACzB,YAAY,KAAK;AACjB,YAAY,SAAS,EAAE,OAAO;AAC9B,YAAY,MAAM;AAClB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,WAAW;AACzB,QAAQ,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAChC,QAAQ,YAAY,EAAE,KAAK,CAAC,YAAY;AACxC,QAAQ,OAAO,EAAE;AACjB,YAAY,aAAa,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AACrF,SAAS;AACT,KAAK,CAAC;AACN,CAAC;;ACzBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,2BAA2B,GAAG,yEAAyE,CAAC;AAC9G,AAAO,SAAS,iBAAiB,CAAC,GAAG,EAAE;AACvC,IAAI,OAAO,GAAG,IAAI,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;;ACfM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC5D,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACxD,QAAQ,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAC5E,QAAQ,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAChE,QAAQ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjD;AACA;AACA;AACA;AACA,QAAQ,MAAM,yBAAyB,GAAG,QAAQ,CAAC,MAAM,KAAK,MAAM;AACpE,YAAY,0DAA0D,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC1F,QAAQ,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,KAAK,OAAO;AAC/D,YAAY,yCAAyC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACzE,QAAQ,IAAI,yBAAyB,IAAI,mBAAmB,EAAE;AAC9D,YAAY,KAAK,CAAC,KAAK,GAAG;AAC1B,gBAAgB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;AAC1C;AACA,gBAAgB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM;AAC3C,aAAa,CAAC;AACd,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK;AACL,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,2GAA2G,CAAC,CAAC,CAAC;AAChI,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AACpE,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;AClCM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACK3C,MAAM,yBAAyB,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;AACnE,AAAO,SAAS,kBAAkB,CAAC,OAAO,EAAE;AAC5C,IAAI,MAAM,qBAAqB,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,MAAM,IAAI,OAAO,CAAC,CAAC;AAClG,IAAI,IAAI,qBAAqB,CAAC,MAAM,EAAE;AACtC,QAAQ,OAAO,CAAC,IAAI,CAAC,CAAC,2BAA2B,EAAE,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,yEAAyE,CAAC,CAAC,CAAC;AAChK,KAAK;AACL,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC;AAClC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACtF,aAAa;AACb,SAAS,CAAC;AACV,KAAK,EAAE,OAAO,CAAC,CAAC;AAChB;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-app/package.json b/node_modules/@octokit/auth-oauth-app/package.json index 2c2e24a..0f5d2c1 100644 --- a/node_modules/@octokit/auth-oauth-app/package.json +++ b/node_modules/@octokit/auth-oauth-app/package.json @@ -1,32 +1,22 @@ { - "_from": "@octokit/auth-oauth-app@^3.0.7", - "_id": "@octokit/auth-oauth-app@3.0.8", - "_inBundle": false, - "_integrity": "sha512-LxP/1oQSICvmy5CLCesF3hT8CjtTHga3hsQKBTmFq892pgoOmHUhbcc0BALqgjcuRz1dEy8x2QB7UQibEnEerw==", - "_location": "/@octokit/auth-oauth-app", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/auth-oauth-app@^3.0.7", - "name": "@octokit/auth-oauth-app", - "escapedName": "@octokit%2fauth-oauth-app", - "scope": "@octokit", - "rawSpec": "^3.0.7", - "saveSpec": null, - "fetchSpec": "^3.0.7" - }, - "_requiredBy": [ - "/@octokit/auth" + "name": "@octokit/auth-oauth-app", + "description": "GitHub OAuth App authentication for JavaScript", + "version": "3.1.1", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-3.0.8.tgz", - "_shasum": "05b3a102dae45591a265f0b0b7862e17afffb6e1", - "_spec": "@octokit/auth-oauth-app@^3.0.7", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\auth", - "bugs": { - "url": "https://github.com/octokit/auth-oauth-app.js/issues" - }, - "bundleDependencies": false, + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "octokit", + "authentication", + "oauth", + "api" + ], + "repository": "github:octokit/auth-oauth-app.js", "dependencies": { "@octokit/request": "^5.3.0", "@octokit/request-error": "^2.0.0", @@ -35,8 +25,6 @@ "btoa-lite": "^1.0.0", "universal-user-agent": "^6.0.0" }, - "deprecated": false, - "description": "GitHub OAuth App authentication for JavaScript", "devDependencies": { "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", @@ -51,32 +39,11 @@ "ts-jest": "^26.0.0", "typescript": "^4.0.0" }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/auth-oauth-app.js#readme", - "keywords": [ - "github", - "octokit", - "authentication", - "oauth", - "api" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/auth-oauth-app", - "pika": true, "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/auth-oauth-app.js.git" - }, - "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "version": "3.0.8" + "main": "dist-node/index.js", + "module": "dist-web/index.js" } diff --git a/node_modules/@octokit/auth-oauth-device/LICENSE b/node_modules/@octokit/auth-oauth-device/LICENSE new file mode 100644 index 0000000..57049d0 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 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/auth-oauth-device/README.md b/node_modules/@octokit/auth-oauth-device/README.md new file mode 100644 index 0000000..2fbe50d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/README.md @@ -0,0 +1,656 @@ +# auth-oauth-device.js + +> GitHub OAuth Device authentication strategy for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-device.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-device) +[![Build Status](https://github.com/octokit/auth-oauth-device.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-device.js/actions?query=workflow%3ATest+branch%3Amain) + +`@octokit/auth-oauth-device` is implementing one of [GitHub’s OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). + + + +- [Usage](#usage) + - [For OAuth Apps](#for-oauth-apps) + - [For GitHub Apps](#for-github-apps) +- [`createOAuthDeviceAuth(options)`](#createoauthdeviceauthoptions) +- [`auth(options)`](#authoptions) +- [Authentication object](#authentication-object) + - [OAuth APP user authentication](#oauth-app-user-authentication) + - [GitHub APP user authentication with expiring tokens disabled](#github-app-user-authentication-with-expiring-tokens-disabled) + - [GitHub APP user authentication with expiring tokens enabled](#github-app-user-authentication-with-expiring-tokens-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [How it works](#how-it-works) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + + + + + + +
+ +Browsers + + + +Load `@octokit/auth-oauth-device` directly from [cdn.pika.dev](https://cdn.pika.dev) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-oauth-device` + +```js +const { createOAuthDeviceAuth } = require("@octokit/auth-oauth-device"); +``` + +
+ +### For OAuth Apps + +```js +const auth = createOAuthDeviceAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["public_repo"], + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +const tokenAuthentication = await auth({ + type: "oauth", +}); +// resolves with +// { +// type: "token", +// tokenType: "oauth", +// clientType: "oauth-app", +// clientId: "1234567890abcdef1234", +// token: "...", /* the created oauth token */ +// scopes: [] /* depend on request scopes by OAuth app */ +// } +``` + +### For GitHub Apps + +GitHub Apps do not support `scopes`. Client IDs of GitHub Apps have a `lv1.` prefix. If the GitHub App has expiring user tokens enabled, the resulting `authentication` object has extra properties related to expiration and refreshing the token. + +```js +const auth = createOAuthDeviceAuth({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +const tokenAuthentication = await auth({ + type: "oauth", +}); +// resolves with +// { +// type: "token", +// tokenType: "oauth", +// clientType: "github-app", +// clientId: "lv1.1234567890abcdef", +// token: "...", /* the created oauth token */ +// } +// or if expiring user tokens are enabled +// { +// type: "token", +// tokenType: "oauth", +// clientType: "github-app", +// clientId: "lv1.1234567890abcdef", +// token: "...", /* the created oauth token */ +// refreshToken: "...", +// expiresAt: "2022-01-01T08:00:0.000Z", +// refreshTokenExpiresAt: "2021-07-01T00:00:0.000Z", +// } +``` + +## `createOAuthDeviceAuth(options)` + +The `createOAuthDeviceAuth` method accepts a single `options` parameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Find your OAuth app’s Client ID in your account’s developer settings. +
+ onVerification + + function + + Required. A function that is called once the device and user codes were retrieved + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = createOAuthDeviceAuth({ + clientId: "1234567890abcdef1234", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ clientType + + string + + +Must be either `oauth-app` or `github-app`. Defaults to `oauth-app`. + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthDeviceAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ scopes + + array of strings + + +Only relavant if `clientType` is set to `"oauth-app"`. + +Array of scope names enabled for the token. Defaults to `[]`. See [available scopes](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes). + +
+ +## `auth(options)` + +The async `auth()` method returned by `createOAuthDeviceAuth(options)` accepts the following options + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth" +
+ scopes + + array of strings + + +Only relevant if the `clientType` strategy options was set to `"oauth-app"` + +Array of scope names enabled for the token. Defaults to what was set in the [strategy options](#createoauthdeviceauthoptions). See available scopes + +
+ refresh + + boolean + + +Defaults to `false`. When set to `false`, calling `auth(options)` will resolve with a token that was previously created for the same scopes if it exists. If set to `true` a new token will always be created. + +
+ +## Authentication object + +The async `auth(options)` method resolves to one of three possible objects + +1. OAuth APP user authentication +1. GitHub APP user authentication with expiring tokens disabled +1. GitHub APP user authentication with expiring tokens enabled + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +### OAuth APP user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The personal access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub APP user authentication with expiring tokens disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The personal access token +
+ +### GitHub APP user authentication with expiring tokens enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: user } = await auth.hook(request, "GET /user"); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: user } = await requestWithAuth("GET /user"); +``` + +## Types + +```ts +import { + OAuthAppStrategyOptions, + OAuthAppAuthOptions, + OAuthAppAuthentication, + GitHubAppStrategyOptions, + GitHubAppAuthOptions, + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, +} from "@octokit/auth-oauth-device"; +``` + +## How it works + +GitHub's OAuth Device flow is different from the web flow in two ways + +1. It does not require a URL redirect, which makes it great for devices and CLI apps +2. It does not require the OAuth client secret, which means there is no user-owned server component required. + +The flow has 3 parts (see [GitHub documentation](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow)) + +1. `@octokit/auth-oauth-device` requests a device and user code +2. Then the user has to open https://github.com/login/device (or it's GitHub Enterprise Server equivalent) and enter the user code +3. While the user enters the code, `@octokit/auth-oauth-device` is sending requests in the background to retrieve the OAuth access token. Once the user completed step 2, the request will succeed and the token will be returned + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/dist-node/index.js new file mode 100644 index 0000000..0320a41 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-node/index.js @@ -0,0 +1,242 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var universalUserAgent = require('universal-user-agent'); +var request = require('@octokit/request'); +var oauthMethods = require('@octokit/oauth-methods'); + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +async function getOAuthAccessToken(state, options) { + const cachedAuthentication = getCachedAuthentication(state, options.auth); + if (cachedAuthentication) return cachedAuthentication; // Step 1: Request device and user codes + // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github + + const { + data: verification + } = await oauthMethods.createDeviceCode({ + clientType: state.clientType, + clientId: state.clientId, + request: options.request || state.request, + // @ts-expect-error the extra code to make TS happy is not worth it + scopes: options.auth.scopes || state.scopes + }); // Step 2: User must enter the user code on https://github.com/login/device + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser + + await state.onVerification(verification); // Step 3: Exchange device code for access token + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device + + const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification); + state.authentication = authentication; + return authentication; +} + +function getCachedAuthentication(state, auth) { + if (auth.refresh === true) return false; + if (!state.authentication) return false; + + if (state.clientType === "github-app") { + return state.authentication; + } + + const authentication = state.authentication; + const newScope = ("scopes" in auth && auth.scopes || state.scopes).join(" "); + const currentScope = authentication.scopes.join(" "); + return newScope === currentScope ? authentication : false; +} + +async function wait(seconds) { + await new Promise(resolve => setTimeout(resolve, seconds * 1000)); +} + +async function waitForAccessToken(request, clientId, clientType, verification) { + try { + const options = { + clientId, + request, + code: verification.device_code + }; // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME + + const { + authentication + } = clientType === "oauth-app" ? await oauthMethods.exchangeDeviceCode(_objectSpread2(_objectSpread2({}, options), {}, { + clientType: "oauth-app" + })) : await oauthMethods.exchangeDeviceCode(_objectSpread2(_objectSpread2({}, options), {}, { + clientType: "github-app" + })); + return _objectSpread2({ + type: "token", + tokenType: "oauth" + }, authentication); + } catch (error) { + // istanbul ignore if + if (!error.response) throw error; + const errorType = error.response.data.error; + + if (errorType === "authorization_pending") { + await wait(verification.interval); + return waitForAccessToken(request, clientId, clientType, verification); + } + + if (errorType === "slow_down") { + await wait(verification.interval + 5); + return waitForAccessToken(request, clientId, clientType, verification); + } + + throw error; + } +} + +async function auth(state, authOptions) { + return getOAuthAccessToken(state, { + auth: authOptions + }); +} + +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); // Do not intercept request to retrieve codes or token + + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + + const { + token + } = await getOAuthAccessToken(state, { + request, + auth: { + type: "oauth" + } + }); + endpoint.headers.authorization = `token ${token}`; + return request(endpoint); +} + +const VERSION = "3.1.4"; + +const _excluded = ["request"]; +function createOAuthDeviceAuth(options) { + const requestWithDefaults = options.request || request.request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } + }); + + const { + request: request$1 = requestWithDefaults + } = options, + otherOptions = _objectWithoutProperties(options, _excluded); + + const state = options.clientType === "github-app" ? _objectSpread2(_objectSpread2({}, otherOptions), {}, { + clientType: "github-app", + request: request$1 + }) : _objectSpread2(_objectSpread2({}, otherOptions), {}, { + clientType: "oauth-app", + request: request$1, + scopes: options.scopes || [] + }); + + if (!options.clientId) { + throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + + if (!options.onVerification) { + throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'); + } // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯ + + + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} + +exports.createOAuthDeviceAuth = createOAuthDeviceAuth; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map new file mode 100644 index 0000000..bda10b9 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { createDeviceCode, exchangeDeviceCode } from \"@octokit/oauth-methods\";\nexport async function getOAuthAccessToken(state, options) {\n const cachedAuthentication = getCachedAuthentication(state, options.auth);\n if (cachedAuthentication)\n return cachedAuthentication;\n // Step 1: Request device and user codes\n // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github\n const { data: verification } = await createDeviceCode({\n clientType: state.clientType,\n clientId: state.clientId,\n request: options.request || state.request,\n // @ts-expect-error the extra code to make TS happy is not worth it\n scopes: options.auth.scopes || state.scopes,\n });\n // Step 2: User must enter the user code on https://github.com/login/device\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser\n await state.onVerification(verification);\n // Step 3: Exchange device code for access token\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device\n const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);\n state.authentication = authentication;\n return authentication;\n}\nfunction getCachedAuthentication(state, auth) {\n if (auth.refresh === true)\n return false;\n if (!state.authentication)\n return false;\n if (state.clientType === \"github-app\") {\n return state.authentication;\n }\n const authentication = state.authentication;\n const newScope = ((\"scopes\" in auth && auth.scopes) || state.scopes).join(\" \");\n const currentScope = authentication.scopes.join(\" \");\n return newScope === currentScope ? authentication : false;\n}\nasync function wait(seconds) {\n await new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n}\nasync function waitForAccessToken(request, clientId, clientType, verification) {\n try {\n const options = {\n clientId,\n request,\n code: verification.device_code,\n };\n // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME\n const { authentication } = clientType === \"oauth-app\"\n ? await exchangeDeviceCode({\n ...options,\n clientType: \"oauth-app\",\n })\n : await exchangeDeviceCode({\n ...options,\n clientType: \"github-app\",\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n catch (error) {\n // istanbul ignore if\n if (!error.response)\n throw error;\n const errorType = error.response.data.error;\n if (errorType === \"authorization_pending\") {\n await wait(verification.interval);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n if (errorType === \"slow_down\") {\n await wait(verification.interval + 5);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n throw error;\n }\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n return getOAuthAccessToken(state, {\n auth: authOptions,\n });\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve codes or token\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n const { token } = await getOAuthAccessToken(state, {\n request,\n auth: { type: \"oauth\" },\n });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"3.1.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport function createOAuthDeviceAuth(options) {\n const requestWithDefaults = options.request ||\n octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const { request = requestWithDefaults, ...otherOptions } = options;\n const state = options.clientType === \"github-app\"\n ? {\n ...otherOptions,\n clientType: \"github-app\",\n request,\n }\n : {\n ...otherOptions,\n clientType: \"oauth-app\",\n request,\n scopes: options.scopes || [],\n };\n if (!options.clientId) {\n throw new Error('[@octokit/auth-oauth-device] \"clientId\" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n if (!options.onVerification) {\n throw new Error('[@octokit/auth-oauth-device] \"onVerification\" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n // @ts-ignore too much for tsc / ts-jest ¯\\_(ツ)_/¯\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["getOAuthAccessToken","state","options","cachedAuthentication","getCachedAuthentication","auth","data","verification","createDeviceCode","clientType","clientId","request","scopes","onVerification","authentication","waitForAccessToken","refresh","newScope","join","currentScope","wait","seconds","Promise","resolve","setTimeout","code","device_code","exchangeDeviceCode","type","tokenType","error","response","errorType","interval","authOptions","hook","route","parameters","endpoint","merge","test","url","token","headers","authorization","VERSION","createOAuthDeviceAuth","requestWithDefaults","octokitRequest","defaults","getUserAgent","otherOptions","Error","Object","assign","bind"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACO,eAAeA,mBAAf,CAAmCC,KAAnC,EAA0CC,OAA1C,EAAmD;AACtD,QAAMC,oBAAoB,GAAGC,uBAAuB,CAACH,KAAD,EAAQC,OAAO,CAACG,IAAhB,CAApD;AACA,MAAIF,oBAAJ,EACI,OAAOA,oBAAP,CAHkD;AAKtD;;AACA,QAAM;AAAEG,IAAAA,IAAI,EAAEC;AAAR,MAAyB,MAAMC,6BAAgB,CAAC;AAClDC,IAAAA,UAAU,EAAER,KAAK,CAACQ,UADgC;AAElDC,IAAAA,QAAQ,EAAET,KAAK,CAACS,QAFkC;AAGlDC,IAAAA,OAAO,EAAET,OAAO,CAACS,OAAR,IAAmBV,KAAK,CAACU,OAHgB;AAIlD;AACAC,IAAAA,MAAM,EAAEV,OAAO,CAACG,IAAR,CAAaO,MAAb,IAAuBX,KAAK,CAACW;AALa,GAAD,CAArD,CANsD;AActD;;AACA,QAAMX,KAAK,CAACY,cAAN,CAAqBN,YAArB,CAAN,CAfsD;AAiBtD;;AACA,QAAMO,cAAc,GAAG,MAAMC,kBAAkB,CAACb,OAAO,CAACS,OAAR,IAAmBV,KAAK,CAACU,OAA1B,EAAmCV,KAAK,CAACS,QAAzC,EAAmDT,KAAK,CAACQ,UAAzD,EAAqEF,YAArE,CAA/C;AACAN,EAAAA,KAAK,CAACa,cAAN,GAAuBA,cAAvB;AACA,SAAOA,cAAP;AACH;;AACD,SAASV,uBAAT,CAAiCH,KAAjC,EAAwCI,IAAxC,EAA8C;AAC1C,MAAIA,IAAI,CAACW,OAAL,KAAiB,IAArB,EACI,OAAO,KAAP;AACJ,MAAI,CAACf,KAAK,CAACa,cAAX,EACI,OAAO,KAAP;;AACJ,MAAIb,KAAK,CAACQ,UAAN,KAAqB,YAAzB,EAAuC;AACnC,WAAOR,KAAK,CAACa,cAAb;AACH;;AACD,QAAMA,cAAc,GAAGb,KAAK,CAACa,cAA7B;AACA,QAAMG,QAAQ,GAAG,CAAE,YAAYZ,IAAZ,IAAoBA,IAAI,CAACO,MAA1B,IAAqCX,KAAK,CAACW,MAA5C,EAAoDM,IAApD,CAAyD,GAAzD,CAAjB;AACA,QAAMC,YAAY,GAAGL,cAAc,CAACF,MAAf,CAAsBM,IAAtB,CAA2B,GAA3B,CAArB;AACA,SAAOD,QAAQ,KAAKE,YAAb,GAA4BL,cAA5B,GAA6C,KAApD;AACH;;AACD,eAAeM,IAAf,CAAoBC,OAApB,EAA6B;AACzB,QAAM,IAAIC,OAAJ,CAAaC,OAAD,IAAaC,UAAU,CAACD,OAAD,EAAUF,OAAO,GAAG,IAApB,CAAnC,CAAN;AACH;;AACD,eAAeN,kBAAf,CAAkCJ,OAAlC,EAA2CD,QAA3C,EAAqDD,UAArD,EAAiEF,YAAjE,EAA+E;AAC3E,MAAI;AACA,UAAML,OAAO,GAAG;AACZQ,MAAAA,QADY;AAEZC,MAAAA,OAFY;AAGZc,MAAAA,IAAI,EAAElB,YAAY,CAACmB;AAHP,KAAhB,CADA;;AAOA,UAAM;AAAEZ,MAAAA;AAAF,QAAqBL,UAAU,KAAK,WAAf,GACrB,MAAMkB,+BAAkB,mCACnBzB,OADmB;AAEtBO,MAAAA,UAAU,EAAE;AAFU,OADH,GAKrB,MAAMkB,+BAAkB,mCACnBzB,OADmB;AAEtBO,MAAAA,UAAU,EAAE;AAFU,OAL9B;AASA;AACImB,MAAAA,IAAI,EAAE,OADV;AAEIC,MAAAA,SAAS,EAAE;AAFf,OAGOf,cAHP;AAKH,GArBD,CAsBA,OAAOgB,KAAP,EAAc;AACV;AACA,QAAI,CAACA,KAAK,CAACC,QAAX,EACI,MAAMD,KAAN;AACJ,UAAME,SAAS,GAAGF,KAAK,CAACC,QAAN,CAAezB,IAAf,CAAoBwB,KAAtC;;AACA,QAAIE,SAAS,KAAK,uBAAlB,EAA2C;AACvC,YAAMZ,IAAI,CAACb,YAAY,CAAC0B,QAAd,CAAV;AACA,aAAOlB,kBAAkB,CAACJ,OAAD,EAAUD,QAAV,EAAoBD,UAApB,EAAgCF,YAAhC,CAAzB;AACH;;AACD,QAAIyB,SAAS,KAAK,WAAlB,EAA+B;AAC3B,YAAMZ,IAAI,CAACb,YAAY,CAAC0B,QAAb,GAAwB,CAAzB,CAAV;AACA,aAAOlB,kBAAkB,CAACJ,OAAD,EAAUD,QAAV,EAAoBD,UAApB,EAAgCF,YAAhC,CAAzB;AACH;;AACD,UAAMuB,KAAN;AACH;AACJ;;AC5EM,eAAezB,IAAf,CAAoBJ,KAApB,EAA2BiC,WAA3B,EAAwC;AAC3C,SAAOlC,mBAAmB,CAACC,KAAD,EAAQ;AAC9BI,IAAAA,IAAI,EAAE6B;AADwB,GAAR,CAA1B;AAGH;;ACJM,eAAeC,IAAf,CAAoBlC,KAApB,EAA2BU,OAA3B,EAAoCyB,KAApC,EAA2CC,UAA3C,EAAuD;AAC1D,MAAIC,QAAQ,GAAG3B,OAAO,CAAC2B,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAf,CAD0D;;AAG1D,MAAI,+CAA+CG,IAA/C,CAAoDF,QAAQ,CAACG,GAA7D,CAAJ,EAAuE;AACnE,WAAO9B,OAAO,CAAC2B,QAAD,CAAd;AACH;;AACD,QAAM;AAAEI,IAAAA;AAAF,MAAY,MAAM1C,mBAAmB,CAACC,KAAD,EAAQ;AAC/CU,IAAAA,OAD+C;AAE/CN,IAAAA,IAAI,EAAE;AAAEuB,MAAAA,IAAI,EAAE;AAAR;AAFyC,GAAR,CAA3C;AAIAU,EAAAA,QAAQ,CAACK,OAAT,CAAiBC,aAAjB,GAAkC,SAAQF,KAAM,EAAhD;AACA,SAAO/B,OAAO,CAAC2B,QAAD,CAAd;AACH;;ACbM,MAAMO,OAAO,GAAG,mBAAhB;;;ACAP,AAKO,SAASC,qBAAT,CAA+B5C,OAA/B,EAAwC;AAC3C,QAAM6C,mBAAmB,GAAG7C,OAAO,CAACS,OAAR,IACxBqC,eAAc,CAACC,QAAf,CAAwB;AACpBN,IAAAA,OAAO,EAAE;AACL,oBAAe,gCAA+BE,OAAQ,IAAGK,+BAAY,EAAG;AADnE;AADW,GAAxB,CADJ;;AAMA,QAAM;AAAEvC,aAAAA,SAAO,GAAGoC;AAAZ,MAAqD7C,OAA3D;AAAA,QAA0CiD,YAA1C,4BAA2DjD,OAA3D;;AACA,QAAMD,KAAK,GAAGC,OAAO,CAACO,UAAR,KAAuB,YAAvB,qCAEH0C,YAFG;AAGN1C,IAAAA,UAAU,EAAE,YAHN;AAINE,aAAAA;AAJM,yCAOHwC,YAPG;AAQN1C,IAAAA,UAAU,EAAE,WARN;AASNE,aAAAA,SATM;AAUNC,IAAAA,MAAM,EAAEV,OAAO,CAACU,MAAR,IAAkB;AAVpB,IAAd;;AAYA,MAAI,CAACV,OAAO,CAACQ,QAAb,EAAuB;AACnB,UAAM,IAAI0C,KAAJ,CAAU,oHAAV,CAAN;AACH;;AACD,MAAI,CAAClD,OAAO,CAACW,cAAb,EAA6B;AACzB,UAAM,IAAIuC,KAAJ,CAAU,iIAAV,CAAN;AACH,GAzB0C;;;AA2B3C,SAAOC,MAAM,CAACC,MAAP,CAAcjD,IAAI,CAACkD,IAAL,CAAU,IAAV,EAAgBtD,KAAhB,CAAd,EAAsC;AACzCkC,IAAAA,IAAI,EAAEA,IAAI,CAACoB,IAAL,CAAU,IAAV,EAAgBtD,KAAhB;AADmC,GAAtC,CAAP;AAGH;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/auth.js b/node_modules/@octokit/auth-oauth-device/dist-src/auth.js new file mode 100644 index 0000000..f62e980 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-src/auth.js @@ -0,0 +1,6 @@ +import { getOAuthAccessToken } from "./get-oauth-access-token"; +export async function auth(state, authOptions) { + return getOAuthAccessToken(state, { + auth: authOptions, + }); +} diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js b/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js new file mode 100644 index 0000000..b72a786 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js @@ -0,0 +1,78 @@ +import { createDeviceCode, exchangeDeviceCode } from "@octokit/oauth-methods"; +export async function getOAuthAccessToken(state, options) { + const cachedAuthentication = getCachedAuthentication(state, options.auth); + if (cachedAuthentication) + return cachedAuthentication; + // Step 1: Request device and user codes + // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github + const { data: verification } = await createDeviceCode({ + clientType: state.clientType, + clientId: state.clientId, + request: options.request || state.request, + // @ts-expect-error the extra code to make TS happy is not worth it + scopes: options.auth.scopes || state.scopes, + }); + // Step 2: User must enter the user code on https://github.com/login/device + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser + await state.onVerification(verification); + // Step 3: Exchange device code for access token + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device + const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification); + state.authentication = authentication; + return authentication; +} +function getCachedAuthentication(state, auth) { + if (auth.refresh === true) + return false; + if (!state.authentication) + return false; + if (state.clientType === "github-app") { + return state.authentication; + } + const authentication = state.authentication; + const newScope = (("scopes" in auth && auth.scopes) || state.scopes).join(" "); + const currentScope = authentication.scopes.join(" "); + return newScope === currentScope ? authentication : false; +} +async function wait(seconds) { + await new Promise((resolve) => setTimeout(resolve, seconds * 1000)); +} +async function waitForAccessToken(request, clientId, clientType, verification) { + try { + const options = { + clientId, + request, + code: verification.device_code, + }; + // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME + const { authentication } = clientType === "oauth-app" + ? await exchangeDeviceCode({ + ...options, + clientType: "oauth-app", + }) + : await exchangeDeviceCode({ + ...options, + clientType: "github-app", + }); + return { + type: "token", + tokenType: "oauth", + ...authentication, + }; + } + catch (error) { + // istanbul ignore if + if (!error.response) + throw error; + const errorType = error.response.data.error; + if (errorType === "authorization_pending") { + await wait(verification.interval); + return waitForAccessToken(request, clientId, clientType, verification); + } + if (errorType === "slow_down") { + await wait(verification.interval + 5); + return waitForAccessToken(request, clientId, clientType, verification); + } + throw error; + } +} diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/hook.js b/node_modules/@octokit/auth-oauth-device/dist-src/hook.js new file mode 100644 index 0000000..76f9a55 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-src/hook.js @@ -0,0 +1,14 @@ +import { getOAuthAccessToken } from "./get-oauth-access-token"; +export async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); + // Do not intercept request to retrieve codes or token + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + const { token } = await getOAuthAccessToken(state, { + request, + auth: { type: "oauth" }, + }); + endpoint.headers.authorization = `token ${token}`; + return request(endpoint); +} diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/dist-src/index.js new file mode 100644 index 0000000..b9e6980 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-src/index.js @@ -0,0 +1,36 @@ +import { getUserAgent } from "universal-user-agent"; +import { request as octokitRequest } from "@octokit/request"; +import { auth } from "./auth"; +import { hook } from "./hook"; +import { VERSION } from "./version"; +export function createOAuthDeviceAuth(options) { + const requestWithDefaults = options.request || + octokitRequest.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`, + }, + }); + const { request = requestWithDefaults, ...otherOptions } = options; + const state = options.clientType === "github-app" + ? { + ...otherOptions, + clientType: "github-app", + request, + } + : { + ...otherOptions, + clientType: "oauth-app", + request, + scopes: options.scopes || [], + }; + if (!options.clientId) { + throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + if (!options.onVerification) { + throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯ + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state), + }); +} diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/types.js b/node_modules/@octokit/auth-oauth-device/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/version.js b/node_modules/@octokit/auth-oauth-device/dist-src/version.js new file mode 100644 index 0000000..5a7ab0c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "3.1.4"; diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts new file mode 100644 index 0000000..935ab95 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts @@ -0,0 +1,2 @@ +import { OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, OAuthAppState, GitHubAppState } from "./types"; +export declare function auth(state: OAuthAppState | GitHubAppState, authOptions: OAuthAppAuthOptions | GitHubAppAuthOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts new file mode 100644 index 0000000..2bbe941 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts @@ -0,0 +1,6 @@ +import { RequestInterface } from "@octokit/types"; +import { OAuthAppState, GitHubAppState, OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication } from "./types"; +export declare function getOAuthAccessToken(state: OAuthAppState | GitHubAppState, options: { + request?: RequestInterface; + auth: OAuthAppAuthOptions | GitHubAppAuthOptions; +}): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts new file mode 100644 index 0000000..f9803e4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts @@ -0,0 +1,3 @@ +import { RequestInterface, OctokitResponse, EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { OAuthAppState, GitHubAppState } from "./types"; +export declare function hook(state: OAuthAppState | GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts new file mode 100644 index 0000000..4b1b734 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts @@ -0,0 +1,4 @@ +import { GitHubAppAuthInterface, GitHubAppStrategyOptions, OAuthAppAuthInterface, OAuthAppStrategyOptions } from "./types"; +export { OAuthAppStrategyOptions, OAuthAppAuthOptions, OAuthAppAuthentication, GitHubAppStrategyOptions, GitHubAppAuthOptions, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types"; +export declare function createOAuthDeviceAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; +export declare function createOAuthDeviceAuth(options: GitHubAppStrategyOptions): GitHubAppAuthInterface; diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts new file mode 100644 index 0000000..951dbab --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts @@ -0,0 +1,68 @@ +import { RequestInterface, Route, EndpointOptions, RequestParameters, OctokitResponse } from "@octokit/types"; +import * as OAuthMethodsTypes from "@octokit/oauth-methods"; +export declare type ClientType = "oauth-app" | "github-app"; +export declare type OAuthAppStrategyOptions = { + clientId: string; + clientType?: "oauth-app"; + onVerification: OnVerificationCallback; + scopes?: string[]; + request?: RequestInterface; +}; +export declare type GitHubAppStrategyOptions = { + clientId: string; + clientType: "github-app"; + onVerification: OnVerificationCallback; + request?: RequestInterface; +}; +export interface OAuthAppAuthInterface { + (options: OAuthAppAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export interface GitHubAppAuthInterface { + (options: GitHubAppAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export declare type OAuthAppAuthOptions = { + type: "oauth"; + scopes?: string[]; + refresh?: boolean; +}; +export declare type GitHubAppAuthOptions = { + type: "oauth"; + refresh?: boolean; +}; +export declare type OAuthAppAuthentication = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export declare type GitHubAppAuthentication = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export declare type GitHubAppAuthenticationWithExpiration = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export declare type Verification = { + device_code: string; + user_code: string; + verification_uri: string; + expires_in: number; + interval: number; +}; +export declare type OnVerificationCallback = (verification: Verification) => any | Promise; +export declare type OAuthAppState = { + clientId: string; + clientType: "oauth-app"; + onVerification: OnVerificationCallback; + scopes: string[]; + request: RequestInterface; + authentication?: OAuthAppAuthentication; +}; +export declare type GitHubAppState = { + clientId: string; + clientType: "github-app"; + onVerification: OnVerificationCallback; + request: RequestInterface; + authentication?: GitHubAppAuthentication | GitHubAppAuthenticationWithExpiration; +}; diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts new file mode 100644 index 0000000..fe27f2e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "3.1.4"; diff --git a/node_modules/@octokit/auth-oauth-device/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/dist-web/index.js new file mode 100644 index 0000000..2548818 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-web/index.js @@ -0,0 +1,138 @@ +import { getUserAgent } from 'universal-user-agent'; +import { request } from '@octokit/request'; +import { createDeviceCode, exchangeDeviceCode } from '@octokit/oauth-methods'; + +async function getOAuthAccessToken(state, options) { + const cachedAuthentication = getCachedAuthentication(state, options.auth); + if (cachedAuthentication) + return cachedAuthentication; + // Step 1: Request device and user codes + // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github + const { data: verification } = await createDeviceCode({ + clientType: state.clientType, + clientId: state.clientId, + request: options.request || state.request, + // @ts-expect-error the extra code to make TS happy is not worth it + scopes: options.auth.scopes || state.scopes, + }); + // Step 2: User must enter the user code on https://github.com/login/device + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser + await state.onVerification(verification); + // Step 3: Exchange device code for access token + // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device + const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification); + state.authentication = authentication; + return authentication; +} +function getCachedAuthentication(state, auth) { + if (auth.refresh === true) + return false; + if (!state.authentication) + return false; + if (state.clientType === "github-app") { + return state.authentication; + } + const authentication = state.authentication; + const newScope = (("scopes" in auth && auth.scopes) || state.scopes).join(" "); + const currentScope = authentication.scopes.join(" "); + return newScope === currentScope ? authentication : false; +} +async function wait(seconds) { + await new Promise((resolve) => setTimeout(resolve, seconds * 1000)); +} +async function waitForAccessToken(request, clientId, clientType, verification) { + try { + const options = { + clientId, + request, + code: verification.device_code, + }; + // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME + const { authentication } = clientType === "oauth-app" + ? await exchangeDeviceCode({ + ...options, + clientType: "oauth-app", + }) + : await exchangeDeviceCode({ + ...options, + clientType: "github-app", + }); + return { + type: "token", + tokenType: "oauth", + ...authentication, + }; + } + catch (error) { + // istanbul ignore if + if (!error.response) + throw error; + const errorType = error.response.data.error; + if (errorType === "authorization_pending") { + await wait(verification.interval); + return waitForAccessToken(request, clientId, clientType, verification); + } + if (errorType === "slow_down") { + await wait(verification.interval + 5); + return waitForAccessToken(request, clientId, clientType, verification); + } + throw error; + } +} + +async function auth(state, authOptions) { + return getOAuthAccessToken(state, { + auth: authOptions, + }); +} + +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge(route, parameters); + // Do not intercept request to retrieve codes or token + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + const { token } = await getOAuthAccessToken(state, { + request, + auth: { type: "oauth" }, + }); + endpoint.headers.authorization = `token ${token}`; + return request(endpoint); +} + +const VERSION = "3.1.4"; + +function createOAuthDeviceAuth(options) { + const requestWithDefaults = options.request || + request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`, + }, + }); + const { request: request$1 = requestWithDefaults, ...otherOptions } = options; + const state = options.clientType === "github-app" + ? { + ...otherOptions, + clientType: "github-app", + request: request$1, + } + : { + ...otherOptions, + clientType: "oauth-app", + request: request$1, + scopes: options.scopes || [], + }; + if (!options.clientId) { + throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + if (!options.onVerification) { + throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'); + } + // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯ + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state), + }); +} + +export { createOAuthDeviceAuth }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map new file mode 100644 index 0000000..03ea006 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { createDeviceCode, exchangeDeviceCode } from \"@octokit/oauth-methods\";\nexport async function getOAuthAccessToken(state, options) {\n const cachedAuthentication = getCachedAuthentication(state, options.auth);\n if (cachedAuthentication)\n return cachedAuthentication;\n // Step 1: Request device and user codes\n // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github\n const { data: verification } = await createDeviceCode({\n clientType: state.clientType,\n clientId: state.clientId,\n request: options.request || state.request,\n // @ts-expect-error the extra code to make TS happy is not worth it\n scopes: options.auth.scopes || state.scopes,\n });\n // Step 2: User must enter the user code on https://github.com/login/device\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser\n await state.onVerification(verification);\n // Step 3: Exchange device code for access token\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device\n const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);\n state.authentication = authentication;\n return authentication;\n}\nfunction getCachedAuthentication(state, auth) {\n if (auth.refresh === true)\n return false;\n if (!state.authentication)\n return false;\n if (state.clientType === \"github-app\") {\n return state.authentication;\n }\n const authentication = state.authentication;\n const newScope = ((\"scopes\" in auth && auth.scopes) || state.scopes).join(\" \");\n const currentScope = authentication.scopes.join(\" \");\n return newScope === currentScope ? authentication : false;\n}\nasync function wait(seconds) {\n await new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n}\nasync function waitForAccessToken(request, clientId, clientType, verification) {\n try {\n const options = {\n clientId,\n request,\n code: verification.device_code,\n };\n // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME\n const { authentication } = clientType === \"oauth-app\"\n ? await exchangeDeviceCode({\n ...options,\n clientType: \"oauth-app\",\n })\n : await exchangeDeviceCode({\n ...options,\n clientType: \"github-app\",\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n catch (error) {\n // istanbul ignore if\n if (!error.response)\n throw error;\n const errorType = error.response.data.error;\n if (errorType === \"authorization_pending\") {\n await wait(verification.interval);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n if (errorType === \"slow_down\") {\n await wait(verification.interval + 5);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n throw error;\n }\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n return getOAuthAccessToken(state, {\n auth: authOptions,\n });\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve codes or token\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n const { token } = await getOAuthAccessToken(state, {\n request,\n auth: { type: \"oauth\" },\n });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"3.1.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport function createOAuthDeviceAuth(options) {\n const requestWithDefaults = options.request ||\n octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const { request = requestWithDefaults, ...otherOptions } = options;\n const state = options.clientType === \"github-app\"\n ? {\n ...otherOptions,\n clientType: \"github-app\",\n request,\n }\n : {\n ...otherOptions,\n clientType: \"oauth-app\",\n request,\n scopes: options.scopes || [],\n };\n if (!options.clientId) {\n throw new Error('[@octokit/auth-oauth-device] \"clientId\" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n if (!options.onVerification) {\n throw new Error('[@octokit/auth-oauth-device] \"onVerification\" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n // @ts-ignore too much for tsc / ts-jest ¯\\_(ツ)_/¯\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["octokitRequest","request"],"mappings":";;;;AACO,eAAe,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1D,IAAI,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9E,IAAI,IAAI,oBAAoB;AAC5B,QAAQ,OAAO,oBAAoB,CAAC;AACpC;AACA;AACA,IAAI,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,MAAM,gBAAgB,CAAC;AAC1D,QAAQ,UAAU,EAAE,KAAK,CAAC,UAAU;AACpC,QAAQ,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAChC,QAAQ,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO;AACjD;AACA,QAAQ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM;AACnD,KAAK,CAAC,CAAC;AACP;AACA;AACA,IAAI,MAAM,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;AAC7C;AACA;AACA,IAAI,MAAM,cAAc,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AACtI,IAAI,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;AAC1C,IAAI,OAAO,cAAc,CAAC;AAC1B,CAAC;AACD,SAAS,uBAAuB,CAAC,KAAK,EAAE,IAAI,EAAE;AAC9C,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI;AAC7B,QAAQ,OAAO,KAAK,CAAC;AACrB,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc;AAC7B,QAAQ,OAAO,KAAK,CAAC;AACrB,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,YAAY,EAAE;AAC3C,QAAQ,OAAO,KAAK,CAAC,cAAc,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;AAChD,IAAI,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACnF,IAAI,MAAM,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzD,IAAI,OAAO,QAAQ,KAAK,YAAY,GAAG,cAAc,GAAG,KAAK,CAAC;AAC9D,CAAC;AACD,eAAe,IAAI,CAAC,OAAO,EAAE;AAC7B,IAAI,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;AACxE,CAAC;AACD,eAAe,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE;AAC/E,IAAI,IAAI;AACR,QAAQ,MAAM,OAAO,GAAG;AACxB,YAAY,QAAQ;AACpB,YAAY,OAAO;AACnB,YAAY,IAAI,EAAE,YAAY,CAAC,WAAW;AAC1C,SAAS,CAAC;AACV;AACA,QAAQ,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,KAAK,WAAW;AAC7D,cAAc,MAAM,kBAAkB,CAAC;AACvC,gBAAgB,GAAG,OAAO;AAC1B,gBAAgB,UAAU,EAAE,WAAW;AACvC,aAAa,CAAC;AACd,cAAc,MAAM,kBAAkB,CAAC;AACvC,gBAAgB,GAAG,OAAO;AAC1B,gBAAgB,UAAU,EAAE,YAAY;AACxC,aAAa,CAAC,CAAC;AACf,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,OAAO;AACzB,YAAY,SAAS,EAAE,OAAO;AAC9B,YAAY,GAAG,cAAc;AAC7B,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB;AACA,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ;AAC3B,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;AACpD,QAAQ,IAAI,SAAS,KAAK,uBAAuB,EAAE;AACnD,YAAY,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC9C,YAAY,OAAO,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AACnF,SAAS;AACT,QAAQ,IAAI,SAAS,KAAK,WAAW,EAAE;AACvC,YAAY,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;AAClD,YAAY,OAAO,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AACnF,SAAS;AACT,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL;;AC5EO,eAAe,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;AAC/C,IAAI,OAAO,mBAAmB,CAAC,KAAK,EAAE;AACtC,QAAQ,IAAI,EAAE,WAAW;AACzB,KAAK,CAAC,CAAC;AACP,CAAC;;ACJM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,8CAA8C,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC3E,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE;AACvD,QAAQ,OAAO;AACf,QAAQ,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;AAC/B,KAAK,CAAC,CAAC;AACP,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACbM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACKpC,SAAS,qBAAqB,CAAC,OAAO,EAAE;AAC/C,IAAI,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO;AAC/C,QAAQA,OAAc,CAAC,QAAQ,CAAC;AAChC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACzF,aAAa;AACb,SAAS,CAAC,CAAC;AACX,IAAI,MAAM,WAAEC,SAAO,GAAG,mBAAmB,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;AACvE,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,KAAK,YAAY;AACrD,UAAU;AACV,YAAY,GAAG,YAAY;AAC3B,YAAY,UAAU,EAAE,YAAY;AACpC,qBAAYA,SAAO;AACnB,SAAS;AACT,UAAU;AACV,YAAY,GAAG,YAAY;AAC3B,YAAY,UAAU,EAAE,WAAW;AACnC,qBAAYA,SAAO;AACnB,YAAY,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;AACxC,SAAS,CAAC;AACV,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;AAC3B,QAAQ,MAAM,IAAI,KAAK,CAAC,oHAAoH,CAAC,CAAC;AAC9I,KAAK;AACL,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;AACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,iIAAiI,CAAC,CAAC;AAC3J,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/README.md new file mode 100644 index 0000000..c7b5232 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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://github.com/octokit/endpoint.js/workflows/Test/badge.svg)](https://github.com/octokit/endpoint.js/actions/workflows/test.yml?query=branch%3Amain) + +`@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(route, options)` or `endpoint(options)`](#endpointroute-options-or-endpointoptions) + - [`endpoint.defaults()`](#endpointdefaults) + - [`endpoint.DEFAULTS`](#endpointdefaults) + - [`endpoint.merge(route, options)` or `endpoint.merge(options)`](#endpointmergeroute-options-or-endpointmergeoptions) + - [`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.skypack.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 common 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/auth-oauth-device/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-node/index.js new file mode 100644 index 0000000..ef51e39 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-node/index.js @@ -0,0 +1,348 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var isPlainObject = require('is-plain-object'); +var universalUserAgent = 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 mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject.isPlainObject(options[key])) { + if (!(key in defaults)) Object.assign(result, { + [key]: options[key] + });else result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { + [key]: options[key] + }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map(name => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], + result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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 = "7.0.4"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; + +const endpoint = withDefaults(null, DEFAULTS); + +exports.endpoint = endpoint; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-node/index.js.map new file mode 100644 index 0000000..10e5ff9 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","removeUndefinedProperties","obj","undefined","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequest","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;AAAO,SAASA,aAAa,CAACC,MAAM,EAAE;EAClC,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,EAAE;;EAEb,OAAOC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,MAAM,CAAC,CAACC,MAAM,EAAEC,GAAG,KAAK;IAC/CD,MAAM,CAACC,GAAG,CAACC,WAAW,EAAE,CAAC,GAAGN,MAAM,CAACK,GAAG,CAAC;IACvC,OAAOD,MAAM;GAChB,EAAE,EAAE,CAAC;AACV;;ACPO,SAASG,SAAS,CAACC,QAAQ,EAAEC,OAAO,EAAE;EACzC,MAAMC,MAAM,GAAGT,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEH,QAAQ,CAAC;EAC1CP,MAAM,CAACC,IAAI,CAACO,OAAO,CAAC,CAACG,OAAO,CAAEP,GAAG,IAAK;IAClC,IAAIQ,2BAAa,CAACJ,OAAO,CAACJ,GAAG,CAAC,CAAC,EAAE;MAC7B,IAAI,EAAEA,GAAG,IAAIG,QAAQ,CAAC,EAClBP,MAAM,CAACU,MAAM,CAACD,MAAM,EAAE;QAAE,CAACL,GAAG,GAAGI,OAAO,CAACJ,GAAG;OAAG,CAAC,CAAC,KAE/CK,MAAM,CAACL,GAAG,CAAC,GAAGE,SAAS,CAACC,QAAQ,CAACH,GAAG,CAAC,EAAEI,OAAO,CAACJ,GAAG,CAAC,CAAC;KAC3D,MACI;MACDJ,MAAM,CAACU,MAAM,CAACD,MAAM,EAAE;QAAE,CAACL,GAAG,GAAGI,OAAO,CAACJ,GAAG;OAAG,CAAC;;GAErD,CAAC;EACF,OAAOK,MAAM;AACjB;;ACfO,SAASI,yBAAyB,CAACC,GAAG,EAAE;EAC3C,KAAK,MAAMV,GAAG,IAAIU,GAAG,EAAE;IACnB,IAAIA,GAAG,CAACV,GAAG,CAAC,KAAKW,SAAS,EAAE;MACxB,OAAOD,GAAG,CAACV,GAAG,CAAC;;;EAGvB,OAAOU,GAAG;AACd;;ACJO,SAASE,KAAK,CAACT,QAAQ,EAAEU,KAAK,EAAET,OAAO,EAAE;EAC5C,IAAI,OAAOS,KAAK,KAAK,QAAQ,EAAE;IAC3B,IAAI,CAACC,MAAM,EAAEC,GAAG,CAAC,GAAGF,KAAK,CAACG,KAAK,CAAC,GAAG,CAAC;IACpCZ,OAAO,GAAGR,MAAM,CAACU,MAAM,CAACS,GAAG,GAAG;MAAED,MAAM;MAAEC;KAAK,GAAG;MAAEA,GAAG,EAAED;KAAQ,EAAEV,OAAO,CAAC;GAC5E,MACI;IACDA,OAAO,GAAGR,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEO,KAAK,CAAC;;;EAGtCT,OAAO,CAACa,OAAO,GAAGvB,aAAa,CAACU,OAAO,CAACa,OAAO,CAAC;;EAEhDR,yBAAyB,CAACL,OAAO,CAAC;EAClCK,yBAAyB,CAACL,OAAO,CAACa,OAAO,CAAC;EAC1C,MAAMC,aAAa,GAAGhB,SAAS,CAACC,QAAQ,IAAI,EAAE,EAAEC,OAAO,CAAC;;EAExD,IAAID,QAAQ,IAAIA,QAAQ,CAACgB,SAAS,CAACC,QAAQ,CAACC,MAAM,EAAE;IAChDH,aAAa,CAACC,SAAS,CAACC,QAAQ,GAAGjB,QAAQ,CAACgB,SAAS,CAACC,QAAQ,CACzDE,MAAM,CAAEC,OAAO,IAAK,CAACL,aAAa,CAACC,SAAS,CAACC,QAAQ,CAACI,QAAQ,CAACD,OAAO,CAAC,CAAC,CACxEE,MAAM,CAACP,aAAa,CAACC,SAAS,CAACC,QAAQ,CAAC;;EAEjDF,aAAa,CAACC,SAAS,CAACC,QAAQ,GAAGF,aAAa,CAACC,SAAS,CAACC,QAAQ,CAACM,GAAG,CAAEH,OAAO,IAAKA,OAAO,CAACI,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;EACrH,OAAOT,aAAa;AACxB;;ACzBO,SAASU,kBAAkB,CAACb,GAAG,EAAEc,UAAU,EAAE;EAChD,MAAMC,SAAS,GAAG,IAAI,CAACC,IAAI,CAAChB,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;EAC5C,MAAMiB,KAAK,GAAGpC,MAAM,CAACC,IAAI,CAACgC,UAAU,CAAC;EACrC,IAAIG,KAAK,CAACX,MAAM,KAAK,CAAC,EAAE;IACpB,OAAON,GAAG;;EAEd,OAAQA,GAAG,GACPe,SAAS,GACTE,KAAK,CACAN,GAAG,CAAEO,IAAI,IAAK;IACf,IAAIA,IAAI,KAAK,GAAG,EAAE;MACd,OAAQ,IAAI,GAAGJ,UAAU,CAACK,CAAC,CAAClB,KAAK,CAAC,GAAG,CAAC,CAACU,GAAG,CAACS,kBAAkB,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;;IAE5E,OAAQ,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAI,CAAC,CAAE,EAAC;GAC3D,CAAC,CACGG,IAAI,CAAC,GAAG,CAAC;AACtB;;AChBA,MAAMC,gBAAgB,GAAG,YAAY;AACrC,SAASC,cAAc,CAACC,YAAY,EAAE;EAClC,OAAOA,YAAY,CAACZ,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAACX,KAAK,CAAC,GAAG,CAAC;AAC5D;AACA,AAAO,SAASwB,uBAAuB,CAACzB,GAAG,EAAE;EACzC,MAAM0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAK,CAACL,gBAAgB,CAAC;EAC3C,IAAI,CAACI,OAAO,EAAE;IACV,OAAO,EAAE;;EAEb,OAAOA,OAAO,CAACf,GAAG,CAACY,cAAc,CAAC,CAACxC,MAAM,CAAC,CAAC6C,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAAClB,MAAM,CAACmB,CAAC,CAAC,EAAE,EAAE,CAAC;AACxE;;ACVO,SAASC,IAAI,CAAClD,MAAM,EAAEmD,UAAU,EAAE;EACrC,OAAOlD,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CACrB2B,MAAM,CAAEyB,MAAM,IAAK,CAACD,UAAU,CAACtB,QAAQ,CAACuB,MAAM,CAAC,CAAC,CAChDjD,MAAM,CAAC,CAACY,GAAG,EAAEV,GAAG,KAAK;IACtBU,GAAG,CAACV,GAAG,CAAC,GAAGL,MAAM,CAACK,GAAG,CAAC;IACtB,OAAOU,GAAG;GACb,EAAE,EAAE,CAAC;AACV;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASsC,cAAc,CAACC,GAAG,EAAE;EACzB,OAAOA,GAAG,CACLjC,KAAK,CAAC,oBAAoB,CAAC,CAC3BU,GAAG,CAAC,UAAUwB,IAAI,EAAE;IACrB,IAAI,CAAC,cAAc,CAACnB,IAAI,CAACmB,IAAI,CAAC,EAAE;MAC5BA,IAAI,GAAGC,SAAS,CAACD,IAAI,CAAC,CAACvB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;;IAEpE,OAAOuB,IAAI;GACd,CAAC,CACGd,IAAI,CAAC,EAAE,CAAC;AACjB;AACA,SAASgB,gBAAgB,CAACH,GAAG,EAAE;EAC3B,OAAOd,kBAAkB,CAACc,GAAG,CAAC,CAACtB,OAAO,CAAC,UAAU,EAAE,UAAU0B,CAAC,EAAE;IAC5D,OAAO,GAAG,GAAGA,CAAC,CAACC,UAAU,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,WAAW,EAAE;GAC1D,CAAC;AACN;AACA,SAASC,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAE3D,GAAG,EAAE;EACvC2D,KAAK,GACDD,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,GAC9BV,cAAc,CAACW,KAAK,CAAC,GACrBP,gBAAgB,CAACO,KAAK,CAAC;EACjC,IAAI3D,GAAG,EAAE;IACL,OAAOoD,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,GAAG2D,KAAK;GAC7C,MACI;IACD,OAAOA,KAAK;;AAEpB;AACA,SAASC,SAAS,CAACD,KAAK,EAAE;EACtB,OAAOA,KAAK,KAAKhD,SAAS,IAAIgD,KAAK,KAAK,IAAI;AAChD;AACA,SAASE,aAAa,CAACH,QAAQ,EAAE;EAC7B,OAAOA,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG;AACnE;AACA,SAASI,SAAS,CAACC,OAAO,EAAEL,QAAQ,EAAE1D,GAAG,EAAEgE,QAAQ,EAAE;EACjD,IAAIL,KAAK,GAAGI,OAAO,CAAC/D,GAAG,CAAC;IAAEK,MAAM,GAAG,EAAE;EACrC,IAAIuD,SAAS,CAACD,KAAK,CAAC,IAAIA,KAAK,KAAK,EAAE,EAAE;IAClC,IAAI,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,SAAS,EAAE;MAC5BA,KAAK,GAAGA,KAAK,CAACJ,QAAQ,EAAE;MACxB,IAAIS,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;QAC9BL,KAAK,GAAGA,KAAK,CAACM,SAAS,CAAC,CAAC,EAAEC,QAAQ,CAACF,QAAQ,EAAE,EAAE,CAAC,CAAC;;MAEtD3D,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAEE,aAAa,CAACH,QAAQ,CAAC,GAAG1D,GAAG,GAAG,EAAE,CAAC,CAAC;KAChF,MACI;MACD,IAAIgE,QAAQ,KAAK,GAAG,EAAE;QAClB,IAAII,KAAK,CAACC,OAAO,CAACV,KAAK,CAAC,EAAE;UACtBA,KAAK,CAACrC,MAAM,CAACsC,SAAS,CAAC,CAACrD,OAAO,CAAC,UAAUoD,KAAK,EAAE;YAC7CtD,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAEE,aAAa,CAACH,QAAQ,CAAC,GAAG1D,GAAG,GAAG,EAAE,CAAC,CAAC;WAChF,CAAC;SACL,MACI;UACDJ,MAAM,CAACC,IAAI,CAAC8D,KAAK,CAAC,CAACpD,OAAO,CAAC,UAAU+D,CAAC,EAAE;YACpC,IAAIV,SAAS,CAACD,KAAK,CAACW,CAAC,CAAC,CAAC,EAAE;cACrBjE,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAACW,CAAC,CAAC,EAAEA,CAAC,CAAC,CAAC;;WAEtD,CAAC;;OAET,MACI;QACD,MAAMC,GAAG,GAAG,EAAE;QACd,IAAIH,KAAK,CAACC,OAAO,CAACV,KAAK,CAAC,EAAE;UACtBA,KAAK,CAACrC,MAAM,CAACsC,SAAS,CAAC,CAACrD,OAAO,CAAC,UAAUoD,KAAK,EAAE;YAC7CY,GAAG,CAACJ,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAAC,CAAC;WACzC,CAAC;SACL,MACI;UACD/D,MAAM,CAACC,IAAI,CAAC8D,KAAK,CAAC,CAACpD,OAAO,CAAC,UAAU+D,CAAC,EAAE;YACpC,IAAIV,SAAS,CAACD,KAAK,CAACW,CAAC,CAAC,CAAC,EAAE;cACrBC,GAAG,CAACJ,IAAI,CAACf,gBAAgB,CAACkB,CAAC,CAAC,CAAC;cAC7BC,GAAG,CAACJ,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAACW,CAAC,CAAC,CAACf,QAAQ,EAAE,CAAC,CAAC;;WAE3D,CAAC;;QAEN,IAAIM,aAAa,CAACH,QAAQ,CAAC,EAAE;UACzBrD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,GAAGuE,GAAG,CAACnC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC3D,MACI,IAAImC,GAAG,CAAClD,MAAM,KAAK,CAAC,EAAE;UACvBhB,MAAM,CAAC8D,IAAI,CAACI,GAAG,CAACnC,IAAI,CAAC,GAAG,CAAC,CAAC;;;;GAIzC,MACI;IACD,IAAIsB,QAAQ,KAAK,GAAG,EAAE;MAClB,IAAIE,SAAS,CAACD,KAAK,CAAC,EAAE;QAClBtD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,CAAC;;KAEzC,MACI,IAAI2D,KAAK,KAAK,EAAE,KAAKD,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,CAAC,EAAE;MAC7DrD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,CAAC;KAC3C,MACI,IAAI2D,KAAK,KAAK,EAAE,EAAE;MACnBtD,MAAM,CAAC8D,IAAI,CAAC,EAAE,CAAC;;;EAGvB,OAAO9D,MAAM;AACjB;AACA,AAAO,SAASmE,QAAQ,CAACC,QAAQ,EAAE;EAC/B,OAAO;IACHC,MAAM,EAAEA,MAAM,CAACC,IAAI,CAAC,IAAI,EAAEF,QAAQ;GACrC;AACL;AACA,SAASC,MAAM,CAACD,QAAQ,EAAEV,OAAO,EAAE;EAC/B,IAAIa,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;EACnD,OAAOH,QAAQ,CAAC9C,OAAO,CAAC,4BAA4B,EAAE,UAAUkD,CAAC,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACpF,IAAID,UAAU,EAAE;MACZ,IAAIpB,QAAQ,GAAG,EAAE;MACjB,MAAMsB,MAAM,GAAG,EAAE;MACjB,IAAIJ,SAAS,CAACK,OAAO,CAACH,UAAU,CAACI,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;QAChDxB,QAAQ,GAAGoB,UAAU,CAACI,MAAM,CAAC,CAAC,CAAC;QAC/BJ,UAAU,GAAGA,UAAU,CAACK,MAAM,CAAC,CAAC,CAAC;;MAErCL,UAAU,CAAC9D,KAAK,CAAC,IAAI,CAAC,CAACT,OAAO,CAAC,UAAU6E,QAAQ,EAAE;QAC/C,IAAIb,GAAG,GAAG,2BAA2B,CAACc,IAAI,CAACD,QAAQ,CAAC;QACpDJ,MAAM,CAACb,IAAI,CAACL,SAAS,CAACC,OAAO,EAAEL,QAAQ,EAAEa,GAAG,CAAC,CAAC,CAAC,EAAEA,GAAG,CAAC,CAAC,CAAC,IAAIA,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;OACtE,CAAC;MACF,IAAIb,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;QAC9B,IAAI5B,SAAS,GAAG,GAAG;QACnB,IAAI4B,QAAQ,KAAK,GAAG,EAAE;UAClB5B,SAAS,GAAG,GAAG;SAClB,MACI,IAAI4B,QAAQ,KAAK,GAAG,EAAE;UACvB5B,SAAS,GAAG4B,QAAQ;;QAExB,OAAO,CAACsB,MAAM,CAAC3D,MAAM,KAAK,CAAC,GAAGqC,QAAQ,GAAG,EAAE,IAAIsB,MAAM,CAAC5C,IAAI,CAACN,SAAS,CAAC;OACxE,MACI;QACD,OAAOkD,MAAM,CAAC5C,IAAI,CAAC,GAAG,CAAC;;KAE9B,MACI;MACD,OAAOY,cAAc,CAAC+B,OAAO,CAAC;;GAErC,CAAC;AACN;;AC/JO,SAASO,KAAK,CAAClF,OAAO,EAAE;;EAE3B,IAAIU,MAAM,GAAGV,OAAO,CAACU,MAAM,CAAC0C,WAAW,EAAE;;EAEzC,IAAIzC,GAAG,GAAG,CAACX,OAAO,CAACW,GAAG,IAAI,GAAG,EAAEY,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;EAC9D,IAAIV,OAAO,GAAGrB,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEF,OAAO,CAACa,OAAO,CAAC;EAChD,IAAIsE,IAAI;EACR,IAAI1D,UAAU,GAAGgB,IAAI,CAACzC,OAAO,EAAE,CAC3B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,CACd,CAAC;;EAEF,MAAMoF,gBAAgB,GAAGhD,uBAAuB,CAACzB,GAAG,CAAC;EACrDA,GAAG,GAAGyD,QAAQ,CAACzD,GAAG,CAAC,CAAC2D,MAAM,CAAC7C,UAAU,CAAC;EACtC,IAAI,CAAC,OAAO,CAACE,IAAI,CAAChB,GAAG,CAAC,EAAE;IACpBA,GAAG,GAAGX,OAAO,CAACqF,OAAO,GAAG1E,GAAG;;EAE/B,MAAM2E,iBAAiB,GAAG9F,MAAM,CAACC,IAAI,CAACO,OAAO,CAAC,CACzCkB,MAAM,CAAEyB,MAAM,IAAKyC,gBAAgB,CAAChE,QAAQ,CAACuB,MAAM,CAAC,CAAC,CACrDtB,MAAM,CAAC,SAAS,CAAC;EACtB,MAAMkE,mBAAmB,GAAG9C,IAAI,CAAChB,UAAU,EAAE6D,iBAAiB,CAAC;EAC/D,MAAME,eAAe,GAAG,4BAA4B,CAAC7D,IAAI,CAACd,OAAO,CAAC4E,MAAM,CAAC;EACzE,IAAI,CAACD,eAAe,EAAE;IAClB,IAAIxF,OAAO,CAACe,SAAS,CAAC2E,MAAM,EAAE;;MAE1B7E,OAAO,CAAC4E,MAAM,GAAG5E,OAAO,CAAC4E,MAAM,CAC1B7E,KAAK,CAAC,GAAG,CAAC,CACVU,GAAG,CAAEH,OAAO,IAAKA,OAAO,CAACI,OAAO,CAAC,kDAAkD,EAAG,uBAAsBvB,OAAO,CAACe,SAAS,CAAC2E,MAAO,EAAC,CAAC,CAAC,CACxI1D,IAAI,CAAC,GAAG,CAAC;;IAElB,IAAIhC,OAAO,CAACe,SAAS,CAACC,QAAQ,CAACC,MAAM,EAAE;MACnC,MAAM0E,wBAAwB,GAAG9E,OAAO,CAAC4E,MAAM,CAACnD,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE;MAClFzB,OAAO,CAAC4E,MAAM,GAAGE,wBAAwB,CACpCtE,MAAM,CAACrB,OAAO,CAACe,SAAS,CAACC,QAAQ,CAAC,CAClCM,GAAG,CAAEH,OAAO,IAAK;QAClB,MAAMuE,MAAM,GAAG1F,OAAO,CAACe,SAAS,CAAC2E,MAAM,GAChC,IAAG1F,OAAO,CAACe,SAAS,CAAC2E,MAAO,EAAC,GAC9B,OAAO;QACb,OAAQ,0BAAyBvE,OAAQ,WAAUuE,MAAO,EAAC;OAC9D,CAAC,CACG1D,IAAI,CAAC,GAAG,CAAC;;;;;EAKtB,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAACZ,QAAQ,CAACV,MAAM,CAAC,EAAE;IAClCC,GAAG,GAAGa,kBAAkB,CAACb,GAAG,EAAE4E,mBAAmB,CAAC;GACrD,MACI;IACD,IAAI,MAAM,IAAIA,mBAAmB,EAAE;MAC/BJ,IAAI,GAAGI,mBAAmB,CAACK,IAAI;KAClC,MACI;MACD,IAAIpG,MAAM,CAACC,IAAI,CAAC8F,mBAAmB,CAAC,CAACtE,MAAM,EAAE;QACzCkE,IAAI,GAAGI,mBAAmB;;;;;EAKtC,IAAI,CAAC1E,OAAO,CAAC,cAAc,CAAC,IAAI,OAAOsE,IAAI,KAAK,WAAW,EAAE;IACzDtE,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC;;;;EAI/D,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAACO,QAAQ,CAACV,MAAM,CAAC,IAAI,OAAOyE,IAAI,KAAK,WAAW,EAAE;IAClEA,IAAI,GAAG,EAAE;;;EAGb,OAAO3F,MAAM,CAACU,MAAM,CAAC;IAAEQ,MAAM;IAAEC,GAAG;IAAEE;GAAS,EAAE,OAAOsE,IAAI,KAAK,WAAW,GAAG;IAAEA;GAAM,GAAG,IAAI,EAAEnF,OAAO,CAAC6F,OAAO,GAAG;IAAEA,OAAO,EAAE7F,OAAO,CAAC6F;GAAS,GAAG,IAAI,CAAC;AACxJ;;AC3EO,SAASC,oBAAoB,CAAC/F,QAAQ,EAAEU,KAAK,EAAET,OAAO,EAAE;EAC3D,OAAOkF,KAAK,CAAC1E,KAAK,CAACT,QAAQ,EAAEU,KAAK,EAAET,OAAO,CAAC,CAAC;AACjD;;ACDO,SAAS+F,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EACnD,MAAMC,QAAQ,GAAG1F,KAAK,CAACwF,WAAW,EAAEC,WAAW,CAAC;EAChD,MAAME,QAAQ,GAAGL,oBAAoB,CAACvB,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;EAC1D,OAAO1G,MAAM,CAACU,MAAM,CAACiG,QAAQ,EAAE;IAC3BD,QAAQ;IACRnG,QAAQ,EAAEgG,YAAY,CAACxB,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;IAC3C1F,KAAK,EAAEA,KAAK,CAAC+D,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;IACjChB;GACH,CAAC;AACN;;ACZO,MAAMkB,OAAO,GAAG,mBAAmB;;ACE1C,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAC;AACpE;AACA;AACA,AAAO,MAAMJ,QAAQ,GAAG;EACpBxF,MAAM,EAAE,KAAK;EACb2E,OAAO,EAAE,wBAAwB;EACjCxE,OAAO,EAAE;IACL4E,MAAM,EAAE,gCAAgC;IACxC,YAAY,EAAEY;GACjB;EACDtF,SAAS,EAAE;IACP2E,MAAM,EAAE,EAAE;IACV1E,QAAQ,EAAE;;AAElB,CAAC;;MCdYmF,QAAQ,GAAGJ,YAAY,CAAC,IAAI,EAAEG,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/defaults.js new file mode 100644 index 0000000..456e586 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/defaults.js @@ -0,0 +1,17 @@ +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +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/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js new file mode 100644 index 0000000..5763758 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/index.js new file mode 100644 index 0000000..599917f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/merge.js new file mode 100644 index 0000000..1abcecf --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,26 @@ +import { lowercaseKeys } from "./util/lowercase-keys"; +import { mergeDeep } from "./util/merge-deep"; +import { removeUndefinedProperties } from "./util/remove-undefined-properties"; +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 = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/parse.js new file mode 100644 index 0000000..8cf5885 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/parse.js @@ -0,0 +1,78 @@ +import { addQueryParameters } from "./util/add-query-parameters"; +import { extractUrlVariableNames } from "./util/extract-url-variable-names"; +import { omit } from "./util/omit"; +import { parseUrl } from "./util/url-template"; +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 = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js new file mode 100644 index 0000000..d26be31 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,17 @@ +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/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js new file mode 100644 index 0000000..3e75db2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js new file mode 100644 index 0000000..0780642 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js new file mode 100644 index 0000000..d92aca3 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js @@ -0,0 +1,16 @@ +import { isPlainObject } from "is-plain-object"; +export function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/omit.js new file mode 100644 index 0000000..6245031 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js new file mode 100644 index 0000000..6b5ee5f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js @@ -0,0 +1,8 @@ +export function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/url-template.js new file mode 100644 index 0000000..439b3fe --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/util/url-template.js @@ -0,0 +1,164 @@ +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +export function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/version.js new file mode 100644 index 0000000..2d27c3f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "7.0.4"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-src/with-defaults.js new file mode 100644 index 0000000..81baf6c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/defaults.d.ts new file mode 100644 index 0000000..30fcd20 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults } from "@octokit/types"; +export declare const DEFAULTS: EndpointDefaults; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts new file mode 100644 index 0000000..ff39e5e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts @@ -0,0 +1,3 @@ +import { EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { DEFAULTS } from "./defaults"; +export declare function endpointWithDefaults(defaults: typeof DEFAULTS, route: Route | EndpointOptions, options?: RequestParameters): import("@octokit/types").RequestOptions; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/index.d.ts new file mode 100644 index 0000000..1ede136 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const endpoint: import("@octokit/types").EndpointInterface; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/merge.d.ts new file mode 100644 index 0000000..b75a15e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/merge.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestParameters, Route } from "@octokit/types"; +export declare function merge(defaults: EndpointDefaults | null, route?: Route | RequestParameters, options?: RequestParameters): EndpointDefaults; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/parse.d.ts new file mode 100644 index 0000000..fbe2144 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/parse.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestOptions } from "@octokit/types"; +export declare function parse(options: EndpointDefaults): RequestOptions; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts new file mode 100644 index 0000000..4b192ac --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts new file mode 100644 index 0000000..93586d4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts new file mode 100644 index 0000000..1daf307 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts @@ -0,0 +1,5 @@ +export declare function lowercaseKeys(object?: { + [key: string]: any; +}): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts new file mode 100644 index 0000000..914411c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts @@ -0,0 +1 @@ +export declare function mergeDeep(defaults: any, options: any): object; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts new file mode 100644 index 0000000..06927d6 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts new file mode 100644 index 0000000..92d8d85 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts @@ -0,0 +1 @@ +export declare function removeUndefinedProperties(obj: any): any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts new file mode 100644 index 0000000..5d967ca --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts @@ -0,0 +1,3 @@ +export declare function parseUrl(template: string): { + expand: (context: object) => string; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/version.d.ts new file mode 100644 index 0000000..b9cbe53 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "7.0.4"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..6f5afd1 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestParameters, EndpointDefaults } from "@octokit/types"; +export declare function withDefaults(oldDefaults: EndpointDefaults | null, newDefaults: RequestParameters): EndpointInterface; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-web/index.js new file mode 100644 index 0000000..a31b913 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-web/index.js @@ -0,0 +1,378 @@ +import { isPlainObject } from 'is-plain-object'; +import { getUserAgent } from 'universal-user-agent'; + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } + else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return (url + + separator + + names + .map((name) => { + if (name === "q") { + return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+")); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }) + .join("&")); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object) + .filter((option) => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType", + ]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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 = "7.0.4"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent, + }, + mediaType: { + format: "", + previews: [], + }, +}; + +const endpoint = withDefaults(null, DEFAULTS); + +export { endpoint }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-web/index.js.map new file mode 100644 index 0000000..08201f9 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;AACtC,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AACvD,QAAQ,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAChD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;;ACPO,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;AAC7C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1C,QAAQ,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;AACzC,YAAY,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;AAClC,gBAAgB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/D;AACA,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,SAAS;AACT,aAAa;AACb,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;;ACfM,SAAS,yBAAyB,CAAC,GAAG,EAAE;AAC/C,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AAC3B,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACpC,YAAY,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;ACJM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAChD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7C,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3C,KAAK;AACL;AACA,IAAI,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD;AACA,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,IAAI,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/C,IAAI,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AACxD,QAAQ,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;AACtE,aAAa,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrF,aAAa,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtD,KAAK;AACL,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1H,IAAI,OAAO,aAAa,CAAC;AACzB,CAAC;;ACzBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;AACpD,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AACjD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1C,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK;AAC3B,YAAY,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,gBAAgB,QAAQ,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC1F,aAAa;AACb,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,SAAS,CAAC;AACV,aAAa,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,CAAC;;AChBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,IAAI,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;AAC7C,IAAI,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAChD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;AACzC,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzD,SAAS,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAC9B,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,IAAI,OAAO,GAAG;AACd,SAAS,KAAK,CAAC,oBAAoB,CAAC;AACpC,SAAS,GAAG,CAAC,UAAU,IAAI,EAAE;AAC7B,QAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxC,YAAY,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC7E,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;AACpE,QAAQ,OAAO,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,KAAK,CAAC,CAAC;AACP,CAAC;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;AAC3C,IAAI,KAAK;AACT,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;AAC5C,cAAc,cAAc,CAAC,KAAK,CAAC;AACnC,cAAc,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACtC,IAAI,IAAI,GAAG,EAAE;AACb,QAAQ,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;AACnD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,IAAI,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AACpE,CAAC;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;AACrD,IAAI,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;AAC1C,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1C,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,SAAS,EAAE;AACxC,YAAY,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;AACrC,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AACnE,aAAa;AACb,YAAY,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAC1F,SAAS;AACT,aAAa;AACb,YAAY,IAAI,QAAQ,KAAK,GAAG,EAAE;AAClC,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,aAAa;AACb,iBAAiB;AACjB,gBAAgB,MAAM,GAAG,GAAG,EAAE,CAAC;AAC/B,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,4BAA4B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AACjF,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;AAC7C,oBAAoB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,iBAAiB;AACjB,qBAAqB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3C,oBAAoB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9B,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAClC,gBAAgB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AACnD,aAAa;AACb,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;AACzE,YAAY,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,EAAE;AAC/B,YAAY,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;AACnC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC3C,KAAK,CAAC;AACN,CAAC;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AACnC,IAAI,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;AAC5F,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,QAAQ,GAAG,EAAE,CAAC;AAC9B,YAAY,MAAM,MAAM,GAAG,EAAE,CAAC;AAC9B,YAAY,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;AAChE,gBAAgB,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAChD,gBAAgB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,aAAa;AACb,YAAY,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;AAC/D,gBAAgB,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,gBAAgB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,aAAa,CAAC,CAAC;AACf,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,IAAI,SAAS,GAAG,GAAG,CAAC;AACpC,gBAAgB,IAAI,QAAQ,KAAK,GAAG,EAAE;AACtC,oBAAoB,SAAS,GAAG,GAAG,CAAC;AACpC,iBAAiB;AACjB,qBAAqB,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC3C,oBAAoB,SAAS,GAAG,QAAQ,CAAC;AACzC,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtF,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AAC3C,SAAS;AACT,KAAK,CAAC,CAAC;AACP,CAAC;;AC/JM,SAAS,KAAK,CAAC,OAAO,EAAE;AAC/B;AACA,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;AAC9C;AACA,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACnE,IAAI,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD,IAAI,IAAI,IAAI,CAAC;AACb,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;AAC1D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5B,QAAQ,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AAClD,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9D,SAAS,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,IAAI,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AACpE,IAAI,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;AACtC;AACA,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAC3C,iBAAiB,KAAK,CAAC,GAAG,CAAC;AAC3B,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzJ,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC/C,YAAY,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/F,YAAY,OAAO,CAAC,MAAM,GAAG,wBAAwB;AACrD,iBAAiB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;AACnD,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK;AAClC,gBAAgB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;AACvD,sBAAsB,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACpD,sBAAsB,OAAO,CAAC;AAC9B,gBAAgB,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,aAAa,CAAC;AACd,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC1C,QAAQ,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAC3D,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,mBAAmB,EAAE;AAC3C,YAAY,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;AAC5C,SAAS;AACT,aAAa;AACb,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;AACzD,gBAAgB,IAAI,GAAG,mBAAmB,CAAC;AAC3C,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AACjE,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AACpE,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AAC1E,QAAQ,IAAI,GAAG,EAAE,CAAC;AAClB,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzJ,CAAC;;AC3EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAC/D,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AACvD,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/D,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACzC,QAAQ,KAAK;AACb,KAAK,CAAC,CAAC;AACP,CAAC;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AACrE;AACA;AACA,AAAO,MAAM,QAAQ,GAAG;AACxB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,OAAO,EAAE;AACb,QAAQ,MAAM,EAAE,gCAAgC;AAChD,QAAQ,YAAY,EAAE,SAAS;AAC/B,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,MAAM,EAAE,EAAE;AAClB,QAAQ,QAAQ,EAAE,EAAE;AACpB,KAAK;AACL,CAAC,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/package.json new file mode 100644 index 0000000..2184bb7 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,47 @@ +{ + "name": "@octokit/endpoint", + "description": "Turns REST API endpoints into generic request options", + "version": "7.0.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "repository": "github:octokit/endpoint.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "jest": "^29.0.0", + "prettier": "2.8.3", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/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/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/README.md new file mode 100644 index 0000000..b032aa5 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/README.md @@ -0,0 +1,281 @@ +# oauth-authorization-url.js + +> Universal library to retrieve GitHub’s identity URL for the OAuth web flow + +[![@latest](https://img.shields.io/npm/v/@octokit/oauth-authorization-url.svg)](https://www.npmjs.com/package/@octokit/oauth-authorization-url) +[![Build Status](https://github.com/octokit/oauth-authorization-url.js/workflows/Test/badge.svg)](https://github.com/octokit/oauth-authorization-url.js/actions?query=workflow%3ATest+branch%3Amaster) + +See [GitHub’s Developer Guide for the OAuth App web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). Note that the [OAuth web application flow for GitHub Apps](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#web-application-flow) is slightly different. GitHub Apps do not support scopes for its user access tokens (they are called user-to-server tokens for GitHub Apps), instead they inherit the user permissions from the GitHub App's registration and the repository/organization access and permissions from the respective installation. + + + +- [Usage](#usage) + - [For OAuth Apps](#for-oauth-apps) + - [For GitHub Apps](#for-github-apps) +- [Options](#options) +- [Result](#result) +- [Types](#types) +- [License](#license) + + + +## Usage + + + + + + + + + + +
+ Browsers + + +Load `@octokit/oauth-authorization-url` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+ Node + + +Install with npm install @octokit/oauth-authorization-url + +```js +const { oauthAuthorizationUrl } = require("@octokit/oauth-authorization-url"); +// or: import { oauthAuthorizationUrl } from "@octokit/oauth-authorization-url"; +``` + +
+ +### For OAuth Apps + +```js +const { + url, + clientId, + redirectUrl, + login, + scopes, + state, +} = oauthAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + redirectUrl: "https://example.com", + login: "octocat", + scopes: ["repo", "admin:org"], + state: "secret123", +}); +``` + +### For GitHub Apps + +```js +const { url, clientId, redirectUrl, login, state } = oauthAuthorizationUrl({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + redirectUrl: "https://example.com", + login: "octocat", + state: "secret123", +}); +``` + +## Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + description +
+ clientId + + Required. The client ID you received from GitHub when you registered. +
+ clientType + + +Must be set to either `"oauth-app"` or `"github-app"`. Defaults to `"oauth-app"`. + +
+ redirectUrl + + The URL in your application where users will be sent after authorization. See Redirect URLs in GitHub’s Developer Guide. +
+ login + + Suggests a specific account to use for signing in and authorizing the app. +
+ scopes + + +Only relevant when `clientType` is set to `"oauth-app"`. + +An array of scope names (or: space-delimited list of scopes). If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. + +Defaults to `[]` if `clientType` is set to `"oauth-app"`. + +
+ state + + An unguessable random string. It is used to protect against cross-site request forgery attacks. + Defaults to Math.random().toString(36).substr(2). +
+ allowSignup + + Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. Use false in the case that a policy prohibits signups. Defaults to true. +
+ baseUrl + + When using GitHub Enterprise Server, set the baseUrl to the origin, e.g. https://github.my-enterprise.com. +
+ +## Result + +`oauthAuthorizationUrl()` returns an object with the following properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + description +
+ allowSignup + + Returns options.allowSignup if it was set. Defaults to true. +
+ clientType + + Returns options.clientType. Defaults to "oauth-app". +
+ clientId + + Returns options.clientId. +
+ login + + Returns options.login if it was set. Defaults to null. +
+ redirectUrl + + Returns options.redirectUrl if it was set. Defaults to null. +
+ scopes + + +Only set if `options.clientType` is set to `"oauth-app"`. + +Returns an array of strings. Returns options.scopes if it was set and turns the string into an array if a string was passed, otherwise []. + +
+ state + + Returns options.state if it was set. Defaults to Defaults to Math.random().toString(36).substr(2). +
+ url + + The authorization URL +
+ +## Types + +```ts +import { + ClientType, + OAuthAppOptions, + OAuthAppResult, + GitHubAppOptions, + GitHubAppResult, +} from "@octokit/oauth-authorization-url"; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-node/index.js new file mode 100644 index 0000000..a739ce7 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-node/index.js @@ -0,0 +1,54 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "" + }; + + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes; + } + + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} + +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state" + }; + let url = base; + Object.keys(map) // Filter out keys that are null and remove the url key + .filter(k => options[k] !== null) // Filter out empty scopes array + .filter(k => { + if (k !== "scopes") return true; + if (options.clientType === "github-app") return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map(key => [map[key], `${options[key]}`]) // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} + +exports.oauthAuthorizationUrl = oauthAuthorizationUrl; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map new file mode 100644 index 0000000..5072026 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["export function oauthAuthorizationUrl(options) {\n const clientType = options.clientType || \"oauth-app\";\n const baseUrl = options.baseUrl || \"https://github.com\";\n const result = {\n clientType,\n allowSignup: options.allowSignup === false ? false : true,\n clientId: options.clientId,\n login: options.login || null,\n redirectUrl: options.redirectUrl || null,\n state: options.state || Math.random().toString(36).substr(2),\n url: \"\",\n };\n if (clientType === \"oauth-app\") {\n const scopes = \"scopes\" in options ? options.scopes : [];\n result.scopes =\n typeof scopes === \"string\"\n ? scopes.split(/[,\\s]+/).filter(Boolean)\n : scopes;\n }\n result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result);\n return result;\n}\nfunction urlBuilderAuthorize(base, options) {\n const map = {\n allowSignup: \"allow_signup\",\n clientId: \"client_id\",\n login: \"login\",\n redirectUrl: \"redirect_uri\",\n scopes: \"scope\",\n state: \"state\",\n };\n let url = base;\n Object.keys(map)\n // Filter out keys that are null and remove the url key\n .filter((k) => options[k] !== null)\n // Filter out empty scopes array\n .filter((k) => {\n if (k !== \"scopes\")\n return true;\n if (options.clientType === \"github-app\")\n return false;\n return !Array.isArray(options[k]) || options[k].length > 0;\n })\n // Map Array with the proper URL parameter names and change the value to a string using template strings\n // @ts-ignore\n .map((key) => [map[key], `${options[key]}`])\n // Finally, build the URL\n .forEach(([key, value], index) => {\n url += index === 0 ? `?` : \"&\";\n url += `${key}=${encodeURIComponent(value)}`;\n });\n return url;\n}\n"],"names":["oauthAuthorizationUrl","options","clientType","baseUrl","result","allowSignup","clientId","login","redirectUrl","state","Math","random","toString","substr","url","scopes","split","filter","Boolean","urlBuilderAuthorize","base","map","Object","keys","k","Array","isArray","length","key","forEach","value","index","encodeURIComponent"],"mappings":";;;;AAAO,SAASA,qBAAT,CAA+BC,OAA/B,EAAwC;AAC3C,QAAMC,UAAU,GAAGD,OAAO,CAACC,UAAR,IAAsB,WAAzC;AACA,QAAMC,OAAO,GAAGF,OAAO,CAACE,OAAR,IAAmB,oBAAnC;AACA,QAAMC,MAAM,GAAG;AACXF,IAAAA,UADW;AAEXG,IAAAA,WAAW,EAAEJ,OAAO,CAACI,WAAR,KAAwB,KAAxB,GAAgC,KAAhC,GAAwC,IAF1C;AAGXC,IAAAA,QAAQ,EAAEL,OAAO,CAACK,QAHP;AAIXC,IAAAA,KAAK,EAAEN,OAAO,CAACM,KAAR,IAAiB,IAJb;AAKXC,IAAAA,WAAW,EAAEP,OAAO,CAACO,WAAR,IAAuB,IALzB;AAMXC,IAAAA,KAAK,EAAER,OAAO,CAACQ,KAAR,IAAiBC,IAAI,CAACC,MAAL,GAAcC,QAAd,CAAuB,EAAvB,EAA2BC,MAA3B,CAAkC,CAAlC,CANb;AAOXC,IAAAA,GAAG,EAAE;AAPM,GAAf;;AASA,MAAIZ,UAAU,KAAK,WAAnB,EAAgC;AAC5B,UAAMa,MAAM,GAAG,YAAYd,OAAZ,GAAsBA,OAAO,CAACc,MAA9B,GAAuC,EAAtD;AACAX,IAAAA,MAAM,CAACW,MAAP,GACI,OAAOA,MAAP,KAAkB,QAAlB,GACMA,MAAM,CAACC,KAAP,CAAa,QAAb,EAAuBC,MAAvB,CAA8BC,OAA9B,CADN,GAEMH,MAHV;AAIH;;AACDX,EAAAA,MAAM,CAACU,GAAP,GAAaK,mBAAmB,CAAE,GAAEhB,OAAQ,wBAAZ,EAAqCC,MAArC,CAAhC;AACA,SAAOA,MAAP;AACH;;AACD,SAASe,mBAAT,CAA6BC,IAA7B,EAAmCnB,OAAnC,EAA4C;AACxC,QAAMoB,GAAG,GAAG;AACRhB,IAAAA,WAAW,EAAE,cADL;AAERC,IAAAA,QAAQ,EAAE,WAFF;AAGRC,IAAAA,KAAK,EAAE,OAHC;AAIRC,IAAAA,WAAW,EAAE,cAJL;AAKRO,IAAAA,MAAM,EAAE,OALA;AAMRN,IAAAA,KAAK,EAAE;AANC,GAAZ;AAQA,MAAIK,GAAG,GAAGM,IAAV;AACAE,EAAAA,MAAM,CAACC,IAAP,CAAYF,GAAZ;AAAA,GAEKJ,MAFL,CAEaO,CAAD,IAAOvB,OAAO,CAACuB,CAAD,CAAP,KAAe,IAFlC;AAAA,GAIKP,MAJL,CAIaO,CAAD,IAAO;AACf,QAAIA,CAAC,KAAK,QAAV,EACI,OAAO,IAAP;AACJ,QAAIvB,OAAO,CAACC,UAAR,KAAuB,YAA3B,EACI,OAAO,KAAP;AACJ,WAAO,CAACuB,KAAK,CAACC,OAAN,CAAczB,OAAO,CAACuB,CAAD,CAArB,CAAD,IAA8BvB,OAAO,CAACuB,CAAD,CAAP,CAAWG,MAAX,GAAoB,CAAzD;AACH,GAVD;AAYI;AAZJ,GAaKN,GAbL,CAaUO,GAAD,IAAS,CAACP,GAAG,CAACO,GAAD,CAAJ,EAAY,GAAE3B,OAAO,CAAC2B,GAAD,CAAM,EAA3B,CAblB;AAAA,GAeKC,OAfL,CAea,CAAC,CAACD,GAAD,EAAME,KAAN,CAAD,EAAeC,KAAf,KAAyB;AAClCjB,IAAAA,GAAG,IAAIiB,KAAK,KAAK,CAAV,GAAe,GAAf,GAAoB,GAA3B;AACAjB,IAAAA,GAAG,IAAK,GAAEc,GAAI,IAAGI,kBAAkB,CAACF,KAAD,CAAQ,EAA3C;AACH,GAlBD;AAmBA,SAAOhB,GAAP;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-src/index.js new file mode 100644 index 0000000..3a0be85 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-src/index.js @@ -0,0 +1,53 @@ +export function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "", + }; + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = + typeof scopes === "string" + ? scopes.split(/[,\s]+/).filter(Boolean) + : scopes; + } + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state", + }; + let url = base; + Object.keys(map) + // Filter out keys that are null and remove the url key + .filter((k) => options[k] !== null) + // Filter out empty scopes array + .filter((k) => { + if (k !== "scopes") + return true; + if (options.clientType === "github-app") + return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) + // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map((key) => [map[key], `${options[key]}`]) + // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-src/types.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts new file mode 100644 index 0000000..b4efd4a --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts @@ -0,0 +1,4 @@ +import { OAuthAppOptions, GitHubAppOptions, OAuthAppResult, GitHubAppResult } from "./types"; +export { ClientType, OAuthAppOptions, GitHubAppOptions, OAuthAppResult, GitHubAppResult, } from "./types"; +export declare function oauthAuthorizationUrl(options: OAuthAppOptions): OAuthAppResult; +export declare function oauthAuthorizationUrl(options: GitHubAppOptions): GitHubAppResult; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts new file mode 100644 index 0000000..0dd3ad1 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts @@ -0,0 +1,39 @@ +export declare type ClientType = "oauth-app" | "github-app"; +export declare type OAuthAppOptions = { + clientId: string; + clientType?: "oauth-app"; + allowSignup?: boolean; + login?: string; + scopes?: string | string[]; + redirectUrl?: string; + state?: string; + baseUrl?: string; +}; +export declare type GitHubAppOptions = { + clientId: string; + clientType: "github-app"; + allowSignup?: boolean; + login?: string; + redirectUrl?: string; + state?: string; + baseUrl?: string; +}; +export declare type OAuthAppResult = { + allowSignup: boolean; + clientId: string; + clientType: "oauth-app"; + login: string | null; + redirectUrl: string | null; + scopes: string[]; + state: string; + url: string; +}; +export declare type GitHubAppResult = { + allowSignup: boolean; + clientId: string; + clientType: "github-app"; + login: string | null; + redirectUrl: string | null; + state: string; + url: string; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-web/index.js new file mode 100644 index 0000000..e778a09 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-web/index.js @@ -0,0 +1,56 @@ +function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "", + }; + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = + typeof scopes === "string" + ? scopes.split(/[,\s]+/).filter(Boolean) + : scopes; + } + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state", + }; + let url = base; + Object.keys(map) + // Filter out keys that are null and remove the url key + .filter((k) => options[k] !== null) + // Filter out empty scopes array + .filter((k) => { + if (k !== "scopes") + return true; + if (options.clientType === "github-app") + return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) + // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map((key) => [map[key], `${options[key]}`]) + // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} + +export { oauthAuthorizationUrl }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map new file mode 100644 index 0000000..cad5e93 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["export function oauthAuthorizationUrl(options) {\n const clientType = options.clientType || \"oauth-app\";\n const baseUrl = options.baseUrl || \"https://github.com\";\n const result = {\n clientType,\n allowSignup: options.allowSignup === false ? false : true,\n clientId: options.clientId,\n login: options.login || null,\n redirectUrl: options.redirectUrl || null,\n state: options.state || Math.random().toString(36).substr(2),\n url: \"\",\n };\n if (clientType === \"oauth-app\") {\n const scopes = \"scopes\" in options ? options.scopes : [];\n result.scopes =\n typeof scopes === \"string\"\n ? scopes.split(/[,\\s]+/).filter(Boolean)\n : scopes;\n }\n result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result);\n return result;\n}\nfunction urlBuilderAuthorize(base, options) {\n const map = {\n allowSignup: \"allow_signup\",\n clientId: \"client_id\",\n login: \"login\",\n redirectUrl: \"redirect_uri\",\n scopes: \"scope\",\n state: \"state\",\n };\n let url = base;\n Object.keys(map)\n // Filter out keys that are null and remove the url key\n .filter((k) => options[k] !== null)\n // Filter out empty scopes array\n .filter((k) => {\n if (k !== \"scopes\")\n return true;\n if (options.clientType === \"github-app\")\n return false;\n return !Array.isArray(options[k]) || options[k].length > 0;\n })\n // Map Array with the proper URL parameter names and change the value to a string using template strings\n // @ts-ignore\n .map((key) => [map[key], `${options[key]}`])\n // Finally, build the URL\n .forEach(([key, value], index) => {\n url += index === 0 ? `?` : \"&\";\n url += `${key}=${encodeURIComponent(value)}`;\n });\n return url;\n}\n"],"names":[],"mappings":"AAAO,SAAS,qBAAqB,CAAC,OAAO,EAAE;AAC/C,IAAI,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,WAAW,CAAC;AACzD,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,oBAAoB,CAAC;AAC5D,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,UAAU;AAClB,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW,KAAK,KAAK,GAAG,KAAK,GAAG,IAAI;AACjE,QAAQ,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAClC,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI;AACpC,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI;AAChD,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACpE,QAAQ,GAAG,EAAE,EAAE;AACf,KAAK,CAAC;AACN,IAAI,IAAI,UAAU,KAAK,WAAW,EAAE;AACpC,QAAQ,MAAM,MAAM,GAAG,QAAQ,IAAI,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;AACjE,QAAQ,MAAM,CAAC,MAAM;AACrB,YAAY,OAAO,MAAM,KAAK,QAAQ;AACtC,kBAAkB,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACxD,kBAAkB,MAAM,CAAC;AACzB,KAAK;AACL,IAAI,MAAM,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC,CAAC;AACjF,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,SAAS,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE;AAC5C,IAAI,MAAM,GAAG,GAAG;AAChB,QAAQ,WAAW,EAAE,cAAc;AACnC,QAAQ,QAAQ,EAAE,WAAW;AAC7B,QAAQ,KAAK,EAAE,OAAO;AACtB,QAAQ,WAAW,EAAE,cAAc;AACnC,QAAQ,MAAM,EAAE,OAAO;AACvB,QAAQ,KAAK,EAAE,OAAO;AACtB,KAAK,CAAC;AACN,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC;AACnB,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACpB;AACA,SAAS,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAC3C;AACA,SAAS,MAAM,CAAC,CAAC,CAAC,KAAK;AACvB,QAAQ,IAAI,CAAC,KAAK,QAAQ;AAC1B,YAAY,OAAO,IAAI,CAAC;AACxB,QAAQ,IAAI,OAAO,CAAC,UAAU,KAAK,YAAY;AAC/C,YAAY,OAAO,KAAK,CAAC;AACzB,QAAQ,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACnE,KAAK,CAAC;AACN;AACA;AACA,SAAS,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD;AACA,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK;AAC1C,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AACvC,QAAQ,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,GAAG,CAAC;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/package.json new file mode 100644 index 0000000..f303097 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-authorization-url/package.json @@ -0,0 +1,41 @@ +{ + "name": "@octokit/oauth-authorization-url", + "description": "Universal library to retrieve GitHub’s identity URL for the OAuth web flow", + "version": "5.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "oauth" + ], + "repository": "github:octokit/oauth-authorization-url.js", + "dependencies": {}, + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^27.0.0", + "jest": "^27.0.0", + "pika-plugin-unpkg-field": "^1.0.1", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "unpkg": "dist-web/index.js" +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/LICENSE new file mode 100644 index 0000000..57049d0 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 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/auth-oauth-device/node_modules/@octokit/oauth-methods/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/README.md new file mode 100644 index 0000000..acaac06 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/README.md @@ -0,0 +1,1607 @@ +# oauth-methods.js + +> Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps + +[![@latest](https://img.shields.io/npm/v/@octokit/oauth-methods.svg)](https://www.npmjs.com/package/@octokit/oauth-methods) +[![Build Status](https://github.com/octokit/oauth-methods.js/workflows/Test/badge.svg)](https://github.com/octokit/oauth-methods.js/actions?query=workflow%3ATest+branch%3Amain) + + + +- [Usage](#usage) + - [OAuth Web Flow](#oauth-web-flow) + - [OAuth Device Flow](#oauth-device-flow) +- [Methods](#methods) + - [`getWebFlowAuthorizationUrl()`](#getwebflowauthorizationurl) + - [`exchangeWebFlowCode()`](#exchangewebflowcode) + - [`createDeviceCode()`](#createdevicecode) + - [`exchangeDeviceCode()`](#exchangedevicecode) + - [`checkToken()`](#checktoken) + - [`refreshToken()`](#refreshtoken) + - [`scopeToken()`](#scopetoken) + - [`resetToken()`](#resettoken) + - [`deleteToken()`](#deletetoken) + - [`deleteAuthorization()`](#deleteauthorization) +- [Authentication object](#authentication-object) + - [OAuth APP authentication](#oauth-app-authentication) + - [GitHub App with non-expiring user authentication](#github-app-with-non-expiring-user-authentication) + - [GitHub App with expiring user authentication](#github-app-with-expiring-user-authentication) +- [Types](#types) +- [Contributing](#contributing) +- [License](#license) + + + +The OAuth endpoints related to user access tokens are not all part of GitHub's REST API and they behave slightly different. The methods exported by `@octokit/normalize the differences so you don't have to. + +## Usage + + + + + + +
+ +Browsers + + + +`@octokit/oauth-methods` is not meant for browser usage. + +Some of the methods will work, but others do not have CORS headers enabled and will fail (`exchangeWebFlowCode()`, `createDeviceCode()`, `exchangeDeviceCode()`, `refreshToken()`). Also the Client Secret should not be exposed to clients as it can be used for a [Person-in-the-middle attack](https://en.wikipedia.org/wiki/Person-in-the-middle_attack). + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/oauth-methods` + +```js +const { + exchangeWebFlowCode, + createDeviceCode, + exchangeDeviceCode, + checkToken, + refreshToken, + scopeToken, + resetToken, + deleteToken, + deleteAuthorization, +} = require("@octokit/oauth-methods"); +``` + +
+ +### OAuth Web Flow + +After a user granted access to an OAuth App or GitHub App on [Step 1 of GitHub's OAuth Web Flow](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#1-request-a-users-github-identity), they get redirected to a URL controlled by your app with a `?code=...` query parameter. + +You can exchange that code for a user access token as described in [Step 2 of GitHub's OAuth Web Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github). + +Setting `clientType` is required because there are slight differences between `"oauth-app"` and `"github-app"`. Most importantly, GitHub Apps do not support scopes. + +```js +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", + scopes: ["repo"], +}); +``` + +`data` is the raw response data. `authentication` is a [User Authentication object](#authentication-object). + +### OAuth Device Flow + +In [step 1 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github), you need to create a device and user code + +```js +const { + data: { device_code, user_code, verification_uri }, +} = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +In [step 2 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser), the user has to enter `user_code` on `verification_uri` (https://github.com/login/device unless you use GitHub Enterprise Server). + +Once the user entered the code and granted access, you can exchange the `device_code` for a user access token in [step 3 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device) + +```js +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: device_code, +}); +``` + +`data` is the raw response data. `authentication` is a [User Authentication object](#authentication-object). + +## Methods + +### `getWebFlowAuthorizationUrl()` + +This is a wrapper around [`@octokit/oauth-authorization-url`](https://github.com/octokit/oauth-authorization-url.js#readme) that accepts a `request` option instead of `baseUrl` for consistency with the other OAuth methods. `getWebFlowAuthorizationUrl()` is a synchronous method and does not send any request. + +```js +const { url } = getWebFlowAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. The client ID you received from GitHub when you registered. +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app". +
+ redirectUrl + + string + + The URL in your application where users will be sent after authorization. See Redirect URLs in GitHub’s Developer Guide. +
+ login + + string + + Suggests a specific account to use for signing in and authorizing the app. +
+ scopes + + array of strings + + +Only relevant if `clientType` is set to `"oauth-app"`. + +An array of scope names (or: space-delimited list of scopes). If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. + +Defaults to `[]`. + +
+ state + + string + + An unguessable random string. It is used to protect against cross-site request forgery attacks. + Defaults to Math.random().toString(36).substr(2). +
+ allowSignup + + boolean + + Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. Use false in the case that a policy prohibits signups. Defaults to true. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { url } = getWebFlowAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +The `getWebFlowAuthorizationUrl` method is synchronous and returns an object with the following properties. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ allowSignup + + boolean + + Returns options.allowSignup if it was set. Defaults to true. +
+ clientType + + string + + Returns options.clientType +
+ clientId + + string + + Returns options.clientId. +
+ login + + string + + Returns options.login if it was set. Defaults to null. +
+ redirectUrl + + string + + Returns options.redirectUrl if it was set. Defaults to null. +
+ scopes + + array of strings + + +Only set if `options.clientType` is set to `"oauth-app"`. + +Returns an array of strings. Returns options.scopes if it was set and turns the string into an array if a string was passed, otherwise []. + +
+ state + + string + + Returns options.state if it was set. Defaults to Math.random().toString(36).substr(2). +
+ url + + string + + The authorization URL +
+ +### `exchangeWebFlowCode()` + +```js +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ code + + string + + Required. The code from GitHub's OAuth flow redirect's ?code=... query parameter +
+ redirectUrl + + string + + The redirectUrl option you passed to getWebFlowAuthorizationUrl() +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /login/oauth/access_token`](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#response) (JSON) with an additional `authentication` key which is the [authentication object](#authentication-object). + +### `createDeviceCode()` + +```js +const { data, authentication } = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ scopes + + array of strings + + +Only permitted if `clientType` is set to `"oauth-app"`. GitHub Apps do not support scopes. + +Array of [scope names](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes) you want to request for the user access token. + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data } = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST https://github.com/login/device/code`](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#response-1) (JSON). + +### `exchangeDeviceCode()` + +```js +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: "code123", +}); +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ code + + string + + Required. The decive_code from the createDeviceCode() response +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: "code123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### `checkToken()` + +```js +const { data, authentication } = await checkToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to check +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await checkToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) with an additional `authentication` key which is the [authentication object](#authentication-object). Note that the `authentication` object will not include the keys for expiring authentication. + +### `refreshToken()` + +Expiring user access tokens are currently in preview. You can [enable them for any of your GitHub apps](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens#configuring-expiring-user-tokens-for-an-existing-github-app). OAuth Apps do not support expiring user access tokens + +When a user access token expires it can be [refreshed using a refresh token](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens). Refreshing a token invalidates the current user access token. + +```js +const { data, authentication } = await refreshToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + refreshToken: "r1.refreshtoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ refreshToken + + string + + Required. The refresh token that was received alongside the user access token. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await refreshToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + refreshToken: "r1.refreshtoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /login/oauth/access_token`](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens#response) with an additional `authentication` key which is the [GitHub App expiring user authentication](#github-app-with-expiring-user-authentication). + +### `scopeToken()` + +```js +const { data, authentication } = await scopeToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", + target: "octokit", + repositories: ["oauth-methods.js"], + permissions: { + issues: "write", + }, +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to "github-app". +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ target + + string + + Required unless targetId is set. The name of the user or organization to scope the user-to-server access token to. +
+ targetId + + integer + + Required unless target is set. The ID of the user or organization to scope the user-to-server access token to. +
+ repositories + + array of strings + + The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified. +
+ repository_ids + + array of integers + + The list of repository IDs to scope the user-to-server access token to. repositories may not be specified if repositories is specified. +
+ permissions + + object + + The permissions granted to the user-to-server access token. See GitHub App Permissions. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await scopeToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + token: "usertoken123", + target: "octokit", + repositories: ["oauth-methods.js"], + permissions: { + issues: "write", + }, + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) with an additional `authentication` key which is the new [authentication object](#authentication-object). + +### `resetToken()` + +```js +const { data, authentication } = await resetToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app". +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to reset +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await resetToken({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) with an additional `authentication` key which is the new [authentication object](#authentication-object). + +### `deleteToken()` + +```js +const { status } = await deleteToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to delete +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await deleteToken({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) (which is an empty `204` response). + +### `deleteAuthorization()` + +```js +const { status } = await deleteAuthorization({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. A valid user access token for the authorization +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await deleteAuthorization({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) (which is an empty `204` response). + +## Authentication object + +The `authentication` object returned by the methods have one of three formats. + +1. [OAuth APP authentication token](#oauth-app-authentication-token) +1. [GitHub APP non-expiring user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) +1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +Note that the `clientSecret` may not be set when using [`exchangeDeviceCode()`](#exchangedevicecode) as `clientSecret` is not required for the OAuth device flow. + +### OAuth APP authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub App with non-expiring user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ +### GitHub App with expiring user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## Types + +```ts +import { + OAuthAppAuthentication, + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, + GetWebFlowAuthorizationUrlOAuthAppOptions, + GetWebFlowAuthorizationUrlGitHubAppOptions, + GetWebFlowAuthorizationUrlOAuthAppResult, + GetWebFlowAuthorizationUrlGitHubAppResult, + CheckTokenOAuthAppOptions, + CheckTokenGitHubAppOptions, + CheckTokenOAuthAppResponse, + CheckTokenGitHubAppResponse, + ExchangeWebFlowCodeOAuthAppOptions, + ExchangeWebFlowCodeGitHubAppOptions, + ExchangeWebFlowCodeOAuthAppResponse, + ExchangeWebFlowCodeGitHubAppResponse, + CreateDeviceCodeOAuthAppOptions, + CreateDeviceCodeGitHubAppOptions, + CreateDeviceCodeDeviceTokenResponse, + ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret, + ExchangeDeviceCodeOAuthAppOptions, + ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret, + ExchangeDeviceCodeGitHubAppOptions, + ExchangeDeviceCodeOAuthAppResponse, + ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret, + ExchangeDeviceCodeGitHubAppResponse, + ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret, + RefreshTokenOptions, + RefreshTokenResponse, + ScopeTokenOptions, + ScopeTokenResponse, + ResetTokenOAuthAppOptions, + ResetTokenGitHubAppOptions, + ResetTokenOAuthAppResponse, + ResetTokenGitHubAppResponse, + DeleteTokenOAuthAppOptions, + DeleteTokenGitHubAppOptions, + DeleteTokenResponse, + DeleteAuthorizationOAuthAppOptions, + DeleteAuthorizationGitHubAppOptions, + DeleteAuthorizationResponse, +} from "@octokit/oauth-methods"; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-node/index.js new file mode 100644 index 0000000..697bb0d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-node/index.js @@ -0,0 +1,281 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var oauthAuthorizationUrl = require('@octokit/oauth-authorization-url'); +var request = require('@octokit/request'); +var requestError = require('@octokit/request-error'); +var btoa = _interopDefault(require('btoa-lite')); + +const VERSION = "2.0.4"; + +function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +async function oauthRequest(request, route, parameters) { + const withOAuthParameters = { + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json" + }, + ...parameters + }; + const response = await request(route, withOAuthParameters); + if ("error" in response.data) { + const error = new requestError.RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { + request: request.endpoint.merge(route, withOAuthParameters), + headers: response.headers + }); + // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved + error.response = response; + throw error; + } + return response; +} + +function getWebFlowAuthorizationUrl({ + request: request$1 = request.request, + ...options +}) { + const baseUrl = requestToOAuthBaseUrl(request$1); + // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\_(ツ)_/¯ + return oauthAuthorizationUrl.oauthAuthorizationUrl({ + ...options, + baseUrl + }); +} + +async function exchangeWebFlowCode(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in), authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in); + } + delete authentication.scopes; + } + return { + ...response, + authentication + }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +async function createDeviceCode(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const parameters = { + client_id: options.clientId + }; + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + return oauthRequest(request$1, "POST /login/device/code", parameters); +} + +async function exchangeDeviceCode(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code" + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp$1(apiTimeInMs, response.data.expires_in), authentication.refreshTokenExpiresAt = toTimestamp$1(apiTimeInMs, response.data.refresh_token_expires_in); + } + delete authentication.scopes; + } + return { + ...response, + authentication + }; +} +function toTimestamp$1(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +async function checkToken(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await request$1("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { + ...response, + authentication + }; +} + +async function refreshToken(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken + }); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp$2(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp$2(apiTimeInMs, response.data.refresh_token_expires_in) + }; + return { + ...response, + authentication + }; +} +function toTimestamp$2(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +async function scopeToken(options) { + const { + request: optionsRequest, + clientType, + clientId, + clientSecret, + token, + ...requestOptions + } = options; + const request$1 = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await request$1("POST /applications/{client_id}/token/scoped", { + headers: { + authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}` + }, + client_id: clientId, + access_token: token, + ...requestOptions + }); + const authentication = Object.assign({ + clientType, + clientId, + clientSecret, + token: response.data.token + }, response.data.expires_at ? { + expiresAt: response.data.expires_at + } : {}); + return { + ...response, + authentication + }; +} + +async function resetToken(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + const response = await request$1("PATCH /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { + ...response, + authentication + }; +} + +async function deleteToken(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request$1("DELETE /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); +} + +async function deleteAuthorization(options) { + const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request$1("DELETE /applications/{client_id}/grant", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); +} + +exports.VERSION = VERSION; +exports.checkToken = checkToken; +exports.createDeviceCode = createDeviceCode; +exports.deleteAuthorization = deleteAuthorization; +exports.deleteToken = deleteToken; +exports.exchangeDeviceCode = exchangeDeviceCode; +exports.exchangeWebFlowCode = exchangeWebFlowCode; +exports.getWebFlowAuthorizationUrl = getWebFlowAuthorizationUrl; +exports.refreshToken = refreshToken; +exports.resetToken = resetToken; +exports.scopeToken = scopeToken; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-node/index.js.map new file mode 100644 index 0000000..2922653 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/utils.js","../dist-src/get-web-flow-authorization-url.js","../dist-src/exchange-web-flow-code.js","../dist-src/create-device-code.js","../dist-src/exchange-device-code.js","../dist-src/check-token.js","../dist-src/refresh-token.js","../dist-src/scope-token.js","../dist-src/reset-token.js","../dist-src/delete-token.js","../dist-src/delete-authorization.js"],"sourcesContent":["export const VERSION = \"2.0.4\";\n","import { RequestError } from \"@octokit/request-error\";\nexport function requestToOAuthBaseUrl(request) {\n const endpointDefaults = request.endpoint.DEFAULTS;\n return /^https:\\/\\/(api\\.)?github\\.com$/.test(endpointDefaults.baseUrl)\n ? \"https://github.com\"\n : endpointDefaults.baseUrl.replace(\"/api/v3\", \"\");\n}\nexport async function oauthRequest(request, route, parameters) {\n const withOAuthParameters = {\n baseUrl: requestToOAuthBaseUrl(request),\n headers: {\n accept: \"application/json\",\n },\n ...parameters,\n };\n const response = await request(route, withOAuthParameters);\n if (\"error\" in response.data) {\n const error = new RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, {\n request: request.endpoint.merge(route, withOAuthParameters),\n headers: response.headers,\n });\n // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved\n error.response = response;\n throw error;\n }\n return response;\n}\n","import { oauthAuthorizationUrl, } from \"@octokit/oauth-authorization-url\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { requestToOAuthBaseUrl } from \"./utils\";\nexport function getWebFlowAuthorizationUrl({ request = defaultRequest, ...options }) {\n const baseUrl = requestToOAuthBaseUrl(request);\n // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\\_(ツ)_/¯\n return oauthAuthorizationUrl({\n ...options,\n baseUrl,\n });\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function exchangeWebFlowCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n client_secret: options.clientSecret,\n code: options.code,\n redirect_uri: options.redirectUrl,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.access_token,\n scopes: response.data.scope.split(/\\s+/).filter(Boolean),\n };\n if (options.clientType === \"github-app\") {\n if (\"refresh_token\" in response.data) {\n const apiTimeInMs = new Date(response.headers.date).getTime();\n (authentication.refreshToken = response.data.refresh_token),\n (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)),\n (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in));\n }\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function createDeviceCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const parameters = {\n client_id: options.clientId,\n };\n if (\"scopes\" in options && Array.isArray(options.scopes)) {\n parameters.scope = options.scopes.join(\" \");\n }\n return oauthRequest(request, \"POST /login/device/code\", parameters);\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function exchangeDeviceCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n device_code: options.code,\n grant_type: \"urn:ietf:params:oauth:grant-type:device_code\",\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n token: response.data.access_token,\n scopes: response.data.scope.split(/\\s+/).filter(Boolean),\n };\n if (\"clientSecret\" in options) {\n authentication.clientSecret = options.clientSecret;\n }\n if (options.clientType === \"github-app\") {\n if (\"refresh_token\" in response.data) {\n const apiTimeInMs = new Date(response.headers.date).getTime();\n (authentication.refreshToken = response.data.refresh_token),\n (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)),\n (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in));\n }\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function checkToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await request(\"POST /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: options.token,\n scopes: response.data.scopes,\n };\n if (response.data.expires_at)\n authentication.expiresAt = response.data.expires_at;\n if (options.clientType === \"github-app\") {\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function refreshToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n client_secret: options.clientSecret,\n grant_type: \"refresh_token\",\n refresh_token: options.refreshToken,\n });\n const apiTimeInMs = new Date(response.headers.date).getTime();\n const authentication = {\n clientType: \"github-app\",\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.access_token,\n refreshToken: response.data.refresh_token,\n expiresAt: toTimestamp(apiTimeInMs, response.data.expires_in),\n refreshTokenExpiresAt: toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in),\n };\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function scopeToken(options) {\n const { request: optionsRequest, clientType, clientId, clientSecret, token, ...requestOptions } = options;\n const request = optionsRequest ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await request(\"POST /applications/{client_id}/token/scoped\", {\n headers: {\n authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`,\n },\n client_id: clientId,\n access_token: token,\n ...requestOptions,\n });\n const authentication = Object.assign({\n clientType,\n clientId,\n clientSecret,\n token: response.data.token,\n }, response.data.expires_at ? { expiresAt: response.data.expires_at } : {});\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function resetToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n const response = await request(\"PATCH /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.token,\n scopes: response.data.scopes,\n };\n if (response.data.expires_at)\n authentication.expiresAt = response.data.expires_at;\n if (options.clientType === \"github-app\") {\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function deleteToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n return request(\"DELETE /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function deleteAuthorization(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n return request(\"DELETE /applications/{client_id}/grant\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n}\n"],"names":["VERSION","requestToOAuthBaseUrl","request","endpointDefaults","endpoint","DEFAULTS","test","baseUrl","replace","oauthRequest","route","parameters","withOAuthParameters","headers","accept","response","data","error","RequestError","error_description","error_uri","merge","getWebFlowAuthorizationUrl","defaultRequest","options","oauthAuthorizationUrl","exchangeWebFlowCode","client_id","clientId","client_secret","clientSecret","code","redirect_uri","redirectUrl","authentication","clientType","token","access_token","scopes","scope","split","filter","Boolean","apiTimeInMs","Date","date","getTime","refreshToken","refresh_token","expiresAt","toTimestamp","expires_in","refreshTokenExpiresAt","refresh_token_expires_in","expirationInSeconds","toISOString","createDeviceCode","Array","isArray","join","exchangeDeviceCode","device_code","grant_type","checkToken","authorization","btoa","expires_at","scopeToken","optionsRequest","requestOptions","Object","assign","resetToken","auth","deleteToken","deleteAuthorization"],"mappings":";;;;;;;;;;;MAAaA,OAAO,GAAG;;ACChB,SAASC,qBAAqB,CAACC,OAAO,EAAE;EAC3C,MAAMC,gBAAgB,GAAGD,OAAO,CAACE,QAAQ,CAACC,QAAQ;EAClD,OAAO,iCAAiC,CAACC,IAAI,CAACH,gBAAgB,CAACI,OAAO,CAAC,GACjE,oBAAoB,GACpBJ,gBAAgB,CAACI,OAAO,CAACC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;AACzD;AACA,AAAO,eAAeC,YAAY,CAACP,OAAO,EAAEQ,KAAK,EAAEC,UAAU,EAAE;EAC3D,MAAMC,mBAAmB,GAAG;IACxBL,OAAO,EAAEN,qBAAqB,CAACC,OAAO,CAAC;IACvCW,OAAO,EAAE;MACLC,MAAM,EAAE;KACX;IACD,GAAGH;GACN;EACD,MAAMI,QAAQ,GAAG,MAAMb,OAAO,CAACQ,KAAK,EAAEE,mBAAmB,CAAC;EAC1D,IAAI,OAAO,IAAIG,QAAQ,CAACC,IAAI,EAAE;IAC1B,MAAMC,KAAK,GAAG,IAAIC,yBAAY,CAAE,GAAEH,QAAQ,CAACC,IAAI,CAACG,iBAAkB,KAAIJ,QAAQ,CAACC,IAAI,CAACC,KAAM,KAAIF,QAAQ,CAACC,IAAI,CAACI,SAAU,GAAE,EAAE,GAAG,EAAE;MAC3HlB,OAAO,EAAEA,OAAO,CAACE,QAAQ,CAACiB,KAAK,CAACX,KAAK,EAAEE,mBAAmB,CAAC;MAC3DC,OAAO,EAAEE,QAAQ,CAACF;KACrB,CAAC;;IAEFI,KAAK,CAACF,QAAQ,GAAGA,QAAQ;IACzB,MAAME,KAAK;;EAEf,OAAOF,QAAQ;AACnB;;ACvBO,SAASO,0BAA0B,CAAC;WAAEpB,SAAO,GAAGqB,eAAc;EAAE,GAAGC;AAAQ,CAAC,EAAE;EACjF,MAAMjB,OAAO,GAAGN,qBAAqB,CAACC,SAAO,CAAC;;EAE9C,OAAOuB,2CAAqB,CAAC;IACzB,GAAGD,OAAO;IACVjB;GACH,CAAC;AACN;;ACRO,eAAemB,mBAAmB,CAACF,OAAO,EAAE;EAC/C,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAO,EAAE,gCAAgC,EAAE;IAC3EyB,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BC,aAAa,EAAEL,OAAO,CAACM,YAAY;IACnCC,IAAI,EAAEP,OAAO,CAACO,IAAI;IAClBC,YAAY,EAAER,OAAO,CAACS;GACzB,CAAC;EACF,MAAMC,cAAc,GAAG;IACnBC,UAAU,EAAEX,OAAO,CAACW,UAAU;IAC9BP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BE,YAAY,EAAEN,OAAO,CAACM,YAAY;IAClCM,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACqB,YAAY;IACjCC,MAAM,EAAEvB,QAAQ,CAACC,IAAI,CAACuB,KAAK,CAACC,KAAK,CAAC,KAAK,CAAC,CAACC,MAAM,CAACC,OAAO;GAC1D;EACD,IAAIlB,OAAO,CAACW,UAAU,KAAK,YAAY,EAAE;IACrC,IAAI,eAAe,IAAIpB,QAAQ,CAACC,IAAI,EAAE;MAClC,MAAM2B,WAAW,GAAG,IAAIC,IAAI,CAAC7B,QAAQ,CAACF,OAAO,CAACgC,IAAI,CAAC,CAACC,OAAO,EAAE;MAC5DZ,cAAc,CAACa,YAAY,GAAGhC,QAAQ,CAACC,IAAI,CAACgC,aAAa,EACrDd,cAAc,CAACe,SAAS,GAAGC,WAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACmC,UAAU,CAAC,EAC7EjB,cAAc,CAACkB,qBAAqB,GAAGF,WAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACqC,wBAAwB,CAAE;;IAEjH,OAAOnB,cAAc,CAACI,MAAM;;EAEhC,OAAO;IAAE,GAAGvB,QAAQ;IAAEmB;GAAgB;AAC1C;AACA,SAASgB,WAAW,CAACP,WAAW,EAAEW,mBAAmB,EAAE;EACnD,OAAO,IAAIV,IAAI,CAACD,WAAW,GAAGW,mBAAmB,GAAG,IAAI,CAAC,CAACC,WAAW,EAAE;AAC3E;;AC9BO,eAAeC,gBAAgB,CAAChC,OAAO,EAAE;EAC5C,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMZ,UAAU,GAAG;IACfgB,SAAS,EAAEH,OAAO,CAACI;GACtB;EACD,IAAI,QAAQ,IAAIJ,OAAO,IAAIiC,KAAK,CAACC,OAAO,CAAClC,OAAO,CAACc,MAAM,CAAC,EAAE;IACtD3B,UAAU,CAAC4B,KAAK,GAAGf,OAAO,CAACc,MAAM,CAACqB,IAAI,CAAC,GAAG,CAAC;;EAE/C,OAAOlD,YAAY,CAACP,SAAO,EAAE,yBAAyB,EAAES,UAAU,CAAC;AACvE;;ACXO,eAAeiD,kBAAkB,CAACpC,OAAO,EAAE;EAC9C,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAO,EAAE,gCAAgC,EAAE;IAC3EyB,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BiC,WAAW,EAAErC,OAAO,CAACO,IAAI;IACzB+B,UAAU,EAAE;GACf,CAAC;EACF,MAAM5B,cAAc,GAAG;IACnBC,UAAU,EAAEX,OAAO,CAACW,UAAU;IAC9BP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BQ,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACqB,YAAY;IACjCC,MAAM,EAAEvB,QAAQ,CAACC,IAAI,CAACuB,KAAK,CAACC,KAAK,CAAC,KAAK,CAAC,CAACC,MAAM,CAACC,OAAO;GAC1D;EACD,IAAI,cAAc,IAAIlB,OAAO,EAAE;IAC3BU,cAAc,CAACJ,YAAY,GAAGN,OAAO,CAACM,YAAY;;EAEtD,IAAIN,OAAO,CAACW,UAAU,KAAK,YAAY,EAAE;IACrC,IAAI,eAAe,IAAIpB,QAAQ,CAACC,IAAI,EAAE;MAClC,MAAM2B,WAAW,GAAG,IAAIC,IAAI,CAAC7B,QAAQ,CAACF,OAAO,CAACgC,IAAI,CAAC,CAACC,OAAO,EAAE;MAC5DZ,cAAc,CAACa,YAAY,GAAGhC,QAAQ,CAACC,IAAI,CAACgC,aAAa,EACrDd,cAAc,CAACe,SAAS,GAAGC,aAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACmC,UAAU,CAAC,EAC7EjB,cAAc,CAACkB,qBAAqB,GAAGF,aAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACqC,wBAAwB,CAAE;;IAEjH,OAAOnB,cAAc,CAACI,MAAM;;EAEhC,OAAO;IAAE,GAAGvB,QAAQ;IAAEmB;GAAgB;AAC1C;AACA,SAASgB,aAAW,CAACP,WAAW,EAAEW,mBAAmB,EAAE;EACnD,OAAO,IAAIV,IAAI,CAACD,WAAW,GAAGW,mBAAmB,GAAG,IAAI,CAAC,CAACC,WAAW,EAAE;AAC3E;;AC/BO,eAAeQ,UAAU,CAACvC,OAAO,EAAE;EACtC,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMb,SAAO,CAAC,sCAAsC,EAAE;IACnEW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAAC,CAAE;KAC/E;IACDH,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BS,YAAY,EAAEb,OAAO,CAACY;GACzB,CAAC;EACF,MAAMF,cAAc,GAAG;IACnBC,UAAU,EAAEX,OAAO,CAACW,UAAU;IAC9BP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BE,YAAY,EAAEN,OAAO,CAACM,YAAY;IAClCM,KAAK,EAAEZ,OAAO,CAACY,KAAK;IACpBE,MAAM,EAAEvB,QAAQ,CAACC,IAAI,CAACsB;GACzB;EACD,IAAIvB,QAAQ,CAACC,IAAI,CAACkD,UAAU,EACxBhC,cAAc,CAACe,SAAS,GAAGlC,QAAQ,CAACC,IAAI,CAACkD,UAAU;EACvD,IAAI1C,OAAO,CAACW,UAAU,KAAK,YAAY,EAAE;IACrC,OAAOD,cAAc,CAACI,MAAM;;EAEhC,OAAO;IAAE,GAAGvB,QAAQ;IAAEmB;GAAgB;AAC1C;;ACxBO,eAAea,YAAY,CAACvB,OAAO,EAAE;EACxC,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAO,EAAE,gCAAgC,EAAE;IAC3EyB,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BC,aAAa,EAAEL,OAAO,CAACM,YAAY;IACnCgC,UAAU,EAAE,eAAe;IAC3Bd,aAAa,EAAExB,OAAO,CAACuB;GAC1B,CAAC;EACF,MAAMJ,WAAW,GAAG,IAAIC,IAAI,CAAC7B,QAAQ,CAACF,OAAO,CAACgC,IAAI,CAAC,CAACC,OAAO,EAAE;EAC7D,MAAMZ,cAAc,GAAG;IACnBC,UAAU,EAAE,YAAY;IACxBP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BE,YAAY,EAAEN,OAAO,CAACM,YAAY;IAClCM,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACqB,YAAY;IACjCU,YAAY,EAAEhC,QAAQ,CAACC,IAAI,CAACgC,aAAa;IACzCC,SAAS,EAAEC,aAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACmC,UAAU,CAAC;IAC7DC,qBAAqB,EAAEF,aAAW,CAACP,WAAW,EAAE5B,QAAQ,CAACC,IAAI,CAACqC,wBAAwB;GACzF;EACD,OAAO;IAAE,GAAGtC,QAAQ;IAAEmB;GAAgB;AAC1C;AACA,SAASgB,aAAW,CAACP,WAAW,EAAEW,mBAAmB,EAAE;EACnD,OAAO,IAAIV,IAAI,CAACD,WAAW,GAAGW,mBAAmB,GAAG,IAAI,CAAC,CAACC,WAAW,EAAE;AAC3E;;ACxBO,eAAeY,UAAU,CAAC3C,OAAO,EAAE;EACtC,MAAM;IAAEtB,OAAO,EAAEkE,cAAc;IAAEjC,UAAU;IAAEP,QAAQ;IAAEE,YAAY;IAAEM,KAAK;IAAE,GAAGiC;GAAgB,GAAG7C,OAAO;EACzG,MAAMtB,SAAO,GAAGkE,cAAc;EAE1B7C,eAAc;EAClB,MAAMR,QAAQ,GAAG,MAAMb,SAAO,CAAC,6CAA6C,EAAE;IAC1EW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAErC,QAAS,IAAGE,YAAa,EAAC,CAAE;KAC/D;IACDH,SAAS,EAAEC,QAAQ;IACnBS,YAAY,EAAED,KAAK;IACnB,GAAGiC;GACN,CAAC;EACF,MAAMnC,cAAc,GAAGoC,MAAM,CAACC,MAAM,CAAC;IACjCpC,UAAU;IACVP,QAAQ;IACRE,YAAY;IACZM,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACoB;GACxB,EAAErB,QAAQ,CAACC,IAAI,CAACkD,UAAU,GAAG;IAAEjB,SAAS,EAAElC,QAAQ,CAACC,IAAI,CAACkD;GAAY,GAAG,EAAE,CAAC;EAC3E,OAAO;IAAE,GAAGnD,QAAQ;IAAEmB;GAAgB;AAC1C;;ACpBO,eAAesC,UAAU,CAAChD,OAAO,EAAE;EACtC,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMkD,IAAI,GAAGR,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAAC,CAAC;EAChE,MAAMf,QAAQ,GAAG,MAAMb,SAAO,CAAC,uCAAuC,EAAE;IACpEW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQS,IAAK;KAChC;IACD9C,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BS,YAAY,EAAEb,OAAO,CAACY;GACzB,CAAC;EACF,MAAMF,cAAc,GAAG;IACnBC,UAAU,EAAEX,OAAO,CAACW,UAAU;IAC9BP,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;IAC1BE,YAAY,EAAEN,OAAO,CAACM,YAAY;IAClCM,KAAK,EAAErB,QAAQ,CAACC,IAAI,CAACoB,KAAK;IAC1BE,MAAM,EAAEvB,QAAQ,CAACC,IAAI,CAACsB;GACzB;EACD,IAAIvB,QAAQ,CAACC,IAAI,CAACkD,UAAU,EACxBhC,cAAc,CAACe,SAAS,GAAGlC,QAAQ,CAACC,IAAI,CAACkD,UAAU;EACvD,IAAI1C,OAAO,CAACW,UAAU,KAAK,YAAY,EAAE;IACrC,OAAOD,cAAc,CAACI,MAAM;;EAEhC,OAAO;IAAE,GAAGvB,QAAQ;IAAEmB;GAAgB;AAC1C;;ACzBO,eAAewC,WAAW,CAAClD,OAAO,EAAE;EACvC,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMkD,IAAI,GAAGR,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAAC,CAAC;EAChE,OAAO5B,SAAO,CAAC,wCAAwC,EAAE;IACrDW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQS,IAAK;KAChC;IACD9C,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BS,YAAY,EAAEb,OAAO,CAACY;GACzB,CAAC;AACN;;ACZO,eAAeuC,mBAAmB,CAACnD,OAAO,EAAE;EAC/C,MAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAO;EAE3BqB,eAAc;EAClB,MAAMkD,IAAI,GAAGR,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAAC,CAAC;EAChE,OAAO5B,SAAO,CAAC,wCAAwC,EAAE;IACrDW,OAAO,EAAE;MACLmD,aAAa,EAAG,SAAQS,IAAK;KAChC;IACD9C,SAAS,EAAEH,OAAO,CAACI,QAAQ;IAC3BS,YAAY,EAAEb,OAAO,CAACY;GACzB,CAAC;AACN;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/check-token.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/check-token.js new file mode 100644 index 0000000..1f65e94 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/check-token.js @@ -0,0 +1,27 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function checkToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await request("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}`, + }, + client_id: options.clientId, + access_token: options.token, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes, + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js new file mode 100644 index 0000000..bdb3b3d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js @@ -0,0 +1,14 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function createDeviceCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const parameters = { + client_id: options.clientId, + }; + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + return oauthRequest(request, "POST /login/device/code", parameters); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js new file mode 100644 index 0000000..ab5ce7d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js @@ -0,0 +1,15 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function deleteAuthorization(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request("DELETE /applications/{client_id}/grant", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/delete-token.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/delete-token.js new file mode 100644 index 0000000..e94ccb9 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/delete-token.js @@ -0,0 +1,15 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function deleteToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request("DELETE /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js new file mode 100644 index 0000000..8e54319 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js @@ -0,0 +1,34 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function exchangeDeviceCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code", + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean), + }; + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + (authentication.refreshToken = response.data.refresh_token), + (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)), + (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in)); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js new file mode 100644 index 0000000..412ad0f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js @@ -0,0 +1,33 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function exchangeWebFlowCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean), + }; + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + (authentication.refreshToken = response.data.refresh_token), + (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)), + (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in)); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js new file mode 100644 index 0000000..e742964 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js @@ -0,0 +1,11 @@ +import { oauthAuthorizationUrl, } from "@octokit/oauth-authorization-url"; +import { request as defaultRequest } from "@octokit/request"; +import { requestToOAuthBaseUrl } from "./utils"; +export function getWebFlowAuthorizationUrl({ request = defaultRequest, ...options }) { + const baseUrl = requestToOAuthBaseUrl(request); + // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\_(ツ)_/¯ + return oauthAuthorizationUrl({ + ...options, + baseUrl, + }); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/index.js new file mode 100644 index 0000000..1337e19 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/index.js @@ -0,0 +1,11 @@ +export { VERSION } from "./version"; +export * from "./get-web-flow-authorization-url"; +export * from "./exchange-web-flow-code"; +export * from "./create-device-code"; +export * from "./exchange-device-code"; +export * from "./check-token"; +export * from "./refresh-token"; +export * from "./scope-token"; +export * from "./reset-token"; +export * from "./delete-token"; +export * from "./delete-authorization"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js new file mode 100644 index 0000000..0ce9bf8 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js @@ -0,0 +1,27 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function refreshToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken, + }); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in), + }; + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/reset-token.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/reset-token.js new file mode 100644 index 0000000..3e87a10 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/reset-token.js @@ -0,0 +1,28 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function resetToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + const response = await request("PATCH /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes, + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/scope-token.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/scope-token.js new file mode 100644 index 0000000..608ab45 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/scope-token.js @@ -0,0 +1,23 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function scopeToken(options) { + const { request: optionsRequest, clientType, clientId, clientSecret, token, ...requestOptions } = options; + const request = optionsRequest || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await request("POST /applications/{client_id}/token/scoped", { + headers: { + authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`, + }, + client_id: clientId, + access_token: token, + ...requestOptions, + }); + const authentication = Object.assign({ + clientType, + clientId, + clientSecret, + token: response.data.token, + }, response.data.expires_at ? { expiresAt: response.data.expires_at } : {}); + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/types.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/utils.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/utils.js new file mode 100644 index 0000000..a2540b0 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/utils.js @@ -0,0 +1,27 @@ +import { RequestError } from "@octokit/request-error"; +export function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) + ? "https://github.com" + : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +export async function oauthRequest(request, route, parameters) { + const withOAuthParameters = { + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json", + }, + ...parameters, + }; + const response = await request(route, withOAuthParameters); + if ("error" in response.data) { + const error = new RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { + request: request.endpoint.merge(route, withOAuthParameters), + headers: response.headers, + }); + // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved + error.response = response; + throw error; + } + return response; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/version.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/version.js new file mode 100644 index 0000000..37f4545 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "2.0.4"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts new file mode 100644 index 0000000..234ec3c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts @@ -0,0 +1,24 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +export declare type CheckTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type CheckTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type CheckTokenOAuthAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & { + authentication: OAuthAppAuthentication; +}; +export declare type CheckTokenGitHubAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function checkToken(options: CheckTokenOAuthAppOptions): Promise; +export declare function checkToken(options: CheckTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts new file mode 100644 index 0000000..65c121e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts @@ -0,0 +1,20 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +export declare type CreateDeviceCodeOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + scopes?: string[]; + request?: RequestInterface; +}; +export declare type CreateDeviceCodeGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + request?: RequestInterface; +}; +export declare type CreateDeviceCodeDeviceTokenResponse = OctokitResponse<{ + device_code: string; + user_code: string; + verification_uri: string; + expires_in: number; + interval: number; +}>; +export declare function createDeviceCode(options: CreateDeviceCodeOAuthAppOptions | CreateDeviceCodeGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts new file mode 100644 index 0000000..fee77d1 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts @@ -0,0 +1,18 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +export declare type DeleteAuthorizationOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteAuthorizationGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteAuthorizationResponse = Endpoints["DELETE /applications/{client_id}/grant"]["response"]; +export declare function deleteAuthorization(options: DeleteAuthorizationOAuthAppOptions): Promise; +export declare function deleteAuthorization(options: DeleteAuthorizationGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts new file mode 100644 index 0000000..d777357 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts @@ -0,0 +1,18 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +export declare type DeleteTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteTokenResponse = Endpoints["DELETE /applications/{client_id}/token"]["response"]; +export declare function deleteToken(options: DeleteTokenOAuthAppOptions): Promise; +export declare function deleteToken(options: DeleteTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts new file mode 100644 index 0000000..3528761 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts @@ -0,0 +1,57 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret = { + clientType: "oauth-app"; + clientId: string; + code: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; + scopes?: string[]; +}; +export declare type ExchangeDeviceCodeOAuthAppOptions = ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret & { + clientSecret: string; +}; +export declare type ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret = { + clientType: "github-app"; + clientId: string; + code: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type ExchangeDeviceCodeGitHubAppOptions = ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret & { + clientSecret: string; +}; +declare type OAuthAppAuthenticationWithoutClientSecret = Omit; +declare type GitHubAppAuthenticationWithoutClientSecret = Omit; +declare type GitHubAppAuthenticationWithExpirationWithoutClientSecret = Omit; +export declare type ExchangeDeviceCodeOAuthAppResponse = OctokitResponse & { + authentication: OAuthAppAuthentication; +}; +export declare type ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret = OctokitResponse & { + authentication: OAuthAppAuthenticationWithoutClientSecret; +}; +export declare type ExchangeDeviceCodeGitHubAppResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken; +}; +export declare type ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret = OctokitResponse & { + authentication: GitHubAppAuthenticationWithoutClientSecret | GitHubAppAuthenticationWithExpirationWithoutClientSecret; +}; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeOAuthAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps without clientSecret + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps. `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeGitHubAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps without using `clientSecret`. `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret): Promise; +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts new file mode 100644 index 0000000..68b7c6d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts @@ -0,0 +1,32 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type ExchangeWebFlowCodeOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + code: string; + redirectUrl?: string; + request?: RequestInterface; +}; +export declare type ExchangeWebFlowCodeGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + code: string; + redirectUrl?: string; + request?: RequestInterface; +}; +export declare type ExchangeWebFlowCodeOAuthAppResponse = OctokitResponse & { + authentication: OAuthAppAuthentication; +}; +export declare type ExchangeWebFlowCodeGitHubAppResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken; +}; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps. + */ +export declare function exchangeWebFlowCode(options: ExchangeWebFlowCodeOAuthAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps. Note that `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeWebFlowCode(options: ExchangeWebFlowCodeGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts new file mode 100644 index 0000000..c721600 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts @@ -0,0 +1,25 @@ +import { OAuthAppResult, GitHubAppResult } from "@octokit/oauth-authorization-url"; +import { RequestInterface } from "@octokit/types"; +export declare type GetWebFlowAuthorizationUrlOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + allowSignup?: boolean; + login?: string; + scopes?: string | string[]; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type GetWebFlowAuthorizationUrlGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + allowSignup?: boolean; + login?: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type GetWebFlowAuthorizationUrlOAuthAppResult = OAuthAppResult; +export declare type GetWebFlowAuthorizationUrlGitHubAppResult = GitHubAppResult; +export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlOAuthAppOptions): OAuthAppResult; +export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlGitHubAppOptions): GitHubAppResult; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/index.d.ts new file mode 100644 index 0000000..0157ae2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/index.d.ts @@ -0,0 +1,12 @@ +export { VERSION } from "./version"; +export * from "./get-web-flow-authorization-url"; +export * from "./exchange-web-flow-code"; +export * from "./create-device-code"; +export * from "./exchange-device-code"; +export * from "./check-token"; +export * from "./refresh-token"; +export * from "./scope-token"; +export * from "./reset-token"; +export * from "./delete-token"; +export * from "./delete-authorization"; +export { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithRefreshToken, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts new file mode 100644 index 0000000..246e4f3 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts @@ -0,0 +1,13 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { GitHubAppAuthenticationWithRefreshToken, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type RefreshTokenOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + refreshToken: string; + request?: RequestInterface; +}; +export declare type RefreshTokenResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithRefreshToken; +}; +export declare function refreshToken(options: RefreshTokenOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts new file mode 100644 index 0000000..ca5402b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts @@ -0,0 +1,24 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +export declare type ResetTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type ResetTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type ResetTokenOAuthAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & { + authentication: OAuthAppAuthentication; +}; +export declare type ResetTokenGitHubAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function resetToken(options: ResetTokenOAuthAppOptions): Promise; +export declare function resetToken(options: ResetTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts new file mode 100644 index 0000000..d1cb95d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts @@ -0,0 +1,29 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +declare type CommonOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + permissions?: Endpoint["parameters"]["permissions"]; + request?: RequestInterface; +}; +declare type TargetOption = { + target: string; +}; +declare type TargetIdOption = { + target_id: number; +}; +declare type RepositoriesOption = { + repositories?: string[]; +}; +declare type RepositoryIdsOption = { + repository_ids?: number[]; +}; +declare type Endpoint = Endpoints["POST /applications/{client_id}/token/scoped"]; +export declare type ScopeTokenOptions = (CommonOptions & TargetOption & RepositoriesOption) | (CommonOptions & TargetIdOption & RepositoriesOption) | (CommonOptions & TargetOption & RepositoryIdsOption) | (CommonOptions & TargetIdOption & RepositoryIdsOption); +export declare type ScopeTokenResponse = Endpoint["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function scopeToken(options: ScopeTokenOptions): Promise; +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/types.d.ts new file mode 100644 index 0000000..afeffee --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/types.d.ts @@ -0,0 +1,58 @@ +export declare type OAuthAppAuthentication = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + scopes: string[]; +}; +export declare type GitHubAppAuthenticationWithExpirationDisabled = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; +}; +export declare type GitHubAppAuthenticationWithExpirationEnabled = GitHubAppAuthenticationWithExpirationDisabled & { + expiresAt: string; +}; +export declare type GitHubAppAuthenticationWithRefreshToken = GitHubAppAuthenticationWithExpirationEnabled & { + refreshToken: string; + refreshTokenExpiresAt: string; +}; +/** + * @deprecated Use `GitHubAppAuthenticationWithExpirationDisabled` or + * `GitHubAppAuthenticationWithExpirationEnabled` instead. + */ +export declare type GitHubAppAuthentication = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; +}; +/** + * @deprecated Use `GitHubAppAuthenticationWithRefreshToken` instead. + */ +export declare type GitHubAppAuthenticationWithExpiration = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + refreshToken: string; + expiresAt: string; + refreshTokenExpiresAt: string; +}; +export declare type OAuthAppCreateTokenResponseData = { + access_token: string; + scope: string; + token_type: "bearer"; +}; +export declare type GitHubAppCreateTokenResponseData = { + access_token: string; + token_type: "bearer"; +}; +export declare type GitHubAppCreateTokenWithExpirationResponseData = { + access_token: string; + token_type: "bearer"; + expires_in: number; + refresh_token: string; + refresh_token_expires_in: number; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts new file mode 100644 index 0000000..ac692f5 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts @@ -0,0 +1,3 @@ +import { RequestInterface } from "@octokit/types"; +export declare function requestToOAuthBaseUrl(request: RequestInterface): string; +export declare function oauthRequest(request: RequestInterface, route: string, parameters: Record): Promise>; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/version.d.ts new file mode 100644 index 0000000..3ffcc39 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.0.4"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 0000000..c61fbbe --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +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/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 0000000..9da833c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 0000000..3983580 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,20 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public" + }, + "version": "14.0.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "8.0.0" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..f4bd1f0 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,46693 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installations": { + /** + * You must use a [JWT](https://docs.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. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprise-installation/{enterprise_or_org}/server-statistics": { + /** + * Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + get: operations["enterprise-admin/get-server-statistics"]; + }; + "/enterprises/{enterprise}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-github-actions-permissions-enterprise"]; + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-github-actions-permissions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations": { + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise"]; + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/disable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-allowed-actions-enterprise"]; + /** + * Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-allowed-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-enterprise"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-group-from-enterprise"]; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + patch: operations["enterprise-admin/update-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise"]; + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": { + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-in-group-for-enterprise"]; + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-self-hosted-runners-in-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + put: operations["enterprise-admin/add-self-hosted-runner-to-group-for-enterprise"]; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners": { + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-runner-applications-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + post: operations["enterprise-admin/create-registration-token-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["enterprise-admin/create-remove-token-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-for-enterprise"]; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be a member of the enterprise, + * and you must use an access token with the `repo` scope or `security_events` scope. + */ + get: operations["code-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/settings/billing/advanced-security": { + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-billing-ghe"]; + }; + "/events": { + /** 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. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * 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. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** 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. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** 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. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + get: operations["activity/get-thread"]; + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/organizations/{organization_id}/custom_roles": { + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + get: operations["orgs/list-custom-roles"]; + }; + "/organizations/{org}/codespaces/secrets": { + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-org-secrets"]; + }; + "/organizations/{org}/codespaces/secrets/public-key": { + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/get-org-public-key"]; + }; + "/organizations/{org}/codespaces/secrets/{secret_name}": { + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * // Written with ❤️ by PSJ and free to use under The Unlicense. + * const sodium=require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with secret before running the script. + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key. + * + * //Check if libsodium is ready and then proceed. + * + * sodium.ready.then( ()=>{ + * + * // Convert Secret & Base64 key to Uint8Array. + * let binkey= sodium.from_base64(key, sodium.base64_variants.ORIGINAL) //Equivalent of Buffer.from(key, 'base64') + * let binsec= sodium.from_string(secret) // Equivalent of Buffer.from(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes= sodium.crypto_box_seal(binsec,binkey) // Similar to tweetsodium.seal(binsec,binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output=sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) //Equivalent of Buffer.from(encBytes).toString('base64') + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/delete-org-secret"]; + }; + "/organizations/{org}/codespaces/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/set-selected-repos-for-org-secret"]; + }; + "/organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}": { + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/custom_roles": { + /** + * **Note**: This operation is in beta and is subject to change. + * + * Creates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + post: operations["orgs/create-custom-role"]; + }; + "/orgs/{org}/custom_roles/{role_id}": { + /** + * **Note**: This operation is in beta and is subject to change. + * + * Deletes a custom role from an organization. Once the custom role has been deleted, any + * user, team, or invitation with the deleted custom role will be reassigned the inherited role. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + delete: operations["orgs/delete-custom-role"]; + /** + * **Note**: This operation is in beta and subject to change. + * + * Updates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + patch: operations["orgs/update-custom-role"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/fine_grained_permissions": { + /** + * **Note**: This operation is in beta and subject to change. + * + * Lists the fine-grained permissions available for an organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + */ + get: operations["orgs/list-fine-grained-permissions"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** 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`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** 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. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** 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. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/memberships/{username}": { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations["orgs/get-membership-for-user"]; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * 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. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** 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. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/public_members": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** Lists repositories for the specified organization. */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/security-managers": { + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + get: operations["orgs/list-security-manager-teams"]; + }; + "/orgs/{org}/security-managers/teams/{team_slug}": { + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + put: operations["orgs/add-security-manager-team"]; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + delete: operations["orgs/remove-security-manager-team"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/advanced-security": { + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * 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://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/orgs/{org}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** 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: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** 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. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** 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. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** 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. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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: operations["rate-limit/get"]; + }; + "/repos/{owner}/{repo}": { + /** 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: operations["repos/get"]; + /** + * 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, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * 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. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-pull-request-review-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-status-checks-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-all-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations["repos/set-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations["repos/add-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **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: operations["checks/get"]; + /** + * **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. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** 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. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **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. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + get: operations["code-scanning/get-alert"]; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases": { + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/list-codeql-databases"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": { + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/check-collaborator"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + put: operations["repos/add-collaborator"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * 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. + * + * + * 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` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * 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`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * Returns all community profile metrics for a repository. The repository must be public, and cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + get: operations["repos/get-content"]; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * 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. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/get-alert"]; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + patch: operations["dependabot/update-alert"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + get: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * 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. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations["repos/create-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": { + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** 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. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + get: operations["repos/list-webhooks"]; + /** + * 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. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * 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` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * 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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** 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://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** 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. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + put: operations["repos/enable-lfs-for-repo"]; + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** List all notifications for the current user. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + put: operations["repos/update-information-about-pages-site"]; + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + post: operations["repos/create-pages-site"]; + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * 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. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployment": { + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + post: operations["repos/create-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/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. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["pulls/list"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + get: operations["pulls/list-requested-reviewers"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["pulls/request-reviewers"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * 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. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * 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. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. 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. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** 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. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** 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. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** 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://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **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. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * 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. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/ssh_signing_keys": { + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/list-ssh-signing-keys-for-authenticated-user"]; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + post: operations["users/create-ssh-signing-key-for-authenticated-user"]; + }; + "/user/ssh_signing_keys/{ssh_signing_key_id}": { + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/get-ssh-signing-key-for-authenticated-user"]; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + delete: operations["users/delete-ssh-signing-key-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** 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. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/ssh_signing_keys": { + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + get: operations["users/list-ssh-signing-keys-for-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description Simple User + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description Simple User + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise account + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # 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 [EMAIL]. 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/ + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + /** + * Server Statistics Proxy Endpoint + * @description Response of S4 Proxy endpoint that provides GHES statistics + */ + "server-statistics": { + server_id?: string; + collection_date?: string; + schema_version?: string; + ghes_version?: string; + host_name?: string; + github_connect?: { + features_enabled?: string[]; + }; + ghe_stats?: { + comments?: { + total_commit_comments?: number; + total_gist_comments?: number; + total_issue_comments?: number; + total_pull_request_comments?: number; + }; + gists?: { + total_gists?: number; + private_gists?: number; + public_gists?: number; + }; + hooks?: { + total_hooks?: number; + active_hooks?: number; + inactive_hooks?: number; + }; + issues?: { + total_issues?: number; + open_issues?: number; + closed_issues?: number; + }; + milestones?: { + total_milestones?: number; + open_milestones?: number; + closed_milestones?: number; + }; + orgs?: { + total_orgs?: number; + disabled_orgs?: number; + total_teams?: number; + total_team_members?: number; + }; + pages?: { + total_pages?: number; + }; + pulls?: { + total_pulls?: number; + merged_pulls?: number; + mergeable_pulls?: number; + unmergeable_pulls?: number; + }; + repos?: { + total_repos?: number; + root_repos?: number; + fork_repos?: number; + org_repos?: number; + total_pushes?: number; + total_wikis?: number; + }; + users?: { + total_users?: number; + admin_users?: number; + suspended_users?: number; + }; + }; + dormant_users?: { + total_dormant_users?: number; + dormancy_threshold?: string; + }; + }[]; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-organizations": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-enterprise-permissions": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + /** @description The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. */ + selected_organizations_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + /** + * Organization Simple + * @description Organization Simple + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** @description The security alert number. */ + "alert-number": number; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "alert-instances-url": string; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-alert-fixed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-alert-dismissed-at": string | null; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | ("source" | "generated" | "test" | "library") + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + /** + * Simple Repository + * @description Simple Repository + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + "advanced-security-active-committers-user": { + user_login: string; + /** @example 2021-11-03 */ + last_pushed_date: string; + }; + "advanced-security-active-committers-repository": { + /** @example octocat/Hello-World */ + name: string; + /** @example 25 */ + advanced_security_committers: number; + advanced_security_committers_breakdown: components["schemas"]["advanced-security-active-committers-user"][]; + }; + "advanced-security-active-committers": { + /** @example 25 */ + total_advanced_security_committers?: number; + /** @example 2 */ + total_count?: number; + repositories: components["schemas"]["advanced-security-active-committers-repository"][]; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + 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?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * 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. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** @example flat-rate */ + price_model: string; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + /** + * Repository + * @description A git repository + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Custom Repository Role + * @description Custom repository roles created by organization administrators + */ + "organization-custom-repository-role": { + /** @description The unique identifier of the custom role. */ + id: number; + /** @description The name of the custom role. */ + name: string; + /** @description A short description about who this role is for or what permissions it grants. */ + description?: string | null; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role?: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. */ + permissions?: string[]; + organization?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** + * @description Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + * this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + * to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + /** + * @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. + * @example you've used 100% of your spending limit for Codespaces + */ + last_known_stop_notice?: string | null; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + }; + /** + * Organization Fine-Grained Permission + * @description Fine-grained permissions available for the organization + */ + "organization-fine-grained-permission": { + name: string; + description: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Team Organization + * @description Team Organization + */ + "team-organization": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @example true */ + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. `none` means access is only possible from workflows in this repository. + * @enum {string} + */ + access_level: "none" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description Simple Commit + */ + "nullable-simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title: string; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: { [key: string]: unknown } | string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + * @example true + */ + is_alphanumeric: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + 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; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description Simple Commit + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @example completed + * @enum {string|null} + */ + status: ("queued" | "in_progress" | "completed") | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** + * CodeQL Database + * @description A CodeQL database. + */ + "code-scanning-codeql-database": { + /** @description The ID of the CodeQL database. */ + id: number; + /** @description The name of the CodeQL database. */ + name: string; + /** @description The language of the CodeQL database. */ + language: string; + uploader: components["schemas"]["simple-user"]; + /** @description The MIME type of the CodeQL database file. */ + content_type: string; + /** @description The size of the CodeQL database file in bytes. */ + size: number; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * Format: uri + * @description The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + */ + url: string; + }; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string | null; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string | null; + target_url: string | null; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + } & { + content: unknown; + encoding: unknown; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + /** @enum {string} */ + type: "dir" | "file" | "submodule" | "symlink"; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + /** @enum {string} */ + type: "file"; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + /** @enum {string} */ + type: "symlink"; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Submodule Content + * @description An object describing a submodule + */ + "content-submodule": { + /** @enum {string} */ + type: "submodule"; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** + * @description The scope of the vulnerable dependency. + * @enum {string|null} + */ + "dependabot-alert-scope": ("development" | "runtime") | null; + /** + * @description State of a Dependabot alert. + * @enum {string} + */ + "dependabot-alert-state": "dismissed" | "fixed" | "open"; + /** @description The details of the vulnerable package. */ + "dependabot-alert-package": { + ecosystem?: string; + name?: string; + }; + "dependabot-alert-dependency": { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The path to the manifest filename. */ + manifest_path?: string; + scope?: components["schemas"]["dependabot-alert-scope"]; + }; + /** @description The details of the security advisory, including summary, description, and severity. */ + "dependabot-alert-security-advisory": { + ghsa_id: string; + cve_id?: string | null; + summary: string; + description: string; + /** @enum {string} */ + severity: "low" | "medium" | "high" | "critical"; + identifiers: { + /** @enum {string} */ + type: "GHSA" | "CVE"; + value: string; + }[]; + references: { + /** Format: uri */ + url: string; + }[]; + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + /** Format: date-time */ + published_at: string; + /** Format: date-time */ + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + /** Format: date-time */ + withdrawn_at: string | null; + }; + /** @description The details of the vulnerability of a security advisory. */ + "dependabot-alert-security-vulnerability": { + package?: components["schemas"]["dependabot-alert-package"]; + severity?: string; + vulnerable_version_range?: string; + first_patched_version?: { + identifier?: string; + }; + }; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "dependabot-alert-dismissed_at": string | null; + /** + * @description **Required when the `state` is `dismissed`.** The reason for dismissing the Dependabot alert. + * @enum {string|null} + */ + "dependabot-alert-dismissed-reason": + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. The maximum size is 280 characters. */ + "dependabot-alert-dismissed-comment": string | null; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "dependabot-alert-fixed-at": string | null; + "dependabot-alert": { + number: components["schemas"]["alert-number"]; + state: components["schemas"]["dependabot-alert-state"]; + dependency: components["schemas"]["dependabot-alert-dependency"]; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + dismissed_at: components["schemas"]["dependabot-alert-dismissed_at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_reason: components["schemas"]["dependabot-alert-dismissed-reason"]; + dismissed_comment: components["schemas"]["dependabot-alert-dismissed-comment"]; + fixed_at: components["schemas"]["dependabot-alert-fixed-at"]; + }; + /** + * @description Sets the status of the dependabot alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "dependabot-alert-set-state": "dismissed" | "open"; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + /** + * @description Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + * @enum {string} + */ + scope: "unknown" | "runtime" | "development"; + }[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: Partial & Partial & Partial; + }; + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { [key: string]: components["schemas"]["dependency"] }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. */ + manifests?: { [key: string]: components["schemas"]["manifest"] }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy-settings": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + protection_rules?: (Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + }>)[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + "deployment-branch-policy": { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number; + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string; + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: { + /** @example "foo@bar.com" */ + email?: string; + /** @example "foo" */ + password?: string; + /** @example "roomer" */ + room?: string; + /** @example "foo" */ + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + /** @example "sha256" */ + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + /** @example "abc" */ + token?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** @example 1 */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + added_by?: string | null; + last_used?: string | null; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + * @example https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + * @example hello-world.github.io + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + * @example monalisa-1231a2312sa32-23sda74.drafts.github.io + */ + preview_url?: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + web_commit_signoff_required?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + /** @description Sets an optional comment when closing an alert. Must be null when changing `state` to `open`. */ + "secret-scanning-alert-resolution-comment": string | null; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: "commit"; + details: components["schemas"]["secret-scanning-location-commit"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * SSH Signing Key + * @description A public SSH key used to sign Git commits + */ + "ssh-signing-key": { + key: string; + id: number; + title: string; + /** Format: date-time */ + created_at: string; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + /** + * Simple Installation + * @description Simple Installation + */ + "simple-installation": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + /** + * @description The global node ID of the installation. + * @example MDQ6VXNlcjU4MzIzMQ== + */ + node_id: string; + }; + "webhook-merge-group-checks-requested": { + action: string; + installation?: components["schemas"]["simple-installation"]; + merge_group: { + base_ref: string; + head_ref: string; + head_sha: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** A header with no content is returned. */ + no_content: unknown; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "per-page": number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string; + "delivery-id": number; + /** @description Page number of the results to fetch. */ + page: number; + /** @description 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; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The slug version of the enterprise name or the login of an organization. */ + "enterprise-or-org": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name": components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid": components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + "pagination-after": string; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type": string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution": string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort": "created" | "updated"; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** @description 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; + /** @description The unique identifier of the pull request thread. */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The unique identifier of the role. */ + "role-id": number; + /** @description The unique identifier of the hook. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** @description The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": + | "dependency_graph" + | "dependabot_alerts" + | "dependabot_security_updates" + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + "org-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref": components["schemas"]["code-scanning-ref"]; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key": string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort": + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + "workflow-run-status": + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests": boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id": number; + /** @description Only returns workflow runs that are associated with the specified `head_sha`. */ + "workflow-run-head-sha": string; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name": string; + /** @description Returns check runs with the specified `status`. */ + status: "queued" | "in_progress" | "completed"; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + "dependabot-alert-state": string; + /** + * @description A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + "dependabot-alert-severity": string; + /** + * @description A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `rubygems`, `rust` + */ + "dependabot-alert-ecosystem": string; + /** @description A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + "dependabot-alert-package": string; + /** @description A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + "dependabot-alert-manifest": string; + /** @description Scope of the dependency on a Dependabot alert. */ + "dependabot-alert-scope": components["schemas"]["dependabot-alert-scope"]; + /** + * @description The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + "dependabot-alert-sort": "created" | "updated"; + /** @description The number that identifies a Dependabot alert in its repository. You can find this at the end of the URL for a Dependabot alert within GitHub, or in `number` fields in the response from the `GET /repos/{owner}/{repo}/dependabot/alerts` operation. */ + "dependabot-alert-number": components["schemas"]["alert-number"]; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path": string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per: "" | "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** @description 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"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query": number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + /** @description The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.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. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + "enterprise-admin/get-server-statistics": { + parameters: { + path: { + /** The slug version of the enterprise name or the login of an organization. */ + enterprise_or_org: components["parameters"]["enterprise-or-org"]; + }; + query: { + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + date_start?: string; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + date_end?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["server-statistics"]; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "actions/get-actions-cache-usage-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-github-actions-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-enterprise-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-github-actions-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/disable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-allowed-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-allowed-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + "actions/get-github-actions-default-workflow-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Success response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + "actions/set-github-actions-default-workflow-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Success response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-group-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/update-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name?: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runners-in-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-self-hosted-runners-in-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + "enterprise-admin/add-self-hosted-runner-to-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runners-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count?: number; + runners?: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-runner-applications-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + "enterprise-admin/create-registration-token-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "enterprise-admin/create-remove-token-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be a member of the enterprise, + * and you must use an access token with the `repo` scope or `security_events` scope. + */ + "code-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + "billing/get-github-advanced-security-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + /** 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. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + "gists/list-public": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names of files to be updated + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** 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. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 50). */ + per_page?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + "orgs/list-custom-roles": { + parameters: { + path: { + /** The unique identifier of the organization. */ + organization_id: string; + }; + }; + responses: { + /** Response - list of custom role names */ + 200: { + content: { + "application/json": { + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number; + custom_roles?: components["schemas"]["organization-custom-repository-role"][]; + }; + }; + }; + }; + }; + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-org-secret"][]; + }; + }; + }; + }; + }; + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * // Written with ❤️ by PSJ and free to use under The Unlicense. + * const sodium=require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with secret before running the script. + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key. + * + * //Check if libsodium is ready and then proceed. + * + * sodium.ready.then( ()=>{ + * + * // Convert Secret & Base64 key to Uint8Array. + * let binkey= sodium.from_base64(key, sodium.base64_variants.ORIGINAL) //Equivalent of Buffer.from(key, 'base64') + * let binsec= sodium.from_string(secret) // Equivalent of Buffer.from(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes= sodium.crypto_box_seal(binsec,binkey) // Similar to tweetsodium.seal(binsec,binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output=sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) //Equivalent of Buffer.from(encBytes).toString('base64') + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description The ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean; + /** @example "http://github.blog" */ + blog?: string; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot alerts is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot security updates is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * **Note**: This operation is in beta and is subject to change. + * + * Creates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + "orgs/create-custom-role": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-custom-repository-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the custom role. */ + name: string; + /** @description A short description about the intended usage of this role or what permissions it grants. */ + description?: string; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. */ + permissions: string[]; + }; + }; + }; + }; + /** + * **Note**: This operation is in beta and is subject to change. + * + * Deletes a custom role from an organization. Once the custom role has been deleted, any + * user, team, or invitation with the deleted custom role will be reassigned the inherited role. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + "orgs/delete-custom-role": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the role. */ + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Note**: This operation is in beta and subject to change. + * + * Updates a custom repository role that can be used by all repositories owned by the organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope. + * GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint. + * + * For more information about custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + */ + "orgs/update-custom-role": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the role. */ + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-custom-repository-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the custom role. */ + name?: string; + /** @description A short description about who this role is for or what permissions it grants. */ + description?: string; + /** + * @description The system role from which this role inherits permissions. + * @enum {string} + */ + base_role?: "read" | "triage" | "write" | "maintain"; + /** @description A list of additional permissions included in this role. If specified, these permissions will replace any currently set on the role. */ + permissions?: string[]; + }; + }; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: This operation is in beta and subject to change. + * + * Lists the fine-grained permissions available for an organization. + * + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + */ + "orgs/list-fine-grained-permissions": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-fine-grained-permission"][]; + }; + }; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * \* `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** 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. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * 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. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `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. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/en/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists repositories for the specified organization. */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + type?: + | "all" + | "public" + | "private" + | "forks" + | "sources" + | "member" + | "internal"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description 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; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description 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; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.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; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + "orgs/list-security-manager-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-simple"][]; + }; + }; + }; + }; + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/add-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** The organization has reached the maximum number of security manager teams. */ + 409: unknown; + }; + }; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/remove-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + "billing/get-github-advanced-security-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description 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` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + */ + permission?: string; + }; + }; + }; + }; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "orgs/enable-or-disable-security-product-on-all-org-repos": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + enablement: components["parameters"]["org-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** 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. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** 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. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/list-columns": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.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. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description 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; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description 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; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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://docs.github.com/rest/reference/checks#output-object) description. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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://docs.github.com/rest/reference/checks#output-object-1) description. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** 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. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. */ + sort?: "created"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/list-codeql-databases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/get-codeql-database": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The language of the CodeQL database. */ + language: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis 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; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + */ + permission?: string; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ + 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 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?: components["parameters"]["since"]; + /** 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; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * **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. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * + * 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` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * Returns all community profile metrics for a repository. The repository must be public, and cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * 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. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-state"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-severity"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-ecosystem"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-package"]; + /** A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + manifest?: components["parameters"]["dependabot-alert-manifest"]; + /** Scope of the dependency on a Dependabot alert. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies a Dependabot alert in its repository. You can find this at the end of the URL for a Dependabot alert within GitHub, or in `number` fields in the response from the `GET /repos/{owner}/{repo}/dependabot/alerts` operation. */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + "dependabot/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies a Dependabot alert in its repository. You can find this at the end of the URL for a Dependabot alert within GitHub, or in `number` fields in the response from the `GET /repos/{owner}/{repo}/dependabot/alerts` operation. */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["dependabot-alert-set-state"]; + dismissed_reason?: components["schemas"]["dependabot-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["dependabot-alert-dismissed-comment"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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 | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/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[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description 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`. + * @default + */ + target_url?: string; + /** + * @description 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: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description 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` */ + auto_inactive?: boolean; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/list-deployment-branch-policies": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number; + branch_policies: components["schemas"]["deployment-branch-policy"][]; + }; + }; + }; + }; + }; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** Response if the same branch name pattern already exists */ + 303: never; + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/update-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/delete-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + /** @description When forking from an existing repository, fork with only the default branch. */ + default_branch_only?: boolean; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description 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[]; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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; + }; + }; + }; + }; + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description 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. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. 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. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + }; + /** + * List issues in a repository. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. */ + 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?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description 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 | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "not_planned" | "reopened") | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. 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. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. 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. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description 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://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** List all notifications for the current user. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean; + /** + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * 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. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + "repos/create-pages-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-deployment"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + artifact_url: string; + /** + * @description The target environment for this GitHub Pages deployment. + * @default github-pages + */ + environment?: string; + /** + * @description A unique string that represents the version of the build for this deployment. + * @default GITHUB_SHA + */ + pages_build_version: string; + /** @description The OIDC token issued by GitHub Actions certifying the origin of the deployment. */ + oidc_token: string; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** 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. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description 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; + /** @description 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; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description 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; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description 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; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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 above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description 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://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description 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; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; + }; + }; + }; + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description 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. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * 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. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Bad request, resolution comment is invalid or the resolution was not changed. */ + 400: unknown; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution or resolution comment */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + resolution_comment?: components["schemas"]["secret-scanning-alert-resolution-comment"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description 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 | null; + /** @description A short description of the status. */ + description?: string | null; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + }; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. 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. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** 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. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + "search/code": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + "search/topics": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on 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. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **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. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } + | { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }; + }; + }; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creaing a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @example [] + */ + emails: string[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + 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; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** @description 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; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/list-ssh-signing-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/create-ssh-signing-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ + key: string; + }; + }; + }; + }; + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/get-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/delete-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + "users/list-ssh-signing-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..774b76a --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "8.2.1"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..83a6ec5 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "8.2.1"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..1217c90 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "8.2.1"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..72ec59e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3499 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /organizations/{org}/codespaces/secrets/{secret_name}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-a-custom-role + */ + "DELETE /orgs/{org}/custom_roles/{role_id}": Operation<"/orgs/{org}/custom_roles/{role_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#get-github-enterprise-server-statistics + */ + "GET /enterprise-installation/{enterprise_or_org}/server-statistics": Operation<"/enterprise-installation/{enterprise_or_org}/server-statistics", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/cache/usage": Operation<"/enterprises/{enterprise}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions": Operation<"/enterprises/{enterprise}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/organizations": Operation<"/enterprises/{enterprise}/actions/permissions/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/selected-actions": Operation<"/enterprises/{enterprise}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/workflow": Operation<"/enterprises/{enterprise}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners": Operation<"/enterprises/{enterprise}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/downloads": Operation<"/enterprises/{enterprise}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code-scanning/alerts": Operation<"/enterprises/{enterprise}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise + */ + "GET /enterprises/{enterprise}/settings/billing/advanced-security": Operation<"/enterprises/{enterprise}/settings/billing/advanced-security", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-custom-repository-roles-in-an-organization + */ + "GET /organizations/{organization_id}/custom_roles": Operation<"/organizations/{organization_id}/custom_roles", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /organizations/{org}/codespaces/secrets": Operation<"/organizations/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /organizations/{org}/codespaces/secrets/public-key": Operation<"/organizations/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /organizations/{org}/codespaces/secrets/{secret_name}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /organizations/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-fine-grained-permissions-for-an-organization + */ + "GET /orgs/{org}/fine_grained_permissions": Operation<"/orgs/{org}/fine_grained_permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization + */ + "GET /orgs/{org}/settings/billing/advanced-security": Operation<"/orgs/{org}/settings/billing/advanced-security", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs/#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-custom-role + */ + "PATCH /orgs/{org}/custom_roles/{role_id}": Operation<"/orgs/{org}/custom_roles/{role_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos/#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues/#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/registration-token": Operation<"/enterprises/{enterprise}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/remove-token": Operation<"/enterprises/{enterprise}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-a-custom-role + */ + "POST /orgs/{org}/custom_roles": Operation<"/orgs/{org}/custom_roles", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions": Operation<"/enterprises/{enterprise}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-organizations-enabled-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations": Operation<"/enterprises/{enterprise}/actions/permissions/organizations", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/selected-actions": Operation<"/enterprises/{enterprise}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/workflow": Operation<"/enterprises/{enterprise}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /organizations/{org}/codespaces/secrets/{secret_name}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /organizations/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/organizations/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..2f1a3d5 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "8.2.1"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..c20f3ab --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "8.2.1", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "8.0.1" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^14.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/package.json new file mode 100644 index 0000000..3c7a353 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/oauth-methods/package.json @@ -0,0 +1,53 @@ +{ + "name": "@octokit/oauth-methods", + "description": "Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps", + "version": "2.0.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "oauth" + ], + "repository": "https://github.com/octokit/oauth-methods.js", + "dependencies": { + "@octokit/oauth-authorization-url": "^5.0.0", + "@octokit/request": "^6.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^8.0.0", + "btoa-lite": "^1.0.0" + }, + "peerDependencies": {}, + "devDependencies": { + "@octokit/tsconfig": "^1.0.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.2", + "@pika/plugin-ts-standard-pkg": "^0.9.2", + "@types/btoa-lite": "^1.0.0", + "@types/jest": "^29.0.0", + "@types/node": "^16.0.0", + "fetch-mock": "^9.11.0", + "jest": "^29.0.0", + "prettier": "2.7.1", + "semantic-release": "^19.0.0", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^29.0.0", + "typescript": "^4.2.3" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js" +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 0000000..c61fbbe --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +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/auth-oauth-device/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 0000000..9da833c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 0000000..26eae6a --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,20 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public" + }, + "version": "16.0.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "10.0.0" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..806b5bc --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,118413 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installations": { + /** + * You must use a [JWT](https://docs.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. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/code_security_and_analysis": { + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + get: operations["secret-scanning/get-security-analysis-settings-for-enterprise"]; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + patch: operations["secret-scanning/patch-security-analysis-settings-for-enterprise"]; + }; + "/enterprises/{enterprise}/dependabot/alerts": { + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["dependabot/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + post: operations["secret-scanning/post-security-product-enablement-for-enterprise"]; + }; + "/events": { + /** 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. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * 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. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** 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. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + /** Gets information about a notification thread. */ + get: operations["activity/get-thread"]; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/orgs/{org}": { + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + get: operations["oidc/get-oidc-custom-sub-template-for-org"]; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + put: operations["oidc/update-oidc-custom-sub-template-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/required_workflows": { + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflows"]; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + post: operations["actions/create-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}": { + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/get-required-workflow"]; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/delete-required-workflow"]; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + patch: operations["actions/update-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": { + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-selected-repositories-required-workflow"]; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/set-selected-repos-to-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": { + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/add-selected-repo-to-required-workflow"]; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/remove-selected-repo-from-required-workflow"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/actions/variables": { + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-org-variables"]; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + post: operations["actions/create-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}": { + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/get-org-variable"]; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + delete: operations["actions/delete-org-variable"]; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + patch: operations["actions/update-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories": { + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-variable"]; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories/{repository_id}": { + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-variable"]; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-variable"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/codespaces/billing": { + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["codespaces/set-codespaces-billing"]; + }; + "/orgs/{org}/codespaces/secrets": { + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-org-secrets"]; + }; + "/orgs/{org}/codespaces/secrets/public-key": { + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/get-org-public-key"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}": { + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/delete-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/dependabot/alerts": { + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-org"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** 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`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** 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. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** 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. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces": { + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-codespaces-for-user-in-org"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/memberships/{username}": { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations["orgs/get-membership-for-user"]; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * 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. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** 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. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/public_members": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/security-managers": { + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + get: operations["orgs/list-security-manager-teams"]; + }; + "/orgs/{org}/security-managers/teams/{team_slug}": { + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + put: operations["orgs/add-security-manager-team"]; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + delete: operations["orgs/remove-security-manager-team"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/orgs/{org}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** 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: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** 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. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** 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. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** 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. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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: operations["rate-limit/get"]; + }; + "/repos/{org}/{repo}/actions/required_workflows": { + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/list-repo-required-workflows"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": { + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/get-repo-required-workflow"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": { + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-repo-required-workflow-usage"]; + }; + "/repos/{owner}/{repo}": { + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/get"]; + /** + * 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, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + get: operations["actions/get-custom-oidc-sub-claim-for-repo"]; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/set-custom-oidc-sub-claim-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": { + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/variables": { + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/list-repo-variables"]; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + post: operations["actions/create-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/variables/{name}": { + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/get-repo-variable"]; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-repo-variable"]; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * 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. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-pull-request-review-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-status-checks-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-all-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations["repos/set-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations["repos/add-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **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: operations["checks/get"]; + /** + * **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. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** 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. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **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. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-alert"]; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases": { + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/list-codeql-databases"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": { + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/check-collaborator"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + put: operations["repos/add-collaborator"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * 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. + * + * + * 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` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * 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`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + get: operations["repos/get-content"]; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * 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 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. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/get-alert"]; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + patch: operations["dependabot/update-alert"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + get: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * 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. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations["repos/create-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": { + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** 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. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + get: operations["repos/list-webhooks"]; + /** + * 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. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * 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` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * 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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** 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://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": { + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations["issues/check-user-can-be-assigned-to-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** 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. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + put: operations["repos/enable-lfs-for-repo"]; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** Lists all notifications for the current user in the specified repository. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + put: operations["repos/update-information-about-pages-site"]; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + post: operations["repos/create-pages-site"]; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * 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. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployment": { + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + post: operations["repos/create-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/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. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["pulls/list"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + get: operations["pulls/list-requested-reviewers"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["pulls/request-reviewers"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * 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. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * 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. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** 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. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** 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. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** 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://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables": { + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/list-environment-variables"]; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + post: operations["actions/create-environment-variable"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables/{name}": { + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/get-environment-variable"]; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-environment-variable"]; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-environment-variable"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **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. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/publish": { + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/publish-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * 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. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/ssh_signing_keys": { + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/list-ssh-signing-keys-for-authenticated-user"]; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + post: operations["users/create-ssh-signing-key-for-authenticated-user"]; + }; + "/user/ssh_signing_keys/{ssh_signing_key_id}": { + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/get-ssh-signing-key-for-authenticated-user"]; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + delete: operations["users/delete-ssh-signing-key-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** 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. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/ssh_signing_keys": { + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + get: operations["users/list-ssh-signing-keys-for-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/versions": { + /** Get all supported GitHub API versions. */ + get: operations["meta/get-all-versions"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description A GitHub user. + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description A GitHub user. + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise on GitHub. + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for a repository. + * @enum {string} + */ + repository_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for an organization. + * @enum {string} + */ + organization_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A repository on GitHub. + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # 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 [EMAIL]. 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/ + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** Enterprise Security Analysis Settings */ + "enterprise-security-analysis-settings": { + /** + * @description Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to + * this enterprise. + * @example false + */ + advanced_security_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * enterprise. + * @example false + */ + secret_scanning_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this enterprise. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + /** @description The security alert number. */ + "alert-number": number; + /** @description Details for the vulnerable package. */ + "dependabot-alert-package": { + /** @description The package's language or package management ecosystem. */ + ecosystem: string; + /** @description The unique package name within its ecosystem. */ + name: string; + }; + /** @description Details pertaining to one vulnerable version range for the advisory. */ + "dependabot-alert-security-vulnerability": { + package: components["schemas"]["dependabot-alert-package"]; + /** + * @description The severity of the vulnerability. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Conditions that identify vulnerable versions of this vulnerability's package. */ + vulnerable_version_range: string; + /** @description Details pertaining to the package version that patches this vulnerability. */ + first_patched_version: { + /** @description The package version that patches this vulnerability. */ + identifier: string; + } | null; + }; + /** @description Details for the GitHub Security Advisory. */ + "dependabot-alert-security-advisory": { + /** @description The unique GitHub Security Advisory ID assigned to the advisory. */ + ghsa_id: string; + /** @description The unique CVE ID assigned to the advisory. */ + cve_id: string | null; + /** @description A short, plain text summary of the advisory. */ + summary: string; + /** @description A long-form Markdown-supported description of the advisory. */ + description: string; + /** @description Vulnerable version range information for the advisory. */ + vulnerabilities: components["schemas"]["dependabot-alert-security-vulnerability"][]; + /** + * @description The severity of the advisory. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Details for the advisory pertaining to the Common Vulnerability Scoring System. */ + cvss: { + /** @description The overall CVSS score of the advisory. */ + score: number; + /** @description The full CVSS vector string for the advisory. */ + vector_string: string | null; + }; + /** @description Details for the advisory pertaining to Common Weakness Enumeration. */ + cwes: { + /** @description The unique CWE ID. */ + cwe_id: string; + /** @description The short, plain text name of the CWE. */ + name: string; + }[]; + /** @description Values that identify this advisory among security information sources. */ + identifiers: { + /** + * @description The type of advisory identifier. + * @enum {string} + */ + type: "CVE" | "GHSA"; + /** @description The value of the advisory identifer. */ + value: string; + }[]; + /** @description Links to additional advisory information. */ + references: { + /** + * Format: uri + * @description The URL of the reference. + */ + url: string; + }[]; + /** + * Format: date-time + * @description The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + published_at: string; + /** + * Format: date-time + * @description The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + updated_at: string; + /** + * Format: date-time + * @description The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + withdrawn_at: string | null; + }; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-dismissed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-fixed-at": string | null; + /** + * Simple Repository + * @description A GitHub repository. + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert-with-repository": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + /** + * @description A feed of discussions for a given repository. + * @example https://github.com/{user}/{repo}/discussions + */ + repository_discussions_url?: string; + /** + * @description A feed of discussions for a given repository and category. + * @example https://github.com/{user}/{repo}/discussions/categories/{category} + */ + repository_discussions_category_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + repository_discussions?: components["schemas"]["link-with-type"]; + repository_discussions_category?: components["schemas"]["link-with-type"]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + 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?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * 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. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** + * @example FLAT_RATE + * @enum {string} + */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Simple + * @description A GitHub organization. + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** + * @description Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + * this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + * to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + * @example false + */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * Actions OIDC Subject customization + * @description Actions OIDC Subject customization + */ + "oidc-custom-sub": { + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys: string[]; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "required-workflow": { + /** @description Unique identifier for a required workflow */ + id: number; + /** @description Name present in the workflow file */ + name: string; + /** @description Path of the workflow file */ + path: string; + /** + * @description Scope of the required workflow + * @enum {string} + */ + scope: "all" | "selected"; + /** @description Ref at which the workflow file will be selected */ + ref: string; + /** + * @description State of the required workflow + * @enum {string} + */ + state: "active" | "deleted"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/actions/required_workflows/1/repositories + */ + selected_repositories_url?: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + repository: components["schemas"]["minimal-repository"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Actions Variable for an Organization + * @description Organization variable for GitHub Actions. + */ + "organization-actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + /** + * @description Visibility of a variable + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/variables/USERNAME/repositories + */ + selected_repositories_url?: string; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** + * @description Severity of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-severity": + | "critical" + | "high" + | "medium" + | "low" + | "warning" + | "note" + | "error"; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "alert-instances-url": string; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | ("source" | "generated" | "test" | "library") + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + /** + * @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. + * @example you've used 100% of your spending limit for Codespaces + */ + last_known_stop_notice?: string | null; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + /** @example "member" */ + invitation_source?: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on macOS 12 core runner machines. */ + macos_12_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Team Organization + * @description Team Organization + */ + "team-organization": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Repository + * @description A repository on GitHub. + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Required workflow + * @description A GitHub Actions required workflow + */ + "repo-required-workflow": { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example Required CI */ + name: string; + /** @example .github/workflows/required_ci.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: "active" | "deleted"; + source_repository: components["schemas"]["minimal-repository"]; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/sample-org/sample-repo/actions/required_workflows/5 */ + url: string; + /** @example https://github.com/sample-org/source-repo/blob/main/.github/workflows/required_ci.yaml */ + html_url: string; + /** @example https://github.com/sample-org/sample-repo/workflows/required/sample-org/source-repo/.github/workflows/required_ci.yaml/badge.svg */ + badge_url: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads: boolean; + /** @example true */ + has_discussions: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @example true */ + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + /** + * @description The name of the workflow. + * @example Build + */ + workflow_name: string | null; + /** + * @description The name of the current branch. + * @example main + */ + head_branch: string | null; + }; + /** + * Actions OIDC subject customization for a repository + * @description Actions OIDC subject customization for a repository + */ + "oidc-custom-sub-repo": { + /** @description Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. */ + use_default: boolean; + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys?: string[]; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. + * + * `none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repos only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. + * @enum {string} + */ + access_level: "none" | "user" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description A commit. + */ + "nullable-simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title: string; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: { [key: string]: unknown } | string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** Actions Variable */ + "actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + * @example true + */ + is_alphanumeric: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + * @example true + */ + require_last_push_approval?: boolean; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + 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; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + */ + require_last_push_approval?: boolean; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description A commit. + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @example completed + * @enum {string|null} + */ + status: ("queued" | "in_progress" | "completed") | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "startup_failure" + | "stale" + | null + ) + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** + * CodeQL Database + * @description A CodeQL database. + */ + "code-scanning-codeql-database": { + /** @description The ID of the CodeQL database. */ + id: number; + /** @description The name of the CodeQL database. */ + name: string; + /** @description The language of the CodeQL database. */ + language: string; + uploader: components["schemas"]["simple-user"]; + /** @description The MIME type of the CodeQL database file. */ + content_type: string; + /** @description The size of the CodeQL database file in bytes. */ + size: number; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * Format: uri + * @description The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + */ + url: string; + }; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string | null; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string | null; + target_url: string | null; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + } & { + content: unknown; + encoding: unknown; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + /** @enum {string} */ + type: "dir" | "file" | "submodule" | "symlink"; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + /** @enum {string} */ + type: "file"; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + /** @enum {string} */ + type: "symlink"; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Submodule Content + * @description An object describing a submodule + */ + "content-submodule": { + /** @enum {string} */ + type: "submodule"; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + }; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + /** + * @description Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + * @enum {string} + */ + scope: "unknown" | "runtime" | "development"; + }[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: Partial & Partial & Partial; + }; + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { [key: string]: components["schemas"]["dependency"] }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. */ + manifests?: { [key: string]: components["schemas"]["manifest"] }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy-settings": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + protection_rules?: (Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + }>)[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + "deployment-branch-policy": { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number; + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string; + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: { + /** @example "foo@bar.com" */ + email?: string; + /** @example "foo" */ + password?: string; + /** @example "roomer" */ + room?: string; + /** @example "foo" */ + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + /** @example "sha256" */ + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + /** @example "abc" */ + token?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** @example 1 */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + added_by?: string | null; + last_used?: string | null; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + * @example https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + * @example hello-world.github.io + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + * @example monalisa-1231a2312sa32-23sda74.drafts.github.io + */ + preview_url?: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + web_commit_signoff_required?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string | null; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + /** @description An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. */ + "secret-scanning-alert-resolution-comment": string | null; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + /** @description Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. */ + "secret-scanning-location-issue-title": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_title_url: string; + }; + /** @description Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. */ + "secret-scanning-location-issue-body": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_body_url: string; + }; + /** @description Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. */ + "secret-scanning-location-issue-comment": { + /** + * Format: uri + * @description The API URL to get the issue comment where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + */ + issue_comment_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: "commit" | "issue_title" | "issue_body" | "issue_comment"; + details: + | components["schemas"]["secret-scanning-location-commit"] + | components["schemas"]["secret-scanning-location-issue-title"] + | components["schemas"]["secret-scanning-location-issue-body"] + | components["schemas"]["secret-scanning-location-issue-comment"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + has_discussions?: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Codespace + * @description A codespace. + */ + "codespace-with-full-repository": { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["full-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * SSH Signing Key + * @description A public SSH key used to sign Git commits + */ + "ssh-signing-key": { + key: string; + id: number; + title: string; + /** Format: date-time */ + created_at: string; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + /** + * Simple Installation + * @description The GitHub App installation. This property is included when the event is configured for and sent to a GitHub App. + */ + "simple-installation": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + /** + * @description The global node ID of the installation. + * @example MDQ6VXNlcjU4MzIzMQ== + */ + node_id: string; + }; + /** @description A suite of checks performed on the code of a given code change */ + "simple-check-suite": { + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after?: string | null; + app?: components["schemas"]["integration"]; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before?: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion?: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "stale" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at?: string; + /** @example master */ + head_branch?: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha?: string; + /** @example 5 */ + id?: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id?: string; + pull_requests?: components["schemas"]["pull-request-minimal"][]; + repository?: components["schemas"]["minimal-repository"]; + /** + * @example completed + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed" | "pending" | "waiting"; + /** Format: date-time */ + updated_at?: string; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url?: string; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run-with-simple-check-suite": { + app: components["schemas"]["nullable-integration"]; + check_suite: components["schemas"]["simple-check-suite"]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "waiting" + | "pending" + | "startup_failure" + | "stale" + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + deployment?: components["schemas"]["deployment-simple"]; + /** @example https://example.com */ + details_url: string; + /** @example 42 */ + external_id: string; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string; + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + output: { + annotations_count: number; + /** Format: uri */ + annotations_url: string; + summary: string | null; + text: string | null; + title: string | null; + }; + pull_requests: components["schemas"]["pull-request-minimal"][]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "pending"; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + }; + /** + * Projects v2 Item Content Type + * @description The type of content tracked in a project item + * @enum {string} + */ + "projects-v2-item-content-type": "Issue" | "PullRequest" | "DraftIssue"; + /** + * Projects v2 Item + * @description An item belonging to a project + */ + "projects-v2-item": { + id: number; + node_id?: string; + project_node_id?: string; + content_node_id: string; + content_type: components["schemas"]["projects-v2-item-content-type"]; + creator?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + created_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + archived_at: string | null; + }; + /** branch protection rule created event */ + "webhook-branch-protection-rule-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule deleted event */ + "webhook-branch-protection-rule-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule edited event */ + "webhook-branch-protection-rule-edited": { + /** @enum {string} */ + action: "edited"; + /** @description If the action was `edited`, the changes to the rule. */ + changes?: { + admin_enforced?: { + from: boolean | null; + }; + authorized_actor_names?: { + from: string[]; + }; + authorized_actors_only?: { + from: boolean | null; + }; + authorized_dismissal_actors_only?: { + from: boolean | null; + }; + linear_history_requirement_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + required_status_checks?: { + from: string[]; + }; + required_status_checks_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** Check Run Completed Event */ + "webhook-check-run-completed": { + /** @enum {string} */ + action?: "completed"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Completed Event + * @description The check_run.completed webhook encoded with URL encoding + */ + "webhook-check-run-completed-form-encoded": { + /** @description A URL-encoded string of the check_run.completed JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Created Event */ + "webhook-check-run-created": { + /** @enum {string} */ + action?: "created"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Created Event + * @description The check_run.created webhook encoded with URL encoding + */ + "webhook-check-run-created-form-encoded": { + /** @description A URL-encoded string of the check_run.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Requested Action Event */ + "webhook-check-run-requested-action": { + /** @enum {string} */ + action: "requested_action"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** @description The action requested by the user. */ + requested_action?: { + /** @description The integrator reference of the action requested by the user. */ + identifier?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Requested Action Event + * @description The check_run.requested_action webhook encoded with URL encoding + */ + "webhook-check-run-requested-action-form-encoded": { + /** @description A URL-encoded string of the check_run.requested_action JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Re-Requested Event */ + "webhook-check-run-rerequested": { + /** @enum {string} */ + action?: "rerequested"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Re-Requested Event + * @description The check_run.rerequested webhook encoded with URL encoding + */ + "webhook-check-run-rerequested-form-encoded": { + /** @description A URL-encoded string of the check_run.rerequested JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** check_suite completed event */ + "webhook-check-suite-completed": { + /** @enum {string} */ + action: "completed"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_group" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "projects_v2_item" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ( + | "requested" + | "in_progress" + | "completed" + | "queued" + | null + | "pending" + ) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite requested event */ + "webhook-check-suite-requested": { + /** @enum {string} */ + action: "requested"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "secret_scanning_alert_location" + | "projects_v2_item" + | "merge_group" + | "repository_import" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite rerequested event */ + "webhook-check-suite-rerequested": { + /** @enum {string} */ + action: "rerequested"; + actions_meta?: { + rerun_info?: { + plan_id?: string; + job_ids?: string[]; + }; + } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert appeared_in_branch event */ + "webhook-code-scanning-alert-appeared-in-branch": { + /** @enum {string} */ + action: "appeared_in_branch"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert closed_by_user event */ + "webhook-code-scanning-alert-closed-by-user": { + /** @enum {string} */ + action: "closed_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert created event */ + "webhook-code-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string | null; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + fixed_at?: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + } | null; + updated_at?: string | null; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert fixed event */ + "webhook-code-scanning-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Format: uri */ + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened event */ + "webhook-code-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: string | null; + dismissed_by: { [key: string]: unknown } | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: string | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + } | null; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string | null; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened_by_user event */ + "webhook-code-scanning-alert-reopened-by-user": { + /** @enum {string} */ + action: "reopened_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** commit_comment created event */ + "webhook-commit-comment-created": { + /** + * @description The action performed. Can be `created`. + * @enum {string} + */ + action: "created"; + /** @description The [commit comment](https://docs.github.com/rest/reference/repos#get-a-commit-comment) resource. */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + created_at: string; + /** Format: uri */ + html_url: string; + /** @description The ID of the commit comment. */ + id: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the commit comment. */ + node_id: string; + /** @description The relative path of the file to which the comment applies. */ + path: string | null; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** create event */ + "webhook-create": { + /** @description The repository's current description. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The name of the repository's default branch (usually `main`). */ + master_branch: string; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object created in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** delete event */ + "webhook-delete": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object deleted in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert created event */ + "webhook-dependabot-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert dismissed event */ + "webhook-dependabot-alert-dismissed": { + /** @enum {string} */ + action: "dismissed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert fixed event */ + "webhook-dependabot-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reintroduced event */ + "webhook-dependabot-alert-reintroduced": { + /** @enum {string} */ + action: "reintroduced"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reopened event */ + "webhook-dependabot-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key created event */ + "webhook-deploy-key-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key deleted event */ + "webhook-deploy-key-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deployment created event */ + "webhook-deployment-created": { + /** @enum {string} */ + action: "created"; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: { [key: string]: unknown } | string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "workflow_job" + | "pull_request_review_thread" + | "merge_queue_entry" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** deployment_status created event */ + "webhook-deployment-status-created": { + /** @enum {string} */ + action: "created"; + check_run?: { + /** Format: date-time */ + completed_at: string | null; + /** + * @description The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: uri */ + details_url: string; + external_id: string; + /** @description The SHA of the commit that is being checked. */ + head_sha: string; + /** Format: uri */ + html_url: string; + /** @description The id of the check. */ + id: number; + /** @description The name of the check run. */ + name: string; + node_id: string; + /** Format: date-time */ + started_at: string; + /** + * @description The current status of the check run. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting" | "pending"; + /** Format: uri */ + url: string; + } | null; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: (string | { [key: string]: unknown }) | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_queue_entry" + | "workflow_job" + | "pull_request_review_thread" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + /** @description The [deployment status](https://docs.github.com/rest/reference/deployments#list-deployment-statuses). */ + deployment_status: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + deployment_url: string; + /** @description The optional human-readable description added to the status. */ + description: string; + environment: string; + /** Format: uri */ + environment_url?: string; + id: number; + /** Format: uri */ + log_url?: string; + node_id: string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + | "merge_group" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + /** Format: uri */ + repository_url: string; + /** @description The new state. Can be `pending`, `success`, `failure`, or `error`. */ + state: string; + /** @description The optional link added to the status. */ + target_url: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow?: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run?: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** discussion answered event */ + "webhook-discussion-answered": { + /** @enum {string} */ + action: "answered"; + answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** Format: date-time */ + answer_chosen_at: string; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + answer_html_url: string; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion category changed event */ + "webhook-discussion-category-changed": { + /** @enum {string} */ + action: "category_changed"; + changes: { + category: { + from: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment created event */ + "webhook-discussion-comment-created": { + /** @enum {string} */ + action: "created"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment deleted event */ + "webhook-discussion-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment edited event */ + "webhook-discussion-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body: { + from: string; + }; + }; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion created event */ + "webhook-discussion-created": { + /** @enum {string} */ + action: "created"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string | null; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "converting" | "transferring"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion deleted event */ + "webhook-discussion-deleted": { + /** @enum {string} */ + action: "deleted"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion edited event */ + "webhook-discussion-edited": { + /** @enum {string} */ + action: "edited"; + changes?: { + body?: { + from: string; + }; + title?: { + from: string; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion labeled event */ + "webhook-discussion-labeled": { + /** @enum {string} */ + action: "labeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion locked event */ + "webhook-discussion-locked": { + /** @enum {string} */ + action: "locked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string; + answer_chosen_at?: string | null; + answer_chosen_by?: { [key: string]: unknown } | null; + answer_html_url?: string | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: true; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "locked"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion pinned event */ + "webhook-discussion-pinned": { + /** @enum {string} */ + action: "pinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion transferred event */ + "webhook-discussion-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** Discussion */ + new_discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unanswered event */ + "webhook-discussion-unanswered": { + /** @enum {string} */ + action: "unanswered"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + old_answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** discussion unlabeled event */ + "webhook-discussion-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unlocked event */ + "webhook-discussion-unlocked": { + /** @enum {string} */ + action: "unlocked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at?: unknown | null; + answer_chosen_by?: unknown | null; + answer_html_url?: unknown | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unpinned event */ + "webhook-discussion-unpinned": { + /** @enum {string} */ + action: "unpinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * fork event + * @description A user forks a repository. + */ + "webhook-fork": { + enterprise?: components["schemas"]["enterprise"]; + /** @description The created [`repository`](https://docs.github.com/rest/reference/repos#get-a-repository) resource. */ + forkee: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } & { + allow_forking?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + /** @enum {boolean} */ + fork?: true; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: unknown | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + public?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (unknown | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + }; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** github_app_authorization revoked event */ + "webhook-github-app-authorization-revoked": { + /** @enum {string} */ + action: "revoked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** gollum event */ + "webhook-gollum": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pages that were updated. */ + pages: { + /** + * @description The action that was performed on the page. Can be `created` or `edited`. + * @enum {string} + */ + action: "created" | "edited"; + /** + * Format: uri + * @description Points to the HTML wiki page. + */ + html_url: string; + /** @description The name of the page. */ + page_name: string; + /** @description The latest commit SHA of the page. */ + sha: string; + summary: string | null; + /** @description The current page title. */ + title: string; + }[]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** installation created event */ + "webhook-installation-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** User */ + requester?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation deleted event */ + "webhook-installation-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation new_permissions_accepted event */ + "webhook-installation-new-permissions-accepted": { + /** @enum {string} */ + action: "new_permissions_accepted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories added event */ + "webhook-installation-repositories-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name?: string; + /** @description Unique identifier of the repository */ + id?: number; + /** @description The name of the repository. */ + name?: string; + node_id?: string; + /** @description Whether the repository is private or public. */ + private?: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories removed event */ + "webhook-installation-repositories-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation suspend event */ + "webhook-installation-suspend": { + /** @enum {string} */ + action: "suspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + "webhook-installation-target-renamed": { + account: { + avatar_url: string; + created_at?: string; + description?: unknown | null; + events_url?: string; + followers?: number; + followers_url?: string; + following?: number; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + has_organization_projects?: boolean; + has_repository_projects?: boolean; + hooks_url?: string; + html_url: string; + id: number; + is_verified?: boolean; + issues_url?: string; + login?: string; + members_url?: string; + name?: string; + node_id: string; + organizations_url?: string; + public_gists?: number; + public_members_url?: string; + public_repos?: number; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + slug?: string; + starred_url?: string; + subscriptions_url?: string; + type?: string; + updated_at?: string; + url?: string; + website_url?: unknown | null; + }; + action: string; + changes: { + login?: { + from: string; + }; + slug?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + target_type: string; + }; + /** installation unsuspend event */ + "webhook-installation-unsuspend": { + /** @enum {string} */ + action: "unsuspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment created event */ + "webhook-issue-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment deleted event */ + "webhook-issue-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment edited event */ + "webhook-issue-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues assigned event */ + "webhook-issues-assigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "assigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues closed event */ + "webhook-issues-closed": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) itself. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "closed" | "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues deleted event */ + "webhook-issues-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues demilestoned event */ + "webhook-issues-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone?: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues edited event */ + "webhook-issues-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the issue. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + title?: { + /** @description The previous version of the title. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues labeled event */ + "webhook-issues-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues locked event */ + "webhook-issues-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "security_and_analysis" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: true; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues milestoned event */ + "webhook-issues-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues opened event */ + "webhook-issues-opened": { + /** @enum {string} */ + action: "opened"; + changes?: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + old_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } | null; + /** + * Repository + * @description A git repository + */ + old_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues pinned event */ + "webhook-issues-pinned": { + /** @enum {string} */ + action: "pinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues reopened event */ + "webhook-issues-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues transferred event */ + "webhook-issues-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + new_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unassigned event */ + "webhook-issues-unassigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlabeled event */ + "webhook-issues-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlocked event */ + "webhook-issues-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason: unknown | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: false; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: unknown | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unpinned event */ + "webhook-issues-unpinned": { + /** @enum {string} */ + action: "unpinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label created event */ + "webhook-label-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** label deleted event */ + "webhook-label-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label edited event */ + "webhook-label-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the label if the action was `edited`. */ + changes?: { + color?: { + /** @description The previous version of the color if the action was `edited`. */ + from: string; + }; + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase cancelled event */ + "webhook-marketplace-purchase-cancelled": { + /** @enum {string} */ + action: "cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase changed event */ + "webhook-marketplace-purchase-changed": { + /** @enum {string} */ + action: "changed"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean | null; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change event */ + "webhook-marketplace-purchase-pending-change": { + /** @enum {string} */ + action: "pending_change"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change_cancelled event */ + "webhook-marketplace-purchase-pending-change-cancelled": { + /** @enum {string} */ + action: "pending_change_cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + next_billing_date: string; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase purchased event */ + "webhook-marketplace-purchase-purchased": { + /** @enum {string} */ + action: "purchased"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member added event */ + "webhook-member-added": { + /** @enum {string} */ + action: "added"; + changes?: { + permission?: { + /** @enum {string} */ + to: "write" | "admin" | "read"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member edited event */ + "webhook-member-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the collaborator permissions */ + changes: { + old_permission?: { + /** @description The previous permissions of the collaborator if the action was edited. */ + from: string; + }; + permission?: { + from?: string | null; + to?: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member removed event */ + "webhook-member-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** membership added event */ + "webhook-membership-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** membership removed event */ + "webhook-membership-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team" | "organization"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + "webhook-merge-group-checks-requested": { + action: string; + installation?: components["schemas"]["simple-installation"]; + /** MergeGroup */ + merge_group: { + /** @description The SHA of the merge group. */ + head_sha: string; + /** @description The full ref of the merge group. */ + head_ref: string; + /** @description The SHA of the merge group's parent commit. */ + base_sha: string; + /** @description The full ref of the branch the merge group will be merged into. */ + base_ref: string; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** meta deleted event */ + "webhook-meta-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + /** @description The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace. */ + hook: { + active: boolean; + config: { + /** @enum {string} */ + content_type: "json" | "form"; + insecure_ssl: string; + secret?: string; + /** Format: uri */ + url: string; + }; + created_at: string; + events: ( + | "*" + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "create" + | "delete" + | "deployment" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "meta" + | "milestone" + | "organization" + | "org_block" + | "package" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "pull_request_review_thread" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_import" + | "repository_vulnerability_alert" + | "secret_scanning_alert" + | "secret_scanning_alert_location" + | "security_and_analysis" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_job" + | "workflow_run" + | "repository_dispatch" + | "projects_v2_item" + )[]; + id: number; + name: string; + type: string; + updated_at: string; + }; + /** @description The id of the modified webhook. */ + hook_id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** milestone closed event */ + "webhook-milestone-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone created event */ + "webhook-milestone-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone deleted event */ + "webhook-milestone-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone edited event */ + "webhook-milestone-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the milestone if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + due_on?: { + /** @description The previous version of the due date if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone opened event */ + "webhook-milestone-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block blocked event */ + "webhook-org-block-blocked": { + /** @enum {string} */ + action: "blocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block unblocked event */ + "webhook-org-block-unblocked": { + /** @enum {string} */ + action: "unblocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization deleted event */ + "webhook-organization-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_added event */ + "webhook-organization-member-added": { + /** @enum {string} */ + action: "member_added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_invited event */ + "webhook-organization-member-invited": { + /** @enum {string} */ + action: "member_invited"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The invitation for the user or email if the action is `member_invited`. */ + invitation: { + /** Format: date-time */ + created_at: string; + email: string | null; + /** Format: date-time */ + failed_at: string | null; + failed_reason: string | null; + id: number; + /** Format: uri */ + invitation_teams_url: string; + /** User */ + inviter: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + login: string | null; + node_id: string; + role: string; + team_count: number; + invitation_source?: string; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** organization member_removed event */ + "webhook-organization-member-removed": { + /** @enum {string} */ + action: "member_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization renamed event */ + "webhook-organization-renamed": { + /** @enum {string} */ + action: "renamed"; + changes?: { + login?: { + from?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package published event */ + "webhook-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string | null; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + } | null; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: { [key: string]: unknown } | null; + bugs?: { [key: string]: unknown } | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: { [key: string]: unknown } | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: { [key: string]: unknown } | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: { [key: string]: unknown }[]; + contributors?: { [key: string]: unknown }[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: { [key: string]: unknown } | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: number | string; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + source_url?: string; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package updated event */ + "webhook-package-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string; + size: number; + state: string; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + /** Format: uri */ + source_url?: string; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** page_build event */ + "webhook-page-build": { + /** @description The [List GitHub Pages builds](https://docs.github.com/rest/reference/repos#list-github-pages-builds) itself. */ + build: { + commit: string | null; + created_at: string; + duration: number; + error: { + message: string | null; + }; + /** User */ + pusher: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + status: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-ping": { + /** + * Webhook + * @description The webhook that is being pinged + */ + hook?: { + /** @description Determines whether the hook is actually triggered for the events it subscribes to. */ + active: boolean; + /** @description Only included for GitHub Apps. When you register a new GitHub App, GitHub sends a ping event to the webhook URL you specified during registration. The GitHub App ID sent in this field is required for authenticating an app. */ + app_id?: number; + config: { + content_type?: components["schemas"]["webhook-config-content-type"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + secret?: components["schemas"]["webhook-config-secret"]; + url?: components["schemas"]["webhook-config-url"]; + }; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + deliveries_url?: string; + /** @description Determines what events the hook is triggered for. Default: ['push']. */ + events: string[]; + /** @description Unique identifier of the webhook. */ + id: number; + last_response?: components["schemas"]["hook-response"]; + /** + * @description The type of webhook. The only valid value is 'web'. + * @enum {string} + */ + name: "web"; + /** Format: uri */ + ping_url?: string; + /** Format: uri */ + test_url?: string; + type: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url?: string; + }; + /** @description The ID of the webhook that triggered the ping. */ + hook_id?: number; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + /** @description Random string of GitHub zen. */ + zen?: string; + }; + /** @description The webhooks ping payload encoded with URL encoding. */ + "webhook-ping-form-encoded": { + /** @description A URL-encoded string of the ping JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** project_card converted event */ + "webhook-project-card-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + note: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card created event */ + "webhook-project-card-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card deleted event */ + "webhook-project-card-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number | null; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card edited event */ + "webhook-project-card-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + note: { + from: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card moved event */ + "webhook-project-card-moved": { + /** @enum {string} */ + action: "moved"; + changes?: { + column_id: { + from: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } & { + after_id: number | null; + archived?: boolean; + column_id?: number; + column_url?: string; + created_at?: string; + creator?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + id?: number; + node_id?: string; + note?: string | null; + project_url?: string; + updated_at?: string; + url?: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project closed event */ + "webhook-project-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_column created event */ + "webhook-project-column-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column deleted event */ + "webhook-project-column-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column edited event */ + "webhook-project-column-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + name?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column moved event */ + "webhook-project-column-moved": { + /** @enum {string} */ + action: "moved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project created event */ + "webhook-project-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project deleted event */ + "webhook-project-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project edited event */ + "webhook-project-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the project if the action was `edited`. */ + changes?: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The changes to the project if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project reopened event */ + "webhook-project-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Archived Event */ + "webhook-projects-v2-item-archived": { + /** @enum {string} */ + action: "archived"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Converted Event */ + "webhook-projects-v2-item-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + content_type?: { + from?: string | null; + to?: string; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Created Event */ + "webhook-projects-v2-item-created": { + /** @enum {string} */ + action: "created"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Deleted Event */ + "webhook-projects-v2-item-deleted": { + /** @enum {string} */ + action: "deleted"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Edited Event */ + "webhook-projects-v2-item-edited": { + /** @enum {string} */ + action: "edited"; + changes?: + | { + field_value: { + field_node_id?: string; + field_type?: string; + }; + } + | { + body: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Reordered Event */ + "webhook-projects-v2-item-reordered": { + /** @enum {string} */ + action: "reordered"; + changes: { + previous_projects_v2_item_node_id?: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Restored Event */ + "webhook-projects-v2-item-restored": { + /** @enum {string} */ + action: "restored"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** public event */ + "webhook-public": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request assigned event */ + "webhook-pull-request-assigned": { + /** @enum {string} */ + action: "assigned"; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_disabled event */ + "webhook-pull-request-auto-merge-disabled": { + /** @enum {string} */ + action: "auto_merge_disabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_enabled event */ + "webhook-pull-request-auto-merge-enabled": { + /** @enum {string} */ + action: "auto_merge_enabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason?: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request closed event */ + "webhook-pull-request-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string | null; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at?: string | null; + merged_by?: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "closed" | "open"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request converted_to_draft event */ + "webhook-pull-request-converted-to-draft": { + /** @enum {string} */ + action: "converted_to_draft"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + /** @enum {boolean} */ + merged: false; + merged_at: unknown | null; + merged_by: unknown | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + state?: string; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request demilestoned event */ + "webhook-pull-request-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request dequeued event */ + "webhook-pull-request-dequeued": { + /** @enum {string} */ + action: "dequeued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request edited event */ + "webhook-pull-request-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment if the action was `edited`. */ + changes: { + base?: { + ref: { + from: string; + }; + sha: { + from: string; + }; + }; + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request enqueued event */ + "webhook-pull-request-enqueued": { + /** @enum {string} */ + action: "enqueued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request labeled event */ + "webhook-pull-request-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request locked event */ + "webhook-pull-request-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request milestoned event */ + "webhook-pull-request-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request opened event */ + "webhook-pull-request-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request ready_for_review event */ + "webhook-pull-request-ready-for-review": { + /** @enum {string} */ + action: "ready_for_review"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request reopened event */ + "webhook-pull-request-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: unknown | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment created event */ + "webhook-pull-request-review-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions?: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment deleted event */ + "webhook-pull-request-review-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment edited event */ + "webhook-pull-request-review-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review dismissed event */ + "webhook-pull-request-review-dismissed": { + /** @enum {string} */ + action: "dismissed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + /** @enum {string} */ + state: "dismissed" | "approved" | "changes_requested"; + /** Format: date-time */ + submitted_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review edited event */ + "webhook-pull-request-review-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_request_removed event */ + "webhook-pull-request-review-request-removed": + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_requested event */ + "webhook-pull-request-review-requested": + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review submitted event */ + "webhook-pull-request-review-submitted": { + /** @enum {string} */ + action: "submitted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_thread resolved event */ + "webhook-pull-request-review-thread-resolved": { + /** @enum {string} */ + action: "resolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request_review_thread unresolved event */ + "webhook-pull-request-review-thread-unresolved": { + /** @enum {string} */ + action: "unresolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request synchronize event */ + "webhook-pull-request-synchronize": { + /** @enum {string} */ + action: "synchronize"; + after: string; + before: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unassigned event */ + "webhook-pull-request-unassigned": { + /** @enum {string} */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request unlabeled event */ + "webhook-pull-request-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unlocked event */ + "webhook-pull-request-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** push event */ + "webhook-push": { + /** @description The SHA of the most recent commit on `ref` after the push. */ + after: string; + base_ref: string | null; + /** @description The SHA of the most recent commit on `ref` before the push. */ + before: string; + /** @description An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/reference/repos#commits) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries. */ + commits: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + }[]; + /** @description URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit. */ + compare: string; + /** @description Whether this push created the `ref`. */ + created: boolean; + /** @description Whether this push deleted the `ref`. */ + deleted: boolean; + enterprise?: components["schemas"]["enterprise"]; + /** @description Whether this push was a force push of the `ref`. */ + forced: boolean; + /** Commit */ + head_commit: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + pusher: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email?: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description The full git ref that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`. */ + ref: string; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sender?: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string | null; + description: string | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author?: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + }; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: (string | { [key: string]: unknown }) | null; + bugs?: (string | { [key: string]: unknown }) | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: (string | { [key: string]: unknown }) | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: (string | { [key: string]: unknown }) | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: string[]; + contributors?: string[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: (string | { [key: string]: unknown }) | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: (string | { [key: string]: unknown } | number) | null; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + prerelease?: boolean; + published_at?: string; + tag_name?: string; + target_commitish?: string; + url?: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + about_url?: string; + name?: string; + type?: string; + url?: string; + vendor?: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-updated": { + action: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string; + description: unknown | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: (unknown | null)[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type?: string; + created_at?: string; + download_url?: string; + id?: number; + md5?: string | null; + name?: string; + sha1?: string | null; + sha256?: string; + size?: number; + state?: string; + updated_at?: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + url: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { [key: string]: unknown } | null; + updated_at: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release created event */ + "webhook-release-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release deleted event */ + "webhook-release-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release edited event */ + "webhook-release-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release prereleased event */ + "webhook-release-prereleased": { + /** @enum {string} */ + action: "prereleased"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + /** + * @description Whether the release is identified as a prerelease or a full release. + * @enum {boolean} + */ + prerelease: true; + published_at?: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release published event */ + "webhook-release-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + /** Format: date-time */ + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release released event */ + "webhook-release-released": { + /** @enum {string} */ + action: "released"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release unpublished event */ + "webhook-release-unpublished": { + /** @enum {string} */ + action: "unpublished"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** repository archived event */ + "webhook-repository-archived": { + /** @enum {string} */ + action: "archived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository created event */ + "webhook-repository-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository deleted event */ + "webhook-repository-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_dispatch event */ + "webhook-repository-dispatch-sample": { + action: string; + branch: string; + client_payload: { [key: string]: unknown } | null; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository edited event */ + "webhook-repository-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + default_branch?: { + from: string; + }; + description?: { + from: string | null; + }; + homepage?: { + from: string | null; + }; + topics?: { + from?: string[] | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_import event */ + "webhook-repository-import": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @enum {string} */ + status: "success" | "cancelled" | "failure"; + }; + /** repository privatized event */ + "webhook-repository-privatized": { + /** @enum {string} */ + action: "privatized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository publicized event */ + "webhook-repository-publicized": { + /** @enum {string} */ + action: "publicized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository renamed event */ + "webhook-repository-renamed": { + /** @enum {string} */ + action: "renamed"; + changes: { + repository: { + name: { + from: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository transferred event */ + "webhook-repository-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + owner: { + from: { + /** Organization */ + organization?: { + /** Format: uri */ + avatar_url: string; + description: string | null; + /** Format: uri */ + events_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url?: string; + id: number; + /** Format: uri */ + issues_url: string; + login: string; + /** Format: uri-template */ + members_url: string; + node_id: string; + /** Format: uri-template */ + public_members_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + url: string; + }; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository unarchived event */ + "webhook-repository-unarchived": { + /** @enum {string} */ + action: "unarchived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert create event */ + "webhook-repository-vulnerability-alert-create": { + /** @enum {string} */ + action: "create"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert dismiss event */ + "webhook-repository-vulnerability-alert-dismiss": { + /** @enum {string} */ + action: "dismiss"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_comment?: string | null; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + dismiss_comment?: string | null; + dismiss_reason: string; + dismissed_at: string; + /** User */ + dismisser: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "dismissed"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert reopen event */ + "webhook-repository-vulnerability-alert-reopen": { + /** @enum {string} */ + action: "reopen"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert resolve event */ + "webhook-repository-vulnerability-alert-resolve": { + /** @enum {string} */ + action: "resolve"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "fixed" | "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert created event */ + "webhook-secret-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created": { + /** @enum {string} */ + action?: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + installation?: components["schemas"]["simple-installation"]; + location: components["schemas"]["secret-scanning-location"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created-form-encoded": { + /** @description A URL-encoded string of the secret_scanning_alert_location.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** secret_scanning_alert reopened event */ + "webhook-secret-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert resolved event */ + "webhook-secret-scanning-alert-resolved": { + /** @enum {string} */ + action: "resolved"; + alert: { + created_at?: components["schemas"]["alert-created-at"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + number?: components["schemas"]["alert-number"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + resolution?: + | ( + | null + | "false_positive" + | "wont_fix" + | "revoked" + | "used_in_tests" + | "pattern_deleted" + | "pattern_edited" + ) + | null; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The secret that was detected. */ + secret?: string; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert revoked event */ + "webhook-secret-scanning-alert-revoked": { + /** @enum {string} */ + action: "revoked"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory published event */ + "webhook-security-advisory-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory updated event */ + "webhook-security-advisory-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory withdrawn event */ + "webhook-security-advisory-withdrawn": { + /** @enum {string} */ + action: "withdrawn"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_and_analysis event */ + "webhook-security-and-analysis": { + changes: { + from?: { + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["full-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** sponsorship cancelled event */ + "webhook-sponsorship-cancelled": { + /** @enum {string} */ + action: "cancelled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship created event */ + "webhook-sponsorship-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship edited event */ + "webhook-sponsorship-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + privacy_level?: { + /** @description The `edited` event types include the details about the change when someone edits a sponsorship to change the privacy. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_cancellation event */ + "webhook-sponsorship-pending-cancellation": { + /** @enum {string} */ + action: "pending_cancellation"; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_tier_change event */ + "webhook-sponsorship-pending-tier-change": { + /** @enum {string} */ + action: "pending_tier_change"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship tier_changed event */ + "webhook-sponsorship-tier-changed": { + /** @enum {string} */ + action: "tier_changed"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** star created event */ + "webhook-star-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: string | null; + }; + /** star deleted event */ + "webhook-star-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: unknown | null; + }; + /** status event */ + "webhook-status": { + /** Format: uri */ + avatar_url?: string | null; + /** @description An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. */ + branches: { + commit: { + sha: string | null; + /** Format: uri */ + url: string | null; + }; + name: string; + protected: boolean; + }[]; + commit: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + comments_url: string; + commit: { + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + comment_count: number; + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification: { + payload: string | null; + /** @enum {string} */ + reason: + | "expired_key" + | "not_signing_key" + | "gpgverify_error" + | "gpgverify_unavailable" + | "unsigned" + | "unknown_signature_type" + | "no_user" + | "unverified_email" + | "bad_email" + | "unknown_key" + | "malformed_signature" + | "invalid" + | "valid" + | "bad_cert" + | "ocsp_pending"; + signature: string | null; + verified: boolean; + }; + }; + /** User */ + committer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + node_id: string; + parents: { + /** Format: uri */ + html_url: string; + sha: string; + /** Format: uri */ + url: string; + }[]; + sha: string; + /** Format: uri */ + url: string; + }; + context: string; + created_at: string; + /** @description The optional human-readable description added to the status. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + /** @description The unique identifier of the status. */ + id: number; + installation?: components["schemas"]["simple-installation"]; + name: string; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The Commit SHA. */ + sha: string; + /** + * @description The new state. Can be `pending`, `success`, `failure`, or `error`. + * @enum {string} + */ + state: "pending" | "success" | "failure" | "error"; + /** @description The optional link added to the status. */ + target_url: string | null; + updated_at: string; + }; + /** team_add event */ + "webhook-team-add": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team added_to_repository event */ + "webhook-team-added-to-repository": { + /** @enum {string} */ + action: "added_to_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team created event */ + "webhook-team-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team deleted event */ + "webhook-team-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team edited event */ + "webhook-team-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the team if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + privacy?: { + /** @description The previous version of the team's privacy if the action was `edited`. */ + from: string; + }; + repository?: { + permissions: { + from: { + /** @description The previous version of the team member's `admin` permission on a repository, if the action was `edited`. */ + admin?: boolean; + /** @description The previous version of the team member's `pull` permission on a repository, if the action was `edited`. */ + pull?: boolean; + /** @description The previous version of the team member's `push` permission on a repository, if the action was `edited`. */ + push?: boolean; + }; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team removed_from_repository event */ + "webhook-team-removed-from-repository": { + /** @enum {string} */ + action: "removed_from_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** watch started event */ + "webhook-watch-started": { + /** @enum {string} */ + action: "started"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** workflow_dispatch event */ + "webhook-workflow-dispatch": { + enterprise?: components["schemas"]["enterprise"]; + inputs: { + name?: string; + number?: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow: string; + }; + /** workflow_job completed event */ + "webhook-workflow-job-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | null + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out" + ) + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out"; + head_sha?: string; + html_url?: string; + id?: number; + labels?: (string | null)[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + status?: string; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps?: ({ [key: string]: unknown } | null)[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job in_progress event */ + "webhook-workflow-job-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("success" | "failure" | null | "cancelled" | "neutral") + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | null | "cancelled") + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string | null; + conclusion?: string | null; + head_sha?: string; + html_url?: string; + id?: number; + labels?: string[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps: { + completed_at: string | null; + conclusion: string | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "pending" | "queued"; + }[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job queued event */ + "webhook-workflow-job-queued": { + /** @enum {string} */ + action: "queued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "completed" | "in_progress" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job waiting event */ + "webhook-workflow-job-waiting": { + /** @enum {string} */ + action: "waiting"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: + | "completed" + | "in_progress" + | "queued" + | "pending" + | "waiting"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_run completed event */ + "webhook-workflow-run-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped"; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run in_progress event */ + "webhook-workflow-run-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "skipped" + | "stale" + ) + | null; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string | null; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run requested event */ + "webhook-workflow-run-requested": { + /** @enum {string} */ + action: "requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + display_title: string; + }; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** Unavailable due to service under maintenance. */ + porter_maintenance: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** A header with no content is returned. */ + no_content: unknown; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "per-page": number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string; + "delivery-id": number; + /** @description Page number of the results to fetch. */ + page: number; + /** @description 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; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + "dependabot-alert-comma-separated-states": string; + /** + * @description A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + "dependabot-alert-comma-separated-severities": string; + /** + * @description A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + "dependabot-alert-comma-separated-ecosystems": string; + /** @description A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + "dependabot-alert-comma-separated-packages": string; + /** @description The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + "dependabot-alert-scope": "development" | "runtime"; + /** + * @description The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + "dependabot-alert-sort": "created" | "updated"; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + "pagination-after": string; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + "pagination-first": number; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + "pagination-last": number; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type": string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution": string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort": "created" | "updated"; + /** @description The security feature to enable or disable. */ + "enterprise-security-product": + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + "enterprise-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** @description 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; + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description The unique identifier of the required workflow. */ + "required-workflow-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The number of results per page (max 30). */ + "variables-per-page": number; + /** @description The name of the variable. */ + "variable-name": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name": components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid": components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description The unique identifier of the hook. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** + * @description The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": + | "dependency_graph" + | "dependabot_alerts" + | "dependabot_security_updates" + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + "org-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The ID of the required workflow that has run at least once in a repository. */ + "repo-required-workflow-id": number; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref": components["schemas"]["code-scanning-ref"]; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key": string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort": + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + "workflow-run-status": + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests": boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id": number; + /** @description Only returns workflow runs that are associated with the specified `head_sha`. */ + "workflow-run-head-sha": string; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name": string; + /** @description Returns check runs with the specified `status`. */ + status: "queued" | "in_progress" | "completed"; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** @description A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + "dependabot-alert-comma-separated-manifests": string; + /** + * @description The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + "dependabot-alert-number": components["schemas"]["alert-number"]; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path": string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per: "" | "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** @description 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"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query": number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + /** @description The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.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. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/get-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["enterprise-security-analysis-settings"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/patch-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." */ + advanced_security_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning)." */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + * To disable this functionality, set this field to `null`. + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + }; + }; + }; + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "dependabot/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/post-security-product-enablement-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["enterprise-security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + enablement: components["parameters"]["enterprise-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + /** 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. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + "gists/list-public": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string; + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** 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. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 50). */ + per_page?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + /** Gets information about a notification thread. */ + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean; + /** @example "http://github.blog" */ + blog?: string; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot alerts is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot security updates is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** @description If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. */ + secret_scanning_push_protection_custom_link?: string; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + "oidc/get-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** A JSON serialized template for OIDC subject claim customization */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + }; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + "oidc/update-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["required-workflow"][]; + }; + }; + }; + }; + }; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/create-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/get-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + }; + }; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/delete-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/update-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path?: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id?: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-selected-repositories-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + /** Resource Not Found */ + 404: unknown; + }; + }; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/set-selected-repos-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories for which the workflow should be required. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/add-selected-repo-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/remove-selected-repo-from-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-org-variables": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["organization-actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/create-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when creating a variable */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/get-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/delete-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/update-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility?: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories that can access the organization variable. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + /** If specified, only code scanning alerts with this severity will be returned. */ + severity?: components["schemas"]["code-scanning-alert-severity"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/set-codespaces-billing": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when successfully modifying permissions. */ + 204: never; + 304: components["responses"]["not_modified"]; + /** Users are neither members nor collaborators of this organization. */ + 400: unknown; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. + * @enum {string} + */ + visibility: + | "disabled" + | "selected_members" + | "all_members" + | "all_members_and_outside_collaborators"; + /** @description The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. */ + selected_usernames?: string[]; + }; + }; + }; + }; + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-org-secret"][]; + }; + }; + }; + }; + }; + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description The ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * * `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** 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. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-codespaces-for-user-in-org": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * 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. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `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. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description 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; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description 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; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.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; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + "orgs/list-security-manager-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-simple"][]; + }; + }; + }; + }; + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/add-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** The organization has reached the maximum number of security manager teams. */ + 409: unknown; + }; + }; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/remove-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description 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` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + */ + permission?: string; + }; + }; + }; + }; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "orgs/enable-or-disable-security-product-on-all-org-repos": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + enablement: components["parameters"]["org-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** 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. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** 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. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/list-columns": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/list-repo-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["repo-required-workflow"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/get-repo-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-required-workflow"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-repo-required-workflow-usage": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.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. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to archive this repository. `false` will unarchive a previously archived repository. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Filters artifacts by exact match on their name field. */ + name?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + "actions/get-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Status response */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/set-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/list-repo-variables": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/create-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/get-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/delete-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/update-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description 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; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + /** + * @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. + * @default false + */ + lock_branch?: boolean; + /** + * @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. + * @default false + */ + allow_fork_syncing?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description 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; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** 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. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. */ + sort?: "created"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/list-codeql-databases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/get-codeql-database": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The language of the CodeQL database. */ + language: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis 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; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + /** + * @description Whether the SARIF file will be validated according to the code scanning specifications. + * This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. + */ + validate?: boolean; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + */ + permission?: string; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). */ + 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 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?: components["parameters"]["since"]; + /** 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; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * **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. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * + * 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` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * 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 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. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + manifest?: components["parameters"]["dependabot-alert-comma-separated-manifests"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** @deprecated **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. */ + page?: number; + /** @deprecated The number of results per page (max 100). */ + per_page?: number; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + "dependabot/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the Dependabot alert. + * A `dismissed_reason` must be provided when setting the state to `dismissed`. + * @enum {string} + */ + state: "dismissed" | "open"; + /** + * @description **Required when `state` is `dismissed`.** A reason for dismissing the alert. + * @enum {string} + */ + dismissed_reason?: + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk"; + /** @description An optional comment associated with dismissing the alert. */ + dismissed_comment?: string; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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 | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/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[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description 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`. + * @default + */ + target_url?: string; + /** + * @description 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: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description 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` */ + auto_inactive?: boolean; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/list-deployment-branch-policies": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number; + branch_policies: components["schemas"]["deployment-branch-policy"][]; + }; + }; + }; + }; + }; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** Response if the same branch name pattern already exists */ + 303: never; + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/update-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/delete-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + /** @description When forking from an existing repository, fork with only the default branch. */ + default_branch_only?: boolean; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description 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[]; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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; + }; + }; + }; + }; + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description 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. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. 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. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** 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://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + }; + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. */ + 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?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description 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 | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "not_planned" | "reopened") | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + "issues/check-user-can-be-assigned-to-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + assignee: string; + }; + }; + responses: { + /** Response if `assignee` can be assigned to `issue_number` */ + 204: never; + /** Response if `assignee` can not be assigned to `issue_number` */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. 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. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. 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. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description 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://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** Lists all notifications for the current user in the specified repository. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * 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. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + "repos/create-pages-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-deployment"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + artifact_url: string; + /** + * @description The target environment for this GitHub Pages deployment. + * @default github-pages + */ + environment?: string; + /** + * @description A unique string that represents the version of the build for this deployment. + * @default GITHUB_SHA + */ + pages_build_version: string; + /** @description The OIDC token issued by GitHub Actions certifying the origin of the deployment. */ + oidc_token: string; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** 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. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description 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; + /** @description 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; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description 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; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description 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; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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 above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description 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://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description 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; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; + }; + }; + }; + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description 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. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * 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. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Bad request, resolution comment is invalid or the resolution was not changed. */ + 400: unknown; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution or resolution comment */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + resolution_comment?: components["schemas"]["secret-scanning-alert-resolution-comment"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description 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 | null; + /** @description A short description of the status. */ + description?: string | null; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + }; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** 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. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description The new name to be given to the repository. */ + new_name?: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/list-environment-variables": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/create-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/get-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/delete-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/update-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + "search/code": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + "search/topics": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on 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. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **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. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } + | { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }; + }; + }; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/publish-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["codespace-with-full-repository"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the new repository. */ + name?: string; + /** + * @description Whether the new repository should be private. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @example [] + */ + emails: string[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + 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; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** @description 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; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/list-ssh-signing-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/create-ssh-signing-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ + key: string; + }; + }; + }; + }; + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/get-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/delete-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + "users/list-ssh-signing-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get all supported GitHub API versions. */ + "meta/get-all-versions": { + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/README.md new file mode 100644 index 0000000..343c456 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/README.md @@ -0,0 +1,71 @@ +# 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://github.com/octokit/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit/request-error.js/actions?query=workflow%3ATest) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.skypack.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, { + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz", + }, + headers: { + authorization: "token secret123", + }, + }, + response: { + status: 500, + url: "https://api.github.com/foo", + headers: { + "x-github-request-id": "1:2:3:4", + }, + data: { + foo: "bar", + }, + }, +}); + +error.message; // Oops +error.status; // 500 +error.request; // { method, url, headers, body } +error.response; // { url, status, headers, data } +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-node/index.js new file mode 100644 index 0000000..c676580 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,65 @@ +'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 logOnceCode = once(deprecation => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + } + }); + } +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-node/index.js.map new file mode 100644 index 0000000..5381b78 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":["logOnceCode","once","deprecation","console","warn","logOnceHeaders","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","headers","response","requestCopy","Object","assign","request","authorization","replace","url","defineProperty","get","Deprecation"],"mappings":";;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACpE,MAAMG,cAAc,GAAGJ,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACvE;AACA;AACA;AACO,MAAMI,YAAY,SAASC,KAAK,CAAC;EACpCC,WAAW,CAACC,OAAO,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACtC,KAAK,CAACF,OAAO,CAAC;;;IAGd,IAAIF,KAAK,CAACK,iBAAiB,EAAE;MACzBL,KAAK,CAACK,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAACJ,WAAW,CAAC;;IAEnD,IAAI,CAACK,IAAI,GAAG,WAAW;IACvB,IAAI,CAACC,MAAM,GAAGJ,UAAU;IACxB,IAAIK,OAAO;IACX,IAAI,SAAS,IAAIJ,OAAO,IAAI,OAAOA,OAAO,CAACI,OAAO,KAAK,WAAW,EAAE;MAChEA,OAAO,GAAGJ,OAAO,CAACI,OAAO;;IAE7B,IAAI,UAAU,IAAIJ,OAAO,EAAE;MACvB,IAAI,CAACK,QAAQ,GAAGL,OAAO,CAACK,QAAQ;MAChCD,OAAO,GAAGJ,OAAO,CAACK,QAAQ,CAACD,OAAO;;;IAGtC,MAAME,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAAC;IACtD,IAAIT,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,EAAE;MACvCJ,WAAW,CAACF,OAAO,GAAGG,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAACL,OAAO,EAAE;QAC7DM,aAAa,EAAEV,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,CAACC,OAAO,CAAC,MAAM,EAAE,aAAa;OACrF,CAAC;;IAENL,WAAW,CAACM,GAAG,GAAGN,WAAW,CAACM;;;KAGzBD,OAAO,CAAC,sBAAsB,EAAE,0BAA0B;;;KAG1DA,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;IAC9D,IAAI,CAACF,OAAO,GAAGH,WAAW;;IAE1BC,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;MAChCC,GAAG,GAAG;QACFzB,WAAW,CAAC,IAAI0B,uBAAW,CAAC,0EAA0E,CAAC,CAAC;QACxG,OAAOhB,UAAU;;KAExB,CAAC;IACFQ,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;MACnCC,GAAG,GAAG;QACFpB,cAAc,CAAC,IAAIqB,uBAAW,CAAC,uFAAuF,CAAC,CAAC;QACxH,OAAOX,OAAO,IAAI,EAAE;;KAE3B,CAAC;;AAEV;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 0000000..5eb1927 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,55 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 0000000..d6e089c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,33 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +import { 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; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + /** + * error response headers + * + * @deprecated `error.headers` is deprecated in favor of `error.response.headers` + */ + headers: ResponseHeaders; + /** + * Response object if a response was received + */ + response?: OctokitResponse; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 0000000..e5e1fab --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,9 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +export type RequestErrorOptions = { + /** @deprecated set `response` instead */ + headers?: ResponseHeaders; + request: RequestOptions; +} | { + response: OctokitResponse; + request: RequestOptions; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-web/index.js new file mode 100644 index 0000000..0fb64be --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,59 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} + +export { RequestError }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-web/index.js.map new file mode 100644 index 0000000..78f677f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACxE;AACA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;AAC9C,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;AAChC,QAAQ,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;AACjC,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW,EAAE;AAC5E,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,SAAS;AACT,QAAQ,IAAI,UAAU,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAC7C,YAAY,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/C,SAAS;AACT;AACA,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/D,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;AACnD,YAAY,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;AAC7E,gBAAgB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;AACnG,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;AACzC;AACA;AACA,aAAa,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AACxE;AACA;AACA,aAAa,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;AACvE,QAAQ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AACnC;AACA,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,YAAY,GAAG,GAAG;AAClB,gBAAgB,WAAW,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;AACzH,gBAAgB,OAAO,UAAU,CAAC;AAClC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;AAC/C,YAAY,GAAG,GAAG;AAClB,gBAAgB,cAAc,CAAC,IAAI,WAAW,CAAC,uFAAuF,CAAC,CAAC,CAAC;AACzI,gBAAgB,OAAO,OAAO,IAAI,EAAE,CAAC;AACrC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/package.json new file mode 100644 index 0000000..2215caa --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request-error/package.json @@ -0,0 +1,49 @@ +{ + "name": "@octokit/request-error", + "description": "Error class for Octokit request errors", + "version": "3.0.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "repository": "github:octokit/request-error.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-bundle-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "@types/node": "^18.0.0", + "@types/once": "^1.4.0", + "jest": "^29.0.0", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "2.8.3", + "ts-jest": "^29.0.0", + "typescript": "^4.0.0" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/request/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/README.md new file mode 100644 index 0000000..82a82a1 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/README.md @@ -0,0 +1,553 @@ +# 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://github.com/octokit/request.js/workflows/Test/badge.svg)](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%3Amain) + +`@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) when the runtime has no native `fetch` API). + + + + + +- [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) +- [Authentication](#authentication) +- [request()](#request) +- [`request.defaults()`](#requestdefaults) +- [`request.endpoint`](#requestendpoint) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter--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: "octokit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"], +}); +``` + +👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) + +😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). + +👍 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). + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from cdn.skypack.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 + +For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) + +```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", +}); +``` + +## Authentication + +The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const requestWithAuth = request.defaults({ + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, +}); +const result = await requestWithAuth("GET /user"); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + appId: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, + mediaType: { + previews: ["machine-man"], + }, +}); + +const { data: app } = await requestWithAuth("GET /app"); +const { data: app } = await requestWithAuth( + "POST /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + title: "Hello from the engine room", + } +); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + **Required**. 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 + + The base URL that route or url will be prefixed with, if they use relative paths. 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 + + 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.log + + object + + Used for internal logging. Defaults to console. +
+ 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. If the request was successful, the promise resolves with an object containing 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 promise is rejected with an `error` object containing 3 keys to help with debugging: + +- `error.status` The http response status code +- `error.request` The request options such as `method`, `url` and `data` +- `error.response` The http response object with `url`, `headers`, and `data` + +If the error is due to an `AbortSignal` being used, the resulting `AbortError` is bubbled up to the caller. + +## `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: + +- [`octokitRequest.endpoint()`](#endpoint) +- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) +- [`octokitRequest.endpoint.merge()`](#endpointdefaults) +- [`octokitRequest.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/auth-oauth-device/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-node/index.js new file mode 100644 index 0000000..11ac3f4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,156 @@ +'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 universalUserAgent = require('universal-user-agent'); +var isPlainObject = require('is-plain-object'); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + if (isPlainObject.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 || globalThis.fetch || /* istanbul ignore next */nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)).then(async response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new requestError.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined + }, + request: requestOptions + }); + } + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new requestError.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return getResponseData(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) throw error;else if (error.name === "AbortError") throw error; + throw new requestError.RequestError(error.message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); + +exports.request = request; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-node/index.js.map new file mode 100644 index 0000000..19fd47d --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","log","request","console","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","globalThis","nodeFetch","Object","assign","method","redirect","then","keyAndValue","matches","link","match","deprecationLink","pop","warn","sunset","RequestError","statusText","data","undefined","getResponseData","error","toErrorMessage","catch","name","message","contentType","get","test","json","text","getBuffer","errors","map","join","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","parse","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA3B,SAASC,iBAAiB,CAACC,QAAQ,EAAE;EAChD,OAAOA,QAAQ,CAACC,WAAW,EAAE;AACjC;;ACEe,SAASC,YAAY,CAACC,cAAc,EAAE;EACjD,MAAMC,GAAG,GAAGD,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1DD,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1BE,OAAO;EACb,IAAIC,2BAAa,CAACJ,cAAc,CAACK,IAAI,CAAC,IAClCC,KAAK,CAACC,OAAO,CAACP,cAAc,CAACK,IAAI,CAAC,EAAE;IACpCL,cAAc,CAACK,IAAI,GAAGG,IAAI,CAACC,SAAS,CAACT,cAAc,CAACK,IAAI,CAAC;;EAE7D,IAAIK,OAAO,GAAG,EAAE;EAChB,IAAIC,MAAM;EACV,IAAIC,GAAG;EACP,MAAMC,KAAK,GAAIb,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACW,KAAK,IACjEC,UAAU,CAACD,KAAK,8BACWE,SAAS;EACxC,OAAOF,KAAK,CAACb,cAAc,CAACY,GAAG,EAAEI,MAAM,CAACC,MAAM,CAAC;IAC3CC,MAAM,EAAElB,cAAc,CAACkB,MAAM;IAC7Bb,IAAI,EAAEL,cAAc,CAACK,IAAI;IACzBK,OAAO,EAAEV,cAAc,CAACU,OAAO;IAC/BS,QAAQ,EAAEnB,cAAc,CAACmB;GAC5B;;;EAGDnB,cAAc,CAACE,OAAO,CAAC,CAAC,CACnBkB,IAAI,CAAC,MAAOvB,QAAQ,IAAK;IAC1Be,GAAG,GAAGf,QAAQ,CAACe,GAAG;IAClBD,MAAM,GAAGd,QAAQ,CAACc,MAAM;IACxB,KAAK,MAAMU,WAAW,IAAIxB,QAAQ,CAACa,OAAO,EAAE;MACxCA,OAAO,CAACW,WAAW,CAAC,CAAC,CAAC,CAAC,GAAGA,WAAW,CAAC,CAAC,CAAC;;IAE5C,IAAI,aAAa,IAAIX,OAAO,EAAE;MAC1B,MAAMY,OAAO,GAAGZ,OAAO,CAACa,IAAI,IAAIb,OAAO,CAACa,IAAI,CAACC,KAAK,CAAC,8BAA8B,CAAC;MAClF,MAAMC,eAAe,GAAGH,OAAO,IAAIA,OAAO,CAACI,GAAG,EAAE;MAChDzB,GAAG,CAAC0B,IAAI,CAAE,uBAAsB3B,cAAc,CAACkB,MAAO,IAAGlB,cAAc,CAACY,GAAI,qDAAoDF,OAAO,CAACkB,MAAO,GAAEH,eAAe,GAAI,SAAQA,eAAgB,EAAC,GAAG,EAAG,EAAC,CAAC;;IAEzM,IAAId,MAAM,KAAK,GAAG,IAAIA,MAAM,KAAK,GAAG,EAAE;MAClC;;;IAGJ,IAAIX,cAAc,CAACkB,MAAM,KAAK,MAAM,EAAE;MAClC,IAAIP,MAAM,GAAG,GAAG,EAAE;QACd;;MAEJ,MAAM,IAAIkB,yBAAY,CAAChC,QAAQ,CAACiC,UAAU,EAAEnB,MAAM,EAAE;QAChDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAEC;SACT;QACD9B,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,KAAK,GAAG,EAAE;MAChB,MAAM,IAAIkB,yBAAY,CAAC,cAAc,EAAElB,MAAM,EAAE;QAC3Cd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAE,MAAME,eAAe,CAACpC,QAAQ;SACvC;QACDK,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,IAAI,GAAG,EAAE;MACf,MAAMoB,IAAI,GAAG,MAAME,eAAe,CAACpC,QAAQ,CAAC;MAC5C,MAAMqC,KAAK,GAAG,IAAIL,yBAAY,CAACM,cAAc,CAACJ,IAAI,CAAC,EAAEpB,MAAM,EAAE;QACzDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB;SACH;QACD7B,OAAO,EAAEF;OACZ,CAAC;MACF,MAAMkC,KAAK;;IAEf,OAAOD,eAAe,CAACpC,QAAQ,CAAC;GACnC,CAAC,CACGuB,IAAI,CAAEW,IAAI,IAAK;IAChB,OAAO;MACHpB,MAAM;MACNC,GAAG;MACHF,OAAO;MACPqB;KACH;GACJ,CAAC,CACGK,KAAK,CAAEF,KAAK,IAAK;IAClB,IAAIA,KAAK,YAAYL,yBAAY,EAC7B,MAAMK,KAAK,CAAC,KACX,IAAIA,KAAK,CAACG,IAAI,KAAK,YAAY,EAChC,MAAMH,KAAK;IACf,MAAM,IAAIL,yBAAY,CAACK,KAAK,CAACI,OAAO,EAAE,GAAG,EAAE;MACvCpC,OAAO,EAAEF;KACZ,CAAC;GACL,CAAC;AACN;AACA,eAAeiC,eAAe,CAACpC,QAAQ,EAAE;EACrC,MAAM0C,WAAW,GAAG1C,QAAQ,CAACa,OAAO,CAAC8B,GAAG,CAAC,cAAc,CAAC;EACxD,IAAI,mBAAmB,CAACC,IAAI,CAACF,WAAW,CAAC,EAAE;IACvC,OAAO1C,QAAQ,CAAC6C,IAAI,EAAE;;EAE1B,IAAI,CAACH,WAAW,IAAI,wBAAwB,CAACE,IAAI,CAACF,WAAW,CAAC,EAAE;IAC5D,OAAO1C,QAAQ,CAAC8C,IAAI,EAAE;;EAE1B,OAAOC,iBAAS,CAAC/C,QAAQ,CAAC;AAC9B;AACA,SAASsC,cAAc,CAACJ,IAAI,EAAE;EAC1B,IAAI,OAAOA,IAAI,KAAK,QAAQ,EACxB,OAAOA,IAAI;;EAEf,IAAI,SAAS,IAAIA,IAAI,EAAE;IACnB,IAAIzB,KAAK,CAACC,OAAO,CAACwB,IAAI,CAACc,MAAM,CAAC,EAAE;MAC5B,OAAQ,GAAEd,IAAI,CAACO,OAAQ,KAAIP,IAAI,CAACc,MAAM,CAACC,GAAG,CAACtC,IAAI,CAACC,SAAS,CAAC,CAACsC,IAAI,CAAC,IAAI,CAAE,EAAC;;IAE3E,OAAOhB,IAAI,CAACO,OAAO;;;EAGvB,OAAQ,kBAAiB9B,IAAI,CAACC,SAAS,CAACsB,IAAI,CAAE,EAAC;AACnD;;ACzHe,SAASiB,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EAC3D,MAAMC,QAAQ,GAAGF,WAAW,CAACG,QAAQ,CAACF,WAAW,CAAC;EAClD,MAAMG,MAAM,GAAG,UAAUC,KAAK,EAAEC,UAAU,EAAE;IACxC,MAAMC,eAAe,GAAGL,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;IACzD,IAAI,CAACC,eAAe,CAACtD,OAAO,IAAI,CAACsD,eAAe,CAACtD,OAAO,CAACwD,IAAI,EAAE;MAC3D,OAAO3D,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACH,eAAe,CAAC,CAAC;;IAExD,MAAMtD,OAAO,GAAG,CAACoD,KAAK,EAAEC,UAAU,KAAK;MACnC,OAAOxD,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACR,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC,CAAC,CAAC;KACzE;IACDvC,MAAM,CAACC,MAAM,CAACf,OAAO,EAAE;MACnBiD,QAAQ;MACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;KAC7C,CAAC;IACF,OAAOK,eAAe,CAACtD,OAAO,CAACwD,IAAI,CAACxD,OAAO,EAAEsD,eAAe,CAAC;GAChE;EACD,OAAOxC,MAAM,CAACC,MAAM,CAACoC,MAAM,EAAE;IACzBF,QAAQ;IACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;GAC7C,CAAC;AACN;;MCjBajD,OAAO,GAAG8C,YAAY,CAACG,iBAAQ,EAAE;EAC1CzC,OAAO,EAAE;IACL,YAAY,EAAG,sBAAqBf,OAAQ,IAAGkE,+BAAY,EAAG;;AAEtE,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 0000000..223307a --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,123 @@ +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) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/get-buffer-response.js new file mode 100644 index 0000000..845a394 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 0000000..2460e99 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 0000000..4b40fe8 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 0000000..e206429 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 0000000..4901c79 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,11 @@ +import { EndpointInterface } from "@octokit/types"; +export default function fetchWrapper(requestOptions: ReturnType & { + redirect?: "error" | "follow" | "manual"; +}): Promise<{ + status: number; + url: string; + headers: { + [header: string]: string; + }; + data: any; +}>; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts new file mode 100644 index 0000000..915b705 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/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/auth-oauth-device/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 0000000..1030809 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("@octokit/types").RequestInterface; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 0000000..b45decc --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..0080469 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types"; +export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-web/index.js new file mode 100644 index 0000000..bf549a4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,162 @@ +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 = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +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 }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-web/index.js.map new file mode 100644 index 0000000..b2d1f15 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA3B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACpD,IAAI,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;AACrD,IAAI,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG;AACpE,UAAU,cAAc,CAAC,OAAO,CAAC,GAAG;AACpC,UAAU,OAAO,CAAC;AAClB,IAAI,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;AAC1C,QAAQ,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK;AACL,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK;AACzE,QAAQ,UAAU,CAAC,KAAK;AACxB,mCAAmC,SAAS,CAAC;AAC7C,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACnD,QAAQ,MAAM,EAAE,cAAc,CAAC,MAAM;AACrC,QAAQ,IAAI,EAAE,cAAc,CAAC,IAAI;AACjC,QAAQ,OAAO,EAAE,cAAc,CAAC,OAAO;AACvC,QAAQ,QAAQ,EAAE,cAAc,CAAC,QAAQ;AACzC,KAAK;AACL;AACA;AACA,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC5B,SAAS,IAAI,CAAC,OAAO,QAAQ,KAAK;AAClC,QAAQ,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC3B,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,QAAQ,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;AACpD,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,aAAa,IAAI,OAAO,EAAE;AACtC,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC/F,YAAY,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7D,YAAY,GAAG,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,kDAAkD,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClN,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;AAC9C,YAAY,OAAO;AACnB,SAAS;AACT;AACA,QAAQ,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9C,YAAY,IAAI,MAAM,GAAG,GAAG,EAAE;AAC9B,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;AAChE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,SAAS;AACnC,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;AAC3D,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,MAAM,eAAe,CAAC,QAAQ,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE;AAC3B,YAAY,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;AACzE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI;AACxB,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzC,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK;AACxB,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,GAAG;AACf,YAAY,OAAO;AACnB,YAAY,IAAI;AAChB,SAAS,CAAC;AACV,KAAK,CAAC;AACN,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1B,QAAQ,IAAI,KAAK,YAAY,YAAY;AACzC,YAAY,MAAM,KAAK,CAAC;AACxB,aAAa,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;AAC5C,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;AACnD,YAAY,OAAO,EAAE,cAAc;AACnC,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;AACD,eAAe,eAAe,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC7D,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AAC/C,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACpE,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AACD,SAAS,cAAc,CAAC,IAAI,EAAE;AAC9B,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AAChC,QAAQ,OAAO,IAAI,CAAC;AACpB;AACA,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE;AAC3B,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACxC,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpF,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL;AACA,IAAI,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;;ACzHc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACvD,IAAI,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;AAChD,QAAQ,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;AACvE,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;AAC/C,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AAC/B,YAAY,QAAQ;AACpB,YAAY,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACtE,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,CAAC;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/README.md b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/package.json new file mode 100644 index 0000000..53910ad --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/package.json @@ -0,0 +1,58 @@ +{ + "name": "@octokit/request", + "description": "Send parameterized requests to GitHub's APIs with sensible defaults in browsers and Node", + "version": "6.2.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "repository": "github:octokit/request.js", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/auth-app": "^4.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^29.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^18.0.0", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^9.3.1", + "jest": "^29.0.0", + "lolex": "^6.0.0", + "prettier": "2.8.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "string-to-arraybuffer": "^1.0.2", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/auth-oauth-device/package.json b/node_modules/@octokit/auth-oauth-device/package.json new file mode 100644 index 0000000..1797755 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/package.json @@ -0,0 +1,49 @@ +{ + "name": "@octokit/auth-oauth-device", + "description": "GitHub OAuth Device authentication strategy for JavaScript", + "version": "3.1.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "github:octokit/auth-oauth-device.js", + "dependencies": { + "@octokit/oauth-methods": "^2.0.0", + "@octokit/request": "^6.0.0", + "@octokit/types": "^6.10.0", + "universal-user-agent": "^6.0.0" + }, + "peerDependencies": {}, + "devDependencies": { + "@octokit/tsconfig": "^1.0.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.2", + "@pika/plugin-build-web": "^0.9.2", + "@pika/plugin-ts-standard-pkg": "^0.9.2", + "@types/jest": "^27.0.0", + "@types/node": "^16.0.0", + "fetch-mock": "^9.11.0", + "jest": "^27.0.0", + "prettier": "2.7.1", + "semantic-release": "^18.0.0", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.2.2" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/auth-oauth-user/LICENSE b/node_modules/@octokit/auth-oauth-user/LICENSE new file mode 100644 index 0000000..57049d0 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 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/auth-oauth-user/README.md b/node_modules/@octokit/auth-oauth-user/README.md new file mode 100644 index 0000000..5215668 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/README.md @@ -0,0 +1,1010 @@ +# auth-oauth-user.js + +> Octokit authentication strategy for OAuth user authentication + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-user.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-user) +[![Build Status](https://github.com/octokit/auth-oauth-user.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-user.js/actions?query=workflow%3ATest+branch%3Amain) + +**Important:** `@octokit/auth-oauth-user` requires your app's `client_secret`, which must not be exposed. If you are looking for an OAuth user authentication strategy that can be used on a client (browser, IoT, CLI), check out [`@octokit/auth-oauth-user-client`](https://github.com/octokit/auth-oauth-user-client.js#readme). Note that `@octokit/auth-oauth-user-client` requires a backend. The only exception is [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme) which does not require the `client_secret`, but does not work in browsers due to CORS constraints. + +

+Table of contents + + + +- [Features](#features) +- [Standalone usage](#standalone-usage) + - [Exchange code from OAuth web flow](#exchange-code-from-oauth-web-flow) + - [OAuth Device flow](#oauth-device-flow) + - [Use an existing authentication](#use-an-existing-authentication) +- [Usage with Octokit](#usage-with-octokit) +- [`createOAuthUserAuth(options)` or `new Octokit({ auth })`](#createoauthuserauthoptions-or-new-octokit-auth-) + - [When using GitHub's OAuth web flow](#when-using-githubs-oauth-web-flow) + - [When using GitHub's OAuth device flow](#when-using-githubs-oauth-device-flow) + - [When passing an existing authentication object](#when-passing-an-existing-authentication-object) +- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions) +- [Authentication object](#authentication-object) + - [OAuth APP authentication token](#oauth-app-authentication-token) + - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) + - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [Contributing](#contributing) +- [License](#license) + + + +
+ +## Features + +- Code for token exchange from [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) +- [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow) +- Caches token for succesive calls +- Auto-refreshing for [expiring user access tokens](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens) +- Applies the correct authentication strategy based on the request URL when using with `Octokit` +- Token verification +- Token reset +- Token invalidation +- Application grant revocation + +## Standalone usage + + + + + + +
+ +Browsers + + + +Load `@octokit/auth-oauth-user` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/auth-oauth-user` + +```js +const { createOAuthUserAuth } = require("@octokit/auth-oauth-user"); +``` + +
+ +### Exchange code from OAuth web flow + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + code: "code123", + // optional + state: "state123", + redirectUrl: "https://acme-inc.com/login", +}); + +// Exchanges the code for the user access token authentication on first call +// and caches the authentication for successive calls +const { token } = await auth(); +``` + +About [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) + +### OAuth Device flow + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +// resolves once the user entered the `user_code` on `verification_uri` +const { token } = await auth(); +``` + +About [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow) + +### Use an existing authentication + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + clientType: "oauth-app", + token: "token123", +}); + +// will return the passed authentication +const { token } = await auth(); +``` + +See [Authentication object](#authentication-object). + +## Usage with Octokit + + + + + + +
+ +Browsers + + + +`@octokit/auth-oauth-user` cannot be used in the browser. It requires `clientSecret` to be set which must not be exposed to clients, and some of the OAuth APIs it uses do not support CORS. + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-oauth-user`. Optionally replace `@octokit/core` with a compatible module + +```js +const { Octokit } = require("@octokit/core"); +const { createOAuthUserAuth } = require("@octokit/auth-oauth-user"); +``` + +
+ +```js +const octokit = new Octokit({ + authStrategy: createOAuthUserAuth, + auth: { + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + code: "code123", + }, +}); + +// Exchanges the code for the user access token authentication on first request +// and caches the authentication for successive requests +const { + data: { login }, +} = await octokit.request("GET /user"); +console.log("Hello, %s!", login); +``` + +## `createOAuthUserAuth(options)` or `new Octokit({ auth })` + +The `createOAuthUserAuth` method accepts a single `options` object as argument. The same set of options can be passed as `auth` to the `Octokit` constructor when setting `authStrategy: createOAuthUserAuth` + +### When using GitHub's OAuth web flow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page. +
+ clientType + + string + + Either "oauth-app" or "github-app". Defaults to "oauth-app". +
+ code + + string + + +**Required.** The authorization code which was passed as query parameter to the callback URL from [GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow). + +
+ state + + string + + +The unguessable random string you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity). + +
+ redirectUrl + + string + + +The redirect_uri parameter you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity). + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### When using GitHub's OAuth device flow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. The clientSecret is not needed for the OAuth device flow itself, but it is required for resetting, refreshing, and invalidating a token. Find the Client Secret on your app's settings page. +
+ clientType + + string + + Either "oauth-app" or "github-app". Defaults to "oauth-app". +
+ onVerification + + function + + +**Required**. A function that is called once the device and user codes were retrieved + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### When passing an existing authentication object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Either "oauth-app" or "github". +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page. +
+ token + + string + + Required. The user access token +
+ scopes + + array of strings + + Required if clientType is set to "oauth-app". Array of OAuth scope names the token was granted +
+ refreshToken + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. +
+ expiresAt + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +## `auth(options)` or `octokit.auth(options)` + +The async `auth()` method is returned by `createOAuthUserAuth(options)` or set on the `octokit` instance when the `Octokit` constructor was called with `authStrategy: createOAuthUserAuth`. + +Once `auth()` receives a valid authentication object it caches it in memory and uses it for subsequent calls. It also caches if the token is invalid and no longer tries to send any requests. If the authentication is using a refresh token, a new token will be requested as needed. Calling `auth({ type: "reset" })` will replace the internally cached authentication. + +Resolves with an [authentication object](#authentication-object). + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + +Without setting `type` auth will return the current authentication object, or exchange the `code` from the strategy options on first call. If the current authentication token is expired, the tokens will be refreshed. + +Possible values for `type` are + +- `"get"`: returns the token from internal state and creates it if none was created yet +- `"check"`: sends request to verify the validity of the current token +- `"reset"`: invalidates current token and replaces it with a new one +- `"refresh"`: GitHub Apps only, and only if expiring user tokens are enabled. +- `"delete"`: invalidates current token +- `"deleteAuthorization"`: revokes OAuth access for application. All tokens for the current user created by the same app are invalidated. The user will be prompted to grant access again during the next OAuth web flow. + +
+ +## Authentication object + +There are three possible results + +1. [OAuth APP authentication token](#oauth-app-authentication-token) +1. [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) +1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +### OAuth APP authentication token + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +### GitHub APP user authentication token with expiring disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +### GitHub APP user authentication token with expiring enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: user } = await auth.hook(request, "GET /user"); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: user } = await requestWithAuth("GET /user"); +``` + +## Types + +```ts +import { + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, + GitHubAppAuthOptions, + GitHubAppStrategyOptions, + GitHubAppStrategyOptionsDeviceFlow, + GitHubAppStrategyOptionsExistingAuthentication, + GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, + GitHubAppStrategyOptionsWebFlow, + OAuthAppAuthentication, + OAuthAppAuthOptions, + OAuthAppStrategyOptions, + OAuthAppStrategyOptionsDeviceFlow, + OAuthAppStrategyOptionsExistingAuthentication, + OAuthAppStrategyOptionsWebFlow, +} from "@octokit/auth-oauth-user"; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-oauth-user/dist-node/index.js b/node_modules/@octokit/auth-oauth-user/dist-node/index.js new file mode 100644 index 0000000..2a095d4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-node/index.js @@ -0,0 +1,327 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var universalUserAgent = require('universal-user-agent'); +var request = require('@octokit/request'); +var authOauthDevice = require('@octokit/auth-oauth-device'); +var oauthMethods = require('@octokit/oauth-methods'); +var btoa = _interopDefault(require('btoa-lite')); + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +const VERSION = "1.3.0"; + +async function getAuthentication(state) { + // handle code exchange form OAuth Web Flow + if ("code" in state.strategyOptions) { + const { + authentication + } = await oauthMethods.exchangeWebFlowCode(_objectSpread2(_objectSpread2({ + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType + }, state.strategyOptions), {}, { + request: state.request + })); + return _objectSpread2({ + type: "token", + tokenType: "oauth" + }, authentication); + } // handle OAuth device flow + + + if ("onVerification" in state.strategyOptions) { + const deviceAuth = authOauthDevice.createOAuthDeviceAuth(_objectSpread2(_objectSpread2({ + clientType: state.clientType, + clientId: state.clientId + }, state.strategyOptions), {}, { + request: state.request + })); + const authentication = await deviceAuth({ + type: "oauth" + }); + return _objectSpread2({ + clientSecret: state.clientSecret + }, authentication); + } // use existing authentication + + + if ("token" in state.strategyOptions) { + return _objectSpread2({ + type: "token", + tokenType: "oauth", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType + }, state.strategyOptions); + } + + throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); +} + +async function auth(state, options = {}) { + if (!state.authentication) { + // This is what TS makes us do ¯\_(ツ)_/¯ + state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state); + } + + if (state.authentication.invalid) { + throw new Error("[@octokit/auth-oauth-user] Token is invalid"); + } + + const currentAuthentication = state.authentication; // (auto) refresh for user-to-server tokens + + if ("expiresAt" in currentAuthentication) { + if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) { + const { + authentication + } = await oauthMethods.refreshToken({ + clientType: "github-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + refreshToken: currentAuthentication.refreshToken, + request: state.request + }); + state.authentication = _objectSpread2({ + tokenType: "oauth", + type: "token" + }, authentication); + } + } // throw error for invalid refresh call + + + if (options.type === "refresh") { + if (state.clientType === "oauth-app") { + throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens"); + } + + if (!currentAuthentication.hasOwnProperty("expiresAt")) { + throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); + } + } // check or reset token + + + if (options.type === "check" || options.type === "reset") { + const method = options.type === "check" ? oauthMethods.checkToken : oauthMethods.resetToken; + + try { + const { + authentication + } = await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request + }); + state.authentication = _objectSpread2({ + tokenType: "oauth", + type: "token" + }, authentication); + return state.authentication; + } catch (error) { + // istanbul ignore else + if (error.status === 404) { + error.message = "[@octokit/auth-oauth-user] Token is invalid"; // @ts-expect-error TBD + + state.authentication.invalid = true; + } + + throw error; + } + } // invalidate + + + if (options.type === "delete" || options.type === "deleteAuthorization") { + const method = options.type === "delete" ? oauthMethods.deleteToken : oauthMethods.deleteAuthorization; + + try { + await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request + }); + } catch (error) { + // istanbul ignore if + if (error.status !== 404) throw error; + } + + state.authentication.invalid = true; + return state.authentication; + } + + return state.authentication; +} + +/** + * The following endpoints require an OAuth App to authenticate using its client_id and client_secret. + * + * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token + * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token + * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token + * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token + * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization + * + * deprecated: + * + * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization + * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization + * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application + * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application + */ +const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; +function requiresBasicAuth(url) { + return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); +} + +async function hook(state, request, route, parameters = {}) { + const endpoint = request.endpoint.merge(route, parameters); // Do not intercept OAuth Web/Device flow request + + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + + if (requiresBasicAuth(endpoint.url)) { + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + return request(endpoint); + } // TS makes us do this ¯\_(ツ)_/¯ + + + const { + token + } = state.clientType === "oauth-app" ? await auth(_objectSpread2(_objectSpread2({}, state), {}, { + request + })) : await auth(_objectSpread2(_objectSpread2({}, state), {}, { + request + })); + endpoint.headers.authorization = "token " + token; + return request(endpoint); +} + +const _excluded = ["clientId", "clientSecret", "clientType", "request"]; +function createOAuthUserAuth(_ref) { + let { + clientId, + clientSecret, + clientType = "oauth-app", + request: request$1 = request.request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } + }) + } = _ref, + strategyOptions = _objectWithoutProperties(_ref, _excluded); + + const state = Object.assign({ + clientType, + clientId, + clientSecret, + strategyOptions, + request: request$1 + }); // @ts-expect-error not worth the extra code needed to appease TS + + return Object.assign(auth.bind(null, state), { + // @ts-expect-error not worth the extra code needed to appease TS + hook: hook.bind(null, state) + }); +} +createOAuthUserAuth.VERSION = VERSION; + +exports.createOAuthUserAuth = createOAuthUserAuth; +exports.requiresBasicAuth = requiresBasicAuth; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map new file mode 100644 index 0000000..c359a01 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-authentication.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"1.3.0\";\n","// @ts-nocheck there is only place for one of us in this file. And it's not you, TS\nimport { createOAuthDeviceAuth } from \"@octokit/auth-oauth-device\";\nimport { exchangeWebFlowCode } from \"@octokit/oauth-methods\";\nexport async function getAuthentication(state) {\n // handle code exchange form OAuth Web Flow\n if (\"code\" in state.strategyOptions) {\n const { authentication } = await exchangeWebFlowCode({\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n ...state.strategyOptions,\n request: state.request,\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n // handle OAuth device flow\n if (\"onVerification\" in state.strategyOptions) {\n const deviceAuth = createOAuthDeviceAuth({\n clientType: state.clientType,\n clientId: state.clientId,\n ...state.strategyOptions,\n request: state.request,\n });\n const authentication = await deviceAuth({\n type: \"oauth\",\n });\n return {\n clientSecret: state.clientSecret,\n ...authentication,\n };\n }\n // use existing authentication\n if (\"token\" in state.strategyOptions) {\n return {\n type: \"token\",\n tokenType: \"oauth\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n ...state.strategyOptions,\n };\n }\n throw new Error(\"[@octokit/auth-oauth-user] Invalid strategy options\");\n}\n","import { getAuthentication } from \"./get-authentication\";\nimport { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from \"@octokit/oauth-methods\";\nexport async function auth(state, options = {}) {\n if (!state.authentication) {\n // This is what TS makes us do ¯\\_(ツ)_/¯\n state.authentication =\n state.clientType === \"oauth-app\"\n ? await getAuthentication(state)\n : await getAuthentication(state);\n }\n if (state.authentication.invalid) {\n throw new Error(\"[@octokit/auth-oauth-user] Token is invalid\");\n }\n const currentAuthentication = state.authentication;\n // (auto) refresh for user-to-server tokens\n if (\"expiresAt\" in currentAuthentication) {\n if (options.type === \"refresh\" ||\n new Date(currentAuthentication.expiresAt) < new Date()) {\n const { authentication } = await refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n refreshToken: currentAuthentication.refreshToken,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n ...authentication,\n };\n }\n }\n // throw error for invalid refresh call\n if (options.type === \"refresh\") {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\"[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens\");\n }\n if (!currentAuthentication.hasOwnProperty(\"expiresAt\")) {\n throw new Error(\"[@octokit/auth-oauth-user] Refresh token missing\");\n }\n }\n // check or reset token\n if (options.type === \"check\" || options.type === \"reset\") {\n const method = options.type === \"check\" ? checkToken : resetToken;\n try {\n const { authentication } = await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n // @ts-expect-error TBD\n ...authentication,\n };\n return state.authentication;\n }\n catch (error) {\n // istanbul ignore else\n if (error.status === 404) {\n error.message = \"[@octokit/auth-oauth-user] Token is invalid\";\n // @ts-expect-error TBD\n state.authentication.invalid = true;\n }\n throw error;\n }\n }\n // invalidate\n if (options.type === \"delete\" || options.type === \"deleteAuthorization\") {\n const method = options.type === \"delete\" ? deleteToken : deleteAuthorization;\n try {\n await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n }\n catch (error) {\n // istanbul ignore if\n if (error.status !== 404)\n throw error;\n }\n state.authentication.invalid = true;\n return state.authentication;\n }\n return state.authentication;\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token\n * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token\n * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[^/]+\\/(token|grant)s?/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { auth } from \"./auth\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters = {}) {\n const endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n return request(endpoint);\n }\n // TS makes us do this ¯\\_(ツ)_/¯\n const { token } = state.clientType === \"oauth-app\"\n ? await auth({ ...state, request })\n : await auth({ ...state, request });\n endpoint.headers.authorization = \"token \" + token;\n return request(endpoint);\n}\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { VERSION } from \"./version\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport function createOAuthUserAuth({ clientId, clientSecret, clientType = \"oauth-app\", request = octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n}), ...strategyOptions }) {\n const state = Object.assign({\n clientType,\n clientId,\n clientSecret,\n strategyOptions,\n request,\n });\n // @ts-expect-error not worth the extra code needed to appease TS\n return Object.assign(auth.bind(null, state), {\n // @ts-expect-error not worth the extra code needed to appease TS\n hook: hook.bind(null, state),\n });\n}\ncreateOAuthUserAuth.VERSION = VERSION;\n"],"names":["VERSION","getAuthentication","state","strategyOptions","authentication","exchangeWebFlowCode","clientId","clientSecret","clientType","request","type","tokenType","deviceAuth","createOAuthDeviceAuth","Error","auth","options","invalid","currentAuthentication","Date","expiresAt","refreshToken","hasOwnProperty","method","checkToken","resetToken","token","error","status","message","deleteToken","deleteAuthorization","ROUTES_REQUIRING_BASIC_AUTH","requiresBasicAuth","url","test","hook","route","parameters","endpoint","merge","credentials","btoa","headers","authorization","createOAuthUserAuth","octokitRequest","defaults","getUserAgent","Object","assign","bind"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACGA,eAAeC,iBAAf,CAAiCC,KAAjC,EAAwC;AAC3C;AACA,MAAI,UAAUA,KAAK,CAACC,eAApB,EAAqC;AACjC,UAAM;AAAEC,MAAAA;AAAF,QAAqB,MAAMC,gCAAmB;AAChDC,MAAAA,QAAQ,EAAEJ,KAAK,CAACI,QADgC;AAEhDC,MAAAA,YAAY,EAAEL,KAAK,CAACK,YAF4B;AAGhDC,MAAAA,UAAU,EAAEN,KAAK,CAACM;AAH8B,OAI7CN,KAAK,CAACC,eAJuC;AAKhDM,MAAAA,OAAO,EAAEP,KAAK,CAACO;AALiC,OAApD;AAOA;AACIC,MAAAA,IAAI,EAAE,OADV;AAEIC,MAAAA,SAAS,EAAE;AAFf,OAGOP,cAHP;AAKH,GAf0C;;;AAiB3C,MAAI,oBAAoBF,KAAK,CAACC,eAA9B,EAA+C;AAC3C,UAAMS,UAAU,GAAGC,qCAAqB;AACpCL,MAAAA,UAAU,EAAEN,KAAK,CAACM,UADkB;AAEpCF,MAAAA,QAAQ,EAAEJ,KAAK,CAACI;AAFoB,OAGjCJ,KAAK,CAACC,eAH2B;AAIpCM,MAAAA,OAAO,EAAEP,KAAK,CAACO;AAJqB,OAAxC;AAMA,UAAML,cAAc,GAAG,MAAMQ,UAAU,CAAC;AACpCF,MAAAA,IAAI,EAAE;AAD8B,KAAD,CAAvC;AAGA;AACIH,MAAAA,YAAY,EAAEL,KAAK,CAACK;AADxB,OAEOH,cAFP;AAIH,GA/B0C;;;AAiC3C,MAAI,WAAWF,KAAK,CAACC,eAArB,EAAsC;AAClC;AACIO,MAAAA,IAAI,EAAE,OADV;AAEIC,MAAAA,SAAS,EAAE,OAFf;AAGIL,MAAAA,QAAQ,EAAEJ,KAAK,CAACI,QAHpB;AAIIC,MAAAA,YAAY,EAAEL,KAAK,CAACK,YAJxB;AAKIC,MAAAA,UAAU,EAAEN,KAAK,CAACM;AALtB,OAMON,KAAK,CAACC,eANb;AAQH;;AACD,QAAM,IAAIW,KAAJ,CAAU,qDAAV,CAAN;AACH;;AC7CM,eAAeC,IAAf,CAAoBb,KAApB,EAA2Bc,OAAO,GAAG,EAArC,EAAyC;AAC5C,MAAI,CAACd,KAAK,CAACE,cAAX,EAA2B;AACvB;AACAF,IAAAA,KAAK,CAACE,cAAN,GACIF,KAAK,CAACM,UAAN,KAAqB,WAArB,GACM,MAAMP,iBAAiB,CAACC,KAAD,CAD7B,GAEM,MAAMD,iBAAiB,CAACC,KAAD,CAHjC;AAIH;;AACD,MAAIA,KAAK,CAACE,cAAN,CAAqBa,OAAzB,EAAkC;AAC9B,UAAM,IAAIH,KAAJ,CAAU,6CAAV,CAAN;AACH;;AACD,QAAMI,qBAAqB,GAAGhB,KAAK,CAACE,cAApC,CAX4C;;AAa5C,MAAI,eAAec,qBAAnB,EAA0C;AACtC,QAAIF,OAAO,CAACN,IAAR,KAAiB,SAAjB,IACA,IAAIS,IAAJ,CAASD,qBAAqB,CAACE,SAA/B,IAA4C,IAAID,IAAJ,EADhD,EAC4D;AACxD,YAAM;AAAEf,QAAAA;AAAF,UAAqB,MAAMiB,yBAAY,CAAC;AAC1Cb,QAAAA,UAAU,EAAE,YAD8B;AAE1CF,QAAAA,QAAQ,EAAEJ,KAAK,CAACI,QAF0B;AAG1CC,QAAAA,YAAY,EAAEL,KAAK,CAACK,YAHsB;AAI1Cc,QAAAA,YAAY,EAAEH,qBAAqB,CAACG,YAJM;AAK1CZ,QAAAA,OAAO,EAAEP,KAAK,CAACO;AAL2B,OAAD,CAA7C;AAOAP,MAAAA,KAAK,CAACE,cAAN;AACIO,QAAAA,SAAS,EAAE,OADf;AAEID,QAAAA,IAAI,EAAE;AAFV,SAGON,cAHP;AAKH;AACJ,GA7B2C;;;AA+B5C,MAAIY,OAAO,CAACN,IAAR,KAAiB,SAArB,EAAgC;AAC5B,QAAIR,KAAK,CAACM,UAAN,KAAqB,WAAzB,EAAsC;AAClC,YAAM,IAAIM,KAAJ,CAAU,sEAAV,CAAN;AACH;;AACD,QAAI,CAACI,qBAAqB,CAACI,cAAtB,CAAqC,WAArC,CAAL,EAAwD;AACpD,YAAM,IAAIR,KAAJ,CAAU,kDAAV,CAAN;AACH;AACJ,GAtC2C;;;AAwC5C,MAAIE,OAAO,CAACN,IAAR,KAAiB,OAAjB,IAA4BM,OAAO,CAACN,IAAR,KAAiB,OAAjD,EAA0D;AACtD,UAAMa,MAAM,GAAGP,OAAO,CAACN,IAAR,KAAiB,OAAjB,GAA2Bc,uBAA3B,GAAwCC,uBAAvD;;AACA,QAAI;AACA,YAAM;AAAErB,QAAAA;AAAF,UAAqB,MAAMmB,MAAM,CAAC;AACpC;AACAf,QAAAA,UAAU,EAAEN,KAAK,CAACM,UAFkB;AAGpCF,QAAAA,QAAQ,EAAEJ,KAAK,CAACI,QAHoB;AAIpCC,QAAAA,YAAY,EAAEL,KAAK,CAACK,YAJgB;AAKpCmB,QAAAA,KAAK,EAAExB,KAAK,CAACE,cAAN,CAAqBsB,KALQ;AAMpCjB,QAAAA,OAAO,EAAEP,KAAK,CAACO;AANqB,OAAD,CAAvC;AAQAP,MAAAA,KAAK,CAACE,cAAN;AACIO,QAAAA,SAAS,EAAE,OADf;AAEID,QAAAA,IAAI,EAAE;AAFV,SAION,cAJP;AAMA,aAAOF,KAAK,CAACE,cAAb;AACH,KAhBD,CAiBA,OAAOuB,KAAP,EAAc;AACV;AACA,UAAIA,KAAK,CAACC,MAAN,KAAiB,GAArB,EAA0B;AACtBD,QAAAA,KAAK,CAACE,OAAN,GAAgB,6CAAhB,CADsB;;AAGtB3B,QAAAA,KAAK,CAACE,cAAN,CAAqBa,OAArB,GAA+B,IAA/B;AACH;;AACD,YAAMU,KAAN;AACH;AACJ,GApE2C;;;AAsE5C,MAAIX,OAAO,CAACN,IAAR,KAAiB,QAAjB,IAA6BM,OAAO,CAACN,IAAR,KAAiB,qBAAlD,EAAyE;AACrE,UAAMa,MAAM,GAAGP,OAAO,CAACN,IAAR,KAAiB,QAAjB,GAA4BoB,wBAA5B,GAA0CC,gCAAzD;;AACA,QAAI;AACA,YAAMR,MAAM,CAAC;AACT;AACAf,QAAAA,UAAU,EAAEN,KAAK,CAACM,UAFT;AAGTF,QAAAA,QAAQ,EAAEJ,KAAK,CAACI,QAHP;AAITC,QAAAA,YAAY,EAAEL,KAAK,CAACK,YAJX;AAKTmB,QAAAA,KAAK,EAAExB,KAAK,CAACE,cAAN,CAAqBsB,KALnB;AAMTjB,QAAAA,OAAO,EAAEP,KAAK,CAACO;AANN,OAAD,CAAZ;AAQH,KATD,CAUA,OAAOkB,KAAP,EAAc;AACV;AACA,UAAIA,KAAK,CAACC,MAAN,KAAiB,GAArB,EACI,MAAMD,KAAN;AACP;;AACDzB,IAAAA,KAAK,CAACE,cAAN,CAAqBa,OAArB,GAA+B,IAA/B;AACA,WAAOf,KAAK,CAACE,cAAb;AACH;;AACD,SAAOF,KAAK,CAACE,cAAb;AACH;;AC7FD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM4B,2BAA2B,GAAG,wCAApC;AACA,AAAO,SAASC,iBAAT,CAA2BC,GAA3B,EAAgC;AACnC,SAAOA,GAAG,IAAIF,2BAA2B,CAACG,IAA5B,CAAiCD,GAAjC,CAAd;AACH;;AChBM,eAAeE,IAAf,CAAoBlC,KAApB,EAA2BO,OAA3B,EAAoC4B,KAApC,EAA2CC,UAAU,GAAG,EAAxD,EAA4D;AAC/D,QAAMC,QAAQ,GAAG9B,OAAO,CAAC8B,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAjB,CAD+D;;AAG/D,MAAI,+CAA+CH,IAA/C,CAAoDI,QAAQ,CAACL,GAA7D,CAAJ,EAAuE;AACnE,WAAOzB,OAAO,CAAC8B,QAAD,CAAd;AACH;;AACD,MAAIN,iBAAiB,CAACM,QAAQ,CAACL,GAAV,CAArB,EAAqC;AACjC,UAAMO,WAAW,GAAGC,IAAI,CAAE,GAAExC,KAAK,CAACI,QAAS,IAAGJ,KAAK,CAACK,YAAa,EAAzC,CAAxB;AACAgC,IAAAA,QAAQ,CAACI,OAAT,CAAiBC,aAAjB,GAAkC,SAAQH,WAAY,EAAtD;AACA,WAAOhC,OAAO,CAAC8B,QAAD,CAAd;AACH,GAV8D;;;AAY/D,QAAM;AAAEb,IAAAA;AAAF,MAAYxB,KAAK,CAACM,UAAN,KAAqB,WAArB,GACZ,MAAMO,IAAI,mCAAMb,KAAN;AAAaO,IAAAA;AAAb,KADE,GAEZ,MAAMM,IAAI,mCAAMb,KAAN;AAAaO,IAAAA;AAAb,KAFhB;AAGA8B,EAAAA,QAAQ,CAACI,OAAT,CAAiBC,aAAjB,GAAiC,WAAWlB,KAA5C;AACA,SAAOjB,OAAO,CAAC8B,QAAD,CAAd;AACH;;;ACpBD,AAMO,SAASM,mBAAT,OAImB;AAAA,MAJU;AAAEvC,IAAAA,QAAF;AAAYC,IAAAA,YAAZ;AAA0BC,IAAAA,UAAU,GAAG,WAAvC;AAAoDC,aAAAA,SAAO,GAAGqC,eAAc,CAACC,QAAf,CAAwB;AACtHJ,MAAAA,OAAO,EAAE;AACL,sBAAe,6BAA4B3C,OAAQ,IAAGgD,+BAAY,EAAG;AADhE;AAD6G,KAAxB;AAA9D,GAIV;AAAA,MAAnB7C,eAAmB;;AACtB,QAAMD,KAAK,GAAG+C,MAAM,CAACC,MAAP,CAAc;AACxB1C,IAAAA,UADwB;AAExBF,IAAAA,QAFwB;AAGxBC,IAAAA,YAHwB;AAIxBJ,IAAAA,eAJwB;AAKxBM,aAAAA;AALwB,GAAd,CAAd,CADsB;;AAStB,SAAOwC,MAAM,CAACC,MAAP,CAAcnC,IAAI,CAACoC,IAAL,CAAU,IAAV,EAAgBjD,KAAhB,CAAd,EAAsC;AACzC;AACAkC,IAAAA,IAAI,EAAEA,IAAI,CAACe,IAAL,CAAU,IAAV,EAAgBjD,KAAhB;AAFmC,GAAtC,CAAP;AAIH;AACD2C,mBAAmB,CAAC7C,OAApB,GAA8BA,OAA9B;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/auth.js b/node_modules/@octokit/auth-oauth-user/dist-src/auth.js new file mode 100644 index 0000000..07e42da --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-src/auth.js @@ -0,0 +1,94 @@ +import { getAuthentication } from "./get-authentication"; +import { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from "@octokit/oauth-methods"; +export async function auth(state, options = {}) { + if (!state.authentication) { + // This is what TS makes us do ¯\_(ツ)_/¯ + state.authentication = + state.clientType === "oauth-app" + ? await getAuthentication(state) + : await getAuthentication(state); + } + if (state.authentication.invalid) { + throw new Error("[@octokit/auth-oauth-user] Token is invalid"); + } + const currentAuthentication = state.authentication; + // (auto) refresh for user-to-server tokens + if ("expiresAt" in currentAuthentication) { + if (options.type === "refresh" || + new Date(currentAuthentication.expiresAt) < new Date()) { + const { authentication } = await refreshToken({ + clientType: "github-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + refreshToken: currentAuthentication.refreshToken, + request: state.request, + }); + state.authentication = { + tokenType: "oauth", + type: "token", + ...authentication, + }; + } + } + // throw error for invalid refresh call + if (options.type === "refresh") { + if (state.clientType === "oauth-app") { + throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens"); + } + if (!currentAuthentication.hasOwnProperty("expiresAt")) { + throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); + } + } + // check or reset token + if (options.type === "check" || options.type === "reset") { + const method = options.type === "check" ? checkToken : resetToken; + try { + const { authentication } = await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request, + }); + state.authentication = { + tokenType: "oauth", + type: "token", + // @ts-expect-error TBD + ...authentication, + }; + return state.authentication; + } + catch (error) { + // istanbul ignore else + if (error.status === 404) { + error.message = "[@octokit/auth-oauth-user] Token is invalid"; + // @ts-expect-error TBD + state.authentication.invalid = true; + } + throw error; + } + } + // invalidate + if (options.type === "delete" || options.type === "deleteAuthorization") { + const method = options.type === "delete" ? deleteToken : deleteAuthorization; + try { + await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request, + }); + } + catch (error) { + // istanbul ignore if + if (error.status !== 404) + throw error; + } + state.authentication.invalid = true; + return state.authentication; + } + return state.authentication; +} diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js b/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js new file mode 100644 index 0000000..6b08d77 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js @@ -0,0 +1,48 @@ +// @ts-nocheck there is only place for one of us in this file. And it's not you, TS +import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device"; +import { exchangeWebFlowCode } from "@octokit/oauth-methods"; +export async function getAuthentication(state) { + // handle code exchange form OAuth Web Flow + if ("code" in state.strategyOptions) { + const { authentication } = await exchangeWebFlowCode({ + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + ...state.strategyOptions, + request: state.request, + }); + return { + type: "token", + tokenType: "oauth", + ...authentication, + }; + } + // handle OAuth device flow + if ("onVerification" in state.strategyOptions) { + const deviceAuth = createOAuthDeviceAuth({ + clientType: state.clientType, + clientId: state.clientId, + ...state.strategyOptions, + request: state.request, + }); + const authentication = await deviceAuth({ + type: "oauth", + }); + return { + clientSecret: state.clientSecret, + ...authentication, + }; + } + // use existing authentication + if ("token" in state.strategyOptions) { + return { + type: "token", + tokenType: "oauth", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + ...state.strategyOptions, + }; + } + throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); +} diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/hook.js b/node_modules/@octokit/auth-oauth-user/dist-src/hook.js new file mode 100644 index 0000000..8977ac4 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-src/hook.js @@ -0,0 +1,21 @@ +import btoa from "btoa-lite"; +import { auth } from "./auth"; +import { requiresBasicAuth } from "./requires-basic-auth"; +export async function hook(state, request, route, parameters = {}) { + const endpoint = request.endpoint.merge(route, parameters); + // Do not intercept OAuth Web/Device flow request + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (requiresBasicAuth(endpoint.url)) { + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + return request(endpoint); + } + // TS makes us do this ¯\_(ツ)_/¯ + const { token } = state.clientType === "oauth-app" + ? await auth({ ...state, request }) + : await auth({ ...state, request }); + endpoint.headers.authorization = "token " + token; + return request(endpoint); +} diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/index.js b/node_modules/@octokit/auth-oauth-user/dist-src/index.js new file mode 100644 index 0000000..4c205f1 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-src/index.js @@ -0,0 +1,25 @@ +import { getUserAgent } from "universal-user-agent"; +import { request as octokitRequest } from "@octokit/request"; +import { VERSION } from "./version"; +import { auth } from "./auth"; +import { hook } from "./hook"; +export { requiresBasicAuth } from "./requires-basic-auth"; +export function createOAuthUserAuth({ clientId, clientSecret, clientType = "oauth-app", request = octokitRequest.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, + }, +}), ...strategyOptions }) { + const state = Object.assign({ + clientType, + clientId, + clientSecret, + strategyOptions, + request, + }); + // @ts-expect-error not worth the extra code needed to appease TS + return Object.assign(auth.bind(null, state), { + // @ts-expect-error not worth the extra code needed to appease TS + hook: hook.bind(null, state), + }); +} +createOAuthUserAuth.VERSION = VERSION; diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js b/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js new file mode 100644 index 0000000..d10f02c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js @@ -0,0 +1,20 @@ +/** + * The following endpoints require an OAuth App to authenticate using its client_id and client_secret. + * + * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token + * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token + * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token + * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token + * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization + * + * deprecated: + * + * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization + * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization + * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application + * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application + */ +const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; +export function requiresBasicAuth(url) { + return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); +} diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/types.js b/node_modules/@octokit/auth-oauth-user/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/version.js b/node_modules/@octokit/auth-oauth-user/dist-src/version.js new file mode 100644 index 0000000..e853866 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "1.3.0"; diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts new file mode 100644 index 0000000..d85f08b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts @@ -0,0 +1,3 @@ +import { OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, OAuthAppState, GitHubAppState } from "./types"; +export declare function auth(state: OAuthAppState, options?: OAuthAppAuthOptions): Promise; +export declare function auth(state: GitHubAppState, options?: GitHubAppAuthOptions): Promise; diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts new file mode 100644 index 0000000..359accb --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts @@ -0,0 +1,3 @@ +import { OAuthAppState, GitHubAppState, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration } from "./types"; +export declare function getAuthentication(state: OAuthAppState): Promise; +export declare function getAuthentication(state: GitHubAppState): Promise; diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts new file mode 100644 index 0000000..c3395d6 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts @@ -0,0 +1,6 @@ +import { EndpointOptions, OctokitResponse, RequestInterface, RequestParameters, Route } from "@octokit/types"; +import { OAuthAppState, GitHubAppState } from "./types"; +declare type AnyResponse = OctokitResponse; +export declare function hook(state: OAuthAppState, request: RequestInterface, route: Route | EndpointOptions, parameters: RequestParameters): Promise; +export declare function hook(state: GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters: RequestParameters): Promise; +export {}; diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts new file mode 100644 index 0000000..ae56794 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts @@ -0,0 +1,11 @@ +import { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAppAuthInterface } from "./types"; +export { OAuthAppStrategyOptionsWebFlow, GitHubAppStrategyOptionsWebFlow, OAuthAppStrategyOptionsDeviceFlow, GitHubAppStrategyOptionsDeviceFlow, OAuthAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types"; +export { requiresBasicAuth } from "./requires-basic-auth"; +export declare function createOAuthUserAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; +export declare namespace createOAuthUserAuth { + var VERSION: string; +} +export declare function createOAuthUserAuth(options: GitHubAppStrategyOptions): GitHubAppAuthInterface; +export declare namespace createOAuthUserAuth { + var VERSION: string; +} diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts new file mode 100644 index 0000000..c7a90ea --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts @@ -0,0 +1 @@ +export declare function requiresBasicAuth(url: string | undefined): boolean | "" | undefined; diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts new file mode 100644 index 0000000..d619abd --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts @@ -0,0 +1,110 @@ +import * as OctokitTypes from "@octokit/types"; +import * as DeviceTypes from "@octokit/auth-oauth-device"; +import * as OAuthMethodsTypes from "@octokit/oauth-methods"; +export declare type ClientType = "oauth-app" | "github-app"; +export declare type WebFlowOptions = { + code: string; + state?: string; + redirectUrl?: string; +}; +declare type CommonOAuthAppStrategyOptions = { + clientType?: "oauth-app"; + clientId: string; + clientSecret: string; + request?: OctokitTypes.RequestInterface; +}; +declare type CommonGitHubAppStrategyOptions = { + clientType?: "github-app"; + clientId: string; + clientSecret: string; + request?: OctokitTypes.RequestInterface; +}; +declare type OAuthAppDeviceFlowOptions = { + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; + scopes?: string[]; +}; +declare type GitHubDeviceFlowOptions = { + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; +}; +declare type ExistingOAuthAppAuthenticationOptions = { + clientType: "oauth-app"; + token: string; + scopes: string[]; +}; +declare type ExistingGitHubAppAuthenticationOptions = { + token: string; +}; +declare type ExistingGitHubAppAuthenticationWithExpirationOptions = { + token: string; + refreshToken: string; + expiresAt: string; + refreshTokenExpiresAt: string; +}; +export declare type OAuthAppStrategyOptionsWebFlow = CommonOAuthAppStrategyOptions & WebFlowOptions; +export declare type GitHubAppStrategyOptionsWebFlow = CommonGitHubAppStrategyOptions & WebFlowOptions; +export declare type OAuthAppStrategyOptionsDeviceFlow = CommonOAuthAppStrategyOptions & OAuthAppDeviceFlowOptions; +export declare type GitHubAppStrategyOptionsDeviceFlow = CommonGitHubAppStrategyOptions & GitHubDeviceFlowOptions; +export declare type OAuthAppStrategyOptionsExistingAuthentication = CommonOAuthAppStrategyOptions & ExistingOAuthAppAuthenticationOptions; +export declare type GitHubAppStrategyOptionsExistingAuthentication = CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationOptions; +export declare type GitHubAppStrategyOptionsExistingAuthenticationWithExpiration = CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationWithExpirationOptions; +export declare type OAuthAppStrategyOptions = OAuthAppStrategyOptionsWebFlow | OAuthAppStrategyOptionsDeviceFlow | OAuthAppStrategyOptionsExistingAuthentication; +export declare type GitHubAppStrategyOptions = GitHubAppStrategyOptionsWebFlow | GitHubAppStrategyOptionsDeviceFlow | GitHubAppStrategyOptionsExistingAuthentication | GitHubAppStrategyOptionsExistingAuthenticationWithExpiration; +export declare type OAuthAppAuthentication = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.OAuthAppAuthentication; +export declare type GitHubAppAuthentication = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.GitHubAppAuthentication; +export declare type GitHubAppAuthenticationWithExpiration = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.GitHubAppAuthenticationWithExpiration; +export interface OAuthAppAuthInterface { + (options?: OAuthAppAuthOptions): Promise; + hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>; +} +export interface GitHubAppAuthInterface { + (options?: GitHubAppAuthOptions): Promise; + hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>; +} +export declare type OAuthAppState = { + clientId: string; + clientSecret: string; + clientType: "oauth-app"; + request: OctokitTypes.RequestInterface; + strategyOptions: WebFlowOptions | OAuthAppDeviceFlowOptions | ExistingOAuthAppAuthenticationOptions; + authentication?: OAuthAppAuthentication & { + invalid?: true; + }; +}; +declare type GitHubAppStateAuthentication = GitHubAppAuthentication & { + invalid?: true; +}; +declare type GitHubAppStateAuthenticationWIthExpiration = GitHubAppAuthenticationWithExpiration & { + invalid?: true; +}; +export declare type GitHubAppState = { + clientId: string; + clientSecret: string; + clientType: "github-app"; + request: OctokitTypes.RequestInterface; + strategyOptions: WebFlowOptions | GitHubDeviceFlowOptions | ExistingGitHubAppAuthenticationOptions | ExistingGitHubAppAuthenticationWithExpirationOptions; + authentication?: GitHubAppStateAuthentication | GitHubAppStateAuthenticationWIthExpiration; +}; +export declare type State = OAuthAppState | GitHubAppState; +export declare type WebFlowState = { + clientId: string; + clientSecret: string; + clientType: ClientType; + request: OctokitTypes.RequestInterface; + strategyOptions: WebFlowOptions; +}; +export declare type OAuthAppAuthOptions = { + type?: "get" | "check" | "reset" | "delete" | "deleteAuthorization"; +}; +export declare type GitHubAppAuthOptions = { + type?: "get" | "check" | "reset" | "refresh" | "delete" | "deleteAuthorization"; +}; +export {}; diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts new file mode 100644 index 0000000..52b0e6b --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "1.3.0"; diff --git a/node_modules/@octokit/auth-oauth-user/dist-web/index.js b/node_modules/@octokit/auth-oauth-user/dist-web/index.js new file mode 100644 index 0000000..b67f44a --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-web/index.js @@ -0,0 +1,210 @@ +import { getUserAgent } from 'universal-user-agent'; +import { request } from '@octokit/request'; +import { createOAuthDeviceAuth } from '@octokit/auth-oauth-device'; +import { exchangeWebFlowCode, refreshToken, checkToken, resetToken, deleteToken, deleteAuthorization } from '@octokit/oauth-methods'; +import btoa from 'btoa-lite'; + +const VERSION = "1.3.0"; + +// @ts-nocheck there is only place for one of us in this file. And it's not you, TS +async function getAuthentication(state) { + // handle code exchange form OAuth Web Flow + if ("code" in state.strategyOptions) { + const { authentication } = await exchangeWebFlowCode({ + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + ...state.strategyOptions, + request: state.request, + }); + return { + type: "token", + tokenType: "oauth", + ...authentication, + }; + } + // handle OAuth device flow + if ("onVerification" in state.strategyOptions) { + const deviceAuth = createOAuthDeviceAuth({ + clientType: state.clientType, + clientId: state.clientId, + ...state.strategyOptions, + request: state.request, + }); + const authentication = await deviceAuth({ + type: "oauth", + }); + return { + clientSecret: state.clientSecret, + ...authentication, + }; + } + // use existing authentication + if ("token" in state.strategyOptions) { + return { + type: "token", + tokenType: "oauth", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + ...state.strategyOptions, + }; + } + throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); +} + +async function auth(state, options = {}) { + if (!state.authentication) { + // This is what TS makes us do ¯\_(ツ)_/¯ + state.authentication = + state.clientType === "oauth-app" + ? await getAuthentication(state) + : await getAuthentication(state); + } + if (state.authentication.invalid) { + throw new Error("[@octokit/auth-oauth-user] Token is invalid"); + } + const currentAuthentication = state.authentication; + // (auto) refresh for user-to-server tokens + if ("expiresAt" in currentAuthentication) { + if (options.type === "refresh" || + new Date(currentAuthentication.expiresAt) < new Date()) { + const { authentication } = await refreshToken({ + clientType: "github-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + refreshToken: currentAuthentication.refreshToken, + request: state.request, + }); + state.authentication = { + tokenType: "oauth", + type: "token", + ...authentication, + }; + } + } + // throw error for invalid refresh call + if (options.type === "refresh") { + if (state.clientType === "oauth-app") { + throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens"); + } + if (!currentAuthentication.hasOwnProperty("expiresAt")) { + throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); + } + } + // check or reset token + if (options.type === "check" || options.type === "reset") { + const method = options.type === "check" ? checkToken : resetToken; + try { + const { authentication } = await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request, + }); + state.authentication = { + tokenType: "oauth", + type: "token", + // @ts-expect-error TBD + ...authentication, + }; + return state.authentication; + } + catch (error) { + // istanbul ignore else + if (error.status === 404) { + error.message = "[@octokit/auth-oauth-user] Token is invalid"; + // @ts-expect-error TBD + state.authentication.invalid = true; + } + throw error; + } + } + // invalidate + if (options.type === "delete" || options.type === "deleteAuthorization") { + const method = options.type === "delete" ? deleteToken : deleteAuthorization; + try { + await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request, + }); + } + catch (error) { + // istanbul ignore if + if (error.status !== 404) + throw error; + } + state.authentication.invalid = true; + return state.authentication; + } + return state.authentication; +} + +/** + * The following endpoints require an OAuth App to authenticate using its client_id and client_secret. + * + * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token + * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token + * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token + * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token + * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization + * + * deprecated: + * + * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization + * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization + * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application + * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application + */ +const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; +function requiresBasicAuth(url) { + return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); +} + +async function hook(state, request, route, parameters = {}) { + const endpoint = request.endpoint.merge(route, parameters); + // Do not intercept OAuth Web/Device flow request + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (requiresBasicAuth(endpoint.url)) { + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + return request(endpoint); + } + // TS makes us do this ¯\_(ツ)_/¯ + const { token } = state.clientType === "oauth-app" + ? await auth({ ...state, request }) + : await auth({ ...state, request }); + endpoint.headers.authorization = "token " + token; + return request(endpoint); +} + +function createOAuthUserAuth({ clientId, clientSecret, clientType = "oauth-app", request: request$1 = request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, + }, +}), ...strategyOptions }) { + const state = Object.assign({ + clientType, + clientId, + clientSecret, + strategyOptions, + request: request$1, + }); + // @ts-expect-error not worth the extra code needed to appease TS + return Object.assign(auth.bind(null, state), { + // @ts-expect-error not worth the extra code needed to appease TS + hook: hook.bind(null, state), + }); +} +createOAuthUserAuth.VERSION = VERSION; + +export { createOAuthUserAuth, requiresBasicAuth }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map new file mode 100644 index 0000000..86d31ff --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-authentication.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"1.3.0\";\n","// @ts-nocheck there is only place for one of us in this file. And it's not you, TS\nimport { createOAuthDeviceAuth } from \"@octokit/auth-oauth-device\";\nimport { exchangeWebFlowCode } from \"@octokit/oauth-methods\";\nexport async function getAuthentication(state) {\n // handle code exchange form OAuth Web Flow\n if (\"code\" in state.strategyOptions) {\n const { authentication } = await exchangeWebFlowCode({\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n ...state.strategyOptions,\n request: state.request,\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n // handle OAuth device flow\n if (\"onVerification\" in state.strategyOptions) {\n const deviceAuth = createOAuthDeviceAuth({\n clientType: state.clientType,\n clientId: state.clientId,\n ...state.strategyOptions,\n request: state.request,\n });\n const authentication = await deviceAuth({\n type: \"oauth\",\n });\n return {\n clientSecret: state.clientSecret,\n ...authentication,\n };\n }\n // use existing authentication\n if (\"token\" in state.strategyOptions) {\n return {\n type: \"token\",\n tokenType: \"oauth\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n ...state.strategyOptions,\n };\n }\n throw new Error(\"[@octokit/auth-oauth-user] Invalid strategy options\");\n}\n","import { getAuthentication } from \"./get-authentication\";\nimport { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from \"@octokit/oauth-methods\";\nexport async function auth(state, options = {}) {\n if (!state.authentication) {\n // This is what TS makes us do ¯\\_(ツ)_/¯\n state.authentication =\n state.clientType === \"oauth-app\"\n ? await getAuthentication(state)\n : await getAuthentication(state);\n }\n if (state.authentication.invalid) {\n throw new Error(\"[@octokit/auth-oauth-user] Token is invalid\");\n }\n const currentAuthentication = state.authentication;\n // (auto) refresh for user-to-server tokens\n if (\"expiresAt\" in currentAuthentication) {\n if (options.type === \"refresh\" ||\n new Date(currentAuthentication.expiresAt) < new Date()) {\n const { authentication } = await refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n refreshToken: currentAuthentication.refreshToken,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n ...authentication,\n };\n }\n }\n // throw error for invalid refresh call\n if (options.type === \"refresh\") {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\"[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens\");\n }\n if (!currentAuthentication.hasOwnProperty(\"expiresAt\")) {\n throw new Error(\"[@octokit/auth-oauth-user] Refresh token missing\");\n }\n }\n // check or reset token\n if (options.type === \"check\" || options.type === \"reset\") {\n const method = options.type === \"check\" ? checkToken : resetToken;\n try {\n const { authentication } = await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n // @ts-expect-error TBD\n ...authentication,\n };\n return state.authentication;\n }\n catch (error) {\n // istanbul ignore else\n if (error.status === 404) {\n error.message = \"[@octokit/auth-oauth-user] Token is invalid\";\n // @ts-expect-error TBD\n state.authentication.invalid = true;\n }\n throw error;\n }\n }\n // invalidate\n if (options.type === \"delete\" || options.type === \"deleteAuthorization\") {\n const method = options.type === \"delete\" ? deleteToken : deleteAuthorization;\n try {\n await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n }\n catch (error) {\n // istanbul ignore if\n if (error.status !== 404)\n throw error;\n }\n state.authentication.invalid = true;\n return state.authentication;\n }\n return state.authentication;\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token\n * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token\n * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[^/]+\\/(token|grant)s?/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { auth } from \"./auth\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters = {}) {\n const endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n return request(endpoint);\n }\n // TS makes us do this ¯\\_(ツ)_/¯\n const { token } = state.clientType === \"oauth-app\"\n ? await auth({ ...state, request })\n : await auth({ ...state, request });\n endpoint.headers.authorization = \"token \" + token;\n return request(endpoint);\n}\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { VERSION } from \"./version\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport function createOAuthUserAuth({ clientId, clientSecret, clientType = \"oauth-app\", request = octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n}), ...strategyOptions }) {\n const state = Object.assign({\n clientType,\n clientId,\n clientSecret,\n strategyOptions,\n request,\n });\n // @ts-expect-error not worth the extra code needed to appease TS\n return Object.assign(auth.bind(null, state), {\n // @ts-expect-error not worth the extra code needed to appease TS\n hook: hook.bind(null, state),\n });\n}\ncreateOAuthUserAuth.VERSION = VERSION;\n"],"names":["request","octokitRequest"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C;AACA,AAEO,eAAe,iBAAiB,CAAC,KAAK,EAAE;AAC/C;AACA,IAAI,IAAI,MAAM,IAAI,KAAK,CAAC,eAAe,EAAE;AACzC,QAAQ,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,mBAAmB,CAAC;AAC7D,YAAY,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACpC,YAAY,YAAY,EAAE,KAAK,CAAC,YAAY;AAC5C,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,YAAY,GAAG,KAAK,CAAC,eAAe;AACpC,YAAY,OAAO,EAAE,KAAK,CAAC,OAAO;AAClC,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,OAAO;AACzB,YAAY,SAAS,EAAE,OAAO;AAC9B,YAAY,GAAG,cAAc;AAC7B,SAAS,CAAC;AACV,KAAK;AACL;AACA,IAAI,IAAI,gBAAgB,IAAI,KAAK,CAAC,eAAe,EAAE;AACnD,QAAQ,MAAM,UAAU,GAAG,qBAAqB,CAAC;AACjD,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,YAAY,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACpC,YAAY,GAAG,KAAK,CAAC,eAAe;AACpC,YAAY,OAAO,EAAE,KAAK,CAAC,OAAO;AAClC,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC;AAChD,YAAY,IAAI,EAAE,OAAO;AACzB,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO;AACf,YAAY,YAAY,EAAE,KAAK,CAAC,YAAY;AAC5C,YAAY,GAAG,cAAc;AAC7B,SAAS,CAAC;AACV,KAAK;AACL;AACA,IAAI,IAAI,OAAO,IAAI,KAAK,CAAC,eAAe,EAAE;AAC1C,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,OAAO;AACzB,YAAY,SAAS,EAAE,OAAO;AAC9B,YAAY,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACpC,YAAY,YAAY,EAAE,KAAK,CAAC,YAAY;AAC5C,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,YAAY,GAAG,KAAK,CAAC,eAAe;AACpC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAC3E,CAAC;;AC7CM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE;AAChD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE;AAC/B;AACA,QAAQ,KAAK,CAAC,cAAc;AAC5B,YAAY,KAAK,CAAC,UAAU,KAAK,WAAW;AAC5C,kBAAkB,MAAM,iBAAiB,CAAC,KAAK,CAAC;AAChD,kBAAkB,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAC;AACjD,KAAK;AACL,IAAI,IAAI,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE;AACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;AACvE,KAAK;AACL,IAAI,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC;AACvD;AACA,IAAI,IAAI,WAAW,IAAI,qBAAqB,EAAE;AAC9C,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;AACtC,YAAY,IAAI,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,EAAE,EAAE;AACpE,YAAY,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,YAAY,CAAC;AAC1D,gBAAgB,UAAU,EAAE,YAAY;AACxC,gBAAgB,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACxC,gBAAgB,YAAY,EAAE,KAAK,CAAC,YAAY;AAChD,gBAAgB,YAAY,EAAE,qBAAqB,CAAC,YAAY;AAChE,gBAAgB,OAAO,EAAE,KAAK,CAAC,OAAO;AACtC,aAAa,CAAC,CAAC;AACf,YAAY,KAAK,CAAC,cAAc,GAAG;AACnC,gBAAgB,SAAS,EAAE,OAAO;AAClC,gBAAgB,IAAI,EAAE,OAAO;AAC7B,gBAAgB,GAAG,cAAc;AACjC,aAAa,CAAC;AACd,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE;AACpC,QAAQ,IAAI,KAAK,CAAC,UAAU,KAAK,WAAW,EAAE;AAC9C,YAAY,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;AACpG,SAAS;AACT,QAAQ,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;AAChE,YAAY,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AAChF,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE;AAC9D,QAAQ,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,KAAK,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;AAC1E,QAAQ,IAAI;AACZ,YAAY,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC;AACpD;AACA,gBAAgB,UAAU,EAAE,KAAK,CAAC,UAAU;AAC5C,gBAAgB,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACxC,gBAAgB,YAAY,EAAE,KAAK,CAAC,YAAY;AAChD,gBAAgB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK;AACjD,gBAAgB,OAAO,EAAE,KAAK,CAAC,OAAO;AACtC,aAAa,CAAC,CAAC;AACf,YAAY,KAAK,CAAC,cAAc,GAAG;AACnC,gBAAgB,SAAS,EAAE,OAAO;AAClC,gBAAgB,IAAI,EAAE,OAAO;AAC7B;AACA,gBAAgB,GAAG,cAAc;AACjC,aAAa,CAAC;AACd,YAAY,OAAO,KAAK,CAAC,cAAc,CAAC;AACxC,SAAS;AACT,QAAQ,OAAO,KAAK,EAAE;AACtB;AACA,YAAY,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AACtC,gBAAgB,KAAK,CAAC,OAAO,GAAG,6CAA6C,CAAC;AAC9E;AACA,gBAAgB,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC;AACpD,aAAa;AACb,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,qBAAqB,EAAE;AAC7E,QAAQ,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,KAAK,QAAQ,GAAG,WAAW,GAAG,mBAAmB,CAAC;AACrF,QAAQ,IAAI;AACZ,YAAY,MAAM,MAAM,CAAC;AACzB;AACA,gBAAgB,UAAU,EAAE,KAAK,CAAC,UAAU;AAC5C,gBAAgB,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACxC,gBAAgB,YAAY,EAAE,KAAK,CAAC,YAAY;AAChD,gBAAgB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK;AACjD,gBAAgB,OAAO,EAAE,KAAK,CAAC,OAAO;AACtC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,OAAO,KAAK,EAAE;AACtB;AACA,YAAY,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG;AACpC,gBAAgB,MAAM,KAAK,CAAC;AAC5B,SAAS;AACT,QAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC;AAC5C,QAAQ,OAAO,KAAK,CAAC,cAAc,CAAC;AACpC,KAAK;AACL,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC;AAChC,CAAC;;AC7FD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,2BAA2B,GAAG,wCAAwC,CAAC;AAC7E,AAAO,SAAS,iBAAiB,CAAC,GAAG,EAAE;AACvC,IAAI,OAAO,GAAG,IAAI,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;;AChBM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,GAAG,EAAE,EAAE;AACnE,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D;AACA,IAAI,IAAI,8CAA8C,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC3E,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,IAAI,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACzC,QAAQ,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAC5E,QAAQ,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAChE,QAAQ,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,KAAK;AACL;AACA,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,UAAU,KAAK,WAAW;AACtD,UAAU,MAAM,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,CAAC;AAC3C,UAAU,MAAM,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5C,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,QAAQ,GAAG,KAAK,CAAC;AACtD,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACdM,SAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,GAAG,WAAW,WAAEA,SAAO,GAAGC,OAAc,CAAC,QAAQ,CAAC;AAC1H,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC9E,KAAK;AACL,CAAC,CAAC,EAAE,GAAG,eAAe,EAAE,EAAE;AAC1B,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,UAAU;AAClB,QAAQ,QAAQ;AAChB,QAAQ,YAAY;AACpB,QAAQ,eAAe;AACvB,iBAAQD,SAAO;AACf,KAAK,CAAC,CAAC;AACP;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD;AACA,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;AACD,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-oauth-user/package.json b/node_modules/@octokit/auth-oauth-user/package.json new file mode 100644 index 0000000..4979f07 --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/auth-oauth-user", + "description": "Octokit authentication strategy for OAuth clients", + "version": "1.3.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "https://github.com/octokit/auth-oauth-user.js", + "dependencies": { + "@octokit/auth-oauth-device": "^3.1.1", + "@octokit/oauth-methods": "^1.1.0", + "@octokit/request": "^5.4.14", + "@octokit/types": "^6.12.2", + "btoa-lite": "^1.0.0", + "universal-user-agent": "^6.0.0" + }, + "peerDependencies": {}, + "devDependencies": { + "@octokit/core": "^3.3.0", + "@octokit/tsconfig": "^1.0.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.2", + "@pika/plugin-build-web": "^0.9.2", + "@pika/plugin-ts-standard-pkg": "^0.9.2", + "@types/btoa-lite": "^1.0.0", + "@types/jest": "^26.0.20", + "@types/node": "^14.14.33", + "fetch-mock": "^9.11.0", + "jest": "^27.0.0", + "mockdate": "^3.0.4", + "prettier": "2.3.1", + "semantic-release": "^17.4.1", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.2.3" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/auth-token/README.md b/node_modules/@octokit/auth-token/README.md index b4791f0..a1f6d35 100644 --- a/node_modules/@octokit/auth-token/README.md +++ b/node_modules/@octokit/auth-token/README.md @@ -58,11 +58,11 @@ const { createTokenAuth } = require("@octokit/auth-token"); ```js -const auth = createTokenAuth("1234567890abcdef1234567890abcdef12345678"); +const auth = createTokenAuth("ghp_PersonalAccessToken01245678900000000"); const authentication = await auth(); // { // type: 'token', -// token: '1234567890abcdef1234567890abcdef12345678', +// token: 'ghp_PersonalAccessToken01245678900000000', // tokenType: 'oauth' // } ``` @@ -73,17 +73,36 @@ The `createTokenAuth` method accepts a single argument of type string, which is - [Personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) - [OAuth access token](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/) -- Installation access token ([GitHub App Installation](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)) - [GITHUB_TOKEN provided to GitHub Actions](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables) +- Installation access token ([server-to-server](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)) +- User authentication for installation ([user-to-server](https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)) Examples ```js // Personal access token or OAuth access token -createTokenAuth("1234567890abcdef1234567890abcdef12345678"); +createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghs_InstallallationOrActionToken00000000"); +// { +// type: 'token', +// token: 'ghs_InstallallationOrActionToken00000000', +// tokenType: 'installation' +// } // Installation access token or GitHub Action token -createTokenAuth("v1.d3d433526f780fbcc3129004e2731b3904ad0b86"); +createTokenAuth("ghu_InstallationUserToServer000000000000"); +// { +// type: 'token', +// token: 'ghu_InstallationUserToServer000000000000', +// tokenType: 'user-to-server' +// } ``` ## `auth()` @@ -137,7 +156,7 @@ The `auth()` method has no options. It returns a promise which resolves with the string - Can be either "oauth" for personal access tokens and OAuth tokens, or "installation" for installation access tokens (includes GITHUB_TOKEN provided to GitHub Actions) + Can be either "oauth" for personal access tokens and OAuth tokens, "installation" for installation access tokens (includes GITHUB_TOKEN provided to GitHub Actions), "app" for a GitHub App JSON Web Token, or "user-to-server" for a user authentication token through an app installation. @@ -181,7 +200,7 @@ Here is a list of things you can do to retrieve further information Note that this does not work for installations. There is no way to retrieve permissions based on an installation access tokens. ```js -const TOKEN = "1234567890abcdef1234567890abcdef12345678"; +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; const auth = createTokenAuth(TOKEN); const authentication = await auth(); @@ -203,7 +222,7 @@ if (scopes.length) { ### Find out if token is a personal access token or if it belongs to an OAuth app ```js -const TOKEN = "1234567890abcdef1234567890abcdef12345678"; +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; const auth = createTokenAuth(TOKEN); const authentication = await auth(); @@ -227,7 +246,7 @@ if (clientId) { Note that the `permissions` key is not set when authenticated using an installation access token. ```js -const TOKEN = "1234567890abcdef1234567890abcdef12345678"; +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; const auth = createTokenAuth(TOKEN); const authentication = await auth(); @@ -253,7 +272,7 @@ Both OAuth and installation access tokens can be used for git operations. Howeve This example is using the [`execa`](https://github.com/sindresorhus/execa) package to run a `git push` command. ```js -const TOKEN = "1234567890abcdef1234567890abcdef12345678"; +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; const auth = createTokenAuth(TOKEN); const { token, tokenType } = await auth(); diff --git a/node_modules/@octokit/auth-token/dist-node/index.js b/node_modules/@octokit/auth-token/dist-node/index.js index 1394a5d..af0f0a6 100644 --- a/node_modules/@octokit/auth-token/dist-node/index.js +++ b/node_modules/@octokit/auth-token/dist-node/index.js @@ -2,8 +2,14 @@ Object.defineProperty(exports, '__esModule', { value: true }); +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; async function auth(token) { - const tokenType = token.split(/\./).length === 3 ? "app" : /^v\d+\./.test(token) ? "installation" : "oauth"; + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; return { type: "token", token: token, diff --git a/node_modules/@octokit/auth-token/dist-node/index.js.map b/node_modules/@octokit/auth-token/dist-node/index.js.map index 46cf5e1..af0c2e2 100644 --- a/node_modules/@octokit/auth-token/dist-node/index.js.map +++ b/node_modules/@octokit/auth-token/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export async function auth(token) {\n const tokenType = token.split(/\\./).length === 3\n ? \"app\"\n : /^v\\d+\\./.test(token)\n ? \"installation\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n"],"names":["auth","token","tokenType","split","length","test","type","withAuthorizationPrefix","hook","request","route","parameters","endpoint","merge","headers","authorization","createTokenAuth","Error","replace","Object","assign","bind"],"mappings":";;;;AAAO,eAAeA,IAAf,CAAoBC,KAApB,EAA2B;AAC9B,QAAMC,SAAS,GAAGD,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAA7B,GACZ,KADY,GAEZ,UAAUC,IAAV,CAAeJ,KAAf,IACI,cADJ,GAEI,OAJV;AAKA,SAAO;AACHK,IAAAA,IAAI,EAAE,OADH;AAEHL,IAAAA,KAAK,EAAEA,KAFJ;AAGHC,IAAAA;AAHG,GAAP;AAKH;;ACXD;AACA;AACA;AACA;AACA;AACA,AAAO,SAASK,uBAAT,CAAiCN,KAAjC,EAAwC;AAC3C,MAAIA,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAAjC,EAAoC;AAChC,WAAQ,UAASH,KAAM,EAAvB;AACH;;AACD,SAAQ,SAAQA,KAAM,EAAtB;AACH;;ACTM,eAAeO,IAAf,CAAoBP,KAApB,EAA2BQ,OAA3B,EAAoCC,KAApC,EAA2CC,UAA3C,EAAuD;AAC1D,QAAMC,QAAQ,GAAGH,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAjB;AACAC,EAAAA,QAAQ,CAACE,OAAT,CAAiBC,aAAjB,GAAiCR,uBAAuB,CAACN,KAAD,CAAxD;AACA,SAAOQ,OAAO,CAACG,QAAD,CAAd;AACH;;MCHYI,eAAe,GAAG,SAASA,eAAT,CAAyBf,KAAzB,EAAgC;AAC3D,MAAI,CAACA,KAAL,EAAY;AACR,UAAM,IAAIgB,KAAJ,CAAU,0DAAV,CAAN;AACH;;AACD,MAAI,OAAOhB,KAAP,KAAiB,QAArB,EAA+B;AAC3B,UAAM,IAAIgB,KAAJ,CAAU,uEAAV,CAAN;AACH;;AACDhB,EAAAA,KAAK,GAAGA,KAAK,CAACiB,OAAN,CAAc,oBAAd,EAAoC,EAApC,CAAR;AACA,SAAOC,MAAM,CAACC,MAAP,CAAcpB,IAAI,CAACqB,IAAL,CAAU,IAAV,EAAgBpB,KAAhB,CAAd,EAAsC;AACzCO,IAAAA,IAAI,EAAEA,IAAI,CAACa,IAAL,CAAU,IAAV,EAAgBpB,KAAhB;AADmC,GAAtC,CAAP;AAGH,CAXM;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":["REGEX_IS_INSTALLATION_LEGACY","REGEX_IS_INSTALLATION","REGEX_IS_USER_TO_SERVER","auth","token","isApp","split","length","isInstallation","test","isUserToServer","tokenType","type","withAuthorizationPrefix","hook","request","route","parameters","endpoint","merge","headers","authorization","createTokenAuth","Error","replace","Object","assign","bind"],"mappings":";;;;AAAA,MAAMA,4BAA4B,GAAG,OAArC;AACA,MAAMC,qBAAqB,GAAG,OAA9B;AACA,MAAMC,uBAAuB,GAAG,OAAhC;AACO,eAAeC,IAAf,CAAoBC,KAApB,EAA2B;AAC9B,QAAMC,KAAK,GAAGD,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAA3C;AACA,QAAMC,cAAc,GAAGR,4BAA4B,CAACS,IAA7B,CAAkCL,KAAlC,KACnBH,qBAAqB,CAACQ,IAAtB,CAA2BL,KAA3B,CADJ;AAEA,QAAMM,cAAc,GAAGR,uBAAuB,CAACO,IAAxB,CAA6BL,KAA7B,CAAvB;AACA,QAAMO,SAAS,GAAGN,KAAK,GACjB,KADiB,GAEjBG,cAAc,GACV,cADU,GAEVE,cAAc,GACV,gBADU,GAEV,OANd;AAOA,SAAO;AACHE,IAAAA,IAAI,EAAE,OADH;AAEHR,IAAAA,KAAK,EAAEA,KAFJ;AAGHO,IAAAA;AAHG,GAAP;AAKH;;ACpBD;AACA;AACA;AACA;AACA;AACA,AAAO,SAASE,uBAAT,CAAiCT,KAAjC,EAAwC;AAC3C,MAAIA,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAAjC,EAAoC;AAChC,WAAQ,UAASH,KAAM,EAAvB;AACH;;AACD,SAAQ,SAAQA,KAAM,EAAtB;AACH;;ACTM,eAAeU,IAAf,CAAoBV,KAApB,EAA2BW,OAA3B,EAAoCC,KAApC,EAA2CC,UAA3C,EAAuD;AAC1D,QAAMC,QAAQ,GAAGH,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAjB;AACAC,EAAAA,QAAQ,CAACE,OAAT,CAAiBC,aAAjB,GAAiCR,uBAAuB,CAACT,KAAD,CAAxD;AACA,SAAOW,OAAO,CAACG,QAAD,CAAd;AACH;;MCHYI,eAAe,GAAG,SAASA,eAAT,CAAyBlB,KAAzB,EAAgC;AAC3D,MAAI,CAACA,KAAL,EAAY;AACR,UAAM,IAAImB,KAAJ,CAAU,0DAAV,CAAN;AACH;;AACD,MAAI,OAAOnB,KAAP,KAAiB,QAArB,EAA+B;AAC3B,UAAM,IAAImB,KAAJ,CAAU,uEAAV,CAAN;AACH;;AACDnB,EAAAA,KAAK,GAAGA,KAAK,CAACoB,OAAN,CAAc,oBAAd,EAAoC,EAApC,CAAR;AACA,SAAOC,MAAM,CAACC,MAAP,CAAcvB,IAAI,CAACwB,IAAL,CAAU,IAAV,EAAgBvB,KAAhB,CAAd,EAAsC;AACzCU,IAAAA,IAAI,EAAEA,IAAI,CAACa,IAAL,CAAU,IAAV,EAAgBvB,KAAhB;AADmC,GAAtC,CAAP;AAGH,CAXM;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-token/dist-src/auth.js b/node_modules/@octokit/auth-token/dist-src/auth.js index 2d5005c..b22ce98 100644 --- a/node_modules/@octokit/auth-token/dist-src/auth.js +++ b/node_modules/@octokit/auth-token/dist-src/auth.js @@ -1,12 +1,21 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; export async function auth(token) { - const tokenType = token.split(/\./).length === 3 + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || + REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" - : /^v\d+\./.test(token) + : isInstallation ? "installation" - : "oauth"; + : isUserToServer + ? "user-to-server" + : "oauth"; return { type: "token", token: token, - tokenType + tokenType, }; } diff --git a/node_modules/@octokit/auth-token/dist-src/index.js b/node_modules/@octokit/auth-token/dist-src/index.js index 114fd45..f2ddd63 100644 --- a/node_modules/@octokit/auth-token/dist-src/index.js +++ b/node_modules/@octokit/auth-token/dist-src/index.js @@ -9,6 +9,6 @@ export const createTokenAuth = function createTokenAuth(token) { } token = token.replace(/^(token|bearer) +/i, ""); return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) + hook: hook.bind(null, token), }); }; diff --git a/node_modules/@octokit/auth-token/dist-types/types.d.ts b/node_modules/@octokit/auth-token/dist-types/types.d.ts index c302dc9..0ae24de 100644 --- a/node_modules/@octokit/auth-token/dist-types/types.d.ts +++ b/node_modules/@octokit/auth-token/dist-types/types.d.ts @@ -25,4 +25,9 @@ export declare type AppAuthentication = { tokenType: "app"; token: Token; }; -export declare type Authentication = OAuthTokenAuthentication | InstallationTokenAuthentication | AppAuthentication; +export declare type UserToServerAuthentication = { + type: "token"; + tokenType: "user-to-server"; + token: Token; +}; +export declare type Authentication = OAuthTokenAuthentication | InstallationTokenAuthentication | AppAuthentication | UserToServerAuthentication; diff --git a/node_modules/@octokit/auth-token/dist-web/index.js b/node_modules/@octokit/auth-token/dist-web/index.js index c15ca12..8b1cd7d 100644 --- a/node_modules/@octokit/auth-token/dist-web/index.js +++ b/node_modules/@octokit/auth-token/dist-web/index.js @@ -1,13 +1,22 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; async function auth(token) { - const tokenType = token.split(/\./).length === 3 + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || + REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" - : /^v\d+\./.test(token) + : isInstallation ? "installation" - : "oauth"; + : isUserToServer + ? "user-to-server" + : "oauth"; return { type: "token", token: token, - tokenType + tokenType, }; } @@ -38,7 +47,7 @@ const createTokenAuth = function createTokenAuth(token) { } token = token.replace(/^(token|bearer) +/i, ""); return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) + hook: hook.bind(null, token), }); }; diff --git a/node_modules/@octokit/auth-token/dist-web/index.js.map b/node_modules/@octokit/auth-token/dist-web/index.js.map index 60de4a6..1d6197b 100644 --- a/node_modules/@octokit/auth-token/dist-web/index.js.map +++ b/node_modules/@octokit/auth-token/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export async function auth(token) {\n const tokenType = token.split(/\\./).length === 3\n ? \"app\"\n : /^v\\d+\\./.test(token)\n ? \"installation\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n"],"names":[],"mappings":"AAAO,eAAe,IAAI,CAAC,KAAK,EAAE;AAClC,IAAI,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;AACpD,UAAU,KAAK;AACf,UAAU,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;AAC/B,cAAc,cAAc;AAC5B,cAAc,OAAO,CAAC;AACtB,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,SAAS;AACjB,KAAK,CAAC;AACN;;ACXA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,uBAAuB,CAAC,KAAK,EAAE;AAC/C,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AACxC,QAAQ,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5B,CAAC;;ACTM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;AACpE,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACHW,MAAC,eAAe,GAAG,SAAS,eAAe,CAAC,KAAK,EAAE;AAC/D,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;AACpF,KAAK;AACL,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;AACjG,KAAK;AACL,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACpD,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":[],"mappings":"AAAA,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,qBAAqB,GAAG,OAAO,CAAC;AACtC,MAAM,uBAAuB,GAAG,OAAO,CAAC;AACjC,eAAe,IAAI,CAAC,KAAK,EAAE;AAClC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACjD,IAAI,MAAM,cAAc,GAAG,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC;AACnE,QAAQ,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1C,IAAI,MAAM,cAAc,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/D,IAAI,MAAM,SAAS,GAAG,KAAK;AAC3B,UAAU,KAAK;AACf,UAAU,cAAc;AACxB,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,kBAAkB,gBAAgB;AAClC,kBAAkB,OAAO,CAAC;AAC1B,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,SAAS;AACjB,KAAK,CAAC;AACN;;ACpBA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,uBAAuB,CAAC,KAAK,EAAE;AAC/C,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AACxC,QAAQ,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5B,CAAC;;ACTM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;AACpE,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACHW,MAAC,eAAe,GAAG,SAAS,eAAe,CAAC,KAAK,EAAE;AAC/D,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;AACpF,KAAK;AACL,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;AACjG,KAAK;AACL,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACpD,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-token/package.json b/node_modules/@octokit/auth-token/package.json index f11cb83..1b0df71 100644 --- a/node_modules/@octokit/auth-token/package.json +++ b/node_modules/@octokit/auth-token/package.json @@ -1,37 +1,24 @@ { - "_from": "@octokit/auth-token@^2.4.4", - "_id": "@octokit/auth-token@2.4.5", - "_inBundle": false, - "_integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", - "_location": "/@octokit/auth-token", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/auth-token@^2.4.4", - "name": "@octokit/auth-token", - "escapedName": "@octokit%2fauth-token", - "scope": "@octokit", - "rawSpec": "^2.4.4", - "saveSpec": null, - "fetchSpec": "^2.4.4" - }, - "_requiredBy": [ - "/@octokit/core" + "name": "@octokit/auth-token", + "description": "GitHub API token authentication for browsers and Node.js", + "version": "2.5.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", - "_shasum": "568ccfb8cb46f36441fac094ce34f7a875b197f3", - "_spec": "@octokit/auth-token@^2.4.4", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\core", - "bugs": { - "url": "https://github.com/octokit/auth-token.js/issues" - }, - "bundleDependencies": false, + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "repository": "github:octokit/auth-token.js", "dependencies": { "@octokit/types": "^6.0.3" }, - "deprecated": false, - "description": "GitHub API token authentication for browsers and Node.js", "devDependencies": { "@octokit/core": "^3.0.0", "@octokit/request": "^5.3.0", @@ -40,38 +27,19 @@ "@pika/plugin-build-web": "^0.9.0", "@pika/plugin-ts-standard-pkg": "^0.9.0", "@types/fetch-mock": "^7.3.1", - "@types/jest": "^26.0.0", + "@types/jest": "^27.0.0", "fetch-mock": "^9.0.0", - "jest": "^26.0.0", + "jest": "^27.0.0", + "prettier": "2.4.1", "semantic-release": "^17.0.0", - "ts-jest": "^26.0.0", + "ts-jest": "^27.0.0-next.12", "typescript": "^4.0.0" }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/auth-token.js#readme", - "keywords": [ - "github", - "octokit", - "authentication", - "api" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/auth-token", - "pika": true, "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/auth-token.js.git" - }, - "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "version": "2.4.5" + "main": "dist-node/index.js", + "module": "dist-web/index.js" } diff --git a/node_modules/@octokit/core/README.md b/node_modules/@octokit/core/README.md index 80804b7..3cc5141 100644 --- a/node_modules/@octokit/core/README.md +++ b/node_modules/@octokit/core/README.md @@ -3,7 +3,7 @@ > Extendable client for GitHub's REST & GraphQL APIs [![@latest](https://img.shields.io/npm/v/@octokit/core.svg)](https://www.npmjs.com/package/@octokit/core) -[![Build Status](https://github.com/octokit/core.js/workflows/Test/badge.svg)](https://github.com/octokit/core.js/actions?query=workflow%3ATest+branch%3Amaster) +[![Build Status](https://github.com/octokit/core.js/workflows/Test/badge.svg)](https://github.com/octokit/core.js/actions?query=workflow%3ATest+branch%3Amain) @@ -33,10 +33,10 @@ If you don't need the Plugin API then using [`@octokit/request`](https://github. Browsers Load @octokit/core directly from cdn.skypack.dev - + ```html ``` @@ -166,7 +166,7 @@ octokit.request("POST /repos/{owner}/{repo}/pulls", { owner, repo, title: "My pull request", - base: "master", + base: "main", head: "my-feature", draft: true, }); @@ -271,7 +271,7 @@ If you need a deep or conditional merge, you can pass a function instead. ```js const MyOctokit = Octokit.defaults((options) => { return { - foo: Object.assign({}, options.foo, { opt2: 1 }), + foo: Object.assign({}, options.foo, { opt1: 1 }), }; }); const octokit = new MyOctokit({ @@ -298,7 +298,9 @@ const octokit = new Octokit({ const { data } = await octokit.request("/user"); ``` -To use a different authentication strategy, set `options.authStrategy`. A set of officially supported authentication strategies can be retrieved from [`@octokit/auth`](https://github.com/octokit/auth-app.js#readme). Example +To use a different authentication strategy, set `options.authStrategy`. A list of authentication strategies is available at [octokit/authentication-strategies.js](https://github.com/octokit/authentication-strategies.js/#readme). + +Example ```js import { Octokit } from "@octokit/core"; @@ -358,7 +360,7 @@ octokit.hook.after("request", async (response, options) => { }); octokit.hook.error("request", async (error, options) => { if (error.status === 304) { - return findInCache(error.headers.etag); + return findInCache(error.response.headers.etag); } throw error; @@ -421,11 +423,19 @@ You can build your own Octokit class with preset default options and plugins. In ```js const { Octokit } = require("@octokit/core"); const MyActionOctokit = Octokit.plugin( - require("@octokit/plugin-paginate-rest"), - require("@octokit/plugin-throttling"), - require("@octokit/plugin-retry") + require("@octokit/plugin-paginate-rest").paginateRest, + require("@octokit/plugin-throttling").throttling, + require("@octokit/plugin-retry").retry ).defaults({ - authStrategy: require("@octokit/auth-action"), + throttle: { + onAbuseLimit: (retryAfter, options) => { + /* ... */ + }, + onRateLimit: (retryAfter, options) => { + /* ... */ + }, + }, + authStrategy: require("@octokit/auth-action").createActionAuth, userAgent: `my-octokit-action/v1.2.3`, }); diff --git a/node_modules/@octokit/core/dist-node/index.js b/node_modules/@octokit/core/dist-node/index.js index d33f9df..dafb029 100644 --- a/node_modules/@octokit/core/dist-node/index.js +++ b/node_modules/@octokit/core/dist-node/index.js @@ -8,43 +8,7 @@ var request = require('@octokit/request'); var graphql = require('@octokit/graphql'); var authToken = require('@octokit/auth-token'); -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - - var target = _objectWithoutPropertiesLoose(source, excluded); - - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } - } - - return target; -} - -const VERSION = "3.2.5"; +const VERSION = "4.2.0"; class Octokit { constructor(options = {}) { @@ -53,6 +17,7 @@ class Octokit { baseUrl: request.request.endpoint.DEFAULTS.baseUrl, headers: {}, request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type hook: hook.bind(null, "request") }), mediaType: { @@ -104,10 +69,9 @@ class Octokit { } } else { const { - authStrategy - } = options, - otherOptions = _objectWithoutProperties(options, ["authStrategy"]); - + authStrategy, + ...otherOptions + } = options; const auth = authStrategy(Object.assign({ request: this.request, log: this.log, diff --git a/node_modules/@octokit/core/dist-node/index.js.map b/node_modules/@octokit/core/dist-node/index.js.map index 326d1f0..25a58bd 100644 --- a/node_modules/@octokit/core/dist-node/index.js.map +++ b/node_modules/@octokit/core/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"3.2.5\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":["VERSION","Octokit","constructor","options","hook","Collection","requestDefaults","baseUrl","request","endpoint","DEFAULTS","headers","Object","assign","bind","mediaType","previews","format","userAgent","getUserAgent","filter","Boolean","join","timeZone","defaults","graphql","withCustomRequest","log","debug","info","warn","console","error","authStrategy","auth","type","createTokenAuth","wrap","otherOptions","octokit","octokitOptions","classConstructor","plugins","forEach","plugin","OctokitWithDefaults","args","newPlugins","_a","currentPlugins","NewOctokit","concat","includes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACMA,MAAMC,OAAN,CAAc;AACjBC,EAAAA,WAAW,CAACC,OAAO,GAAG,EAAX,EAAe;AACtB,UAAMC,IAAI,GAAG,IAAIC,0BAAJ,EAAb;AACA,UAAMC,eAAe,GAAG;AACpBC,MAAAA,OAAO,EAAEC,eAAO,CAACC,QAAR,CAAiBC,QAAjB,CAA0BH,OADf;AAEpBI,MAAAA,OAAO,EAAE,EAFW;AAGpBH,MAAAA,OAAO,EAAEI,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACK,OAA1B,EAAmC;AACxCJ,QAAAA,IAAI,EAAEA,IAAI,CAACU,IAAL,CAAU,IAAV,EAAgB,SAAhB;AADkC,OAAnC,CAHW;AAMpBC,MAAAA,SAAS,EAAE;AACPC,QAAAA,QAAQ,EAAE,EADH;AAEPC,QAAAA,MAAM,EAAE;AAFD;AANS,KAAxB,CAFsB;;AActBX,IAAAA,eAAe,CAACK,OAAhB,CAAwB,YAAxB,IAAwC,CACpCR,OAAO,CAACe,SAD4B,EAEnC,mBAAkBlB,OAAQ,IAAGmB,+BAAY,EAAG,EAFT,EAInCC,MAJmC,CAI5BC,OAJ4B,EAKnCC,IALmC,CAK9B,GAL8B,CAAxC;;AAMA,QAAInB,OAAO,CAACI,OAAZ,EAAqB;AACjBD,MAAAA,eAAe,CAACC,OAAhB,GAA0BJ,OAAO,CAACI,OAAlC;AACH;;AACD,QAAIJ,OAAO,CAACa,QAAZ,EAAsB;AAClBV,MAAAA,eAAe,CAACS,SAAhB,CAA0BC,QAA1B,GAAqCb,OAAO,CAACa,QAA7C;AACH;;AACD,QAAIb,OAAO,CAACoB,QAAZ,EAAsB;AAClBjB,MAAAA,eAAe,CAACK,OAAhB,CAAwB,WAAxB,IAAuCR,OAAO,CAACoB,QAA/C;AACH;;AACD,SAAKf,OAAL,GAAeA,eAAO,CAACgB,QAAR,CAAiBlB,eAAjB,CAAf;AACA,SAAKmB,OAAL,GAAeC,yBAAiB,CAAC,KAAKlB,OAAN,CAAjB,CAAgCgB,QAAhC,CAAyClB,eAAzC,CAAf;AACA,SAAKqB,GAAL,GAAWf,MAAM,CAACC,MAAP,CAAc;AACrBe,MAAAA,KAAK,EAAE,MAAM,EADQ;AAErBC,MAAAA,IAAI,EAAE,MAAM,EAFS;AAGrBC,MAAAA,IAAI,EAAEC,OAAO,CAACD,IAAR,CAAahB,IAAb,CAAkBiB,OAAlB,CAHe;AAIrBC,MAAAA,KAAK,EAAED,OAAO,CAACC,KAAR,CAAclB,IAAd,CAAmBiB,OAAnB;AAJc,KAAd,EAKR5B,OAAO,CAACwB,GALA,CAAX;AAMA,SAAKvB,IAAL,GAAYA,IAAZ,CArCsB;AAuCtB;AACA;AACA;AACA;;AACA,QAAI,CAACD,OAAO,CAAC8B,YAAb,EAA2B;AACvB,UAAI,CAAC9B,OAAO,CAAC+B,IAAb,EAAmB;AACf;AACA,aAAKA,IAAL,GAAY,aAAa;AACrBC,UAAAA,IAAI,EAAE;AADe,SAAb,CAAZ;AAGH,OALD,MAMK;AACD;AACA,cAAMD,IAAI,GAAGE,yBAAe,CAACjC,OAAO,CAAC+B,IAAT,CAA5B,CAFC;;AAID9B,QAAAA,IAAI,CAACiC,IAAL,CAAU,SAAV,EAAqBH,IAAI,CAAC9B,IAA1B;AACA,aAAK8B,IAAL,GAAYA,IAAZ;AACH;AACJ,KAdD,MAeK;AACD,YAAM;AAAED,QAAAA;AAAF,UAAoC9B,OAA1C;AAAA,YAAyBmC,YAAzB,4BAA0CnC,OAA1C;;AACA,YAAM+B,IAAI,GAAGD,YAAY,CAACrB,MAAM,CAACC,MAAP,CAAc;AACpCL,QAAAA,OAAO,EAAE,KAAKA,OADsB;AAEpCmB,QAAAA,GAAG,EAAE,KAAKA,GAF0B;AAGpC;AACA;AACA;AACA;AACA;AACAY,QAAAA,OAAO,EAAE,IAR2B;AASpCC,QAAAA,cAAc,EAAEF;AAToB,OAAd,EAUvBnC,OAAO,CAAC+B,IAVe,CAAD,CAAzB,CAFC;;AAcD9B,MAAAA,IAAI,CAACiC,IAAL,CAAU,SAAV,EAAqBH,IAAI,CAAC9B,IAA1B;AACA,WAAK8B,IAAL,GAAYA,IAAZ;AACH,KA1EqB;AA4EtB;;;AACA,UAAMO,gBAAgB,GAAG,KAAKvC,WAA9B;AACAuC,IAAAA,gBAAgB,CAACC,OAAjB,CAAyBC,OAAzB,CAAkCC,MAAD,IAAY;AACzChC,MAAAA,MAAM,CAACC,MAAP,CAAc,IAAd,EAAoB+B,MAAM,CAAC,IAAD,EAAOzC,OAAP,CAA1B;AACH,KAFD;AAGH;;AACD,SAAOqB,QAAP,CAAgBA,QAAhB,EAA0B;AACtB,UAAMqB,mBAAmB,GAAG,cAAc,IAAd,CAAmB;AAC3C3C,MAAAA,WAAW,CAAC,GAAG4C,IAAJ,EAAU;AACjB,cAAM3C,OAAO,GAAG2C,IAAI,CAAC,CAAD,CAAJ,IAAW,EAA3B;;AACA,YAAI,OAAOtB,QAAP,KAAoB,UAAxB,EAAoC;AAChC,gBAAMA,QAAQ,CAACrB,OAAD,CAAd;AACA;AACH;;AACD,cAAMS,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBW,QAAlB,EAA4BrB,OAA5B,EAAqCA,OAAO,CAACe,SAAR,IAAqBM,QAAQ,CAACN,SAA9B,GACrC;AACEA,UAAAA,SAAS,EAAG,GAAEf,OAAO,CAACe,SAAU,IAAGM,QAAQ,CAACN,SAAU;AADxD,SADqC,GAIrC,IAJA,CAAN;AAKH;;AAZ0C,KAA/C;AAcA,WAAO2B,mBAAP;AACH;AACD;AACJ;AACA;AACA;AACA;AACA;;;AACI,SAAOD,MAAP,CAAc,GAAGG,UAAjB,EAA6B;AACzB,QAAIC,EAAJ;;AACA,UAAMC,cAAc,GAAG,KAAKP,OAA5B;AACA,UAAMQ,UAAU,IAAIF,EAAE,GAAG,cAAc,IAAd,CAAmB,EAAxB,EAEhBA,EAAE,CAACN,OAAH,GAAaO,cAAc,CAACE,MAAf,CAAsBJ,UAAU,CAAC3B,MAAX,CAAmBwB,MAAD,IAAY,CAACK,cAAc,CAACG,QAAf,CAAwBR,MAAxB,CAA/B,CAAtB,CAFG,EAGhBI,EAHY,CAAhB;AAIA,WAAOE,UAAP;AACH;;AAlHgB;AAoHrBjD,OAAO,CAACD,OAAR,GAAkBA,OAAlB;AACAC,OAAO,CAACyC,OAAR,GAAkB,EAAlB;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.2.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":["VERSION","Octokit","constructor","options","hook","Collection","requestDefaults","baseUrl","request","endpoint","DEFAULTS","headers","Object","assign","bind","mediaType","previews","format","userAgent","getUserAgent","filter","Boolean","join","timeZone","defaults","graphql","withCustomRequest","log","debug","info","warn","console","error","authStrategy","auth","type","createTokenAuth","wrap","otherOptions","octokit","octokitOptions","classConstructor","plugins","forEach","plugin","OctokitWithDefaults","args","newPlugins","_a","currentPlugins","NewOctokit","concat","includes"],"mappings":";;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACMA,MAAMC,OAAN,CAAc;AACjBC,EAAAA,WAAW,CAACC,OAAO,GAAG,EAAX,EAAe;AACtB,UAAMC,IAAI,GAAG,IAAIC,0BAAJ,EAAb;AACA,UAAMC,eAAe,GAAG;AACpBC,MAAAA,OAAO,EAAEC,eAAO,CAACC,QAAR,CAAiBC,QAAjB,CAA0BH,OADf;AAEpBI,MAAAA,OAAO,EAAE,EAFW;AAGpBH,MAAAA,OAAO,EAAEI,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACK,OAA1B,EAAmC;AACxC;AACAJ,QAAAA,IAAI,EAAEA,IAAI,CAACU,IAAL,CAAU,IAAV,EAAgB,SAAhB;AAFkC,OAAnC,CAHW;AAOpBC,MAAAA,SAAS,EAAE;AACPC,QAAAA,QAAQ,EAAE,EADH;AAEPC,QAAAA,MAAM,EAAE;AAFD;AAPS,KAAxB,CAFsB;;AAetBX,IAAAA,eAAe,CAACK,OAAhB,CAAwB,YAAxB,IAAwC,CACpCR,OAAO,CAACe,SAD4B,EAEnC,mBAAkBlB,OAAQ,IAAGmB,+BAAY,EAAG,EAFT,EAInCC,MAJmC,CAI5BC,OAJ4B,EAKnCC,IALmC,CAK9B,GAL8B,CAAxC;;AAMA,QAAInB,OAAO,CAACI,OAAZ,EAAqB;AACjBD,MAAAA,eAAe,CAACC,OAAhB,GAA0BJ,OAAO,CAACI,OAAlC;AACH;;AACD,QAAIJ,OAAO,CAACa,QAAZ,EAAsB;AAClBV,MAAAA,eAAe,CAACS,SAAhB,CAA0BC,QAA1B,GAAqCb,OAAO,CAACa,QAA7C;AACH;;AACD,QAAIb,OAAO,CAACoB,QAAZ,EAAsB;AAClBjB,MAAAA,eAAe,CAACK,OAAhB,CAAwB,WAAxB,IAAuCR,OAAO,CAACoB,QAA/C;AACH;;AACD,SAAKf,OAAL,GAAeA,eAAO,CAACgB,QAAR,CAAiBlB,eAAjB,CAAf;AACA,SAAKmB,OAAL,GAAeC,yBAAiB,CAAC,KAAKlB,OAAN,CAAjB,CAAgCgB,QAAhC,CAAyClB,eAAzC,CAAf;AACA,SAAKqB,GAAL,GAAWf,MAAM,CAACC,MAAP,CAAc;AACrBe,MAAAA,KAAK,EAAE,MAAM,EADQ;AAErBC,MAAAA,IAAI,EAAE,MAAM,EAFS;AAGrBC,MAAAA,IAAI,EAAEC,OAAO,CAACD,IAAR,CAAahB,IAAb,CAAkBiB,OAAlB,CAHe;AAIrBC,MAAAA,KAAK,EAAED,OAAO,CAACC,KAAR,CAAclB,IAAd,CAAmBiB,OAAnB;AAJc,KAAd,EAKR5B,OAAO,CAACwB,GALA,CAAX;AAMA,SAAKvB,IAAL,GAAYA,IAAZ,CAtCsB;AAwCtB;AACA;AACA;AACA;;AACA,QAAI,CAACD,OAAO,CAAC8B,YAAb,EAA2B;AACvB,UAAI,CAAC9B,OAAO,CAAC+B,IAAb,EAAmB;AACf;AACA,aAAKA,IAAL,GAAY,aAAa;AACrBC,UAAAA,IAAI,EAAE;AADe,SAAb,CAAZ;AAGH,OALD,MAMK;AACD;AACA,cAAMD,IAAI,GAAGE,yBAAe,CAACjC,OAAO,CAAC+B,IAAT,CAA5B,CAFC;;AAID9B,QAAAA,IAAI,CAACiC,IAAL,CAAU,SAAV,EAAqBH,IAAI,CAAC9B,IAA1B;AACA,aAAK8B,IAAL,GAAYA,IAAZ;AACH;AACJ,KAdD,MAeK;AACD,YAAM;AAAED,QAAAA,YAAF;AAAgB,WAAGK;AAAnB,UAAoCnC,OAA1C;AACA,YAAM+B,IAAI,GAAGD,YAAY,CAACrB,MAAM,CAACC,MAAP,CAAc;AACpCL,QAAAA,OAAO,EAAE,KAAKA,OADsB;AAEpCmB,QAAAA,GAAG,EAAE,KAAKA,GAF0B;AAGpC;AACA;AACA;AACA;AACA;AACAY,QAAAA,OAAO,EAAE,IAR2B;AASpCC,QAAAA,cAAc,EAAEF;AAToB,OAAd,EAUvBnC,OAAO,CAAC+B,IAVe,CAAD,CAAzB,CAFC;;AAcD9B,MAAAA,IAAI,CAACiC,IAAL,CAAU,SAAV,EAAqBH,IAAI,CAAC9B,IAA1B;AACA,WAAK8B,IAAL,GAAYA,IAAZ;AACH,KA3EqB;AA6EtB;;;AACA,UAAMO,gBAAgB,GAAG,KAAKvC,WAA9B;AACAuC,IAAAA,gBAAgB,CAACC,OAAjB,CAAyBC,OAAzB,CAAkCC,MAAD,IAAY;AACzChC,MAAAA,MAAM,CAACC,MAAP,CAAc,IAAd,EAAoB+B,MAAM,CAAC,IAAD,EAAOzC,OAAP,CAA1B;AACH,KAFD;AAGH;;AACc,SAARqB,QAAQ,CAACA,QAAD,EAAW;AACtB,UAAMqB,mBAAmB,GAAG,cAAc,IAAd,CAAmB;AAC3C3C,MAAAA,WAAW,CAAC,GAAG4C,IAAJ,EAAU;AACjB,cAAM3C,OAAO,GAAG2C,IAAI,CAAC,CAAD,CAAJ,IAAW,EAA3B;;AACA,YAAI,OAAOtB,QAAP,KAAoB,UAAxB,EAAoC;AAChC,gBAAMA,QAAQ,CAACrB,OAAD,CAAd;AACA;AACH;;AACD,cAAMS,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBW,QAAlB,EAA4BrB,OAA5B,EAAqCA,OAAO,CAACe,SAAR,IAAqBM,QAAQ,CAACN,SAA9B,GACrC;AACEA,UAAAA,SAAS,EAAG,GAAEf,OAAO,CAACe,SAAU,IAAGM,QAAQ,CAACN,SAAU;AADxD,SADqC,GAIrC,IAJA,CAAN;AAKH;;AAZ0C,KAA/C;AAcA,WAAO2B,mBAAP;AACH;AACD;AACJ;AACA;AACA;AACA;AACA;;;AACiB,SAAND,MAAM,CAAC,GAAGG,UAAJ,EAAgB;AACzB,QAAIC,EAAJ;;AACA,UAAMC,cAAc,GAAG,KAAKP,OAA5B;AACA,UAAMQ,UAAU,IAAIF,EAAE,GAAG,cAAc,IAAd,CAAmB,EAAxB,EAEhBA,EAAE,CAACN,OAAH,GAAaO,cAAc,CAACE,MAAf,CAAsBJ,UAAU,CAAC3B,MAAX,CAAmBwB,MAAD,IAAY,CAACK,cAAc,CAACG,QAAf,CAAwBR,MAAxB,CAA/B,CAAtB,CAFG,EAGhBI,EAHY,CAAhB;AAIA,WAAOE,UAAP;AACH;;AAnHgB;AAqHrBjD,OAAO,CAACD,OAAR,GAAkBA,OAAlB;AACAC,OAAO,CAACyC,OAAR,GAAkB,EAAlB;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/dist-src/index.js b/node_modules/@octokit/core/dist-src/index.js index 75fd2ff..bdbc335 100644 --- a/node_modules/@octokit/core/dist-src/index.js +++ b/node_modules/@octokit/core/dist-src/index.js @@ -11,6 +11,7 @@ export class Octokit { baseUrl: request.endpoint.DEFAULTS.baseUrl, headers: {}, request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type hook: hook.bind(null, "request"), }), mediaType: { diff --git a/node_modules/@octokit/core/dist-src/version.js b/node_modules/@octokit/core/dist-src/version.js index 845ddc0..3343f54 100644 --- a/node_modules/@octokit/core/dist-src/version.js +++ b/node_modules/@octokit/core/dist-src/version.js @@ -1 +1 @@ -export const VERSION = "3.2.5"; +export const VERSION = "4.2.0"; diff --git a/node_modules/@octokit/core/dist-types/index.d.ts b/node_modules/@octokit/core/dist-types/index.d.ts index 1033622..b757c5b 100644 --- a/node_modules/@octokit/core/dist-types/index.d.ts +++ b/node_modules/@octokit/core/dist-types/index.d.ts @@ -1,14 +1,10 @@ import { HookCollection } from "before-after-hook"; import { request } from "@octokit/request"; import { graphql } from "@octokit/graphql"; -import { Constructor, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types"; +import { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types"; export declare class Octokit { static VERSION: string; - static defaults>(this: S, defaults: OctokitOptions | Function): { - new (...args: any[]): { - [x: string]: any; - }; - } & S; + static defaults>(this: S, defaults: OctokitOptions | Function): S; static plugins: OctokitPlugin[]; /** * Attach a plugin (or many) to your Octokit instance. @@ -18,12 +14,7 @@ export declare class Octokit { */ static plugin & { plugins: any[]; - }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): { - new (...args: any[]): { - [x: string]: any; - }; - plugins: any[]; - } & S & Constructor>>; + }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor>>; constructor(options?: OctokitOptions); request: typeof request; graphql: typeof graphql; @@ -34,7 +25,6 @@ export declare class Octokit { error: (message: string, additionalInfo?: object) => any; [key: string]: any; }; - hook: HookCollection; + hook: HookCollection; auth: (...args: unknown[]) => Promise; - [key: string]: any; } diff --git a/node_modules/@octokit/core/dist-types/types.d.ts b/node_modules/@octokit/core/dist-types/types.d.ts index 59b284e..3970d0d 100644 --- a/node_modules/@octokit/core/dist-types/types.d.ts +++ b/node_modules/@octokit/core/dist-types/types.d.ts @@ -1,7 +1,8 @@ import * as OctokitTypes from "@octokit/types"; +import { RequestError } from "@octokit/request-error"; import { Octokit } from "."; export declare type RequestParameters = OctokitTypes.RequestParameters; -export declare type OctokitOptions = { +export interface OctokitOptions { authStrategy?: any; auth?: any; userAgent?: string; @@ -16,9 +17,9 @@ export declare type OctokitOptions = { request?: OctokitTypes.RequestRequestOptions; timeZone?: string; [option: string]: any; -}; +} export declare type Constructor = new (...args: any[]) => T; -export declare type ReturnTypeOf = T extends AnyFunction ? ReturnType : T extends AnyFunction[] ? UnionToIntersection> : never; +export declare type ReturnTypeOf = T extends AnyFunction ? ReturnType : T extends AnyFunction[] ? UnionToIntersection, void>> : never; /** * @author https://stackoverflow.com/users/2887218/jcalz * @see https://stackoverflow.com/a/50375286/10325032 @@ -28,4 +29,16 @@ declare type AnyFunction = (...args: any) => any; export declare type OctokitPlugin = (octokit: Octokit, options: OctokitOptions) => { [key: string]: any; } | void; +export declare type Hooks = { + request: { + Options: Required; + Result: OctokitTypes.OctokitResponse; + Error: RequestError | Error; + }; + [key: string]: { + Options: unknown; + Result: unknown; + Error: unknown; + }; +}; export {}; diff --git a/node_modules/@octokit/core/dist-types/version.d.ts b/node_modules/@octokit/core/dist-types/version.d.ts index 5885c84..88f0f9a 100644 --- a/node_modules/@octokit/core/dist-types/version.d.ts +++ b/node_modules/@octokit/core/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "3.2.5"; +export declare const VERSION = "4.2.0"; diff --git a/node_modules/@octokit/core/dist-web/index.js b/node_modules/@octokit/core/dist-web/index.js index 384c077..15bac0e 100644 --- a/node_modules/@octokit/core/dist-web/index.js +++ b/node_modules/@octokit/core/dist-web/index.js @@ -4,7 +4,7 @@ import { request } from '@octokit/request'; import { withCustomRequest } from '@octokit/graphql'; import { createTokenAuth } from '@octokit/auth-token'; -const VERSION = "3.2.5"; +const VERSION = "4.2.0"; class Octokit { constructor(options = {}) { @@ -13,6 +13,7 @@ class Octokit { baseUrl: request.endpoint.DEFAULTS.baseUrl, headers: {}, request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type hook: hook.bind(null, "request"), }), mediaType: { diff --git a/node_modules/@octokit/core/dist-web/index.js.map b/node_modules/@octokit/core/dist-web/index.js.map index dcc332c..9d5c272 100644 --- a/node_modules/@octokit/core/dist-web/index.js.map +++ b/node_modules/@octokit/core/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"3.2.5\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACMnC,MAAM,OAAO,CAAC;AACrB,IAAI,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC9B,QAAQ,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;AACtC,QAAQ,MAAM,eAAe,GAAG;AAChC,YAAY,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO;AACtD,YAAY,OAAO,EAAE,EAAE;AACvB,YAAY,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE;AACxD,gBAAgB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;AAChD,aAAa,CAAC;AACd,YAAY,SAAS,EAAE;AACvB,gBAAgB,QAAQ,EAAE,EAAE;AAC5B,gBAAgB,MAAM,EAAE,EAAE;AAC1B,aAAa;AACb,SAAS,CAAC;AACV;AACA,QAAQ,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG;AAChD,YAAY,OAAO,CAAC,SAAS;AAC7B,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1D,SAAS;AACT,aAAa,MAAM,CAAC,OAAO,CAAC;AAC5B,aAAa,IAAI,CAAC,GAAG,CAAC,CAAC;AACvB,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE;AAC7B,YAAY,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtD,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;AAC9B,YAAY,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAClE,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;AAC9B,YAAY,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;AACpE,SAAS;AACT,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACzD,QAAQ,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACjF,QAAQ,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AACjC,YAAY,KAAK,EAAE,MAAM,GAAG;AAC5B,YAAY,IAAI,EAAE,MAAM,GAAG;AAC3B,YAAY,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;AAC5C,YAAY,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;AAC9C,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACxB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;AACnC,YAAY,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;AAC/B;AACA,gBAAgB,IAAI,CAAC,IAAI,GAAG,aAAa;AACzC,oBAAoB,IAAI,EAAE,iBAAiB;AAC3C,iBAAiB,CAAC,CAAC;AACnB,aAAa;AACb,iBAAiB;AACjB;AACA,gBAAgB,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3D;AACA,gBAAgB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,gBAAgB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACjC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;AAC9D,YAAY,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC;AACpD,gBAAgB,OAAO,EAAE,IAAI,CAAC,OAAO;AACrC,gBAAgB,GAAG,EAAE,IAAI,CAAC,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO,EAAE,IAAI;AAC7B,gBAAgB,cAAc,EAAE,YAAY;AAC5C,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9B;AACA,YAAY,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5C,YAAY,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AAC7B,SAAS;AACT;AACA;AACA,QAAQ,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC;AAClD,QAAQ,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACrD,YAAY,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,OAAO,QAAQ,CAAC,QAAQ,EAAE;AAC9B,QAAQ,MAAM,mBAAmB,GAAG,cAAc,IAAI,CAAC;AACvD,YAAY,WAAW,CAAC,GAAG,IAAI,EAAE;AACjC,gBAAgB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9C,gBAAgB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;AACpD,oBAAoB,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7C,oBAAoB,OAAO;AAC3B,iBAAiB;AACjB,gBAAgB,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS;AAClG,sBAAsB;AACtB,wBAAwB,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC/E,qBAAqB;AACrB,sBAAsB,IAAI,CAAC,CAAC,CAAC;AAC7B,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,OAAO,mBAAmB,CAAC;AACnC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,MAAM,CAAC,GAAG,UAAU,EAAE;AACjC,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC;AAC5C,QAAQ,MAAM,UAAU,IAAI,EAAE,GAAG,cAAc,IAAI,CAAC;AACpD,aAAa;AACb,YAAY,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/G,YAAY,EAAE,CAAC,CAAC;AAChB,QAAQ,OAAO,UAAU,CAAC;AAC1B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.2.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACMnC,MAAM,OAAO,CAAC;AACrB,IAAI,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC9B,QAAQ,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;AACtC,QAAQ,MAAM,eAAe,GAAG;AAChC,YAAY,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO;AACtD,YAAY,OAAO,EAAE,EAAE;AACvB,YAAY,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE;AACxD;AACA,gBAAgB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;AAChD,aAAa,CAAC;AACd,YAAY,SAAS,EAAE;AACvB,gBAAgB,QAAQ,EAAE,EAAE;AAC5B,gBAAgB,MAAM,EAAE,EAAE;AAC1B,aAAa;AACb,SAAS,CAAC;AACV;AACA,QAAQ,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG;AAChD,YAAY,OAAO,CAAC,SAAS;AAC7B,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1D,SAAS;AACT,aAAa,MAAM,CAAC,OAAO,CAAC;AAC5B,aAAa,IAAI,CAAC,GAAG,CAAC,CAAC;AACvB,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE;AAC7B,YAAY,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtD,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;AAC9B,YAAY,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAClE,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;AAC9B,YAAY,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;AACpE,SAAS;AACT,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACzD,QAAQ,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACjF,QAAQ,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AACjC,YAAY,KAAK,EAAE,MAAM,GAAG;AAC5B,YAAY,IAAI,EAAE,MAAM,GAAG;AAC3B,YAAY,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;AAC5C,YAAY,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;AAC9C,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACxB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;AACnC,YAAY,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;AAC/B;AACA,gBAAgB,IAAI,CAAC,IAAI,GAAG,aAAa;AACzC,oBAAoB,IAAI,EAAE,iBAAiB;AAC3C,iBAAiB,CAAC,CAAC;AACnB,aAAa;AACb,iBAAiB;AACjB;AACA,gBAAgB,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3D;AACA,gBAAgB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,gBAAgB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACjC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;AAC9D,YAAY,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC;AACpD,gBAAgB,OAAO,EAAE,IAAI,CAAC,OAAO;AACrC,gBAAgB,GAAG,EAAE,IAAI,CAAC,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO,EAAE,IAAI;AAC7B,gBAAgB,cAAc,EAAE,YAAY;AAC5C,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9B;AACA,YAAY,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5C,YAAY,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AAC7B,SAAS;AACT;AACA;AACA,QAAQ,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC;AAClD,QAAQ,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACrD,YAAY,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,OAAO,QAAQ,CAAC,QAAQ,EAAE;AAC9B,QAAQ,MAAM,mBAAmB,GAAG,cAAc,IAAI,CAAC;AACvD,YAAY,WAAW,CAAC,GAAG,IAAI,EAAE;AACjC,gBAAgB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9C,gBAAgB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;AACpD,oBAAoB,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7C,oBAAoB,OAAO;AAC3B,iBAAiB;AACjB,gBAAgB,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS;AAClG,sBAAsB;AACtB,wBAAwB,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC/E,qBAAqB;AACrB,sBAAsB,IAAI,CAAC,CAAC,CAAC;AAC7B,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,OAAO,mBAAmB,CAAC;AACnC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,MAAM,CAAC,GAAG,UAAU,EAAE;AACjC,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC;AAC5C,QAAQ,MAAM,UAAU,IAAI,EAAE,GAAG,cAAc,IAAI,CAAC;AACpD,aAAa;AACb,YAAY,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/G,YAAY,EAAE,CAAC,CAAC;AAChB,QAAQ,OAAO,UAAU,CAAC;AAC1B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/LICENSE b/node_modules/@octokit/core/node_modules/@octokit/auth-token/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/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/core/node_modules/@octokit/auth-token/README.md b/node_modules/@octokit/core/node_modules/@octokit/auth-token/README.md new file mode 100644 index 0000000..2e48b73 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/README.md @@ -0,0 +1,285 @@ +# auth-token.js + +> GitHub API token authentication for browsers and Node.js + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-token.svg)](https://www.npmjs.com/package/@octokit/auth-token) +[![Build Status](https://github.com/octokit/auth-token.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-token.js/actions?query=workflow%3ATest) + +`@octokit/auth-token` is the simplest of [GitHub’s authentication strategies](https://github.com/octokit/auth.js). + +It is useful if you want to support multiple authentication strategies, as it’s API is compatible with its sibling packages for [basic](https://github.com/octokit/auth-basic.js), [GitHub App](https://github.com/octokit/auth-app.js) and [OAuth app](https://github.com/octokit/auth.js) authentication. + + + +- [Usage](#usage) +- [`createTokenAuth(token) options`](#createtokenauthtoken-options) +- [`auth()`](#auth) +- [Authentication object](#authentication-object) +- [`auth.hook(request, route, options)` or `auth.hook(request, options)`](#authhookrequest-route-options-or-authhookrequest-options) +- [Find more information](#find-more-information) + - [Find out what scopes are enabled for oauth tokens](#find-out-what-scopes-are-enabled-for-oauth-tokens) + - [Find out if token is a personal access token or if it belongs to an OAuth app](#find-out-if-token-is-a-personal-access-token-or-if-it-belongs-to-an-oauth-app) + - [Find out what permissions are enabled for a repository](#find-out-what-permissions-are-enabled-for-a-repository) + - [Use token for git operations](#use-token-for-git-operations) +- [License](#license) + + + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/auth-token` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+Node + + +Install with npm install @octokit/auth-token + +```js +const { createTokenAuth } = require("@octokit/auth-token"); +// or: import { createTokenAuth } from "@octokit/auth-token"; +``` + +
+ +```js +const auth = createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +const authentication = await auth(); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } +``` + +## `createTokenAuth(token) options` + +The `createTokenAuth` method accepts a single argument of type string, which is the token. The passed token can be one of the following: + +- [Personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) +- [OAuth access token](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/) +- [GITHUB_TOKEN provided to GitHub Actions](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables) +- Installation access token ([server-to-server](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)) +- User authentication for installation ([user-to-server](https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)) + +Examples + +```js +// Personal access token or OAuth access token +createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghs_InstallallationOrActionToken00000000"); +// { +// type: 'token', +// token: 'ghs_InstallallationOrActionToken00000000', +// tokenType: 'installation' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghu_InstallationUserToServer000000000000"); +// { +// type: 'token', +// token: 'ghu_InstallationUserToServer000000000000', +// tokenType: 'user-to-server' +// } +``` + +## `auth()` + +The `auth()` method has no options. It returns a promise which resolves with the the authentication object. + +## Authentication object + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ token + + string + + The provided token. +
+ tokenType + + string + + Can be either "oauth" for personal access tokens and OAuth tokens, "installation" for installation access tokens (includes GITHUB_TOKEN provided to GitHub Actions), "app" for a GitHub App JSON Web Token, or "user-to-server" for a user authentication token through an app installation. +
+ +## `auth.hook(request, route, options)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It authenticates the request using the provided token. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: authorizations } = await auth.hook( + request, + "GET /authorizations" +); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: authorizations } = await requestWithAuth("GET /authorizations"); +``` + +## Find more information + +`auth()` does not send any requests, it only transforms the provided token string into an authentication object. + +Here is a list of things you can do to retrieve further information + +### Find out what scopes are enabled for oauth tokens + +Note that this does not work for installations. There is no way to retrieve permissions based on an installation access tokens. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("HEAD /"); +const scopes = response.headers["x-oauth-scopes"].split(/,\s+/); + +if (scopes.length) { + console.log( + `"${TOKEN}" has ${scopes.length} scopes enabled: ${scopes.join(", ")}` + ); +} else { + console.log(`"${TOKEN}" has no scopes enabled`); +} +``` + +### Find out if token is a personal access token or if it belongs to an OAuth app + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("HEAD /"); +const clientId = response.headers["x-oauth-client-id"]; + +if (clientId) { + console.log( + `"${token}" is an OAuth token, its app’s client_id is ${clientId}.` + ); +} else { + console.log(`"${token}" is a personal access token`); +} +``` + +### Find out what permissions are enabled for a repository + +Note that the `permissions` key is not set when authenticated using an installation access token. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("GET /repos/{owner}/{repo}", { + owner: "octocat", + repo: "hello-world", +}); + +console.log(response.data.permissions); +// { +// admin: true, +// push: true, +// pull: true +// } +``` + +### Use token for git operations + +Both OAuth and installation access tokens can be used for git operations. However, when using with an installation, [the token must be prefixed with `x-access-token`](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#http-based-git-access-by-an-installation). + +This example is using the [`execa`](https://github.com/sindresorhus/execa) package to run a `git push` command. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const { token, tokenType } = await auth(); +const tokenWithPrefix = + tokenType === "installation" ? `x-access-token:${token}` : token; + +const repositoryUrl = `https://${tokenWithPrefix}@github.com/octocat/hello-world.git`; + +const { stdout } = await execa("git", ["push", repositoryUrl]); +console.log(stdout); +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-node/index.js b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-node/index.js new file mode 100644 index 0000000..984c49b --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-node/index.js @@ -0,0 +1,52 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token: token, + tokenType + }; +} + +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} + +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; + +exports.createTokenAuth = createTokenAuth; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-node/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-node/index.js.map new file mode 100644 index 0000000..7f9e2f5 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":["REGEX_IS_INSTALLATION_LEGACY","REGEX_IS_INSTALLATION","REGEX_IS_USER_TO_SERVER","auth","token","isApp","split","length","isInstallation","test","isUserToServer","tokenType","type","withAuthorizationPrefix","hook","request","route","parameters","endpoint","merge","headers","authorization","createTokenAuth","Error","replace","Object","assign","bind"],"mappings":";;;;AAAA,MAAMA,4BAA4B,GAAG,OAAO;AAC5C,MAAMC,qBAAqB,GAAG,OAAO;AACrC,MAAMC,uBAAuB,GAAG,OAAO;AAChC,eAAeC,IAAI,CAACC,KAAK,EAAE;EAC9B,MAAMC,KAAK,GAAGD,KAAK,CAACE,KAAK,CAAC,IAAI,CAAC,CAACC,MAAM,KAAK,CAAC;EAC5C,MAAMC,cAAc,GAAGR,4BAA4B,CAACS,IAAI,CAACL,KAAK,CAAC,IAC3DH,qBAAqB,CAACQ,IAAI,CAACL,KAAK,CAAC;EACrC,MAAMM,cAAc,GAAGR,uBAAuB,CAACO,IAAI,CAACL,KAAK,CAAC;EAC1D,MAAMO,SAAS,GAAGN,KAAK,GACjB,KAAK,GACLG,cAAc,GACV,cAAc,GACdE,cAAc,GACV,gBAAgB,GAChB,OAAO;EACrB,OAAO;IACHE,IAAI,EAAE,OAAO;IACbR,KAAK,EAAEA,KAAK;IACZO;GACH;AACL;;ACpBA;AACA;AACA;AACA;AACA;AACA,AAAO,SAASE,uBAAuB,CAACT,KAAK,EAAE;EAC3C,IAAIA,KAAK,CAACE,KAAK,CAAC,IAAI,CAAC,CAACC,MAAM,KAAK,CAAC,EAAE;IAChC,OAAQ,UAASH,KAAM,EAAC;;EAE5B,OAAQ,SAAQA,KAAM,EAAC;AAC3B;;ACTO,eAAeU,IAAI,CAACV,KAAK,EAAEW,OAAO,EAAEC,KAAK,EAAEC,UAAU,EAAE;EAC1D,MAAMC,QAAQ,GAAGH,OAAO,CAACG,QAAQ,CAACC,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;EAC1DC,QAAQ,CAACE,OAAO,CAACC,aAAa,GAAGR,uBAAuB,CAACT,KAAK,CAAC;EAC/D,OAAOW,OAAO,CAACG,QAAQ,CAAC;AAC5B;;MCHaI,eAAe,GAAG,SAASA,eAAe,CAAClB,KAAK,EAAE;EAC3D,IAAI,CAACA,KAAK,EAAE;IACR,MAAM,IAAImB,KAAK,CAAC,0DAA0D,CAAC;;EAE/E,IAAI,OAAOnB,KAAK,KAAK,QAAQ,EAAE;IAC3B,MAAM,IAAImB,KAAK,CAAC,uEAAuE,CAAC;;EAE5FnB,KAAK,GAAGA,KAAK,CAACoB,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC;EAC/C,OAAOC,MAAM,CAACC,MAAM,CAACvB,IAAI,CAACwB,IAAI,CAAC,IAAI,EAAEvB,KAAK,CAAC,EAAE;IACzCU,IAAI,EAAEA,IAAI,CAACa,IAAI,CAAC,IAAI,EAAEvB,KAAK;GAC9B,CAAC;AACN,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/auth.js b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/auth.js new file mode 100644 index 0000000..b22ce98 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/auth.js @@ -0,0 +1,21 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +export async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || + REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp + ? "app" + : isInstallation + ? "installation" + : isUserToServer + ? "user-to-server" + : "oauth"; + return { + type: "token", + token: token, + tokenType, + }; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/hook.js b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/hook.js new file mode 100644 index 0000000..f8e47f0 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/hook.js @@ -0,0 +1,6 @@ +import { withAuthorizationPrefix } from "./with-authorization-prefix"; +export async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/index.js b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/index.js new file mode 100644 index 0000000..f2ddd63 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/index.js @@ -0,0 +1,14 @@ +import { auth } from "./auth"; +import { hook } from "./hook"; +export const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token), + }); +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/types.js b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js new file mode 100644 index 0000000..9035813 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js @@ -0,0 +1,11 @@ +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +export function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/auth.d.ts b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/auth.d.ts new file mode 100644 index 0000000..dc41835 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/auth.d.ts @@ -0,0 +1,2 @@ +import { Token, Authentication } from "./types"; +export declare function auth(token: Token): Promise; diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/hook.d.ts b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/hook.d.ts new file mode 100644 index 0000000..21e4b6f --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/hook.d.ts @@ -0,0 +1,2 @@ +import { AnyResponse, EndpointOptions, RequestInterface, RequestParameters, Route, Token } from "./types"; +export declare function hook(token: Token, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise; diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/index.d.ts b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/index.d.ts new file mode 100644 index 0000000..f496ab1 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/index.d.ts @@ -0,0 +1,7 @@ +import { StrategyInterface, Token, Authentication } from "./types"; +export type Types = { + StrategyOptions: Token; + AuthOptions: never; + Authentication: Authentication; +}; +export declare const createTokenAuth: StrategyInterface; diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/types.d.ts b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/types.d.ts new file mode 100644 index 0000000..4267fa1 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/types.d.ts @@ -0,0 +1,33 @@ +import * as OctokitTypes from "@octokit/types"; +export type AnyResponse = OctokitTypes.OctokitResponse; +export type StrategyInterface = OctokitTypes.StrategyInterface<[ + Token +], [ +], Authentication>; +export type EndpointDefaults = OctokitTypes.EndpointDefaults; +export type EndpointOptions = OctokitTypes.EndpointOptions; +export type RequestParameters = OctokitTypes.RequestParameters; +export type RequestInterface = OctokitTypes.RequestInterface; +export type Route = OctokitTypes.Route; +export type Token = string; +export type OAuthTokenAuthentication = { + type: "token"; + tokenType: "oauth"; + token: Token; +}; +export type InstallationTokenAuthentication = { + type: "token"; + tokenType: "installation"; + token: Token; +}; +export type AppAuthentication = { + type: "token"; + tokenType: "app"; + token: Token; +}; +export type UserToServerAuthentication = { + type: "token"; + tokenType: "user-to-server"; + token: Token; +}; +export type Authentication = OAuthTokenAuthentication | InstallationTokenAuthentication | AppAuthentication | UserToServerAuthentication; diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts new file mode 100644 index 0000000..2e52c31 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts @@ -0,0 +1,6 @@ +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +export declare function withAuthorizationPrefix(token: string): string; diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-web/index.js b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-web/index.js new file mode 100644 index 0000000..8b1cd7d --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-web/index.js @@ -0,0 +1,55 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || + REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp + ? "app" + : isInstallation + ? "installation" + : isUserToServer + ? "user-to-server" + : "oauth"; + return { + type: "token", + token: token, + tokenType, + }; +} + +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} + +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token), + }); +}; + +export { createTokenAuth }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-web/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-web/index.js.map new file mode 100644 index 0000000..1d6197b --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":[],"mappings":"AAAA,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,qBAAqB,GAAG,OAAO,CAAC;AACtC,MAAM,uBAAuB,GAAG,OAAO,CAAC;AACjC,eAAe,IAAI,CAAC,KAAK,EAAE;AAClC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACjD,IAAI,MAAM,cAAc,GAAG,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC;AACnE,QAAQ,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1C,IAAI,MAAM,cAAc,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/D,IAAI,MAAM,SAAS,GAAG,KAAK;AAC3B,UAAU,KAAK;AACf,UAAU,cAAc;AACxB,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,kBAAkB,gBAAgB;AAClC,kBAAkB,OAAO,CAAC;AAC1B,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,SAAS;AACjB,KAAK,CAAC;AACN;;ACpBA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,uBAAuB,CAAC,KAAK,EAAE;AAC/C,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AACxC,QAAQ,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5B,CAAC;;ACTM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;AACpE,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACHW,MAAC,eAAe,GAAG,SAAS,eAAe,CAAC,KAAK,EAAE;AAC/D,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;AACpF,KAAK;AACL,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;AACjG,KAAK;AACL,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACpD,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/auth-token/package.json b/node_modules/@octokit/core/node_modules/@octokit/auth-token/package.json new file mode 100644 index 0000000..5d72ac1 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/auth-token/package.json @@ -0,0 +1,48 @@ +{ + "name": "@octokit/auth-token", + "description": "GitHub API token authentication for browsers and Node.js", + "version": "3.0.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "repository": "github:octokit/auth-token.js", + "dependencies": { + "@octokit/types": "^9.0.0" + }, + "devDependencies": { + "@octokit/core": "^4.0.0", + "@octokit/request": "^6.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^29.0.0", + "fetch-mock": "^9.0.0", + "jest": "^29.0.0", + "prettier": "2.8.3", + "semantic-release": "^20.0.0", + "ts-jest": "^29.0.0", + "typescript": "^4.0.0" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/core/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/core/node_modules/@octokit/endpoint/README.md new file mode 100644 index 0000000..c7b5232 --- /dev/null +++ b/node_modules/@octokit/core/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://github.com/octokit/endpoint.js/workflows/Test/badge.svg)](https://github.com/octokit/endpoint.js/actions/workflows/test.yml?query=branch%3Amain) + +`@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(route, options)` or `endpoint(options)`](#endpointroute-options-or-endpointoptions) + - [`endpoint.defaults()`](#endpointdefaults) + - [`endpoint.DEFAULTS`](#endpointdefaults) + - [`endpoint.merge(route, options)` or `endpoint.merge(options)`](#endpointmergeroute-options-or-endpointmergeoptions) + - [`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.skypack.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 common 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/core/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-node/index.js new file mode 100644 index 0000000..ef51e39 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-node/index.js @@ -0,0 +1,348 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var isPlainObject = require('is-plain-object'); +var universalUserAgent = 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 mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject.isPlainObject(options[key])) { + if (!(key in defaults)) Object.assign(result, { + [key]: options[key] + });else result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { + [key]: options[key] + }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map(name => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], + result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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 = "7.0.4"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; + +const endpoint = withDefaults(null, DEFAULTS); + +exports.endpoint = endpoint; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-node/index.js.map new file mode 100644 index 0000000..10e5ff9 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","removeUndefinedProperties","obj","undefined","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequest","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;AAAO,SAASA,aAAa,CAACC,MAAM,EAAE;EAClC,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,EAAE;;EAEb,OAAOC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,MAAM,CAAC,CAACC,MAAM,EAAEC,GAAG,KAAK;IAC/CD,MAAM,CAACC,GAAG,CAACC,WAAW,EAAE,CAAC,GAAGN,MAAM,CAACK,GAAG,CAAC;IACvC,OAAOD,MAAM;GAChB,EAAE,EAAE,CAAC;AACV;;ACPO,SAASG,SAAS,CAACC,QAAQ,EAAEC,OAAO,EAAE;EACzC,MAAMC,MAAM,GAAGT,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEH,QAAQ,CAAC;EAC1CP,MAAM,CAACC,IAAI,CAACO,OAAO,CAAC,CAACG,OAAO,CAAEP,GAAG,IAAK;IAClC,IAAIQ,2BAAa,CAACJ,OAAO,CAACJ,GAAG,CAAC,CAAC,EAAE;MAC7B,IAAI,EAAEA,GAAG,IAAIG,QAAQ,CAAC,EAClBP,MAAM,CAACU,MAAM,CAACD,MAAM,EAAE;QAAE,CAACL,GAAG,GAAGI,OAAO,CAACJ,GAAG;OAAG,CAAC,CAAC,KAE/CK,MAAM,CAACL,GAAG,CAAC,GAAGE,SAAS,CAACC,QAAQ,CAACH,GAAG,CAAC,EAAEI,OAAO,CAACJ,GAAG,CAAC,CAAC;KAC3D,MACI;MACDJ,MAAM,CAACU,MAAM,CAACD,MAAM,EAAE;QAAE,CAACL,GAAG,GAAGI,OAAO,CAACJ,GAAG;OAAG,CAAC;;GAErD,CAAC;EACF,OAAOK,MAAM;AACjB;;ACfO,SAASI,yBAAyB,CAACC,GAAG,EAAE;EAC3C,KAAK,MAAMV,GAAG,IAAIU,GAAG,EAAE;IACnB,IAAIA,GAAG,CAACV,GAAG,CAAC,KAAKW,SAAS,EAAE;MACxB,OAAOD,GAAG,CAACV,GAAG,CAAC;;;EAGvB,OAAOU,GAAG;AACd;;ACJO,SAASE,KAAK,CAACT,QAAQ,EAAEU,KAAK,EAAET,OAAO,EAAE;EAC5C,IAAI,OAAOS,KAAK,KAAK,QAAQ,EAAE;IAC3B,IAAI,CAACC,MAAM,EAAEC,GAAG,CAAC,GAAGF,KAAK,CAACG,KAAK,CAAC,GAAG,CAAC;IACpCZ,OAAO,GAAGR,MAAM,CAACU,MAAM,CAACS,GAAG,GAAG;MAAED,MAAM;MAAEC;KAAK,GAAG;MAAEA,GAAG,EAAED;KAAQ,EAAEV,OAAO,CAAC;GAC5E,MACI;IACDA,OAAO,GAAGR,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEO,KAAK,CAAC;;;EAGtCT,OAAO,CAACa,OAAO,GAAGvB,aAAa,CAACU,OAAO,CAACa,OAAO,CAAC;;EAEhDR,yBAAyB,CAACL,OAAO,CAAC;EAClCK,yBAAyB,CAACL,OAAO,CAACa,OAAO,CAAC;EAC1C,MAAMC,aAAa,GAAGhB,SAAS,CAACC,QAAQ,IAAI,EAAE,EAAEC,OAAO,CAAC;;EAExD,IAAID,QAAQ,IAAIA,QAAQ,CAACgB,SAAS,CAACC,QAAQ,CAACC,MAAM,EAAE;IAChDH,aAAa,CAACC,SAAS,CAACC,QAAQ,GAAGjB,QAAQ,CAACgB,SAAS,CAACC,QAAQ,CACzDE,MAAM,CAAEC,OAAO,IAAK,CAACL,aAAa,CAACC,SAAS,CAACC,QAAQ,CAACI,QAAQ,CAACD,OAAO,CAAC,CAAC,CACxEE,MAAM,CAACP,aAAa,CAACC,SAAS,CAACC,QAAQ,CAAC;;EAEjDF,aAAa,CAACC,SAAS,CAACC,QAAQ,GAAGF,aAAa,CAACC,SAAS,CAACC,QAAQ,CAACM,GAAG,CAAEH,OAAO,IAAKA,OAAO,CAACI,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;EACrH,OAAOT,aAAa;AACxB;;ACzBO,SAASU,kBAAkB,CAACb,GAAG,EAAEc,UAAU,EAAE;EAChD,MAAMC,SAAS,GAAG,IAAI,CAACC,IAAI,CAAChB,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;EAC5C,MAAMiB,KAAK,GAAGpC,MAAM,CAACC,IAAI,CAACgC,UAAU,CAAC;EACrC,IAAIG,KAAK,CAACX,MAAM,KAAK,CAAC,EAAE;IACpB,OAAON,GAAG;;EAEd,OAAQA,GAAG,GACPe,SAAS,GACTE,KAAK,CACAN,GAAG,CAAEO,IAAI,IAAK;IACf,IAAIA,IAAI,KAAK,GAAG,EAAE;MACd,OAAQ,IAAI,GAAGJ,UAAU,CAACK,CAAC,CAAClB,KAAK,CAAC,GAAG,CAAC,CAACU,GAAG,CAACS,kBAAkB,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;;IAE5E,OAAQ,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAI,CAAC,CAAE,EAAC;GAC3D,CAAC,CACGG,IAAI,CAAC,GAAG,CAAC;AACtB;;AChBA,MAAMC,gBAAgB,GAAG,YAAY;AACrC,SAASC,cAAc,CAACC,YAAY,EAAE;EAClC,OAAOA,YAAY,CAACZ,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAACX,KAAK,CAAC,GAAG,CAAC;AAC5D;AACA,AAAO,SAASwB,uBAAuB,CAACzB,GAAG,EAAE;EACzC,MAAM0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAK,CAACL,gBAAgB,CAAC;EAC3C,IAAI,CAACI,OAAO,EAAE;IACV,OAAO,EAAE;;EAEb,OAAOA,OAAO,CAACf,GAAG,CAACY,cAAc,CAAC,CAACxC,MAAM,CAAC,CAAC6C,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAAClB,MAAM,CAACmB,CAAC,CAAC,EAAE,EAAE,CAAC;AACxE;;ACVO,SAASC,IAAI,CAAClD,MAAM,EAAEmD,UAAU,EAAE;EACrC,OAAOlD,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CACrB2B,MAAM,CAAEyB,MAAM,IAAK,CAACD,UAAU,CAACtB,QAAQ,CAACuB,MAAM,CAAC,CAAC,CAChDjD,MAAM,CAAC,CAACY,GAAG,EAAEV,GAAG,KAAK;IACtBU,GAAG,CAACV,GAAG,CAAC,GAAGL,MAAM,CAACK,GAAG,CAAC;IACtB,OAAOU,GAAG;GACb,EAAE,EAAE,CAAC;AACV;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASsC,cAAc,CAACC,GAAG,EAAE;EACzB,OAAOA,GAAG,CACLjC,KAAK,CAAC,oBAAoB,CAAC,CAC3BU,GAAG,CAAC,UAAUwB,IAAI,EAAE;IACrB,IAAI,CAAC,cAAc,CAACnB,IAAI,CAACmB,IAAI,CAAC,EAAE;MAC5BA,IAAI,GAAGC,SAAS,CAACD,IAAI,CAAC,CAACvB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;;IAEpE,OAAOuB,IAAI;GACd,CAAC,CACGd,IAAI,CAAC,EAAE,CAAC;AACjB;AACA,SAASgB,gBAAgB,CAACH,GAAG,EAAE;EAC3B,OAAOd,kBAAkB,CAACc,GAAG,CAAC,CAACtB,OAAO,CAAC,UAAU,EAAE,UAAU0B,CAAC,EAAE;IAC5D,OAAO,GAAG,GAAGA,CAAC,CAACC,UAAU,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,WAAW,EAAE;GAC1D,CAAC;AACN;AACA,SAASC,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAE3D,GAAG,EAAE;EACvC2D,KAAK,GACDD,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,GAC9BV,cAAc,CAACW,KAAK,CAAC,GACrBP,gBAAgB,CAACO,KAAK,CAAC;EACjC,IAAI3D,GAAG,EAAE;IACL,OAAOoD,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,GAAG2D,KAAK;GAC7C,MACI;IACD,OAAOA,KAAK;;AAEpB;AACA,SAASC,SAAS,CAACD,KAAK,EAAE;EACtB,OAAOA,KAAK,KAAKhD,SAAS,IAAIgD,KAAK,KAAK,IAAI;AAChD;AACA,SAASE,aAAa,CAACH,QAAQ,EAAE;EAC7B,OAAOA,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG;AACnE;AACA,SAASI,SAAS,CAACC,OAAO,EAAEL,QAAQ,EAAE1D,GAAG,EAAEgE,QAAQ,EAAE;EACjD,IAAIL,KAAK,GAAGI,OAAO,CAAC/D,GAAG,CAAC;IAAEK,MAAM,GAAG,EAAE;EACrC,IAAIuD,SAAS,CAACD,KAAK,CAAC,IAAIA,KAAK,KAAK,EAAE,EAAE;IAClC,IAAI,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,SAAS,EAAE;MAC5BA,KAAK,GAAGA,KAAK,CAACJ,QAAQ,EAAE;MACxB,IAAIS,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;QAC9BL,KAAK,GAAGA,KAAK,CAACM,SAAS,CAAC,CAAC,EAAEC,QAAQ,CAACF,QAAQ,EAAE,EAAE,CAAC,CAAC;;MAEtD3D,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAEE,aAAa,CAACH,QAAQ,CAAC,GAAG1D,GAAG,GAAG,EAAE,CAAC,CAAC;KAChF,MACI;MACD,IAAIgE,QAAQ,KAAK,GAAG,EAAE;QAClB,IAAII,KAAK,CAACC,OAAO,CAACV,KAAK,CAAC,EAAE;UACtBA,KAAK,CAACrC,MAAM,CAACsC,SAAS,CAAC,CAACrD,OAAO,CAAC,UAAUoD,KAAK,EAAE;YAC7CtD,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAEE,aAAa,CAACH,QAAQ,CAAC,GAAG1D,GAAG,GAAG,EAAE,CAAC,CAAC;WAChF,CAAC;SACL,MACI;UACDJ,MAAM,CAACC,IAAI,CAAC8D,KAAK,CAAC,CAACpD,OAAO,CAAC,UAAU+D,CAAC,EAAE;YACpC,IAAIV,SAAS,CAACD,KAAK,CAACW,CAAC,CAAC,CAAC,EAAE;cACrBjE,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAACW,CAAC,CAAC,EAAEA,CAAC,CAAC,CAAC;;WAEtD,CAAC;;OAET,MACI;QACD,MAAMC,GAAG,GAAG,EAAE;QACd,IAAIH,KAAK,CAACC,OAAO,CAACV,KAAK,CAAC,EAAE;UACtBA,KAAK,CAACrC,MAAM,CAACsC,SAAS,CAAC,CAACrD,OAAO,CAAC,UAAUoD,KAAK,EAAE;YAC7CY,GAAG,CAACJ,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAAC,CAAC;WACzC,CAAC;SACL,MACI;UACD/D,MAAM,CAACC,IAAI,CAAC8D,KAAK,CAAC,CAACpD,OAAO,CAAC,UAAU+D,CAAC,EAAE;YACpC,IAAIV,SAAS,CAACD,KAAK,CAACW,CAAC,CAAC,CAAC,EAAE;cACrBC,GAAG,CAACJ,IAAI,CAACf,gBAAgB,CAACkB,CAAC,CAAC,CAAC;cAC7BC,GAAG,CAACJ,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAACW,CAAC,CAAC,CAACf,QAAQ,EAAE,CAAC,CAAC;;WAE3D,CAAC;;QAEN,IAAIM,aAAa,CAACH,QAAQ,CAAC,EAAE;UACzBrD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,GAAGuE,GAAG,CAACnC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC3D,MACI,IAAImC,GAAG,CAAClD,MAAM,KAAK,CAAC,EAAE;UACvBhB,MAAM,CAAC8D,IAAI,CAACI,GAAG,CAACnC,IAAI,CAAC,GAAG,CAAC,CAAC;;;;GAIzC,MACI;IACD,IAAIsB,QAAQ,KAAK,GAAG,EAAE;MAClB,IAAIE,SAAS,CAACD,KAAK,CAAC,EAAE;QAClBtD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,CAAC;;KAEzC,MACI,IAAI2D,KAAK,KAAK,EAAE,KAAKD,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,CAAC,EAAE;MAC7DrD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,CAAC;KAC3C,MACI,IAAI2D,KAAK,KAAK,EAAE,EAAE;MACnBtD,MAAM,CAAC8D,IAAI,CAAC,EAAE,CAAC;;;EAGvB,OAAO9D,MAAM;AACjB;AACA,AAAO,SAASmE,QAAQ,CAACC,QAAQ,EAAE;EAC/B,OAAO;IACHC,MAAM,EAAEA,MAAM,CAACC,IAAI,CAAC,IAAI,EAAEF,QAAQ;GACrC;AACL;AACA,SAASC,MAAM,CAACD,QAAQ,EAAEV,OAAO,EAAE;EAC/B,IAAIa,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;EACnD,OAAOH,QAAQ,CAAC9C,OAAO,CAAC,4BAA4B,EAAE,UAAUkD,CAAC,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACpF,IAAID,UAAU,EAAE;MACZ,IAAIpB,QAAQ,GAAG,EAAE;MACjB,MAAMsB,MAAM,GAAG,EAAE;MACjB,IAAIJ,SAAS,CAACK,OAAO,CAACH,UAAU,CAACI,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;QAChDxB,QAAQ,GAAGoB,UAAU,CAACI,MAAM,CAAC,CAAC,CAAC;QAC/BJ,UAAU,GAAGA,UAAU,CAACK,MAAM,CAAC,CAAC,CAAC;;MAErCL,UAAU,CAAC9D,KAAK,CAAC,IAAI,CAAC,CAACT,OAAO,CAAC,UAAU6E,QAAQ,EAAE;QAC/C,IAAIb,GAAG,GAAG,2BAA2B,CAACc,IAAI,CAACD,QAAQ,CAAC;QACpDJ,MAAM,CAACb,IAAI,CAACL,SAAS,CAACC,OAAO,EAAEL,QAAQ,EAAEa,GAAG,CAAC,CAAC,CAAC,EAAEA,GAAG,CAAC,CAAC,CAAC,IAAIA,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;OACtE,CAAC;MACF,IAAIb,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;QAC9B,IAAI5B,SAAS,GAAG,GAAG;QACnB,IAAI4B,QAAQ,KAAK,GAAG,EAAE;UAClB5B,SAAS,GAAG,GAAG;SAClB,MACI,IAAI4B,QAAQ,KAAK,GAAG,EAAE;UACvB5B,SAAS,GAAG4B,QAAQ;;QAExB,OAAO,CAACsB,MAAM,CAAC3D,MAAM,KAAK,CAAC,GAAGqC,QAAQ,GAAG,EAAE,IAAIsB,MAAM,CAAC5C,IAAI,CAACN,SAAS,CAAC;OACxE,MACI;QACD,OAAOkD,MAAM,CAAC5C,IAAI,CAAC,GAAG,CAAC;;KAE9B,MACI;MACD,OAAOY,cAAc,CAAC+B,OAAO,CAAC;;GAErC,CAAC;AACN;;AC/JO,SAASO,KAAK,CAAClF,OAAO,EAAE;;EAE3B,IAAIU,MAAM,GAAGV,OAAO,CAACU,MAAM,CAAC0C,WAAW,EAAE;;EAEzC,IAAIzC,GAAG,GAAG,CAACX,OAAO,CAACW,GAAG,IAAI,GAAG,EAAEY,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;EAC9D,IAAIV,OAAO,GAAGrB,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEF,OAAO,CAACa,OAAO,CAAC;EAChD,IAAIsE,IAAI;EACR,IAAI1D,UAAU,GAAGgB,IAAI,CAACzC,OAAO,EAAE,CAC3B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,CACd,CAAC;;EAEF,MAAMoF,gBAAgB,GAAGhD,uBAAuB,CAACzB,GAAG,CAAC;EACrDA,GAAG,GAAGyD,QAAQ,CAACzD,GAAG,CAAC,CAAC2D,MAAM,CAAC7C,UAAU,CAAC;EACtC,IAAI,CAAC,OAAO,CAACE,IAAI,CAAChB,GAAG,CAAC,EAAE;IACpBA,GAAG,GAAGX,OAAO,CAACqF,OAAO,GAAG1E,GAAG;;EAE/B,MAAM2E,iBAAiB,GAAG9F,MAAM,CAACC,IAAI,CAACO,OAAO,CAAC,CACzCkB,MAAM,CAAEyB,MAAM,IAAKyC,gBAAgB,CAAChE,QAAQ,CAACuB,MAAM,CAAC,CAAC,CACrDtB,MAAM,CAAC,SAAS,CAAC;EACtB,MAAMkE,mBAAmB,GAAG9C,IAAI,CAAChB,UAAU,EAAE6D,iBAAiB,CAAC;EAC/D,MAAME,eAAe,GAAG,4BAA4B,CAAC7D,IAAI,CAACd,OAAO,CAAC4E,MAAM,CAAC;EACzE,IAAI,CAACD,eAAe,EAAE;IAClB,IAAIxF,OAAO,CAACe,SAAS,CAAC2E,MAAM,EAAE;;MAE1B7E,OAAO,CAAC4E,MAAM,GAAG5E,OAAO,CAAC4E,MAAM,CAC1B7E,KAAK,CAAC,GAAG,CAAC,CACVU,GAAG,CAAEH,OAAO,IAAKA,OAAO,CAACI,OAAO,CAAC,kDAAkD,EAAG,uBAAsBvB,OAAO,CAACe,SAAS,CAAC2E,MAAO,EAAC,CAAC,CAAC,CACxI1D,IAAI,CAAC,GAAG,CAAC;;IAElB,IAAIhC,OAAO,CAACe,SAAS,CAACC,QAAQ,CAACC,MAAM,EAAE;MACnC,MAAM0E,wBAAwB,GAAG9E,OAAO,CAAC4E,MAAM,CAACnD,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE;MAClFzB,OAAO,CAAC4E,MAAM,GAAGE,wBAAwB,CACpCtE,MAAM,CAACrB,OAAO,CAACe,SAAS,CAACC,QAAQ,CAAC,CAClCM,GAAG,CAAEH,OAAO,IAAK;QAClB,MAAMuE,MAAM,GAAG1F,OAAO,CAACe,SAAS,CAAC2E,MAAM,GAChC,IAAG1F,OAAO,CAACe,SAAS,CAAC2E,MAAO,EAAC,GAC9B,OAAO;QACb,OAAQ,0BAAyBvE,OAAQ,WAAUuE,MAAO,EAAC;OAC9D,CAAC,CACG1D,IAAI,CAAC,GAAG,CAAC;;;;;EAKtB,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAACZ,QAAQ,CAACV,MAAM,CAAC,EAAE;IAClCC,GAAG,GAAGa,kBAAkB,CAACb,GAAG,EAAE4E,mBAAmB,CAAC;GACrD,MACI;IACD,IAAI,MAAM,IAAIA,mBAAmB,EAAE;MAC/BJ,IAAI,GAAGI,mBAAmB,CAACK,IAAI;KAClC,MACI;MACD,IAAIpG,MAAM,CAACC,IAAI,CAAC8F,mBAAmB,CAAC,CAACtE,MAAM,EAAE;QACzCkE,IAAI,GAAGI,mBAAmB;;;;;EAKtC,IAAI,CAAC1E,OAAO,CAAC,cAAc,CAAC,IAAI,OAAOsE,IAAI,KAAK,WAAW,EAAE;IACzDtE,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC;;;;EAI/D,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAACO,QAAQ,CAACV,MAAM,CAAC,IAAI,OAAOyE,IAAI,KAAK,WAAW,EAAE;IAClEA,IAAI,GAAG,EAAE;;;EAGb,OAAO3F,MAAM,CAACU,MAAM,CAAC;IAAEQ,MAAM;IAAEC,GAAG;IAAEE;GAAS,EAAE,OAAOsE,IAAI,KAAK,WAAW,GAAG;IAAEA;GAAM,GAAG,IAAI,EAAEnF,OAAO,CAAC6F,OAAO,GAAG;IAAEA,OAAO,EAAE7F,OAAO,CAAC6F;GAAS,GAAG,IAAI,CAAC;AACxJ;;AC3EO,SAASC,oBAAoB,CAAC/F,QAAQ,EAAEU,KAAK,EAAET,OAAO,EAAE;EAC3D,OAAOkF,KAAK,CAAC1E,KAAK,CAACT,QAAQ,EAAEU,KAAK,EAAET,OAAO,CAAC,CAAC;AACjD;;ACDO,SAAS+F,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EACnD,MAAMC,QAAQ,GAAG1F,KAAK,CAACwF,WAAW,EAAEC,WAAW,CAAC;EAChD,MAAME,QAAQ,GAAGL,oBAAoB,CAACvB,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;EAC1D,OAAO1G,MAAM,CAACU,MAAM,CAACiG,QAAQ,EAAE;IAC3BD,QAAQ;IACRnG,QAAQ,EAAEgG,YAAY,CAACxB,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;IAC3C1F,KAAK,EAAEA,KAAK,CAAC+D,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;IACjChB;GACH,CAAC;AACN;;ACZO,MAAMkB,OAAO,GAAG,mBAAmB;;ACE1C,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAC;AACpE;AACA;AACA,AAAO,MAAMJ,QAAQ,GAAG;EACpBxF,MAAM,EAAE,KAAK;EACb2E,OAAO,EAAE,wBAAwB;EACjCxE,OAAO,EAAE;IACL4E,MAAM,EAAE,gCAAgC;IACxC,YAAY,EAAEY;GACjB;EACDtF,SAAS,EAAE;IACP2E,MAAM,EAAE,EAAE;IACV1E,QAAQ,EAAE;;AAElB,CAAC;;MCdYmF,QAAQ,GAAGJ,YAAY,CAAC,IAAI,EAAEG,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/defaults.js new file mode 100644 index 0000000..456e586 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/defaults.js @@ -0,0 +1,17 @@ +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +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/core/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js new file mode 100644 index 0000000..5763758 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/index.js new file mode 100644 index 0000000..599917f --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/merge.js new file mode 100644 index 0000000..1abcecf --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,26 @@ +import { lowercaseKeys } from "./util/lowercase-keys"; +import { mergeDeep } from "./util/merge-deep"; +import { removeUndefinedProperties } from "./util/remove-undefined-properties"; +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 = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/parse.js new file mode 100644 index 0000000..8cf5885 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/parse.js @@ -0,0 +1,78 @@ +import { addQueryParameters } from "./util/add-query-parameters"; +import { extractUrlVariableNames } from "./util/extract-url-variable-names"; +import { omit } from "./util/omit"; +import { parseUrl } from "./util/url-template"; +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 = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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/core/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js new file mode 100644 index 0000000..d26be31 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,17 @@ +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/core/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js new file mode 100644 index 0000000..3e75db2 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js new file mode 100644 index 0000000..0780642 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js new file mode 100644 index 0000000..d92aca3 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js @@ -0,0 +1,16 @@ +import { isPlainObject } from "is-plain-object"; +export function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/omit.js new file mode 100644 index 0000000..6245031 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js new file mode 100644 index 0000000..6b5ee5f --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js @@ -0,0 +1,8 @@ +export function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/url-template.js new file mode 100644 index 0000000..439b3fe --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/util/url-template.js @@ -0,0 +1,164 @@ +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +export function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/version.js new file mode 100644 index 0000000..2d27c3f --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "7.0.4"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-src/with-defaults.js new file mode 100644 index 0000000..81baf6c --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/defaults.d.ts new file mode 100644 index 0000000..30fcd20 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults } from "@octokit/types"; +export declare const DEFAULTS: EndpointDefaults; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts new file mode 100644 index 0000000..ff39e5e --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts @@ -0,0 +1,3 @@ +import { EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { DEFAULTS } from "./defaults"; +export declare function endpointWithDefaults(defaults: typeof DEFAULTS, route: Route | EndpointOptions, options?: RequestParameters): import("@octokit/types").RequestOptions; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/index.d.ts new file mode 100644 index 0000000..1ede136 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const endpoint: import("@octokit/types").EndpointInterface; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/merge.d.ts new file mode 100644 index 0000000..b75a15e --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/merge.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestParameters, Route } from "@octokit/types"; +export declare function merge(defaults: EndpointDefaults | null, route?: Route | RequestParameters, options?: RequestParameters): EndpointDefaults; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/parse.d.ts new file mode 100644 index 0000000..fbe2144 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/parse.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestOptions } from "@octokit/types"; +export declare function parse(options: EndpointDefaults): RequestOptions; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts new file mode 100644 index 0000000..4b192ac --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts new file mode 100644 index 0000000..93586d4 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts new file mode 100644 index 0000000..1daf307 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts @@ -0,0 +1,5 @@ +export declare function lowercaseKeys(object?: { + [key: string]: any; +}): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts new file mode 100644 index 0000000..914411c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts @@ -0,0 +1 @@ +export declare function mergeDeep(defaults: any, options: any): object; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts new file mode 100644 index 0000000..06927d6 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts new file mode 100644 index 0000000..92d8d85 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts @@ -0,0 +1 @@ +export declare function removeUndefinedProperties(obj: any): any; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts new file mode 100644 index 0000000..5d967ca --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts @@ -0,0 +1,3 @@ +export declare function parseUrl(template: string): { + expand: (context: object) => string; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/version.d.ts new file mode 100644 index 0000000..b9cbe53 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "7.0.4"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..6f5afd1 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestParameters, EndpointDefaults } from "@octokit/types"; +export declare function withDefaults(oldDefaults: EndpointDefaults | null, newDefaults: RequestParameters): EndpointInterface; diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-web/index.js new file mode 100644 index 0000000..a31b913 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-web/index.js @@ -0,0 +1,378 @@ +import { isPlainObject } from 'is-plain-object'; +import { getUserAgent } from 'universal-user-agent'; + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } + else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return (url + + separator + + names + .map((name) => { + if (name === "q") { + return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+")); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }) + .join("&")); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object) + .filter((option) => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType", + ]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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 = "7.0.4"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent, + }, + mediaType: { + format: "", + previews: [], + }, +}; + +const endpoint = withDefaults(null, DEFAULTS); + +export { endpoint }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-web/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-web/index.js.map new file mode 100644 index 0000000..08201f9 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;AACtC,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AACvD,QAAQ,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAChD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;;ACPO,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;AAC7C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1C,QAAQ,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;AACzC,YAAY,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;AAClC,gBAAgB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/D;AACA,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,SAAS;AACT,aAAa;AACb,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;;ACfM,SAAS,yBAAyB,CAAC,GAAG,EAAE;AAC/C,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AAC3B,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACpC,YAAY,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;ACJM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAChD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7C,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3C,KAAK;AACL;AACA,IAAI,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD;AACA,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,IAAI,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/C,IAAI,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AACxD,QAAQ,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;AACtE,aAAa,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrF,aAAa,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtD,KAAK;AACL,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1H,IAAI,OAAO,aAAa,CAAC;AACzB,CAAC;;ACzBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;AACpD,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AACjD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1C,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK;AAC3B,YAAY,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,gBAAgB,QAAQ,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC1F,aAAa;AACb,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,SAAS,CAAC;AACV,aAAa,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,CAAC;;AChBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,IAAI,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;AAC7C,IAAI,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAChD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;AACzC,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzD,SAAS,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAC9B,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,IAAI,OAAO,GAAG;AACd,SAAS,KAAK,CAAC,oBAAoB,CAAC;AACpC,SAAS,GAAG,CAAC,UAAU,IAAI,EAAE;AAC7B,QAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxC,YAAY,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC7E,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;AACpE,QAAQ,OAAO,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,KAAK,CAAC,CAAC;AACP,CAAC;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;AAC3C,IAAI,KAAK;AACT,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;AAC5C,cAAc,cAAc,CAAC,KAAK,CAAC;AACnC,cAAc,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACtC,IAAI,IAAI,GAAG,EAAE;AACb,QAAQ,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;AACnD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,IAAI,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AACpE,CAAC;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;AACrD,IAAI,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;AAC1C,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1C,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,SAAS,EAAE;AACxC,YAAY,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;AACrC,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AACnE,aAAa;AACb,YAAY,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAC1F,SAAS;AACT,aAAa;AACb,YAAY,IAAI,QAAQ,KAAK,GAAG,EAAE;AAClC,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,aAAa;AACb,iBAAiB;AACjB,gBAAgB,MAAM,GAAG,GAAG,EAAE,CAAC;AAC/B,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,4BAA4B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AACjF,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;AAC7C,oBAAoB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,iBAAiB;AACjB,qBAAqB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3C,oBAAoB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9B,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAClC,gBAAgB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AACnD,aAAa;AACb,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;AACzE,YAAY,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,EAAE;AAC/B,YAAY,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;AACnC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC3C,KAAK,CAAC;AACN,CAAC;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AACnC,IAAI,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;AAC5F,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,QAAQ,GAAG,EAAE,CAAC;AAC9B,YAAY,MAAM,MAAM,GAAG,EAAE,CAAC;AAC9B,YAAY,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;AAChE,gBAAgB,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAChD,gBAAgB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,aAAa;AACb,YAAY,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;AAC/D,gBAAgB,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,gBAAgB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,aAAa,CAAC,CAAC;AACf,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,IAAI,SAAS,GAAG,GAAG,CAAC;AACpC,gBAAgB,IAAI,QAAQ,KAAK,GAAG,EAAE;AACtC,oBAAoB,SAAS,GAAG,GAAG,CAAC;AACpC,iBAAiB;AACjB,qBAAqB,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC3C,oBAAoB,SAAS,GAAG,QAAQ,CAAC;AACzC,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtF,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AAC3C,SAAS;AACT,KAAK,CAAC,CAAC;AACP,CAAC;;AC/JM,SAAS,KAAK,CAAC,OAAO,EAAE;AAC/B;AACA,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;AAC9C;AACA,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACnE,IAAI,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD,IAAI,IAAI,IAAI,CAAC;AACb,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;AAC1D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5B,QAAQ,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AAClD,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9D,SAAS,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,IAAI,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AACpE,IAAI,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;AACtC;AACA,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAC3C,iBAAiB,KAAK,CAAC,GAAG,CAAC;AAC3B,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzJ,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC/C,YAAY,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/F,YAAY,OAAO,CAAC,MAAM,GAAG,wBAAwB;AACrD,iBAAiB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;AACnD,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK;AAClC,gBAAgB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;AACvD,sBAAsB,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACpD,sBAAsB,OAAO,CAAC;AAC9B,gBAAgB,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,aAAa,CAAC;AACd,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC1C,QAAQ,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAC3D,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,mBAAmB,EAAE;AAC3C,YAAY,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;AAC5C,SAAS;AACT,aAAa;AACb,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;AACzD,gBAAgB,IAAI,GAAG,mBAAmB,CAAC;AAC3C,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AACjE,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AACpE,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AAC1E,QAAQ,IAAI,GAAG,EAAE,CAAC;AAClB,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzJ,CAAC;;AC3EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAC/D,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AACvD,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/D,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACzC,QAAQ,KAAK;AACb,KAAK,CAAC,CAAC;AACP,CAAC;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AACrE;AACA;AACA,AAAO,MAAM,QAAQ,GAAG;AACxB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,OAAO,EAAE;AACb,QAAQ,MAAM,EAAE,gCAAgC;AAChD,QAAQ,YAAY,EAAE,SAAS;AAC/B,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,MAAM,EAAE,EAAE;AAClB,QAAQ,QAAQ,EAAE,EAAE;AACpB,KAAK;AACL,CAAC,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/core/node_modules/@octokit/endpoint/package.json new file mode 100644 index 0000000..2184bb7 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,47 @@ +{ + "name": "@octokit/endpoint", + "description": "Turns REST API endpoints into generic request options", + "version": "7.0.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "repository": "github:octokit/endpoint.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "jest": "^29.0.0", + "prettier": "2.8.3", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/openapi-types/LICENSE b/node_modules/@octokit/core/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 0000000..c61fbbe --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +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/core/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/core/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 0000000..9da833c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/core/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/core/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 0000000..26eae6a --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,20 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public" + }, + "version": "16.0.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "10.0.0" + } +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/core/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..806b5bc --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,118413 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installations": { + /** + * You must use a [JWT](https://docs.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. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/code_security_and_analysis": { + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + get: operations["secret-scanning/get-security-analysis-settings-for-enterprise"]; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + patch: operations["secret-scanning/patch-security-analysis-settings-for-enterprise"]; + }; + "/enterprises/{enterprise}/dependabot/alerts": { + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["dependabot/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + post: operations["secret-scanning/post-security-product-enablement-for-enterprise"]; + }; + "/events": { + /** 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. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * 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. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** 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. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + /** Gets information about a notification thread. */ + get: operations["activity/get-thread"]; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/orgs/{org}": { + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + get: operations["oidc/get-oidc-custom-sub-template-for-org"]; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + put: operations["oidc/update-oidc-custom-sub-template-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/required_workflows": { + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflows"]; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + post: operations["actions/create-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}": { + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/get-required-workflow"]; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/delete-required-workflow"]; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + patch: operations["actions/update-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": { + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-selected-repositories-required-workflow"]; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/set-selected-repos-to-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": { + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/add-selected-repo-to-required-workflow"]; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/remove-selected-repo-from-required-workflow"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/actions/variables": { + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-org-variables"]; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + post: operations["actions/create-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}": { + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/get-org-variable"]; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + delete: operations["actions/delete-org-variable"]; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + patch: operations["actions/update-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories": { + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-variable"]; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories/{repository_id}": { + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-variable"]; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-variable"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/codespaces/billing": { + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["codespaces/set-codespaces-billing"]; + }; + "/orgs/{org}/codespaces/secrets": { + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-org-secrets"]; + }; + "/orgs/{org}/codespaces/secrets/public-key": { + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/get-org-public-key"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}": { + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/delete-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/dependabot/alerts": { + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-org"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** 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`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** 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. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** 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. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces": { + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-codespaces-for-user-in-org"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/memberships/{username}": { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations["orgs/get-membership-for-user"]; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * 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. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** 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. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/public_members": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/security-managers": { + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + get: operations["orgs/list-security-manager-teams"]; + }; + "/orgs/{org}/security-managers/teams/{team_slug}": { + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + put: operations["orgs/add-security-manager-team"]; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + delete: operations["orgs/remove-security-manager-team"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/orgs/{org}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** 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: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** 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. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** 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. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** 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. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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: operations["rate-limit/get"]; + }; + "/repos/{org}/{repo}/actions/required_workflows": { + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/list-repo-required-workflows"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": { + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/get-repo-required-workflow"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": { + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-repo-required-workflow-usage"]; + }; + "/repos/{owner}/{repo}": { + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/get"]; + /** + * 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, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + get: operations["actions/get-custom-oidc-sub-claim-for-repo"]; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/set-custom-oidc-sub-claim-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": { + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/variables": { + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/list-repo-variables"]; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + post: operations["actions/create-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/variables/{name}": { + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/get-repo-variable"]; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-repo-variable"]; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * 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. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-pull-request-review-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-status-checks-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-all-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations["repos/set-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations["repos/add-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **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: operations["checks/get"]; + /** + * **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. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** 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. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **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. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-alert"]; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases": { + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/list-codeql-databases"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": { + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/check-collaborator"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + put: operations["repos/add-collaborator"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * 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. + * + * + * 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` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * 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`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + get: operations["repos/get-content"]; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * 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 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. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/get-alert"]; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + patch: operations["dependabot/update-alert"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + get: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * 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. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations["repos/create-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": { + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** 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. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + get: operations["repos/list-webhooks"]; + /** + * 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. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * 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` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * 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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** 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://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": { + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations["issues/check-user-can-be-assigned-to-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** 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. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + put: operations["repos/enable-lfs-for-repo"]; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** Lists all notifications for the current user in the specified repository. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + put: operations["repos/update-information-about-pages-site"]; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + post: operations["repos/create-pages-site"]; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * 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. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployment": { + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + post: operations["repos/create-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/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. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["pulls/list"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + get: operations["pulls/list-requested-reviewers"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["pulls/request-reviewers"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * 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. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * 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. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** 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. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** 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. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** 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://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables": { + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/list-environment-variables"]; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + post: operations["actions/create-environment-variable"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables/{name}": { + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/get-environment-variable"]; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-environment-variable"]; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-environment-variable"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **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. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/publish": { + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/publish-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * 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. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/ssh_signing_keys": { + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/list-ssh-signing-keys-for-authenticated-user"]; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + post: operations["users/create-ssh-signing-key-for-authenticated-user"]; + }; + "/user/ssh_signing_keys/{ssh_signing_key_id}": { + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/get-ssh-signing-key-for-authenticated-user"]; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + delete: operations["users/delete-ssh-signing-key-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** 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. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/ssh_signing_keys": { + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + get: operations["users/list-ssh-signing-keys-for-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/versions": { + /** Get all supported GitHub API versions. */ + get: operations["meta/get-all-versions"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description A GitHub user. + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description A GitHub user. + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise on GitHub. + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for a repository. + * @enum {string} + */ + repository_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for an organization. + * @enum {string} + */ + organization_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A repository on GitHub. + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # 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 [EMAIL]. 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/ + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** Enterprise Security Analysis Settings */ + "enterprise-security-analysis-settings": { + /** + * @description Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to + * this enterprise. + * @example false + */ + advanced_security_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * enterprise. + * @example false + */ + secret_scanning_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this enterprise. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + /** @description The security alert number. */ + "alert-number": number; + /** @description Details for the vulnerable package. */ + "dependabot-alert-package": { + /** @description The package's language or package management ecosystem. */ + ecosystem: string; + /** @description The unique package name within its ecosystem. */ + name: string; + }; + /** @description Details pertaining to one vulnerable version range for the advisory. */ + "dependabot-alert-security-vulnerability": { + package: components["schemas"]["dependabot-alert-package"]; + /** + * @description The severity of the vulnerability. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Conditions that identify vulnerable versions of this vulnerability's package. */ + vulnerable_version_range: string; + /** @description Details pertaining to the package version that patches this vulnerability. */ + first_patched_version: { + /** @description The package version that patches this vulnerability. */ + identifier: string; + } | null; + }; + /** @description Details for the GitHub Security Advisory. */ + "dependabot-alert-security-advisory": { + /** @description The unique GitHub Security Advisory ID assigned to the advisory. */ + ghsa_id: string; + /** @description The unique CVE ID assigned to the advisory. */ + cve_id: string | null; + /** @description A short, plain text summary of the advisory. */ + summary: string; + /** @description A long-form Markdown-supported description of the advisory. */ + description: string; + /** @description Vulnerable version range information for the advisory. */ + vulnerabilities: components["schemas"]["dependabot-alert-security-vulnerability"][]; + /** + * @description The severity of the advisory. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Details for the advisory pertaining to the Common Vulnerability Scoring System. */ + cvss: { + /** @description The overall CVSS score of the advisory. */ + score: number; + /** @description The full CVSS vector string for the advisory. */ + vector_string: string | null; + }; + /** @description Details for the advisory pertaining to Common Weakness Enumeration. */ + cwes: { + /** @description The unique CWE ID. */ + cwe_id: string; + /** @description The short, plain text name of the CWE. */ + name: string; + }[]; + /** @description Values that identify this advisory among security information sources. */ + identifiers: { + /** + * @description The type of advisory identifier. + * @enum {string} + */ + type: "CVE" | "GHSA"; + /** @description The value of the advisory identifer. */ + value: string; + }[]; + /** @description Links to additional advisory information. */ + references: { + /** + * Format: uri + * @description The URL of the reference. + */ + url: string; + }[]; + /** + * Format: date-time + * @description The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + published_at: string; + /** + * Format: date-time + * @description The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + updated_at: string; + /** + * Format: date-time + * @description The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + withdrawn_at: string | null; + }; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-dismissed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-fixed-at": string | null; + /** + * Simple Repository + * @description A GitHub repository. + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert-with-repository": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + /** + * @description A feed of discussions for a given repository. + * @example https://github.com/{user}/{repo}/discussions + */ + repository_discussions_url?: string; + /** + * @description A feed of discussions for a given repository and category. + * @example https://github.com/{user}/{repo}/discussions/categories/{category} + */ + repository_discussions_category_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + repository_discussions?: components["schemas"]["link-with-type"]; + repository_discussions_category?: components["schemas"]["link-with-type"]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + 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?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * 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. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** + * @example FLAT_RATE + * @enum {string} + */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Simple + * @description A GitHub organization. + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** + * @description Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + * this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + * to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + * @example false + */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * Actions OIDC Subject customization + * @description Actions OIDC Subject customization + */ + "oidc-custom-sub": { + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys: string[]; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "required-workflow": { + /** @description Unique identifier for a required workflow */ + id: number; + /** @description Name present in the workflow file */ + name: string; + /** @description Path of the workflow file */ + path: string; + /** + * @description Scope of the required workflow + * @enum {string} + */ + scope: "all" | "selected"; + /** @description Ref at which the workflow file will be selected */ + ref: string; + /** + * @description State of the required workflow + * @enum {string} + */ + state: "active" | "deleted"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/actions/required_workflows/1/repositories + */ + selected_repositories_url?: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + repository: components["schemas"]["minimal-repository"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Actions Variable for an Organization + * @description Organization variable for GitHub Actions. + */ + "organization-actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + /** + * @description Visibility of a variable + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/variables/USERNAME/repositories + */ + selected_repositories_url?: string; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** + * @description Severity of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-severity": + | "critical" + | "high" + | "medium" + | "low" + | "warning" + | "note" + | "error"; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "alert-instances-url": string; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | ("source" | "generated" | "test" | "library") + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + /** + * @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. + * @example you've used 100% of your spending limit for Codespaces + */ + last_known_stop_notice?: string | null; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + /** @example "member" */ + invitation_source?: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on macOS 12 core runner machines. */ + macos_12_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Team Organization + * @description Team Organization + */ + "team-organization": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Repository + * @description A repository on GitHub. + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Required workflow + * @description A GitHub Actions required workflow + */ + "repo-required-workflow": { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example Required CI */ + name: string; + /** @example .github/workflows/required_ci.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: "active" | "deleted"; + source_repository: components["schemas"]["minimal-repository"]; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/sample-org/sample-repo/actions/required_workflows/5 */ + url: string; + /** @example https://github.com/sample-org/source-repo/blob/main/.github/workflows/required_ci.yaml */ + html_url: string; + /** @example https://github.com/sample-org/sample-repo/workflows/required/sample-org/source-repo/.github/workflows/required_ci.yaml/badge.svg */ + badge_url: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads: boolean; + /** @example true */ + has_discussions: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @example true */ + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + /** + * @description The name of the workflow. + * @example Build + */ + workflow_name: string | null; + /** + * @description The name of the current branch. + * @example main + */ + head_branch: string | null; + }; + /** + * Actions OIDC subject customization for a repository + * @description Actions OIDC subject customization for a repository + */ + "oidc-custom-sub-repo": { + /** @description Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. */ + use_default: boolean; + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys?: string[]; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. + * + * `none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repos only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. + * @enum {string} + */ + access_level: "none" | "user" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description A commit. + */ + "nullable-simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title: string; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: { [key: string]: unknown } | string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** Actions Variable */ + "actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + * @example true + */ + is_alphanumeric: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + * @example true + */ + require_last_push_approval?: boolean; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + 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; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + */ + require_last_push_approval?: boolean; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description A commit. + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @example completed + * @enum {string|null} + */ + status: ("queued" | "in_progress" | "completed") | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "startup_failure" + | "stale" + | null + ) + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** + * CodeQL Database + * @description A CodeQL database. + */ + "code-scanning-codeql-database": { + /** @description The ID of the CodeQL database. */ + id: number; + /** @description The name of the CodeQL database. */ + name: string; + /** @description The language of the CodeQL database. */ + language: string; + uploader: components["schemas"]["simple-user"]; + /** @description The MIME type of the CodeQL database file. */ + content_type: string; + /** @description The size of the CodeQL database file in bytes. */ + size: number; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * Format: uri + * @description The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + */ + url: string; + }; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string | null; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string | null; + target_url: string | null; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + } & { + content: unknown; + encoding: unknown; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + /** @enum {string} */ + type: "dir" | "file" | "submodule" | "symlink"; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + /** @enum {string} */ + type: "file"; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + /** @enum {string} */ + type: "symlink"; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Submodule Content + * @description An object describing a submodule + */ + "content-submodule": { + /** @enum {string} */ + type: "submodule"; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + }; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + /** + * @description Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + * @enum {string} + */ + scope: "unknown" | "runtime" | "development"; + }[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: Partial & Partial & Partial; + }; + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { [key: string]: components["schemas"]["dependency"] }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. */ + manifests?: { [key: string]: components["schemas"]["manifest"] }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy-settings": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + protection_rules?: (Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + }>)[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + "deployment-branch-policy": { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number; + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string; + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: { + /** @example "foo@bar.com" */ + email?: string; + /** @example "foo" */ + password?: string; + /** @example "roomer" */ + room?: string; + /** @example "foo" */ + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + /** @example "sha256" */ + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + /** @example "abc" */ + token?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** @example 1 */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + added_by?: string | null; + last_used?: string | null; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + * @example https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + * @example hello-world.github.io + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + * @example monalisa-1231a2312sa32-23sda74.drafts.github.io + */ + preview_url?: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + web_commit_signoff_required?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string | null; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + /** @description An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. */ + "secret-scanning-alert-resolution-comment": string | null; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + /** @description Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. */ + "secret-scanning-location-issue-title": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_title_url: string; + }; + /** @description Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. */ + "secret-scanning-location-issue-body": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_body_url: string; + }; + /** @description Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. */ + "secret-scanning-location-issue-comment": { + /** + * Format: uri + * @description The API URL to get the issue comment where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + */ + issue_comment_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: "commit" | "issue_title" | "issue_body" | "issue_comment"; + details: + | components["schemas"]["secret-scanning-location-commit"] + | components["schemas"]["secret-scanning-location-issue-title"] + | components["schemas"]["secret-scanning-location-issue-body"] + | components["schemas"]["secret-scanning-location-issue-comment"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + has_discussions?: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Codespace + * @description A codespace. + */ + "codespace-with-full-repository": { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["full-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * SSH Signing Key + * @description A public SSH key used to sign Git commits + */ + "ssh-signing-key": { + key: string; + id: number; + title: string; + /** Format: date-time */ + created_at: string; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + /** + * Simple Installation + * @description The GitHub App installation. This property is included when the event is configured for and sent to a GitHub App. + */ + "simple-installation": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + /** + * @description The global node ID of the installation. + * @example MDQ6VXNlcjU4MzIzMQ== + */ + node_id: string; + }; + /** @description A suite of checks performed on the code of a given code change */ + "simple-check-suite": { + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after?: string | null; + app?: components["schemas"]["integration"]; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before?: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion?: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "stale" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at?: string; + /** @example master */ + head_branch?: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha?: string; + /** @example 5 */ + id?: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id?: string; + pull_requests?: components["schemas"]["pull-request-minimal"][]; + repository?: components["schemas"]["minimal-repository"]; + /** + * @example completed + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed" | "pending" | "waiting"; + /** Format: date-time */ + updated_at?: string; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url?: string; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run-with-simple-check-suite": { + app: components["schemas"]["nullable-integration"]; + check_suite: components["schemas"]["simple-check-suite"]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "waiting" + | "pending" + | "startup_failure" + | "stale" + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + deployment?: components["schemas"]["deployment-simple"]; + /** @example https://example.com */ + details_url: string; + /** @example 42 */ + external_id: string; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string; + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + output: { + annotations_count: number; + /** Format: uri */ + annotations_url: string; + summary: string | null; + text: string | null; + title: string | null; + }; + pull_requests: components["schemas"]["pull-request-minimal"][]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "pending"; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + }; + /** + * Projects v2 Item Content Type + * @description The type of content tracked in a project item + * @enum {string} + */ + "projects-v2-item-content-type": "Issue" | "PullRequest" | "DraftIssue"; + /** + * Projects v2 Item + * @description An item belonging to a project + */ + "projects-v2-item": { + id: number; + node_id?: string; + project_node_id?: string; + content_node_id: string; + content_type: components["schemas"]["projects-v2-item-content-type"]; + creator?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + created_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + archived_at: string | null; + }; + /** branch protection rule created event */ + "webhook-branch-protection-rule-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule deleted event */ + "webhook-branch-protection-rule-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule edited event */ + "webhook-branch-protection-rule-edited": { + /** @enum {string} */ + action: "edited"; + /** @description If the action was `edited`, the changes to the rule. */ + changes?: { + admin_enforced?: { + from: boolean | null; + }; + authorized_actor_names?: { + from: string[]; + }; + authorized_actors_only?: { + from: boolean | null; + }; + authorized_dismissal_actors_only?: { + from: boolean | null; + }; + linear_history_requirement_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + required_status_checks?: { + from: string[]; + }; + required_status_checks_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** Check Run Completed Event */ + "webhook-check-run-completed": { + /** @enum {string} */ + action?: "completed"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Completed Event + * @description The check_run.completed webhook encoded with URL encoding + */ + "webhook-check-run-completed-form-encoded": { + /** @description A URL-encoded string of the check_run.completed JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Created Event */ + "webhook-check-run-created": { + /** @enum {string} */ + action?: "created"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Created Event + * @description The check_run.created webhook encoded with URL encoding + */ + "webhook-check-run-created-form-encoded": { + /** @description A URL-encoded string of the check_run.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Requested Action Event */ + "webhook-check-run-requested-action": { + /** @enum {string} */ + action: "requested_action"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** @description The action requested by the user. */ + requested_action?: { + /** @description The integrator reference of the action requested by the user. */ + identifier?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Requested Action Event + * @description The check_run.requested_action webhook encoded with URL encoding + */ + "webhook-check-run-requested-action-form-encoded": { + /** @description A URL-encoded string of the check_run.requested_action JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Re-Requested Event */ + "webhook-check-run-rerequested": { + /** @enum {string} */ + action?: "rerequested"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Re-Requested Event + * @description The check_run.rerequested webhook encoded with URL encoding + */ + "webhook-check-run-rerequested-form-encoded": { + /** @description A URL-encoded string of the check_run.rerequested JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** check_suite completed event */ + "webhook-check-suite-completed": { + /** @enum {string} */ + action: "completed"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_group" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "projects_v2_item" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ( + | "requested" + | "in_progress" + | "completed" + | "queued" + | null + | "pending" + ) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite requested event */ + "webhook-check-suite-requested": { + /** @enum {string} */ + action: "requested"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "secret_scanning_alert_location" + | "projects_v2_item" + | "merge_group" + | "repository_import" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite rerequested event */ + "webhook-check-suite-rerequested": { + /** @enum {string} */ + action: "rerequested"; + actions_meta?: { + rerun_info?: { + plan_id?: string; + job_ids?: string[]; + }; + } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert appeared_in_branch event */ + "webhook-code-scanning-alert-appeared-in-branch": { + /** @enum {string} */ + action: "appeared_in_branch"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert closed_by_user event */ + "webhook-code-scanning-alert-closed-by-user": { + /** @enum {string} */ + action: "closed_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert created event */ + "webhook-code-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string | null; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + fixed_at?: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + } | null; + updated_at?: string | null; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert fixed event */ + "webhook-code-scanning-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Format: uri */ + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened event */ + "webhook-code-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: string | null; + dismissed_by: { [key: string]: unknown } | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: string | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + } | null; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string | null; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened_by_user event */ + "webhook-code-scanning-alert-reopened-by-user": { + /** @enum {string} */ + action: "reopened_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** commit_comment created event */ + "webhook-commit-comment-created": { + /** + * @description The action performed. Can be `created`. + * @enum {string} + */ + action: "created"; + /** @description The [commit comment](https://docs.github.com/rest/reference/repos#get-a-commit-comment) resource. */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + created_at: string; + /** Format: uri */ + html_url: string; + /** @description The ID of the commit comment. */ + id: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the commit comment. */ + node_id: string; + /** @description The relative path of the file to which the comment applies. */ + path: string | null; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** create event */ + "webhook-create": { + /** @description The repository's current description. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The name of the repository's default branch (usually `main`). */ + master_branch: string; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object created in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** delete event */ + "webhook-delete": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object deleted in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert created event */ + "webhook-dependabot-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert dismissed event */ + "webhook-dependabot-alert-dismissed": { + /** @enum {string} */ + action: "dismissed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert fixed event */ + "webhook-dependabot-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reintroduced event */ + "webhook-dependabot-alert-reintroduced": { + /** @enum {string} */ + action: "reintroduced"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reopened event */ + "webhook-dependabot-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key created event */ + "webhook-deploy-key-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key deleted event */ + "webhook-deploy-key-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deployment created event */ + "webhook-deployment-created": { + /** @enum {string} */ + action: "created"; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: { [key: string]: unknown } | string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "workflow_job" + | "pull_request_review_thread" + | "merge_queue_entry" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** deployment_status created event */ + "webhook-deployment-status-created": { + /** @enum {string} */ + action: "created"; + check_run?: { + /** Format: date-time */ + completed_at: string | null; + /** + * @description The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: uri */ + details_url: string; + external_id: string; + /** @description The SHA of the commit that is being checked. */ + head_sha: string; + /** Format: uri */ + html_url: string; + /** @description The id of the check. */ + id: number; + /** @description The name of the check run. */ + name: string; + node_id: string; + /** Format: date-time */ + started_at: string; + /** + * @description The current status of the check run. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting" | "pending"; + /** Format: uri */ + url: string; + } | null; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: (string | { [key: string]: unknown }) | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_queue_entry" + | "workflow_job" + | "pull_request_review_thread" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + /** @description The [deployment status](https://docs.github.com/rest/reference/deployments#list-deployment-statuses). */ + deployment_status: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + deployment_url: string; + /** @description The optional human-readable description added to the status. */ + description: string; + environment: string; + /** Format: uri */ + environment_url?: string; + id: number; + /** Format: uri */ + log_url?: string; + node_id: string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + | "merge_group" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + /** Format: uri */ + repository_url: string; + /** @description The new state. Can be `pending`, `success`, `failure`, or `error`. */ + state: string; + /** @description The optional link added to the status. */ + target_url: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow?: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run?: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** discussion answered event */ + "webhook-discussion-answered": { + /** @enum {string} */ + action: "answered"; + answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** Format: date-time */ + answer_chosen_at: string; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + answer_html_url: string; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion category changed event */ + "webhook-discussion-category-changed": { + /** @enum {string} */ + action: "category_changed"; + changes: { + category: { + from: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment created event */ + "webhook-discussion-comment-created": { + /** @enum {string} */ + action: "created"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment deleted event */ + "webhook-discussion-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment edited event */ + "webhook-discussion-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body: { + from: string; + }; + }; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion created event */ + "webhook-discussion-created": { + /** @enum {string} */ + action: "created"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string | null; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "converting" | "transferring"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion deleted event */ + "webhook-discussion-deleted": { + /** @enum {string} */ + action: "deleted"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion edited event */ + "webhook-discussion-edited": { + /** @enum {string} */ + action: "edited"; + changes?: { + body?: { + from: string; + }; + title?: { + from: string; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion labeled event */ + "webhook-discussion-labeled": { + /** @enum {string} */ + action: "labeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion locked event */ + "webhook-discussion-locked": { + /** @enum {string} */ + action: "locked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string; + answer_chosen_at?: string | null; + answer_chosen_by?: { [key: string]: unknown } | null; + answer_html_url?: string | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: true; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "locked"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion pinned event */ + "webhook-discussion-pinned": { + /** @enum {string} */ + action: "pinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion transferred event */ + "webhook-discussion-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** Discussion */ + new_discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unanswered event */ + "webhook-discussion-unanswered": { + /** @enum {string} */ + action: "unanswered"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + old_answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** discussion unlabeled event */ + "webhook-discussion-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unlocked event */ + "webhook-discussion-unlocked": { + /** @enum {string} */ + action: "unlocked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at?: unknown | null; + answer_chosen_by?: unknown | null; + answer_html_url?: unknown | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unpinned event */ + "webhook-discussion-unpinned": { + /** @enum {string} */ + action: "unpinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * fork event + * @description A user forks a repository. + */ + "webhook-fork": { + enterprise?: components["schemas"]["enterprise"]; + /** @description The created [`repository`](https://docs.github.com/rest/reference/repos#get-a-repository) resource. */ + forkee: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } & { + allow_forking?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + /** @enum {boolean} */ + fork?: true; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: unknown | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + public?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (unknown | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + }; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** github_app_authorization revoked event */ + "webhook-github-app-authorization-revoked": { + /** @enum {string} */ + action: "revoked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** gollum event */ + "webhook-gollum": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pages that were updated. */ + pages: { + /** + * @description The action that was performed on the page. Can be `created` or `edited`. + * @enum {string} + */ + action: "created" | "edited"; + /** + * Format: uri + * @description Points to the HTML wiki page. + */ + html_url: string; + /** @description The name of the page. */ + page_name: string; + /** @description The latest commit SHA of the page. */ + sha: string; + summary: string | null; + /** @description The current page title. */ + title: string; + }[]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** installation created event */ + "webhook-installation-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** User */ + requester?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation deleted event */ + "webhook-installation-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation new_permissions_accepted event */ + "webhook-installation-new-permissions-accepted": { + /** @enum {string} */ + action: "new_permissions_accepted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories added event */ + "webhook-installation-repositories-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name?: string; + /** @description Unique identifier of the repository */ + id?: number; + /** @description The name of the repository. */ + name?: string; + node_id?: string; + /** @description Whether the repository is private or public. */ + private?: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories removed event */ + "webhook-installation-repositories-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation suspend event */ + "webhook-installation-suspend": { + /** @enum {string} */ + action: "suspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + "webhook-installation-target-renamed": { + account: { + avatar_url: string; + created_at?: string; + description?: unknown | null; + events_url?: string; + followers?: number; + followers_url?: string; + following?: number; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + has_organization_projects?: boolean; + has_repository_projects?: boolean; + hooks_url?: string; + html_url: string; + id: number; + is_verified?: boolean; + issues_url?: string; + login?: string; + members_url?: string; + name?: string; + node_id: string; + organizations_url?: string; + public_gists?: number; + public_members_url?: string; + public_repos?: number; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + slug?: string; + starred_url?: string; + subscriptions_url?: string; + type?: string; + updated_at?: string; + url?: string; + website_url?: unknown | null; + }; + action: string; + changes: { + login?: { + from: string; + }; + slug?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + target_type: string; + }; + /** installation unsuspend event */ + "webhook-installation-unsuspend": { + /** @enum {string} */ + action: "unsuspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment created event */ + "webhook-issue-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment deleted event */ + "webhook-issue-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment edited event */ + "webhook-issue-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues assigned event */ + "webhook-issues-assigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "assigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues closed event */ + "webhook-issues-closed": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) itself. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "closed" | "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues deleted event */ + "webhook-issues-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues demilestoned event */ + "webhook-issues-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone?: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues edited event */ + "webhook-issues-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the issue. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + title?: { + /** @description The previous version of the title. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues labeled event */ + "webhook-issues-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues locked event */ + "webhook-issues-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "security_and_analysis" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: true; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues milestoned event */ + "webhook-issues-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues opened event */ + "webhook-issues-opened": { + /** @enum {string} */ + action: "opened"; + changes?: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + old_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } | null; + /** + * Repository + * @description A git repository + */ + old_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues pinned event */ + "webhook-issues-pinned": { + /** @enum {string} */ + action: "pinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues reopened event */ + "webhook-issues-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues transferred event */ + "webhook-issues-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + new_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unassigned event */ + "webhook-issues-unassigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlabeled event */ + "webhook-issues-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlocked event */ + "webhook-issues-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason: unknown | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: false; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: unknown | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unpinned event */ + "webhook-issues-unpinned": { + /** @enum {string} */ + action: "unpinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label created event */ + "webhook-label-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** label deleted event */ + "webhook-label-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label edited event */ + "webhook-label-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the label if the action was `edited`. */ + changes?: { + color?: { + /** @description The previous version of the color if the action was `edited`. */ + from: string; + }; + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase cancelled event */ + "webhook-marketplace-purchase-cancelled": { + /** @enum {string} */ + action: "cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase changed event */ + "webhook-marketplace-purchase-changed": { + /** @enum {string} */ + action: "changed"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean | null; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change event */ + "webhook-marketplace-purchase-pending-change": { + /** @enum {string} */ + action: "pending_change"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change_cancelled event */ + "webhook-marketplace-purchase-pending-change-cancelled": { + /** @enum {string} */ + action: "pending_change_cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + next_billing_date: string; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase purchased event */ + "webhook-marketplace-purchase-purchased": { + /** @enum {string} */ + action: "purchased"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member added event */ + "webhook-member-added": { + /** @enum {string} */ + action: "added"; + changes?: { + permission?: { + /** @enum {string} */ + to: "write" | "admin" | "read"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member edited event */ + "webhook-member-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the collaborator permissions */ + changes: { + old_permission?: { + /** @description The previous permissions of the collaborator if the action was edited. */ + from: string; + }; + permission?: { + from?: string | null; + to?: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member removed event */ + "webhook-member-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** membership added event */ + "webhook-membership-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** membership removed event */ + "webhook-membership-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team" | "organization"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + "webhook-merge-group-checks-requested": { + action: string; + installation?: components["schemas"]["simple-installation"]; + /** MergeGroup */ + merge_group: { + /** @description The SHA of the merge group. */ + head_sha: string; + /** @description The full ref of the merge group. */ + head_ref: string; + /** @description The SHA of the merge group's parent commit. */ + base_sha: string; + /** @description The full ref of the branch the merge group will be merged into. */ + base_ref: string; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** meta deleted event */ + "webhook-meta-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + /** @description The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace. */ + hook: { + active: boolean; + config: { + /** @enum {string} */ + content_type: "json" | "form"; + insecure_ssl: string; + secret?: string; + /** Format: uri */ + url: string; + }; + created_at: string; + events: ( + | "*" + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "create" + | "delete" + | "deployment" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "meta" + | "milestone" + | "organization" + | "org_block" + | "package" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "pull_request_review_thread" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_import" + | "repository_vulnerability_alert" + | "secret_scanning_alert" + | "secret_scanning_alert_location" + | "security_and_analysis" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_job" + | "workflow_run" + | "repository_dispatch" + | "projects_v2_item" + )[]; + id: number; + name: string; + type: string; + updated_at: string; + }; + /** @description The id of the modified webhook. */ + hook_id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** milestone closed event */ + "webhook-milestone-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone created event */ + "webhook-milestone-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone deleted event */ + "webhook-milestone-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone edited event */ + "webhook-milestone-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the milestone if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + due_on?: { + /** @description The previous version of the due date if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone opened event */ + "webhook-milestone-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block blocked event */ + "webhook-org-block-blocked": { + /** @enum {string} */ + action: "blocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block unblocked event */ + "webhook-org-block-unblocked": { + /** @enum {string} */ + action: "unblocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization deleted event */ + "webhook-organization-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_added event */ + "webhook-organization-member-added": { + /** @enum {string} */ + action: "member_added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_invited event */ + "webhook-organization-member-invited": { + /** @enum {string} */ + action: "member_invited"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The invitation for the user or email if the action is `member_invited`. */ + invitation: { + /** Format: date-time */ + created_at: string; + email: string | null; + /** Format: date-time */ + failed_at: string | null; + failed_reason: string | null; + id: number; + /** Format: uri */ + invitation_teams_url: string; + /** User */ + inviter: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + login: string | null; + node_id: string; + role: string; + team_count: number; + invitation_source?: string; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** organization member_removed event */ + "webhook-organization-member-removed": { + /** @enum {string} */ + action: "member_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization renamed event */ + "webhook-organization-renamed": { + /** @enum {string} */ + action: "renamed"; + changes?: { + login?: { + from?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package published event */ + "webhook-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string | null; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + } | null; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: { [key: string]: unknown } | null; + bugs?: { [key: string]: unknown } | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: { [key: string]: unknown } | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: { [key: string]: unknown } | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: { [key: string]: unknown }[]; + contributors?: { [key: string]: unknown }[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: { [key: string]: unknown } | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: number | string; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + source_url?: string; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package updated event */ + "webhook-package-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string; + size: number; + state: string; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + /** Format: uri */ + source_url?: string; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** page_build event */ + "webhook-page-build": { + /** @description The [List GitHub Pages builds](https://docs.github.com/rest/reference/repos#list-github-pages-builds) itself. */ + build: { + commit: string | null; + created_at: string; + duration: number; + error: { + message: string | null; + }; + /** User */ + pusher: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + status: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-ping": { + /** + * Webhook + * @description The webhook that is being pinged + */ + hook?: { + /** @description Determines whether the hook is actually triggered for the events it subscribes to. */ + active: boolean; + /** @description Only included for GitHub Apps. When you register a new GitHub App, GitHub sends a ping event to the webhook URL you specified during registration. The GitHub App ID sent in this field is required for authenticating an app. */ + app_id?: number; + config: { + content_type?: components["schemas"]["webhook-config-content-type"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + secret?: components["schemas"]["webhook-config-secret"]; + url?: components["schemas"]["webhook-config-url"]; + }; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + deliveries_url?: string; + /** @description Determines what events the hook is triggered for. Default: ['push']. */ + events: string[]; + /** @description Unique identifier of the webhook. */ + id: number; + last_response?: components["schemas"]["hook-response"]; + /** + * @description The type of webhook. The only valid value is 'web'. + * @enum {string} + */ + name: "web"; + /** Format: uri */ + ping_url?: string; + /** Format: uri */ + test_url?: string; + type: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url?: string; + }; + /** @description The ID of the webhook that triggered the ping. */ + hook_id?: number; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + /** @description Random string of GitHub zen. */ + zen?: string; + }; + /** @description The webhooks ping payload encoded with URL encoding. */ + "webhook-ping-form-encoded": { + /** @description A URL-encoded string of the ping JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** project_card converted event */ + "webhook-project-card-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + note: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card created event */ + "webhook-project-card-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card deleted event */ + "webhook-project-card-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number | null; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card edited event */ + "webhook-project-card-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + note: { + from: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card moved event */ + "webhook-project-card-moved": { + /** @enum {string} */ + action: "moved"; + changes?: { + column_id: { + from: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } & { + after_id: number | null; + archived?: boolean; + column_id?: number; + column_url?: string; + created_at?: string; + creator?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + id?: number; + node_id?: string; + note?: string | null; + project_url?: string; + updated_at?: string; + url?: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project closed event */ + "webhook-project-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_column created event */ + "webhook-project-column-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column deleted event */ + "webhook-project-column-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column edited event */ + "webhook-project-column-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + name?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column moved event */ + "webhook-project-column-moved": { + /** @enum {string} */ + action: "moved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project created event */ + "webhook-project-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project deleted event */ + "webhook-project-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project edited event */ + "webhook-project-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the project if the action was `edited`. */ + changes?: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The changes to the project if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project reopened event */ + "webhook-project-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Archived Event */ + "webhook-projects-v2-item-archived": { + /** @enum {string} */ + action: "archived"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Converted Event */ + "webhook-projects-v2-item-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + content_type?: { + from?: string | null; + to?: string; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Created Event */ + "webhook-projects-v2-item-created": { + /** @enum {string} */ + action: "created"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Deleted Event */ + "webhook-projects-v2-item-deleted": { + /** @enum {string} */ + action: "deleted"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Edited Event */ + "webhook-projects-v2-item-edited": { + /** @enum {string} */ + action: "edited"; + changes?: + | { + field_value: { + field_node_id?: string; + field_type?: string; + }; + } + | { + body: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Reordered Event */ + "webhook-projects-v2-item-reordered": { + /** @enum {string} */ + action: "reordered"; + changes: { + previous_projects_v2_item_node_id?: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Restored Event */ + "webhook-projects-v2-item-restored": { + /** @enum {string} */ + action: "restored"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** public event */ + "webhook-public": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request assigned event */ + "webhook-pull-request-assigned": { + /** @enum {string} */ + action: "assigned"; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_disabled event */ + "webhook-pull-request-auto-merge-disabled": { + /** @enum {string} */ + action: "auto_merge_disabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_enabled event */ + "webhook-pull-request-auto-merge-enabled": { + /** @enum {string} */ + action: "auto_merge_enabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason?: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request closed event */ + "webhook-pull-request-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string | null; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at?: string | null; + merged_by?: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "closed" | "open"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request converted_to_draft event */ + "webhook-pull-request-converted-to-draft": { + /** @enum {string} */ + action: "converted_to_draft"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + /** @enum {boolean} */ + merged: false; + merged_at: unknown | null; + merged_by: unknown | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + state?: string; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request demilestoned event */ + "webhook-pull-request-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request dequeued event */ + "webhook-pull-request-dequeued": { + /** @enum {string} */ + action: "dequeued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request edited event */ + "webhook-pull-request-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment if the action was `edited`. */ + changes: { + base?: { + ref: { + from: string; + }; + sha: { + from: string; + }; + }; + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request enqueued event */ + "webhook-pull-request-enqueued": { + /** @enum {string} */ + action: "enqueued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request labeled event */ + "webhook-pull-request-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request locked event */ + "webhook-pull-request-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request milestoned event */ + "webhook-pull-request-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request opened event */ + "webhook-pull-request-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request ready_for_review event */ + "webhook-pull-request-ready-for-review": { + /** @enum {string} */ + action: "ready_for_review"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request reopened event */ + "webhook-pull-request-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: unknown | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment created event */ + "webhook-pull-request-review-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions?: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment deleted event */ + "webhook-pull-request-review-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment edited event */ + "webhook-pull-request-review-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review dismissed event */ + "webhook-pull-request-review-dismissed": { + /** @enum {string} */ + action: "dismissed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + /** @enum {string} */ + state: "dismissed" | "approved" | "changes_requested"; + /** Format: date-time */ + submitted_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review edited event */ + "webhook-pull-request-review-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_request_removed event */ + "webhook-pull-request-review-request-removed": + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_requested event */ + "webhook-pull-request-review-requested": + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review submitted event */ + "webhook-pull-request-review-submitted": { + /** @enum {string} */ + action: "submitted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_thread resolved event */ + "webhook-pull-request-review-thread-resolved": { + /** @enum {string} */ + action: "resolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request_review_thread unresolved event */ + "webhook-pull-request-review-thread-unresolved": { + /** @enum {string} */ + action: "unresolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request synchronize event */ + "webhook-pull-request-synchronize": { + /** @enum {string} */ + action: "synchronize"; + after: string; + before: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unassigned event */ + "webhook-pull-request-unassigned": { + /** @enum {string} */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request unlabeled event */ + "webhook-pull-request-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unlocked event */ + "webhook-pull-request-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** push event */ + "webhook-push": { + /** @description The SHA of the most recent commit on `ref` after the push. */ + after: string; + base_ref: string | null; + /** @description The SHA of the most recent commit on `ref` before the push. */ + before: string; + /** @description An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/reference/repos#commits) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries. */ + commits: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + }[]; + /** @description URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit. */ + compare: string; + /** @description Whether this push created the `ref`. */ + created: boolean; + /** @description Whether this push deleted the `ref`. */ + deleted: boolean; + enterprise?: components["schemas"]["enterprise"]; + /** @description Whether this push was a force push of the `ref`. */ + forced: boolean; + /** Commit */ + head_commit: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + pusher: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email?: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description The full git ref that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`. */ + ref: string; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sender?: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string | null; + description: string | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author?: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + }; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: (string | { [key: string]: unknown }) | null; + bugs?: (string | { [key: string]: unknown }) | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: (string | { [key: string]: unknown }) | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: (string | { [key: string]: unknown }) | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: string[]; + contributors?: string[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: (string | { [key: string]: unknown }) | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: (string | { [key: string]: unknown } | number) | null; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + prerelease?: boolean; + published_at?: string; + tag_name?: string; + target_commitish?: string; + url?: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + about_url?: string; + name?: string; + type?: string; + url?: string; + vendor?: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-updated": { + action: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string; + description: unknown | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: (unknown | null)[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type?: string; + created_at?: string; + download_url?: string; + id?: number; + md5?: string | null; + name?: string; + sha1?: string | null; + sha256?: string; + size?: number; + state?: string; + updated_at?: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + url: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { [key: string]: unknown } | null; + updated_at: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release created event */ + "webhook-release-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release deleted event */ + "webhook-release-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release edited event */ + "webhook-release-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release prereleased event */ + "webhook-release-prereleased": { + /** @enum {string} */ + action: "prereleased"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + /** + * @description Whether the release is identified as a prerelease or a full release. + * @enum {boolean} + */ + prerelease: true; + published_at?: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release published event */ + "webhook-release-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + /** Format: date-time */ + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release released event */ + "webhook-release-released": { + /** @enum {string} */ + action: "released"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release unpublished event */ + "webhook-release-unpublished": { + /** @enum {string} */ + action: "unpublished"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** repository archived event */ + "webhook-repository-archived": { + /** @enum {string} */ + action: "archived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository created event */ + "webhook-repository-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository deleted event */ + "webhook-repository-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_dispatch event */ + "webhook-repository-dispatch-sample": { + action: string; + branch: string; + client_payload: { [key: string]: unknown } | null; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository edited event */ + "webhook-repository-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + default_branch?: { + from: string; + }; + description?: { + from: string | null; + }; + homepage?: { + from: string | null; + }; + topics?: { + from?: string[] | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_import event */ + "webhook-repository-import": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @enum {string} */ + status: "success" | "cancelled" | "failure"; + }; + /** repository privatized event */ + "webhook-repository-privatized": { + /** @enum {string} */ + action: "privatized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository publicized event */ + "webhook-repository-publicized": { + /** @enum {string} */ + action: "publicized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository renamed event */ + "webhook-repository-renamed": { + /** @enum {string} */ + action: "renamed"; + changes: { + repository: { + name: { + from: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository transferred event */ + "webhook-repository-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + owner: { + from: { + /** Organization */ + organization?: { + /** Format: uri */ + avatar_url: string; + description: string | null; + /** Format: uri */ + events_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url?: string; + id: number; + /** Format: uri */ + issues_url: string; + login: string; + /** Format: uri-template */ + members_url: string; + node_id: string; + /** Format: uri-template */ + public_members_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + url: string; + }; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository unarchived event */ + "webhook-repository-unarchived": { + /** @enum {string} */ + action: "unarchived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert create event */ + "webhook-repository-vulnerability-alert-create": { + /** @enum {string} */ + action: "create"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert dismiss event */ + "webhook-repository-vulnerability-alert-dismiss": { + /** @enum {string} */ + action: "dismiss"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_comment?: string | null; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + dismiss_comment?: string | null; + dismiss_reason: string; + dismissed_at: string; + /** User */ + dismisser: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "dismissed"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert reopen event */ + "webhook-repository-vulnerability-alert-reopen": { + /** @enum {string} */ + action: "reopen"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert resolve event */ + "webhook-repository-vulnerability-alert-resolve": { + /** @enum {string} */ + action: "resolve"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "fixed" | "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert created event */ + "webhook-secret-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created": { + /** @enum {string} */ + action?: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + installation?: components["schemas"]["simple-installation"]; + location: components["schemas"]["secret-scanning-location"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created-form-encoded": { + /** @description A URL-encoded string of the secret_scanning_alert_location.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** secret_scanning_alert reopened event */ + "webhook-secret-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert resolved event */ + "webhook-secret-scanning-alert-resolved": { + /** @enum {string} */ + action: "resolved"; + alert: { + created_at?: components["schemas"]["alert-created-at"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + number?: components["schemas"]["alert-number"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + resolution?: + | ( + | null + | "false_positive" + | "wont_fix" + | "revoked" + | "used_in_tests" + | "pattern_deleted" + | "pattern_edited" + ) + | null; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The secret that was detected. */ + secret?: string; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert revoked event */ + "webhook-secret-scanning-alert-revoked": { + /** @enum {string} */ + action: "revoked"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory published event */ + "webhook-security-advisory-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory updated event */ + "webhook-security-advisory-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory withdrawn event */ + "webhook-security-advisory-withdrawn": { + /** @enum {string} */ + action: "withdrawn"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_and_analysis event */ + "webhook-security-and-analysis": { + changes: { + from?: { + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["full-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** sponsorship cancelled event */ + "webhook-sponsorship-cancelled": { + /** @enum {string} */ + action: "cancelled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship created event */ + "webhook-sponsorship-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship edited event */ + "webhook-sponsorship-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + privacy_level?: { + /** @description The `edited` event types include the details about the change when someone edits a sponsorship to change the privacy. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_cancellation event */ + "webhook-sponsorship-pending-cancellation": { + /** @enum {string} */ + action: "pending_cancellation"; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_tier_change event */ + "webhook-sponsorship-pending-tier-change": { + /** @enum {string} */ + action: "pending_tier_change"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship tier_changed event */ + "webhook-sponsorship-tier-changed": { + /** @enum {string} */ + action: "tier_changed"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** star created event */ + "webhook-star-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: string | null; + }; + /** star deleted event */ + "webhook-star-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: unknown | null; + }; + /** status event */ + "webhook-status": { + /** Format: uri */ + avatar_url?: string | null; + /** @description An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. */ + branches: { + commit: { + sha: string | null; + /** Format: uri */ + url: string | null; + }; + name: string; + protected: boolean; + }[]; + commit: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + comments_url: string; + commit: { + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + comment_count: number; + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification: { + payload: string | null; + /** @enum {string} */ + reason: + | "expired_key" + | "not_signing_key" + | "gpgverify_error" + | "gpgverify_unavailable" + | "unsigned" + | "unknown_signature_type" + | "no_user" + | "unverified_email" + | "bad_email" + | "unknown_key" + | "malformed_signature" + | "invalid" + | "valid" + | "bad_cert" + | "ocsp_pending"; + signature: string | null; + verified: boolean; + }; + }; + /** User */ + committer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + node_id: string; + parents: { + /** Format: uri */ + html_url: string; + sha: string; + /** Format: uri */ + url: string; + }[]; + sha: string; + /** Format: uri */ + url: string; + }; + context: string; + created_at: string; + /** @description The optional human-readable description added to the status. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + /** @description The unique identifier of the status. */ + id: number; + installation?: components["schemas"]["simple-installation"]; + name: string; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The Commit SHA. */ + sha: string; + /** + * @description The new state. Can be `pending`, `success`, `failure`, or `error`. + * @enum {string} + */ + state: "pending" | "success" | "failure" | "error"; + /** @description The optional link added to the status. */ + target_url: string | null; + updated_at: string; + }; + /** team_add event */ + "webhook-team-add": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team added_to_repository event */ + "webhook-team-added-to-repository": { + /** @enum {string} */ + action: "added_to_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team created event */ + "webhook-team-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team deleted event */ + "webhook-team-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team edited event */ + "webhook-team-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the team if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + privacy?: { + /** @description The previous version of the team's privacy if the action was `edited`. */ + from: string; + }; + repository?: { + permissions: { + from: { + /** @description The previous version of the team member's `admin` permission on a repository, if the action was `edited`. */ + admin?: boolean; + /** @description The previous version of the team member's `pull` permission on a repository, if the action was `edited`. */ + pull?: boolean; + /** @description The previous version of the team member's `push` permission on a repository, if the action was `edited`. */ + push?: boolean; + }; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team removed_from_repository event */ + "webhook-team-removed-from-repository": { + /** @enum {string} */ + action: "removed_from_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** watch started event */ + "webhook-watch-started": { + /** @enum {string} */ + action: "started"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** workflow_dispatch event */ + "webhook-workflow-dispatch": { + enterprise?: components["schemas"]["enterprise"]; + inputs: { + name?: string; + number?: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow: string; + }; + /** workflow_job completed event */ + "webhook-workflow-job-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | null + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out" + ) + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out"; + head_sha?: string; + html_url?: string; + id?: number; + labels?: (string | null)[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + status?: string; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps?: ({ [key: string]: unknown } | null)[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job in_progress event */ + "webhook-workflow-job-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("success" | "failure" | null | "cancelled" | "neutral") + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | null | "cancelled") + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string | null; + conclusion?: string | null; + head_sha?: string; + html_url?: string; + id?: number; + labels?: string[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps: { + completed_at: string | null; + conclusion: string | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "pending" | "queued"; + }[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job queued event */ + "webhook-workflow-job-queued": { + /** @enum {string} */ + action: "queued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "completed" | "in_progress" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job waiting event */ + "webhook-workflow-job-waiting": { + /** @enum {string} */ + action: "waiting"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: + | "completed" + | "in_progress" + | "queued" + | "pending" + | "waiting"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_run completed event */ + "webhook-workflow-run-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped"; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run in_progress event */ + "webhook-workflow-run-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "skipped" + | "stale" + ) + | null; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string | null; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run requested event */ + "webhook-workflow-run-requested": { + /** @enum {string} */ + action: "requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + display_title: string; + }; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** Unavailable due to service under maintenance. */ + porter_maintenance: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** A header with no content is returned. */ + no_content: unknown; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "per-page": number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string; + "delivery-id": number; + /** @description Page number of the results to fetch. */ + page: number; + /** @description 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; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + "dependabot-alert-comma-separated-states": string; + /** + * @description A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + "dependabot-alert-comma-separated-severities": string; + /** + * @description A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + "dependabot-alert-comma-separated-ecosystems": string; + /** @description A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + "dependabot-alert-comma-separated-packages": string; + /** @description The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + "dependabot-alert-scope": "development" | "runtime"; + /** + * @description The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + "dependabot-alert-sort": "created" | "updated"; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + "pagination-after": string; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + "pagination-first": number; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + "pagination-last": number; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type": string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution": string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort": "created" | "updated"; + /** @description The security feature to enable or disable. */ + "enterprise-security-product": + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + "enterprise-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** @description 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; + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description The unique identifier of the required workflow. */ + "required-workflow-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The number of results per page (max 30). */ + "variables-per-page": number; + /** @description The name of the variable. */ + "variable-name": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name": components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid": components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description The unique identifier of the hook. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** + * @description The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": + | "dependency_graph" + | "dependabot_alerts" + | "dependabot_security_updates" + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + "org-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The ID of the required workflow that has run at least once in a repository. */ + "repo-required-workflow-id": number; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref": components["schemas"]["code-scanning-ref"]; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key": string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort": + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + "workflow-run-status": + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests": boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id": number; + /** @description Only returns workflow runs that are associated with the specified `head_sha`. */ + "workflow-run-head-sha": string; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name": string; + /** @description Returns check runs with the specified `status`. */ + status: "queued" | "in_progress" | "completed"; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** @description A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + "dependabot-alert-comma-separated-manifests": string; + /** + * @description The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + "dependabot-alert-number": components["schemas"]["alert-number"]; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path": string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per: "" | "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** @description 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"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query": number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + /** @description The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.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. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/get-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["enterprise-security-analysis-settings"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/patch-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." */ + advanced_security_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning)." */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + * To disable this functionality, set this field to `null`. + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + }; + }; + }; + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "dependabot/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/post-security-product-enablement-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["enterprise-security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + enablement: components["parameters"]["enterprise-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + /** 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. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + "gists/list-public": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string; + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** 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. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 50). */ + per_page?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + /** Gets information about a notification thread. */ + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean; + /** @example "http://github.blog" */ + blog?: string; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot alerts is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot security updates is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** @description If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. */ + secret_scanning_push_protection_custom_link?: string; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + "oidc/get-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** A JSON serialized template for OIDC subject claim customization */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + }; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + "oidc/update-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["required-workflow"][]; + }; + }; + }; + }; + }; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/create-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/get-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + }; + }; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/delete-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/update-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path?: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id?: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-selected-repositories-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + /** Resource Not Found */ + 404: unknown; + }; + }; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/set-selected-repos-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories for which the workflow should be required. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/add-selected-repo-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/remove-selected-repo-from-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-org-variables": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["organization-actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/create-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when creating a variable */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/get-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/delete-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/update-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility?: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories that can access the organization variable. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + /** If specified, only code scanning alerts with this severity will be returned. */ + severity?: components["schemas"]["code-scanning-alert-severity"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/set-codespaces-billing": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when successfully modifying permissions. */ + 204: never; + 304: components["responses"]["not_modified"]; + /** Users are neither members nor collaborators of this organization. */ + 400: unknown; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. + * @enum {string} + */ + visibility: + | "disabled" + | "selected_members" + | "all_members" + | "all_members_and_outside_collaborators"; + /** @description The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. */ + selected_usernames?: string[]; + }; + }; + }; + }; + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-org-secret"][]; + }; + }; + }; + }; + }; + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description The ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * * `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** 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. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-codespaces-for-user-in-org": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * 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. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `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. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description 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; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description 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; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.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; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + "orgs/list-security-manager-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-simple"][]; + }; + }; + }; + }; + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/add-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** The organization has reached the maximum number of security manager teams. */ + 409: unknown; + }; + }; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/remove-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description 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` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + */ + permission?: string; + }; + }; + }; + }; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "orgs/enable-or-disable-security-product-on-all-org-repos": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + enablement: components["parameters"]["org-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** 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. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** 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. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/list-columns": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/list-repo-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["repo-required-workflow"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/get-repo-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-required-workflow"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-repo-required-workflow-usage": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.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. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to archive this repository. `false` will unarchive a previously archived repository. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Filters artifacts by exact match on their name field. */ + name?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + "actions/get-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Status response */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/set-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/list-repo-variables": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/create-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/get-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/delete-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/update-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description 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; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + /** + * @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. + * @default false + */ + lock_branch?: boolean; + /** + * @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. + * @default false + */ + allow_fork_syncing?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description 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; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** 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. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. */ + sort?: "created"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/list-codeql-databases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/get-codeql-database": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The language of the CodeQL database. */ + language: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis 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; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + /** + * @description Whether the SARIF file will be validated according to the code scanning specifications. + * This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. + */ + validate?: boolean; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + */ + permission?: string; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). */ + 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 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?: components["parameters"]["since"]; + /** 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; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * **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. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * + * 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` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * 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 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. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + manifest?: components["parameters"]["dependabot-alert-comma-separated-manifests"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** @deprecated **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. */ + page?: number; + /** @deprecated The number of results per page (max 100). */ + per_page?: number; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + "dependabot/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the Dependabot alert. + * A `dismissed_reason` must be provided when setting the state to `dismissed`. + * @enum {string} + */ + state: "dismissed" | "open"; + /** + * @description **Required when `state` is `dismissed`.** A reason for dismissing the alert. + * @enum {string} + */ + dismissed_reason?: + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk"; + /** @description An optional comment associated with dismissing the alert. */ + dismissed_comment?: string; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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 | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/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[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description 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`. + * @default + */ + target_url?: string; + /** + * @description 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: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description 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` */ + auto_inactive?: boolean; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/list-deployment-branch-policies": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number; + branch_policies: components["schemas"]["deployment-branch-policy"][]; + }; + }; + }; + }; + }; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** Response if the same branch name pattern already exists */ + 303: never; + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/update-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/delete-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + /** @description When forking from an existing repository, fork with only the default branch. */ + default_branch_only?: boolean; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description 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[]; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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; + }; + }; + }; + }; + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description 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. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. 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. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** 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://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + }; + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. */ + 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?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description 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 | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "not_planned" | "reopened") | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + "issues/check-user-can-be-assigned-to-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + assignee: string; + }; + }; + responses: { + /** Response if `assignee` can be assigned to `issue_number` */ + 204: never; + /** Response if `assignee` can not be assigned to `issue_number` */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. 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. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. 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. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description 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://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** Lists all notifications for the current user in the specified repository. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * 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. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + "repos/create-pages-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-deployment"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + artifact_url: string; + /** + * @description The target environment for this GitHub Pages deployment. + * @default github-pages + */ + environment?: string; + /** + * @description A unique string that represents the version of the build for this deployment. + * @default GITHUB_SHA + */ + pages_build_version: string; + /** @description The OIDC token issued by GitHub Actions certifying the origin of the deployment. */ + oidc_token: string; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** 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. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description 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; + /** @description 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; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description 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; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description 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; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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 above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description 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://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description 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; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; + }; + }; + }; + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description 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. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * 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. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Bad request, resolution comment is invalid or the resolution was not changed. */ + 400: unknown; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution or resolution comment */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + resolution_comment?: components["schemas"]["secret-scanning-alert-resolution-comment"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description 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 | null; + /** @description A short description of the status. */ + description?: string | null; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + }; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** 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. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description The new name to be given to the repository. */ + new_name?: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/list-environment-variables": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/create-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/get-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/delete-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/update-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + "search/code": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + "search/topics": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on 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. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **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. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } + | { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }; + }; + }; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/publish-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["codespace-with-full-repository"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the new repository. */ + name?: string; + /** + * @description Whether the new repository should be private. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @example [] + */ + emails: string[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + 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; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** @description 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; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/list-ssh-signing-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/create-ssh-signing-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ + key: string; + }; + }; + }; + }; + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/get-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/delete-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + "users/list-ssh-signing-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get all supported GitHub API versions. */ + "meta/get-all-versions": { + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/core/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/core/node_modules/@octokit/request-error/README.md new file mode 100644 index 0000000..343c456 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/README.md @@ -0,0 +1,71 @@ +# 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://github.com/octokit/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit/request-error.js/actions?query=workflow%3ATest) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.skypack.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, { + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz", + }, + headers: { + authorization: "token secret123", + }, + }, + response: { + status: 500, + url: "https://api.github.com/foo", + headers: { + "x-github-request-id": "1:2:3:4", + }, + data: { + foo: "bar", + }, + }, +}); + +error.message; // Oops +error.status; // 500 +error.request; // { method, url, headers, body } +error.response; // { url, status, headers, data } +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-node/index.js new file mode 100644 index 0000000..c676580 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,65 @@ +'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 logOnceCode = once(deprecation => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + } + }); + } +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-node/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-node/index.js.map new file mode 100644 index 0000000..5381b78 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":["logOnceCode","once","deprecation","console","warn","logOnceHeaders","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","headers","response","requestCopy","Object","assign","request","authorization","replace","url","defineProperty","get","Deprecation"],"mappings":";;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACpE,MAAMG,cAAc,GAAGJ,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACvE;AACA;AACA;AACO,MAAMI,YAAY,SAASC,KAAK,CAAC;EACpCC,WAAW,CAACC,OAAO,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACtC,KAAK,CAACF,OAAO,CAAC;;;IAGd,IAAIF,KAAK,CAACK,iBAAiB,EAAE;MACzBL,KAAK,CAACK,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAACJ,WAAW,CAAC;;IAEnD,IAAI,CAACK,IAAI,GAAG,WAAW;IACvB,IAAI,CAACC,MAAM,GAAGJ,UAAU;IACxB,IAAIK,OAAO;IACX,IAAI,SAAS,IAAIJ,OAAO,IAAI,OAAOA,OAAO,CAACI,OAAO,KAAK,WAAW,EAAE;MAChEA,OAAO,GAAGJ,OAAO,CAACI,OAAO;;IAE7B,IAAI,UAAU,IAAIJ,OAAO,EAAE;MACvB,IAAI,CAACK,QAAQ,GAAGL,OAAO,CAACK,QAAQ;MAChCD,OAAO,GAAGJ,OAAO,CAACK,QAAQ,CAACD,OAAO;;;IAGtC,MAAME,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAAC;IACtD,IAAIT,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,EAAE;MACvCJ,WAAW,CAACF,OAAO,GAAGG,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAACL,OAAO,EAAE;QAC7DM,aAAa,EAAEV,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,CAACC,OAAO,CAAC,MAAM,EAAE,aAAa;OACrF,CAAC;;IAENL,WAAW,CAACM,GAAG,GAAGN,WAAW,CAACM;;;KAGzBD,OAAO,CAAC,sBAAsB,EAAE,0BAA0B;;;KAG1DA,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;IAC9D,IAAI,CAACF,OAAO,GAAGH,WAAW;;IAE1BC,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;MAChCC,GAAG,GAAG;QACFzB,WAAW,CAAC,IAAI0B,uBAAW,CAAC,0EAA0E,CAAC,CAAC;QACxG,OAAOhB,UAAU;;KAExB,CAAC;IACFQ,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;MACnCC,GAAG,GAAG;QACFpB,cAAc,CAAC,IAAIqB,uBAAW,CAAC,uFAAuF,CAAC,CAAC;QACxH,OAAOX,OAAO,IAAI,EAAE;;KAE3B,CAAC;;AAEV;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 0000000..5eb1927 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,55 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 0000000..d6e089c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,33 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +import { 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; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + /** + * error response headers + * + * @deprecated `error.headers` is deprecated in favor of `error.response.headers` + */ + headers: ResponseHeaders; + /** + * Response object if a response was received + */ + response?: OctokitResponse; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 0000000..e5e1fab --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,9 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +export type RequestErrorOptions = { + /** @deprecated set `response` instead */ + headers?: ResponseHeaders; + request: RequestOptions; +} | { + response: OctokitResponse; + request: RequestOptions; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-web/index.js new file mode 100644 index 0000000..0fb64be --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,59 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} + +export { RequestError }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-web/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-web/index.js.map new file mode 100644 index 0000000..78f677f --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACxE;AACA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;AAC9C,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;AAChC,QAAQ,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;AACjC,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW,EAAE;AAC5E,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,SAAS;AACT,QAAQ,IAAI,UAAU,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAC7C,YAAY,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/C,SAAS;AACT;AACA,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/D,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;AACnD,YAAY,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;AAC7E,gBAAgB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;AACnG,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;AACzC;AACA;AACA,aAAa,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AACxE;AACA;AACA,aAAa,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;AACvE,QAAQ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AACnC;AACA,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,YAAY,GAAG,GAAG;AAClB,gBAAgB,WAAW,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;AACzH,gBAAgB,OAAO,UAAU,CAAC;AAClC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;AAC/C,YAAY,GAAG,GAAG;AAClB,gBAAgB,cAAc,CAAC,IAAI,WAAW,CAAC,uFAAuF,CAAC,CAAC,CAAC;AACzI,gBAAgB,OAAO,OAAO,IAAI,EAAE,CAAC;AACrC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/core/node_modules/@octokit/request-error/package.json new file mode 100644 index 0000000..2215caa --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request-error/package.json @@ -0,0 +1,49 @@ +{ + "name": "@octokit/request-error", + "description": "Error class for Octokit request errors", + "version": "3.0.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "repository": "github:octokit/request-error.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-bundle-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "@types/node": "^18.0.0", + "@types/once": "^1.4.0", + "jest": "^29.0.0", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "2.8.3", + "ts-jest": "^29.0.0", + "typescript": "^4.0.0" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/core/node_modules/@octokit/request/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/request/README.md b/node_modules/@octokit/core/node_modules/@octokit/request/README.md new file mode 100644 index 0000000..82a82a1 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/README.md @@ -0,0 +1,553 @@ +# 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://github.com/octokit/request.js/workflows/Test/badge.svg)](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%3Amain) + +`@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) when the runtime has no native `fetch` API). + + + + + +- [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) +- [Authentication](#authentication) +- [request()](#request) +- [`request.defaults()`](#requestdefaults) +- [`request.endpoint`](#requestendpoint) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter--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: "octokit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"], +}); +``` + +👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) + +😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). + +👍 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). + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from cdn.skypack.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 + +For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) + +```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", +}); +``` + +## Authentication + +The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const requestWithAuth = request.defaults({ + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, +}); +const result = await requestWithAuth("GET /user"); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + appId: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, + mediaType: { + previews: ["machine-man"], + }, +}); + +const { data: app } = await requestWithAuth("GET /app"); +const { data: app } = await requestWithAuth( + "POST /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + title: "Hello from the engine room", + } +); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + **Required**. 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 + + The base URL that route or url will be prefixed with, if they use relative paths. 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 + + 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.log + + object + + Used for internal logging. Defaults to console. +
+ 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. If the request was successful, the promise resolves with an object containing 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 promise is rejected with an `error` object containing 3 keys to help with debugging: + +- `error.status` The http response status code +- `error.request` The request options such as `method`, `url` and `data` +- `error.response` The http response object with `url`, `headers`, and `data` + +If the error is due to an `AbortSignal` being used, the resulting `AbortError` is bubbled up to the caller. + +## `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: + +- [`octokitRequest.endpoint()`](#endpoint) +- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) +- [`octokitRequest.endpoint.merge()`](#endpointdefaults) +- [`octokitRequest.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/core/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/core/node_modules/@octokit/request/dist-node/index.js new file mode 100644 index 0000000..11ac3f4 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,156 @@ +'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 universalUserAgent = require('universal-user-agent'); +var isPlainObject = require('is-plain-object'); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + if (isPlainObject.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 || globalThis.fetch || /* istanbul ignore next */nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)).then(async response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new requestError.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined + }, + request: requestOptions + }); + } + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new requestError.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return getResponseData(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) throw error;else if (error.name === "AbortError") throw error; + throw new requestError.RequestError(error.message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); + +exports.request = request; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/request/dist-node/index.js.map new file mode 100644 index 0000000..19fd47d --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","log","request","console","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","globalThis","nodeFetch","Object","assign","method","redirect","then","keyAndValue","matches","link","match","deprecationLink","pop","warn","sunset","RequestError","statusText","data","undefined","getResponseData","error","toErrorMessage","catch","name","message","contentType","get","test","json","text","getBuffer","errors","map","join","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","parse","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA3B,SAASC,iBAAiB,CAACC,QAAQ,EAAE;EAChD,OAAOA,QAAQ,CAACC,WAAW,EAAE;AACjC;;ACEe,SAASC,YAAY,CAACC,cAAc,EAAE;EACjD,MAAMC,GAAG,GAAGD,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1DD,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1BE,OAAO;EACb,IAAIC,2BAAa,CAACJ,cAAc,CAACK,IAAI,CAAC,IAClCC,KAAK,CAACC,OAAO,CAACP,cAAc,CAACK,IAAI,CAAC,EAAE;IACpCL,cAAc,CAACK,IAAI,GAAGG,IAAI,CAACC,SAAS,CAACT,cAAc,CAACK,IAAI,CAAC;;EAE7D,IAAIK,OAAO,GAAG,EAAE;EAChB,IAAIC,MAAM;EACV,IAAIC,GAAG;EACP,MAAMC,KAAK,GAAIb,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACW,KAAK,IACjEC,UAAU,CAACD,KAAK,8BACWE,SAAS;EACxC,OAAOF,KAAK,CAACb,cAAc,CAACY,GAAG,EAAEI,MAAM,CAACC,MAAM,CAAC;IAC3CC,MAAM,EAAElB,cAAc,CAACkB,MAAM;IAC7Bb,IAAI,EAAEL,cAAc,CAACK,IAAI;IACzBK,OAAO,EAAEV,cAAc,CAACU,OAAO;IAC/BS,QAAQ,EAAEnB,cAAc,CAACmB;GAC5B;;;EAGDnB,cAAc,CAACE,OAAO,CAAC,CAAC,CACnBkB,IAAI,CAAC,MAAOvB,QAAQ,IAAK;IAC1Be,GAAG,GAAGf,QAAQ,CAACe,GAAG;IAClBD,MAAM,GAAGd,QAAQ,CAACc,MAAM;IACxB,KAAK,MAAMU,WAAW,IAAIxB,QAAQ,CAACa,OAAO,EAAE;MACxCA,OAAO,CAACW,WAAW,CAAC,CAAC,CAAC,CAAC,GAAGA,WAAW,CAAC,CAAC,CAAC;;IAE5C,IAAI,aAAa,IAAIX,OAAO,EAAE;MAC1B,MAAMY,OAAO,GAAGZ,OAAO,CAACa,IAAI,IAAIb,OAAO,CAACa,IAAI,CAACC,KAAK,CAAC,8BAA8B,CAAC;MAClF,MAAMC,eAAe,GAAGH,OAAO,IAAIA,OAAO,CAACI,GAAG,EAAE;MAChDzB,GAAG,CAAC0B,IAAI,CAAE,uBAAsB3B,cAAc,CAACkB,MAAO,IAAGlB,cAAc,CAACY,GAAI,qDAAoDF,OAAO,CAACkB,MAAO,GAAEH,eAAe,GAAI,SAAQA,eAAgB,EAAC,GAAG,EAAG,EAAC,CAAC;;IAEzM,IAAId,MAAM,KAAK,GAAG,IAAIA,MAAM,KAAK,GAAG,EAAE;MAClC;;;IAGJ,IAAIX,cAAc,CAACkB,MAAM,KAAK,MAAM,EAAE;MAClC,IAAIP,MAAM,GAAG,GAAG,EAAE;QACd;;MAEJ,MAAM,IAAIkB,yBAAY,CAAChC,QAAQ,CAACiC,UAAU,EAAEnB,MAAM,EAAE;QAChDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAEC;SACT;QACD9B,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,KAAK,GAAG,EAAE;MAChB,MAAM,IAAIkB,yBAAY,CAAC,cAAc,EAAElB,MAAM,EAAE;QAC3Cd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAE,MAAME,eAAe,CAACpC,QAAQ;SACvC;QACDK,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,IAAI,GAAG,EAAE;MACf,MAAMoB,IAAI,GAAG,MAAME,eAAe,CAACpC,QAAQ,CAAC;MAC5C,MAAMqC,KAAK,GAAG,IAAIL,yBAAY,CAACM,cAAc,CAACJ,IAAI,CAAC,EAAEpB,MAAM,EAAE;QACzDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB;SACH;QACD7B,OAAO,EAAEF;OACZ,CAAC;MACF,MAAMkC,KAAK;;IAEf,OAAOD,eAAe,CAACpC,QAAQ,CAAC;GACnC,CAAC,CACGuB,IAAI,CAAEW,IAAI,IAAK;IAChB,OAAO;MACHpB,MAAM;MACNC,GAAG;MACHF,OAAO;MACPqB;KACH;GACJ,CAAC,CACGK,KAAK,CAAEF,KAAK,IAAK;IAClB,IAAIA,KAAK,YAAYL,yBAAY,EAC7B,MAAMK,KAAK,CAAC,KACX,IAAIA,KAAK,CAACG,IAAI,KAAK,YAAY,EAChC,MAAMH,KAAK;IACf,MAAM,IAAIL,yBAAY,CAACK,KAAK,CAACI,OAAO,EAAE,GAAG,EAAE;MACvCpC,OAAO,EAAEF;KACZ,CAAC;GACL,CAAC;AACN;AACA,eAAeiC,eAAe,CAACpC,QAAQ,EAAE;EACrC,MAAM0C,WAAW,GAAG1C,QAAQ,CAACa,OAAO,CAAC8B,GAAG,CAAC,cAAc,CAAC;EACxD,IAAI,mBAAmB,CAACC,IAAI,CAACF,WAAW,CAAC,EAAE;IACvC,OAAO1C,QAAQ,CAAC6C,IAAI,EAAE;;EAE1B,IAAI,CAACH,WAAW,IAAI,wBAAwB,CAACE,IAAI,CAACF,WAAW,CAAC,EAAE;IAC5D,OAAO1C,QAAQ,CAAC8C,IAAI,EAAE;;EAE1B,OAAOC,iBAAS,CAAC/C,QAAQ,CAAC;AAC9B;AACA,SAASsC,cAAc,CAACJ,IAAI,EAAE;EAC1B,IAAI,OAAOA,IAAI,KAAK,QAAQ,EACxB,OAAOA,IAAI;;EAEf,IAAI,SAAS,IAAIA,IAAI,EAAE;IACnB,IAAIzB,KAAK,CAACC,OAAO,CAACwB,IAAI,CAACc,MAAM,CAAC,EAAE;MAC5B,OAAQ,GAAEd,IAAI,CAACO,OAAQ,KAAIP,IAAI,CAACc,MAAM,CAACC,GAAG,CAACtC,IAAI,CAACC,SAAS,CAAC,CAACsC,IAAI,CAAC,IAAI,CAAE,EAAC;;IAE3E,OAAOhB,IAAI,CAACO,OAAO;;;EAGvB,OAAQ,kBAAiB9B,IAAI,CAACC,SAAS,CAACsB,IAAI,CAAE,EAAC;AACnD;;ACzHe,SAASiB,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EAC3D,MAAMC,QAAQ,GAAGF,WAAW,CAACG,QAAQ,CAACF,WAAW,CAAC;EAClD,MAAMG,MAAM,GAAG,UAAUC,KAAK,EAAEC,UAAU,EAAE;IACxC,MAAMC,eAAe,GAAGL,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;IACzD,IAAI,CAACC,eAAe,CAACtD,OAAO,IAAI,CAACsD,eAAe,CAACtD,OAAO,CAACwD,IAAI,EAAE;MAC3D,OAAO3D,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACH,eAAe,CAAC,CAAC;;IAExD,MAAMtD,OAAO,GAAG,CAACoD,KAAK,EAAEC,UAAU,KAAK;MACnC,OAAOxD,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACR,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC,CAAC,CAAC;KACzE;IACDvC,MAAM,CAACC,MAAM,CAACf,OAAO,EAAE;MACnBiD,QAAQ;MACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;KAC7C,CAAC;IACF,OAAOK,eAAe,CAACtD,OAAO,CAACwD,IAAI,CAACxD,OAAO,EAAEsD,eAAe,CAAC;GAChE;EACD,OAAOxC,MAAM,CAACC,MAAM,CAACoC,MAAM,EAAE;IACzBF,QAAQ;IACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;GAC7C,CAAC;AACN;;MCjBajD,OAAO,GAAG8C,YAAY,CAACG,iBAAQ,EAAE;EAC1CzC,OAAO,EAAE;IACL,YAAY,EAAG,sBAAqBf,OAAQ,IAAGkE,+BAAY,EAAG;;AAEtE,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 0000000..223307a --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,123 @@ +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) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/get-buffer-response.js new file mode 100644 index 0000000..845a394 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 0000000..2460e99 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 0000000..4b40fe8 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/core/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 0000000..e206429 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 0000000..4901c79 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,11 @@ +import { EndpointInterface } from "@octokit/types"; +export default function fetchWrapper(requestOptions: ReturnType & { + redirect?: "error" | "follow" | "manual"; +}): Promise<{ + status: number; + url: string; + headers: { + [header: string]: string; + }; + data: any; +}>; diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts new file mode 100644 index 0000000..915b705 --- /dev/null +++ b/node_modules/@octokit/core/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/core/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 0000000..1030809 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("@octokit/types").RequestInterface; diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 0000000..b45decc --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..0080469 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types"; +export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface; diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/core/node_modules/@octokit/request/dist-web/index.js new file mode 100644 index 0000000..bf549a4 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,162 @@ +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 = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +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 }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/request/dist-web/index.js.map new file mode 100644 index 0000000..b2d1f15 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA3B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACpD,IAAI,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;AACrD,IAAI,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG;AACpE,UAAU,cAAc,CAAC,OAAO,CAAC,GAAG;AACpC,UAAU,OAAO,CAAC;AAClB,IAAI,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;AAC1C,QAAQ,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK;AACL,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK;AACzE,QAAQ,UAAU,CAAC,KAAK;AACxB,mCAAmC,SAAS,CAAC;AAC7C,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACnD,QAAQ,MAAM,EAAE,cAAc,CAAC,MAAM;AACrC,QAAQ,IAAI,EAAE,cAAc,CAAC,IAAI;AACjC,QAAQ,OAAO,EAAE,cAAc,CAAC,OAAO;AACvC,QAAQ,QAAQ,EAAE,cAAc,CAAC,QAAQ;AACzC,KAAK;AACL;AACA;AACA,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC5B,SAAS,IAAI,CAAC,OAAO,QAAQ,KAAK;AAClC,QAAQ,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC3B,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,QAAQ,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;AACpD,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,aAAa,IAAI,OAAO,EAAE;AACtC,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC/F,YAAY,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7D,YAAY,GAAG,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,kDAAkD,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClN,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;AAC9C,YAAY,OAAO;AACnB,SAAS;AACT;AACA,QAAQ,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9C,YAAY,IAAI,MAAM,GAAG,GAAG,EAAE;AAC9B,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;AAChE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,SAAS;AACnC,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;AAC3D,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,MAAM,eAAe,CAAC,QAAQ,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE;AAC3B,YAAY,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;AACzE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI;AACxB,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzC,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK;AACxB,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,GAAG;AACf,YAAY,OAAO;AACnB,YAAY,IAAI;AAChB,SAAS,CAAC;AACV,KAAK,CAAC;AACN,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1B,QAAQ,IAAI,KAAK,YAAY,YAAY;AACzC,YAAY,MAAM,KAAK,CAAC;AACxB,aAAa,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;AAC5C,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;AACnD,YAAY,OAAO,EAAE,cAAc;AACnC,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;AACD,eAAe,eAAe,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC7D,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AAC/C,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACpE,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AACD,SAAS,cAAc,CAAC,IAAI,EAAE;AAC9B,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AAChC,QAAQ,OAAO,IAAI,CAAC;AACpB;AACA,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE;AAC3B,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACxC,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpF,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL;AACA,IAAI,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;;ACzHc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACvD,IAAI,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;AAChD,QAAQ,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;AACvE,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;AAC/C,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AAC/B,YAAY,QAAQ;AACpB,YAAY,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACtE,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,CAAC;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/request/package.json b/node_modules/@octokit/core/node_modules/@octokit/request/package.json new file mode 100644 index 0000000..53910ad --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/request/package.json @@ -0,0 +1,58 @@ +{ + "name": "@octokit/request", + "description": "Send parameterized requests to GitHub's APIs with sensible defaults in browsers and Node", + "version": "6.2.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "repository": "github:octokit/request.js", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/auth-app": "^4.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^29.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^18.0.0", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^9.3.1", + "jest": "^29.0.0", + "lolex": "^6.0.0", + "prettier": "2.8.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "string-to-arraybuffer": "^1.0.2", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/core/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/core/node_modules/@octokit/types/README.md b/node_modules/@octokit/core/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/core/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/core/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/core/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/node_modules/@octokit/types/package.json b/node_modules/@octokit/core/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/core/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/core/package.json b/node_modules/@octokit/core/package.json index f8bba29..d84f9f4 100644 --- a/node_modules/@octokit/core/package.json +++ b/node_modules/@octokit/core/package.json @@ -1,92 +1,60 @@ { - "_from": "@octokit/core", - "_id": "@octokit/core@3.2.5", - "_inBundle": false, - "_integrity": "sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg==", - "_location": "/@octokit/core", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "@octokit/core", - "name": "@octokit/core", - "escapedName": "@octokit%2fcore", - "scope": "@octokit", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#USER", - "/", - "/@actions/github" + "name": "@octokit/core", + "description": "Extendable client for GitHub's REST & GraphQL APIs", + "version": "4.2.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.2.5.tgz", - "_shasum": "57becbd5fd789b0592b915840855f3a5f233d554", - "_spec": "@octokit/core", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone", - "bugs": { - "url": "https://github.com/octokit/core.js/issues" - }, - "bundleDependencies": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "github:octokit/core.js", "dependencies": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.4.12", - "@octokit/types": "^6.0.3", - "before-after-hook": "^2.1.0", + "@octokit/auth-token": "^3.0.0", + "@octokit/graphql": "^5.0.0", + "@octokit/request": "^6.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" }, - "deprecated": false, - "description": "Extendable client for GitHub's REST & GraphQL APIs", "devDependencies": { "@octokit/auth": "^3.0.1", - "@pika/pack": "^0.5.0", + "@pika/pack": "^0.3.7", "@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-web": "^0.9.0", "@pika/plugin-ts-standard-pkg": "^0.9.0", "@types/fetch-mock": "^7.3.1", - "@types/jest": "^26.0.0", + "@types/jest": "^29.0.0", "@types/lolex": "^5.1.0", - "@types/node": "^14.0.4", - "@types/node-fetch": "^2.5.0", + "@types/node": "^18.0.0", "fetch-mock": "^9.0.0", - "http-proxy-agent": "^4.0.1", - "jest": "^26.1.0", + "http-proxy-agent": "^5.0.0", + "jest": "^29.0.0", "lolex": "^6.0.0", - "prettier": "^2.0.4", + "prettier": "2.8.3", "proxy": "^1.0.1", - "semantic-release": "^17.0.0", + "semantic-release": "^20.0.0", "semantic-release-plugin-update-version-in-files": "^1.0.0", - "ts-jest": "^26.1.3", + "ts-jest": "^29.0.0", "typescript": "^4.0.2" }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/core.js#readme", - "keywords": [ - "octokit", - "github", - "api", - "sdk", - "toolkit" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/core", - "pika": true, + "engines": { + "node": ">= 14" + }, "publishConfig": { "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/core.js.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "3.2.5" + } } diff --git a/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/endpoint/dist-node/index.js index 4074d68..70f24ff 100644 --- a/node_modules/@octokit/endpoint/dist-node/index.js +++ b/node_modules/@octokit/endpoint/dist-node/index.js @@ -366,7 +366,7 @@ function withDefaults(oldDefaults, newDefaults) { }); } -const VERSION = "6.0.11"; +const VERSION = "6.0.12"; const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. // So we use RequestParameters and add method as additional required property. diff --git a/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/endpoint/dist-node/index.js.map index 0783c99..003e4f2 100644 --- a/node_modules/@octokit/endpoint/dist-node/index.js.map +++ b/node_modules/@octokit/endpoint/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"6.0.11\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","removeUndefinedProperties","obj","undefined","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequest","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;AAAO,SAASA,aAAT,CAAuBC,MAAvB,EAA+B;AAClC,MAAI,CAACA,MAAL,EAAa;AACT,WAAO,EAAP;AACH;;AACD,SAAOC,MAAM,CAACC,IAAP,CAAYF,MAAZ,EAAoBG,MAApB,CAA2B,CAACC,MAAD,EAASC,GAAT,KAAiB;AAC/CD,IAAAA,MAAM,CAACC,GAAG,CAACC,WAAJ,EAAD,CAAN,GAA4BN,MAAM,CAACK,GAAD,CAAlC;AACA,WAAOD,MAAP;AACH,GAHM,EAGJ,EAHI,CAAP;AAIH;;ACPM,SAASG,SAAT,CAAmBC,QAAnB,EAA6BC,OAA7B,EAAsC;AACzC,QAAMC,MAAM,GAAGT,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBH,QAAlB,CAAf;AACAP,EAAAA,MAAM,CAACC,IAAP,CAAYO,OAAZ,EAAqBG,OAArB,CAA8BP,GAAD,IAAS;AAClC,QAAIQ,2BAAa,CAACJ,OAAO,CAACJ,GAAD,CAAR,CAAjB,EAAiC;AAC7B,UAAI,EAAEA,GAAG,IAAIG,QAAT,CAAJ,EACIP,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;AAAE,SAACL,GAAD,GAAOI,OAAO,CAACJ,GAAD;AAAhB,OAAtB,EADJ,KAGIK,MAAM,CAACL,GAAD,CAAN,GAAcE,SAAS,CAACC,QAAQ,CAACH,GAAD,CAAT,EAAgBI,OAAO,CAACJ,GAAD,CAAvB,CAAvB;AACP,KALD,MAMK;AACDJ,MAAAA,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;AAAE,SAACL,GAAD,GAAOI,OAAO,CAACJ,GAAD;AAAhB,OAAtB;AACH;AACJ,GAVD;AAWA,SAAOK,MAAP;AACH;;ACfM,SAASI,yBAAT,CAAmCC,GAAnC,EAAwC;AAC3C,OAAK,MAAMV,GAAX,IAAkBU,GAAlB,EAAuB;AACnB,QAAIA,GAAG,CAACV,GAAD,CAAH,KAAaW,SAAjB,EAA4B;AACxB,aAAOD,GAAG,CAACV,GAAD,CAAV;AACH;AACJ;;AACD,SAAOU,GAAP;AACH;;ACJM,SAASE,KAAT,CAAeT,QAAf,EAAyBU,KAAzB,EAAgCT,OAAhC,EAAyC;AAC5C,MAAI,OAAOS,KAAP,KAAiB,QAArB,EAA+B;AAC3B,QAAI,CAACC,MAAD,EAASC,GAAT,IAAgBF,KAAK,CAACG,KAAN,CAAY,GAAZ,CAApB;AACAZ,IAAAA,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAcS,GAAG,GAAG;AAAED,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAH,GAAqB;AAAEA,MAAAA,GAAG,EAAED;AAAP,KAAtC,EAAuDV,OAAvD,CAAV;AACH,GAHD,MAIK;AACDA,IAAAA,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBO,KAAlB,CAAV;AACH,GAP2C;;;AAS5CT,EAAAA,OAAO,CAACa,OAAR,GAAkBvB,aAAa,CAACU,OAAO,CAACa,OAAT,CAA/B,CAT4C;;AAW5CR,EAAAA,yBAAyB,CAACL,OAAD,CAAzB;AACAK,EAAAA,yBAAyB,CAACL,OAAO,CAACa,OAAT,CAAzB;AACA,QAAMC,aAAa,GAAGhB,SAAS,CAACC,QAAQ,IAAI,EAAb,EAAiBC,OAAjB,CAA/B,CAb4C;;AAe5C,MAAID,QAAQ,IAAIA,QAAQ,CAACgB,SAAT,CAAmBC,QAAnB,CAA4BC,MAA5C,EAAoD;AAChDH,IAAAA,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCjB,QAAQ,CAACgB,SAAT,CAAmBC,QAAnB,CAC9BE,MAD8B,CACtBC,OAAD,IAAa,CAACL,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCI,QAAjC,CAA0CD,OAA1C,CADS,EAE9BE,MAF8B,CAEvBP,aAAa,CAACC,SAAd,CAAwBC,QAFD,CAAnC;AAGH;;AACDF,EAAAA,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCF,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCM,GAAjC,CAAsCH,OAAD,IAAaA,OAAO,CAACI,OAAR,CAAgB,UAAhB,EAA4B,EAA5B,CAAlD,CAAnC;AACA,SAAOT,aAAP;AACH;;ACzBM,SAASU,kBAAT,CAA4Bb,GAA5B,EAAiCc,UAAjC,EAA6C;AAChD,QAAMC,SAAS,GAAG,KAAKC,IAAL,CAAUhB,GAAV,IAAiB,GAAjB,GAAuB,GAAzC;AACA,QAAMiB,KAAK,GAAGpC,MAAM,CAACC,IAAP,CAAYgC,UAAZ,CAAd;;AACA,MAAIG,KAAK,CAACX,MAAN,KAAiB,CAArB,EAAwB;AACpB,WAAON,GAAP;AACH;;AACD,SAAQA,GAAG,GACPe,SADI,GAEJE,KAAK,CACAN,GADL,CACUO,IAAD,IAAU;AACf,QAAIA,IAAI,KAAK,GAAb,EAAkB;AACd,aAAQ,OAAOJ,UAAU,CAACK,CAAX,CAAalB,KAAb,CAAmB,GAAnB,EAAwBU,GAAxB,CAA4BS,kBAA5B,EAAgDC,IAAhD,CAAqD,GAArD,CAAf;AACH;;AACD,WAAQ,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAD,CAAX,CAAmB,EAAvD;AACH,GAND,EAOKG,IAPL,CAOU,GAPV,CAFJ;AAUH;;AChBD,MAAMC,gBAAgB,GAAG,YAAzB;;AACA,SAASC,cAAT,CAAwBC,YAAxB,EAAsC;AAClC,SAAOA,YAAY,CAACZ,OAAb,CAAqB,YAArB,EAAmC,EAAnC,EAAuCX,KAAvC,CAA6C,GAA7C,CAAP;AACH;;AACD,AAAO,SAASwB,uBAAT,CAAiCzB,GAAjC,EAAsC;AACzC,QAAM0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAJ,CAAUL,gBAAV,CAAhB;;AACA,MAAI,CAACI,OAAL,EAAc;AACV,WAAO,EAAP;AACH;;AACD,SAAOA,OAAO,CAACf,GAAR,CAAYY,cAAZ,EAA4BxC,MAA5B,CAAmC,CAAC6C,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAAClB,MAAF,CAASmB,CAAT,CAA7C,EAA0D,EAA1D,CAAP;AACH;;ACVM,SAASC,IAAT,CAAclD,MAAd,EAAsBmD,UAAtB,EAAkC;AACrC,SAAOlD,MAAM,CAACC,IAAP,CAAYF,MAAZ,EACF2B,MADE,CACMyB,MAAD,IAAY,CAACD,UAAU,CAACtB,QAAX,CAAoBuB,MAApB,CADlB,EAEFjD,MAFE,CAEK,CAACY,GAAD,EAAMV,GAAN,KAAc;AACtBU,IAAAA,GAAG,CAACV,GAAD,CAAH,GAAWL,MAAM,CAACK,GAAD,CAAjB;AACA,WAAOU,GAAP;AACH,GALM,EAKJ,EALI,CAAP;AAMH;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA,SAASsC,cAAT,CAAwBC,GAAxB,EAA6B;AACzB,SAAOA,GAAG,CACLjC,KADE,CACI,oBADJ,EAEFU,GAFE,CAEE,UAAUwB,IAAV,EAAgB;AACrB,QAAI,CAAC,eAAenB,IAAf,CAAoBmB,IAApB,CAAL,EAAgC;AAC5BA,MAAAA,IAAI,GAAGC,SAAS,CAACD,IAAD,CAAT,CAAgBvB,OAAhB,CAAwB,MAAxB,EAAgC,GAAhC,EAAqCA,OAArC,CAA6C,MAA7C,EAAqD,GAArD,CAAP;AACH;;AACD,WAAOuB,IAAP;AACH,GAPM,EAQFd,IARE,CAQG,EARH,CAAP;AASH;;AACD,SAASgB,gBAAT,CAA0BH,GAA1B,EAA+B;AAC3B,SAAOd,kBAAkB,CAACc,GAAD,CAAlB,CAAwBtB,OAAxB,CAAgC,UAAhC,EAA4C,UAAU0B,CAAV,EAAa;AAC5D,WAAO,MAAMA,CAAC,CAACC,UAAF,CAAa,CAAb,EAAgBC,QAAhB,CAAyB,EAAzB,EAA6BC,WAA7B,EAAb;AACH,GAFM,CAAP;AAGH;;AACD,SAASC,WAAT,CAAqBC,QAArB,EAA+BC,KAA/B,EAAsC3D,GAAtC,EAA2C;AACvC2D,EAAAA,KAAK,GACDD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,GACMV,cAAc,CAACW,KAAD,CADpB,GAEMP,gBAAgB,CAACO,KAAD,CAH1B;;AAIA,MAAI3D,GAAJ,EAAS;AACL,WAAOoD,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAAxB,GAA8B2D,KAArC;AACH,GAFD,MAGK;AACD,WAAOA,KAAP;AACH;AACJ;;AACD,SAASC,SAAT,CAAmBD,KAAnB,EAA0B;AACtB,SAAOA,KAAK,KAAKhD,SAAV,IAAuBgD,KAAK,KAAK,IAAxC;AACH;;AACD,SAASE,aAAT,CAAuBH,QAAvB,EAAiC;AAC7B,SAAOA,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,IAAwCA,QAAQ,KAAK,GAA5D;AACH;;AACD,SAASI,SAAT,CAAmBC,OAAnB,EAA4BL,QAA5B,EAAsC1D,GAAtC,EAA2CgE,QAA3C,EAAqD;AACjD,MAAIL,KAAK,GAAGI,OAAO,CAAC/D,GAAD,CAAnB;AAAA,MAA0BK,MAAM,GAAG,EAAnC;;AACA,MAAIuD,SAAS,CAACD,KAAD,CAAT,IAAoBA,KAAK,KAAK,EAAlC,EAAsC;AAClC,QAAI,OAAOA,KAAP,KAAiB,QAAjB,IACA,OAAOA,KAAP,KAAiB,QADjB,IAEA,OAAOA,KAAP,KAAiB,SAFrB,EAEgC;AAC5BA,MAAAA,KAAK,GAAGA,KAAK,CAACJ,QAAN,EAAR;;AACA,UAAIS,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;AAC9BL,QAAAA,KAAK,GAAGA,KAAK,CAACM,SAAN,CAAgB,CAAhB,EAAmBC,QAAQ,CAACF,QAAD,EAAW,EAAX,CAA3B,CAAR;AACH;;AACD3D,MAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBE,aAAa,CAACH,QAAD,CAAb,GAA0B1D,GAA1B,GAAgC,EAAlD,CAAvB;AACH,KARD,MASK;AACD,UAAIgE,QAAQ,KAAK,GAAjB,EAAsB;AAClB,YAAII,KAAK,CAACC,OAAN,CAAcV,KAAd,CAAJ,EAA0B;AACtBA,UAAAA,KAAK,CAACrC,MAAN,CAAasC,SAAb,EAAwBrD,OAAxB,CAAgC,UAAUoD,KAAV,EAAiB;AAC7CtD,YAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBE,aAAa,CAACH,QAAD,CAAb,GAA0B1D,GAA1B,GAAgC,EAAlD,CAAvB;AACH,WAFD;AAGH,SAJD,MAKK;AACDJ,UAAAA,MAAM,CAACC,IAAP,CAAY8D,KAAZ,EAAmBpD,OAAnB,CAA2B,UAAU+D,CAAV,EAAa;AACpC,gBAAIV,SAAS,CAACD,KAAK,CAACW,CAAD,CAAN,CAAb,EAAyB;AACrBjE,cAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACW,CAAD,CAAhB,EAAqBA,CAArB,CAAvB;AACH;AACJ,WAJD;AAKH;AACJ,OAbD,MAcK;AACD,cAAMC,GAAG,GAAG,EAAZ;;AACA,YAAIH,KAAK,CAACC,OAAN,CAAcV,KAAd,CAAJ,EAA0B;AACtBA,UAAAA,KAAK,CAACrC,MAAN,CAAasC,SAAb,EAAwBrD,OAAxB,CAAgC,UAAUoD,KAAV,EAAiB;AAC7CY,YAAAA,GAAG,CAACJ,IAAJ,CAASV,WAAW,CAACC,QAAD,EAAWC,KAAX,CAApB;AACH,WAFD;AAGH,SAJD,MAKK;AACD/D,UAAAA,MAAM,CAACC,IAAP,CAAY8D,KAAZ,EAAmBpD,OAAnB,CAA2B,UAAU+D,CAAV,EAAa;AACpC,gBAAIV,SAAS,CAACD,KAAK,CAACW,CAAD,CAAN,CAAb,EAAyB;AACrBC,cAAAA,GAAG,CAACJ,IAAJ,CAASf,gBAAgB,CAACkB,CAAD,CAAzB;AACAC,cAAAA,GAAG,CAACJ,IAAJ,CAASV,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACW,CAAD,CAAL,CAASf,QAAT,EAAX,CAApB;AACH;AACJ,WALD;AAMH;;AACD,YAAIM,aAAa,CAACH,QAAD,CAAjB,EAA6B;AACzBrD,UAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAAxB,GAA8BuE,GAAG,CAACnC,IAAJ,CAAS,GAAT,CAA1C;AACH,SAFD,MAGK,IAAImC,GAAG,CAAClD,MAAJ,KAAe,CAAnB,EAAsB;AACvBhB,UAAAA,MAAM,CAAC8D,IAAP,CAAYI,GAAG,CAACnC,IAAJ,CAAS,GAAT,CAAZ;AACH;AACJ;AACJ;AACJ,GAhDD,MAiDK;AACD,QAAIsB,QAAQ,KAAK,GAAjB,EAAsB;AAClB,UAAIE,SAAS,CAACD,KAAD,CAAb,EAAsB;AAClBtD,QAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAA5B;AACH;AACJ,KAJD,MAKK,IAAI2D,KAAK,KAAK,EAAV,KAAiBD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAlD,CAAJ,EAA4D;AAC7DrD,MAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAApC;AACH,KAFI,MAGA,IAAI2D,KAAK,KAAK,EAAd,EAAkB;AACnBtD,MAAAA,MAAM,CAAC8D,IAAP,CAAY,EAAZ;AACH;AACJ;;AACD,SAAO9D,MAAP;AACH;;AACD,AAAO,SAASmE,QAAT,CAAkBC,QAAlB,EAA4B;AAC/B,SAAO;AACHC,IAAAA,MAAM,EAAEA,MAAM,CAACC,IAAP,CAAY,IAAZ,EAAkBF,QAAlB;AADL,GAAP;AAGH;;AACD,SAASC,MAAT,CAAgBD,QAAhB,EAA0BV,OAA1B,EAAmC;AAC/B,MAAIa,SAAS,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,CAAhB;AACA,SAAOH,QAAQ,CAAC9C,OAAT,CAAiB,4BAAjB,EAA+C,UAAUkD,CAAV,EAAaC,UAAb,EAAyBC,OAAzB,EAAkC;AACpF,QAAID,UAAJ,EAAgB;AACZ,UAAIpB,QAAQ,GAAG,EAAf;AACA,YAAMsB,MAAM,GAAG,EAAf;;AACA,UAAIJ,SAAS,CAACK,OAAV,CAAkBH,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAlB,MAA4C,CAAC,CAAjD,EAAoD;AAChDxB,QAAAA,QAAQ,GAAGoB,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAX;AACAJ,QAAAA,UAAU,GAAGA,UAAU,CAACK,MAAX,CAAkB,CAAlB,CAAb;AACH;;AACDL,MAAAA,UAAU,CAAC9D,KAAX,CAAiB,IAAjB,EAAuBT,OAAvB,CAA+B,UAAU6E,QAAV,EAAoB;AAC/C,YAAIb,GAAG,GAAG,4BAA4Bc,IAA5B,CAAiCD,QAAjC,CAAV;AACAJ,QAAAA,MAAM,CAACb,IAAP,CAAYL,SAAS,CAACC,OAAD,EAAUL,QAAV,EAAoBa,GAAG,CAAC,CAAD,CAAvB,EAA4BA,GAAG,CAAC,CAAD,CAAH,IAAUA,GAAG,CAAC,CAAD,CAAzC,CAArB;AACH,OAHD;;AAIA,UAAIb,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;AAC9B,YAAI5B,SAAS,GAAG,GAAhB;;AACA,YAAI4B,QAAQ,KAAK,GAAjB,EAAsB;AAClB5B,UAAAA,SAAS,GAAG,GAAZ;AACH,SAFD,MAGK,IAAI4B,QAAQ,KAAK,GAAjB,EAAsB;AACvB5B,UAAAA,SAAS,GAAG4B,QAAZ;AACH;;AACD,eAAO,CAACsB,MAAM,CAAC3D,MAAP,KAAkB,CAAlB,GAAsBqC,QAAtB,GAAiC,EAAlC,IAAwCsB,MAAM,CAAC5C,IAAP,CAAYN,SAAZ,CAA/C;AACH,OATD,MAUK;AACD,eAAOkD,MAAM,CAAC5C,IAAP,CAAY,GAAZ,CAAP;AACH;AACJ,KAxBD,MAyBK;AACD,aAAOY,cAAc,CAAC+B,OAAD,CAArB;AACH;AACJ,GA7BM,CAAP;AA8BH;;AC/JM,SAASO,KAAT,CAAelF,OAAf,EAAwB;AAC3B;AACA,MAAIU,MAAM,GAAGV,OAAO,CAACU,MAAR,CAAe0C,WAAf,EAAb,CAF2B;;AAI3B,MAAIzC,GAAG,GAAG,CAACX,OAAO,CAACW,GAAR,IAAe,GAAhB,EAAqBY,OAArB,CAA6B,cAA7B,EAA6C,MAA7C,CAAV;AACA,MAAIV,OAAO,GAAGrB,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBF,OAAO,CAACa,OAA1B,CAAd;AACA,MAAIsE,IAAJ;AACA,MAAI1D,UAAU,GAAGgB,IAAI,CAACzC,OAAD,EAAU,CAC3B,QAD2B,EAE3B,SAF2B,EAG3B,KAH2B,EAI3B,SAJ2B,EAK3B,SAL2B,EAM3B,WAN2B,CAAV,CAArB,CAP2B;;AAgB3B,QAAMoF,gBAAgB,GAAGhD,uBAAuB,CAACzB,GAAD,CAAhD;AACAA,EAAAA,GAAG,GAAGyD,QAAQ,CAACzD,GAAD,CAAR,CAAc2D,MAAd,CAAqB7C,UAArB,CAAN;;AACA,MAAI,CAAC,QAAQE,IAAR,CAAahB,GAAb,CAAL,EAAwB;AACpBA,IAAAA,GAAG,GAAGX,OAAO,CAACqF,OAAR,GAAkB1E,GAAxB;AACH;;AACD,QAAM2E,iBAAiB,GAAG9F,MAAM,CAACC,IAAP,CAAYO,OAAZ,EACrBkB,MADqB,CACbyB,MAAD,IAAYyC,gBAAgB,CAAChE,QAAjB,CAA0BuB,MAA1B,CADE,EAErBtB,MAFqB,CAEd,SAFc,CAA1B;AAGA,QAAMkE,mBAAmB,GAAG9C,IAAI,CAAChB,UAAD,EAAa6D,iBAAb,CAAhC;AACA,QAAME,eAAe,GAAG,6BAA6B7D,IAA7B,CAAkCd,OAAO,CAAC4E,MAA1C,CAAxB;;AACA,MAAI,CAACD,eAAL,EAAsB;AAClB,QAAIxF,OAAO,CAACe,SAAR,CAAkB2E,MAAtB,EAA8B;AAC1B;AACA7E,MAAAA,OAAO,CAAC4E,MAAR,GAAiB5E,OAAO,CAAC4E,MAAR,CACZ7E,KADY,CACN,GADM,EAEZU,GAFY,CAEPH,OAAD,IAAaA,OAAO,CAACI,OAAR,CAAgB,kDAAhB,EAAqE,uBAAsBvB,OAAO,CAACe,SAAR,CAAkB2E,MAAO,EAApH,CAFL,EAGZ1D,IAHY,CAGP,GAHO,CAAjB;AAIH;;AACD,QAAIhC,OAAO,CAACe,SAAR,CAAkBC,QAAlB,CAA2BC,MAA/B,EAAuC;AACnC,YAAM0E,wBAAwB,GAAG9E,OAAO,CAAC4E,MAAR,CAAenD,KAAf,CAAqB,qBAArB,KAA+C,EAAhF;AACAzB,MAAAA,OAAO,CAAC4E,MAAR,GAAiBE,wBAAwB,CACpCtE,MADY,CACLrB,OAAO,CAACe,SAAR,CAAkBC,QADb,EAEZM,GAFY,CAEPH,OAAD,IAAa;AAClB,cAAMuE,MAAM,GAAG1F,OAAO,CAACe,SAAR,CAAkB2E,MAAlB,GACR,IAAG1F,OAAO,CAACe,SAAR,CAAkB2E,MAAO,EADpB,GAET,OAFN;AAGA,eAAQ,0BAAyBvE,OAAQ,WAAUuE,MAAO,EAA1D;AACH,OAPgB,EAQZ1D,IARY,CAQP,GARO,CAAjB;AASH;AACJ,GA9C0B;AAgD3B;;;AACA,MAAI,CAAC,KAAD,EAAQ,MAAR,EAAgBZ,QAAhB,CAAyBV,MAAzB,CAAJ,EAAsC;AAClCC,IAAAA,GAAG,GAAGa,kBAAkB,CAACb,GAAD,EAAM4E,mBAAN,CAAxB;AACH,GAFD,MAGK;AACD,QAAI,UAAUA,mBAAd,EAAmC;AAC/BJ,MAAAA,IAAI,GAAGI,mBAAmB,CAACK,IAA3B;AACH,KAFD,MAGK;AACD,UAAIpG,MAAM,CAACC,IAAP,CAAY8F,mBAAZ,EAAiCtE,MAArC,EAA6C;AACzCkE,QAAAA,IAAI,GAAGI,mBAAP;AACH,OAFD,MAGK;AACD1E,QAAAA,OAAO,CAAC,gBAAD,CAAP,GAA4B,CAA5B;AACH;AACJ;AACJ,GAhE0B;;;AAkE3B,MAAI,CAACA,OAAO,CAAC,cAAD,CAAR,IAA4B,OAAOsE,IAAP,KAAgB,WAAhD,EAA6D;AACzDtE,IAAAA,OAAO,CAAC,cAAD,CAAP,GAA0B,iCAA1B;AACH,GApE0B;AAsE3B;;;AACA,MAAI,CAAC,OAAD,EAAU,KAAV,EAAiBO,QAAjB,CAA0BV,MAA1B,KAAqC,OAAOyE,IAAP,KAAgB,WAAzD,EAAsE;AAClEA,IAAAA,IAAI,GAAG,EAAP;AACH,GAzE0B;;;AA2E3B,SAAO3F,MAAM,CAACU,MAAP,CAAc;AAAEQ,IAAAA,MAAF;AAAUC,IAAAA,GAAV;AAAeE,IAAAA;AAAf,GAAd,EAAwC,OAAOsE,IAAP,KAAgB,WAAhB,GAA8B;AAAEA,IAAAA;AAAF,GAA9B,GAAyC,IAAjF,EAAuFnF,OAAO,CAAC6F,OAAR,GAAkB;AAAEA,IAAAA,OAAO,EAAE7F,OAAO,CAAC6F;AAAnB,GAAlB,GAAiD,IAAxI,CAAP;AACH;;AC9EM,SAASC,oBAAT,CAA8B/F,QAA9B,EAAwCU,KAAxC,EAA+CT,OAA/C,EAAwD;AAC3D,SAAOkF,KAAK,CAAC1E,KAAK,CAACT,QAAD,EAAWU,KAAX,EAAkBT,OAAlB,CAAN,CAAZ;AACH;;ACDM,SAAS+F,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;AACnD,QAAMC,QAAQ,GAAG1F,KAAK,CAACwF,WAAD,EAAcC,WAAd,CAAtB;AACA,QAAME,QAAQ,GAAGL,oBAAoB,CAACvB,IAArB,CAA0B,IAA1B,EAAgC2B,QAAhC,CAAjB;AACA,SAAO1G,MAAM,CAACU,MAAP,CAAciG,QAAd,EAAwB;AAC3BD,IAAAA,QAD2B;AAE3BnG,IAAAA,QAAQ,EAAEgG,YAAY,CAACxB,IAAb,CAAkB,IAAlB,EAAwB2B,QAAxB,CAFiB;AAG3B1F,IAAAA,KAAK,EAAEA,KAAK,CAAC+D,IAAN,CAAW,IAAX,EAAiB2B,QAAjB,CAHoB;AAI3BhB,IAAAA;AAJ2B,GAAxB,CAAP;AAMH;;ACZM,MAAMkB,OAAO,GAAG,mBAAhB;;ACEP,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAnE;AAEA;;AACA,AAAO,MAAMJ,QAAQ,GAAG;AACpBxF,EAAAA,MAAM,EAAE,KADY;AAEpB2E,EAAAA,OAAO,EAAE,wBAFW;AAGpBxE,EAAAA,OAAO,EAAE;AACL4E,IAAAA,MAAM,EAAE,gCADH;AAEL,kBAAcY;AAFT,GAHW;AAOpBtF,EAAAA,SAAS,EAAE;AACP2E,IAAAA,MAAM,EAAE,EADD;AAEP1E,IAAAA,QAAQ,EAAE;AAFH;AAPS,CAAjB;;MCHMmF,QAAQ,GAAGJ,YAAY,CAAC,IAAD,EAAOG,QAAP,CAA7B;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"6.0.12\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","removeUndefinedProperties","obj","undefined","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequest","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;AAAO,SAASA,aAAT,CAAuBC,MAAvB,EAA+B;AAClC,MAAI,CAACA,MAAL,EAAa;AACT,WAAO,EAAP;AACH;;AACD,SAAOC,MAAM,CAACC,IAAP,CAAYF,MAAZ,EAAoBG,MAApB,CAA2B,CAACC,MAAD,EAASC,GAAT,KAAiB;AAC/CD,IAAAA,MAAM,CAACC,GAAG,CAACC,WAAJ,EAAD,CAAN,GAA4BN,MAAM,CAACK,GAAD,CAAlC;AACA,WAAOD,MAAP;AACH,GAHM,EAGJ,EAHI,CAAP;AAIH;;ACPM,SAASG,SAAT,CAAmBC,QAAnB,EAA6BC,OAA7B,EAAsC;AACzC,QAAMC,MAAM,GAAGT,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBH,QAAlB,CAAf;AACAP,EAAAA,MAAM,CAACC,IAAP,CAAYO,OAAZ,EAAqBG,OAArB,CAA8BP,GAAD,IAAS;AAClC,QAAIQ,2BAAa,CAACJ,OAAO,CAACJ,GAAD,CAAR,CAAjB,EAAiC;AAC7B,UAAI,EAAEA,GAAG,IAAIG,QAAT,CAAJ,EACIP,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;AAAE,SAACL,GAAD,GAAOI,OAAO,CAACJ,GAAD;AAAhB,OAAtB,EADJ,KAGIK,MAAM,CAACL,GAAD,CAAN,GAAcE,SAAS,CAACC,QAAQ,CAACH,GAAD,CAAT,EAAgBI,OAAO,CAACJ,GAAD,CAAvB,CAAvB;AACP,KALD,MAMK;AACDJ,MAAAA,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;AAAE,SAACL,GAAD,GAAOI,OAAO,CAACJ,GAAD;AAAhB,OAAtB;AACH;AACJ,GAVD;AAWA,SAAOK,MAAP;AACH;;ACfM,SAASI,yBAAT,CAAmCC,GAAnC,EAAwC;AAC3C,OAAK,MAAMV,GAAX,IAAkBU,GAAlB,EAAuB;AACnB,QAAIA,GAAG,CAACV,GAAD,CAAH,KAAaW,SAAjB,EAA4B;AACxB,aAAOD,GAAG,CAACV,GAAD,CAAV;AACH;AACJ;;AACD,SAAOU,GAAP;AACH;;ACJM,SAASE,KAAT,CAAeT,QAAf,EAAyBU,KAAzB,EAAgCT,OAAhC,EAAyC;AAC5C,MAAI,OAAOS,KAAP,KAAiB,QAArB,EAA+B;AAC3B,QAAI,CAACC,MAAD,EAASC,GAAT,IAAgBF,KAAK,CAACG,KAAN,CAAY,GAAZ,CAApB;AACAZ,IAAAA,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAcS,GAAG,GAAG;AAAED,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAH,GAAqB;AAAEA,MAAAA,GAAG,EAAED;AAAP,KAAtC,EAAuDV,OAAvD,CAAV;AACH,GAHD,MAIK;AACDA,IAAAA,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBO,KAAlB,CAAV;AACH,GAP2C;;;AAS5CT,EAAAA,OAAO,CAACa,OAAR,GAAkBvB,aAAa,CAACU,OAAO,CAACa,OAAT,CAA/B,CAT4C;;AAW5CR,EAAAA,yBAAyB,CAACL,OAAD,CAAzB;AACAK,EAAAA,yBAAyB,CAACL,OAAO,CAACa,OAAT,CAAzB;AACA,QAAMC,aAAa,GAAGhB,SAAS,CAACC,QAAQ,IAAI,EAAb,EAAiBC,OAAjB,CAA/B,CAb4C;;AAe5C,MAAID,QAAQ,IAAIA,QAAQ,CAACgB,SAAT,CAAmBC,QAAnB,CAA4BC,MAA5C,EAAoD;AAChDH,IAAAA,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCjB,QAAQ,CAACgB,SAAT,CAAmBC,QAAnB,CAC9BE,MAD8B,CACtBC,OAAD,IAAa,CAACL,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCI,QAAjC,CAA0CD,OAA1C,CADS,EAE9BE,MAF8B,CAEvBP,aAAa,CAACC,SAAd,CAAwBC,QAFD,CAAnC;AAGH;;AACDF,EAAAA,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCF,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCM,GAAjC,CAAsCH,OAAD,IAAaA,OAAO,CAACI,OAAR,CAAgB,UAAhB,EAA4B,EAA5B,CAAlD,CAAnC;AACA,SAAOT,aAAP;AACH;;ACzBM,SAASU,kBAAT,CAA4Bb,GAA5B,EAAiCc,UAAjC,EAA6C;AAChD,QAAMC,SAAS,GAAG,KAAKC,IAAL,CAAUhB,GAAV,IAAiB,GAAjB,GAAuB,GAAzC;AACA,QAAMiB,KAAK,GAAGpC,MAAM,CAACC,IAAP,CAAYgC,UAAZ,CAAd;;AACA,MAAIG,KAAK,CAACX,MAAN,KAAiB,CAArB,EAAwB;AACpB,WAAON,GAAP;AACH;;AACD,SAAQA,GAAG,GACPe,SADI,GAEJE,KAAK,CACAN,GADL,CACUO,IAAD,IAAU;AACf,QAAIA,IAAI,KAAK,GAAb,EAAkB;AACd,aAAQ,OAAOJ,UAAU,CAACK,CAAX,CAAalB,KAAb,CAAmB,GAAnB,EAAwBU,GAAxB,CAA4BS,kBAA5B,EAAgDC,IAAhD,CAAqD,GAArD,CAAf;AACH;;AACD,WAAQ,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAD,CAAX,CAAmB,EAAvD;AACH,GAND,EAOKG,IAPL,CAOU,GAPV,CAFJ;AAUH;;AChBD,MAAMC,gBAAgB,GAAG,YAAzB;;AACA,SAASC,cAAT,CAAwBC,YAAxB,EAAsC;AAClC,SAAOA,YAAY,CAACZ,OAAb,CAAqB,YAArB,EAAmC,EAAnC,EAAuCX,KAAvC,CAA6C,GAA7C,CAAP;AACH;;AACD,AAAO,SAASwB,uBAAT,CAAiCzB,GAAjC,EAAsC;AACzC,QAAM0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAJ,CAAUL,gBAAV,CAAhB;;AACA,MAAI,CAACI,OAAL,EAAc;AACV,WAAO,EAAP;AACH;;AACD,SAAOA,OAAO,CAACf,GAAR,CAAYY,cAAZ,EAA4BxC,MAA5B,CAAmC,CAAC6C,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAAClB,MAAF,CAASmB,CAAT,CAA7C,EAA0D,EAA1D,CAAP;AACH;;ACVM,SAASC,IAAT,CAAclD,MAAd,EAAsBmD,UAAtB,EAAkC;AACrC,SAAOlD,MAAM,CAACC,IAAP,CAAYF,MAAZ,EACF2B,MADE,CACMyB,MAAD,IAAY,CAACD,UAAU,CAACtB,QAAX,CAAoBuB,MAApB,CADlB,EAEFjD,MAFE,CAEK,CAACY,GAAD,EAAMV,GAAN,KAAc;AACtBU,IAAAA,GAAG,CAACV,GAAD,CAAH,GAAWL,MAAM,CAACK,GAAD,CAAjB;AACA,WAAOU,GAAP;AACH,GALM,EAKJ,EALI,CAAP;AAMH;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA,SAASsC,cAAT,CAAwBC,GAAxB,EAA6B;AACzB,SAAOA,GAAG,CACLjC,KADE,CACI,oBADJ,EAEFU,GAFE,CAEE,UAAUwB,IAAV,EAAgB;AACrB,QAAI,CAAC,eAAenB,IAAf,CAAoBmB,IAApB,CAAL,EAAgC;AAC5BA,MAAAA,IAAI,GAAGC,SAAS,CAACD,IAAD,CAAT,CAAgBvB,OAAhB,CAAwB,MAAxB,EAAgC,GAAhC,EAAqCA,OAArC,CAA6C,MAA7C,EAAqD,GAArD,CAAP;AACH;;AACD,WAAOuB,IAAP;AACH,GAPM,EAQFd,IARE,CAQG,EARH,CAAP;AASH;;AACD,SAASgB,gBAAT,CAA0BH,GAA1B,EAA+B;AAC3B,SAAOd,kBAAkB,CAACc,GAAD,CAAlB,CAAwBtB,OAAxB,CAAgC,UAAhC,EAA4C,UAAU0B,CAAV,EAAa;AAC5D,WAAO,MAAMA,CAAC,CAACC,UAAF,CAAa,CAAb,EAAgBC,QAAhB,CAAyB,EAAzB,EAA6BC,WAA7B,EAAb;AACH,GAFM,CAAP;AAGH;;AACD,SAASC,WAAT,CAAqBC,QAArB,EAA+BC,KAA/B,EAAsC3D,GAAtC,EAA2C;AACvC2D,EAAAA,KAAK,GACDD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,GACMV,cAAc,CAACW,KAAD,CADpB,GAEMP,gBAAgB,CAACO,KAAD,CAH1B;;AAIA,MAAI3D,GAAJ,EAAS;AACL,WAAOoD,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAAxB,GAA8B2D,KAArC;AACH,GAFD,MAGK;AACD,WAAOA,KAAP;AACH;AACJ;;AACD,SAASC,SAAT,CAAmBD,KAAnB,EAA0B;AACtB,SAAOA,KAAK,KAAKhD,SAAV,IAAuBgD,KAAK,KAAK,IAAxC;AACH;;AACD,SAASE,aAAT,CAAuBH,QAAvB,EAAiC;AAC7B,SAAOA,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,IAAwCA,QAAQ,KAAK,GAA5D;AACH;;AACD,SAASI,SAAT,CAAmBC,OAAnB,EAA4BL,QAA5B,EAAsC1D,GAAtC,EAA2CgE,QAA3C,EAAqD;AACjD,MAAIL,KAAK,GAAGI,OAAO,CAAC/D,GAAD,CAAnB;AAAA,MAA0BK,MAAM,GAAG,EAAnC;;AACA,MAAIuD,SAAS,CAACD,KAAD,CAAT,IAAoBA,KAAK,KAAK,EAAlC,EAAsC;AAClC,QAAI,OAAOA,KAAP,KAAiB,QAAjB,IACA,OAAOA,KAAP,KAAiB,QADjB,IAEA,OAAOA,KAAP,KAAiB,SAFrB,EAEgC;AAC5BA,MAAAA,KAAK,GAAGA,KAAK,CAACJ,QAAN,EAAR;;AACA,UAAIS,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;AAC9BL,QAAAA,KAAK,GAAGA,KAAK,CAACM,SAAN,CAAgB,CAAhB,EAAmBC,QAAQ,CAACF,QAAD,EAAW,EAAX,CAA3B,CAAR;AACH;;AACD3D,MAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBE,aAAa,CAACH,QAAD,CAAb,GAA0B1D,GAA1B,GAAgC,EAAlD,CAAvB;AACH,KARD,MASK;AACD,UAAIgE,QAAQ,KAAK,GAAjB,EAAsB;AAClB,YAAII,KAAK,CAACC,OAAN,CAAcV,KAAd,CAAJ,EAA0B;AACtBA,UAAAA,KAAK,CAACrC,MAAN,CAAasC,SAAb,EAAwBrD,OAAxB,CAAgC,UAAUoD,KAAV,EAAiB;AAC7CtD,YAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBE,aAAa,CAACH,QAAD,CAAb,GAA0B1D,GAA1B,GAAgC,EAAlD,CAAvB;AACH,WAFD;AAGH,SAJD,MAKK;AACDJ,UAAAA,MAAM,CAACC,IAAP,CAAY8D,KAAZ,EAAmBpD,OAAnB,CAA2B,UAAU+D,CAAV,EAAa;AACpC,gBAAIV,SAAS,CAACD,KAAK,CAACW,CAAD,CAAN,CAAb,EAAyB;AACrBjE,cAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACW,CAAD,CAAhB,EAAqBA,CAArB,CAAvB;AACH;AACJ,WAJD;AAKH;AACJ,OAbD,MAcK;AACD,cAAMC,GAAG,GAAG,EAAZ;;AACA,YAAIH,KAAK,CAACC,OAAN,CAAcV,KAAd,CAAJ,EAA0B;AACtBA,UAAAA,KAAK,CAACrC,MAAN,CAAasC,SAAb,EAAwBrD,OAAxB,CAAgC,UAAUoD,KAAV,EAAiB;AAC7CY,YAAAA,GAAG,CAACJ,IAAJ,CAASV,WAAW,CAACC,QAAD,EAAWC,KAAX,CAApB;AACH,WAFD;AAGH,SAJD,MAKK;AACD/D,UAAAA,MAAM,CAACC,IAAP,CAAY8D,KAAZ,EAAmBpD,OAAnB,CAA2B,UAAU+D,CAAV,EAAa;AACpC,gBAAIV,SAAS,CAACD,KAAK,CAACW,CAAD,CAAN,CAAb,EAAyB;AACrBC,cAAAA,GAAG,CAACJ,IAAJ,CAASf,gBAAgB,CAACkB,CAAD,CAAzB;AACAC,cAAAA,GAAG,CAACJ,IAAJ,CAASV,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACW,CAAD,CAAL,CAASf,QAAT,EAAX,CAApB;AACH;AACJ,WALD;AAMH;;AACD,YAAIM,aAAa,CAACH,QAAD,CAAjB,EAA6B;AACzBrD,UAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAAxB,GAA8BuE,GAAG,CAACnC,IAAJ,CAAS,GAAT,CAA1C;AACH,SAFD,MAGK,IAAImC,GAAG,CAAClD,MAAJ,KAAe,CAAnB,EAAsB;AACvBhB,UAAAA,MAAM,CAAC8D,IAAP,CAAYI,GAAG,CAACnC,IAAJ,CAAS,GAAT,CAAZ;AACH;AACJ;AACJ;AACJ,GAhDD,MAiDK;AACD,QAAIsB,QAAQ,KAAK,GAAjB,EAAsB;AAClB,UAAIE,SAAS,CAACD,KAAD,CAAb,EAAsB;AAClBtD,QAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAA5B;AACH;AACJ,KAJD,MAKK,IAAI2D,KAAK,KAAK,EAAV,KAAiBD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAlD,CAAJ,EAA4D;AAC7DrD,MAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAApC;AACH,KAFI,MAGA,IAAI2D,KAAK,KAAK,EAAd,EAAkB;AACnBtD,MAAAA,MAAM,CAAC8D,IAAP,CAAY,EAAZ;AACH;AACJ;;AACD,SAAO9D,MAAP;AACH;;AACD,AAAO,SAASmE,QAAT,CAAkBC,QAAlB,EAA4B;AAC/B,SAAO;AACHC,IAAAA,MAAM,EAAEA,MAAM,CAACC,IAAP,CAAY,IAAZ,EAAkBF,QAAlB;AADL,GAAP;AAGH;;AACD,SAASC,MAAT,CAAgBD,QAAhB,EAA0BV,OAA1B,EAAmC;AAC/B,MAAIa,SAAS,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,CAAhB;AACA,SAAOH,QAAQ,CAAC9C,OAAT,CAAiB,4BAAjB,EAA+C,UAAUkD,CAAV,EAAaC,UAAb,EAAyBC,OAAzB,EAAkC;AACpF,QAAID,UAAJ,EAAgB;AACZ,UAAIpB,QAAQ,GAAG,EAAf;AACA,YAAMsB,MAAM,GAAG,EAAf;;AACA,UAAIJ,SAAS,CAACK,OAAV,CAAkBH,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAlB,MAA4C,CAAC,CAAjD,EAAoD;AAChDxB,QAAAA,QAAQ,GAAGoB,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAX;AACAJ,QAAAA,UAAU,GAAGA,UAAU,CAACK,MAAX,CAAkB,CAAlB,CAAb;AACH;;AACDL,MAAAA,UAAU,CAAC9D,KAAX,CAAiB,IAAjB,EAAuBT,OAAvB,CAA+B,UAAU6E,QAAV,EAAoB;AAC/C,YAAIb,GAAG,GAAG,4BAA4Bc,IAA5B,CAAiCD,QAAjC,CAAV;AACAJ,QAAAA,MAAM,CAACb,IAAP,CAAYL,SAAS,CAACC,OAAD,EAAUL,QAAV,EAAoBa,GAAG,CAAC,CAAD,CAAvB,EAA4BA,GAAG,CAAC,CAAD,CAAH,IAAUA,GAAG,CAAC,CAAD,CAAzC,CAArB;AACH,OAHD;;AAIA,UAAIb,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;AAC9B,YAAI5B,SAAS,GAAG,GAAhB;;AACA,YAAI4B,QAAQ,KAAK,GAAjB,EAAsB;AAClB5B,UAAAA,SAAS,GAAG,GAAZ;AACH,SAFD,MAGK,IAAI4B,QAAQ,KAAK,GAAjB,EAAsB;AACvB5B,UAAAA,SAAS,GAAG4B,QAAZ;AACH;;AACD,eAAO,CAACsB,MAAM,CAAC3D,MAAP,KAAkB,CAAlB,GAAsBqC,QAAtB,GAAiC,EAAlC,IAAwCsB,MAAM,CAAC5C,IAAP,CAAYN,SAAZ,CAA/C;AACH,OATD,MAUK;AACD,eAAOkD,MAAM,CAAC5C,IAAP,CAAY,GAAZ,CAAP;AACH;AACJ,KAxBD,MAyBK;AACD,aAAOY,cAAc,CAAC+B,OAAD,CAArB;AACH;AACJ,GA7BM,CAAP;AA8BH;;AC/JM,SAASO,KAAT,CAAelF,OAAf,EAAwB;AAC3B;AACA,MAAIU,MAAM,GAAGV,OAAO,CAACU,MAAR,CAAe0C,WAAf,EAAb,CAF2B;;AAI3B,MAAIzC,GAAG,GAAG,CAACX,OAAO,CAACW,GAAR,IAAe,GAAhB,EAAqBY,OAArB,CAA6B,cAA7B,EAA6C,MAA7C,CAAV;AACA,MAAIV,OAAO,GAAGrB,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBF,OAAO,CAACa,OAA1B,CAAd;AACA,MAAIsE,IAAJ;AACA,MAAI1D,UAAU,GAAGgB,IAAI,CAACzC,OAAD,EAAU,CAC3B,QAD2B,EAE3B,SAF2B,EAG3B,KAH2B,EAI3B,SAJ2B,EAK3B,SAL2B,EAM3B,WAN2B,CAAV,CAArB,CAP2B;;AAgB3B,QAAMoF,gBAAgB,GAAGhD,uBAAuB,CAACzB,GAAD,CAAhD;AACAA,EAAAA,GAAG,GAAGyD,QAAQ,CAACzD,GAAD,CAAR,CAAc2D,MAAd,CAAqB7C,UAArB,CAAN;;AACA,MAAI,CAAC,QAAQE,IAAR,CAAahB,GAAb,CAAL,EAAwB;AACpBA,IAAAA,GAAG,GAAGX,OAAO,CAACqF,OAAR,GAAkB1E,GAAxB;AACH;;AACD,QAAM2E,iBAAiB,GAAG9F,MAAM,CAACC,IAAP,CAAYO,OAAZ,EACrBkB,MADqB,CACbyB,MAAD,IAAYyC,gBAAgB,CAAChE,QAAjB,CAA0BuB,MAA1B,CADE,EAErBtB,MAFqB,CAEd,SAFc,CAA1B;AAGA,QAAMkE,mBAAmB,GAAG9C,IAAI,CAAChB,UAAD,EAAa6D,iBAAb,CAAhC;AACA,QAAME,eAAe,GAAG,6BAA6B7D,IAA7B,CAAkCd,OAAO,CAAC4E,MAA1C,CAAxB;;AACA,MAAI,CAACD,eAAL,EAAsB;AAClB,QAAIxF,OAAO,CAACe,SAAR,CAAkB2E,MAAtB,EAA8B;AAC1B;AACA7E,MAAAA,OAAO,CAAC4E,MAAR,GAAiB5E,OAAO,CAAC4E,MAAR,CACZ7E,KADY,CACN,GADM,EAEZU,GAFY,CAEPH,OAAD,IAAaA,OAAO,CAACI,OAAR,CAAgB,kDAAhB,EAAqE,uBAAsBvB,OAAO,CAACe,SAAR,CAAkB2E,MAAO,EAApH,CAFL,EAGZ1D,IAHY,CAGP,GAHO,CAAjB;AAIH;;AACD,QAAIhC,OAAO,CAACe,SAAR,CAAkBC,QAAlB,CAA2BC,MAA/B,EAAuC;AACnC,YAAM0E,wBAAwB,GAAG9E,OAAO,CAAC4E,MAAR,CAAenD,KAAf,CAAqB,qBAArB,KAA+C,EAAhF;AACAzB,MAAAA,OAAO,CAAC4E,MAAR,GAAiBE,wBAAwB,CACpCtE,MADY,CACLrB,OAAO,CAACe,SAAR,CAAkBC,QADb,EAEZM,GAFY,CAEPH,OAAD,IAAa;AAClB,cAAMuE,MAAM,GAAG1F,OAAO,CAACe,SAAR,CAAkB2E,MAAlB,GACR,IAAG1F,OAAO,CAACe,SAAR,CAAkB2E,MAAO,EADpB,GAET,OAFN;AAGA,eAAQ,0BAAyBvE,OAAQ,WAAUuE,MAAO,EAA1D;AACH,OAPgB,EAQZ1D,IARY,CAQP,GARO,CAAjB;AASH;AACJ,GA9C0B;AAgD3B;;;AACA,MAAI,CAAC,KAAD,EAAQ,MAAR,EAAgBZ,QAAhB,CAAyBV,MAAzB,CAAJ,EAAsC;AAClCC,IAAAA,GAAG,GAAGa,kBAAkB,CAACb,GAAD,EAAM4E,mBAAN,CAAxB;AACH,GAFD,MAGK;AACD,QAAI,UAAUA,mBAAd,EAAmC;AAC/BJ,MAAAA,IAAI,GAAGI,mBAAmB,CAACK,IAA3B;AACH,KAFD,MAGK;AACD,UAAIpG,MAAM,CAACC,IAAP,CAAY8F,mBAAZ,EAAiCtE,MAArC,EAA6C;AACzCkE,QAAAA,IAAI,GAAGI,mBAAP;AACH,OAFD,MAGK;AACD1E,QAAAA,OAAO,CAAC,gBAAD,CAAP,GAA4B,CAA5B;AACH;AACJ;AACJ,GAhE0B;;;AAkE3B,MAAI,CAACA,OAAO,CAAC,cAAD,CAAR,IAA4B,OAAOsE,IAAP,KAAgB,WAAhD,EAA6D;AACzDtE,IAAAA,OAAO,CAAC,cAAD,CAAP,GAA0B,iCAA1B;AACH,GApE0B;AAsE3B;;;AACA,MAAI,CAAC,OAAD,EAAU,KAAV,EAAiBO,QAAjB,CAA0BV,MAA1B,KAAqC,OAAOyE,IAAP,KAAgB,WAAzD,EAAsE;AAClEA,IAAAA,IAAI,GAAG,EAAP;AACH,GAzE0B;;;AA2E3B,SAAO3F,MAAM,CAACU,MAAP,CAAc;AAAEQ,IAAAA,MAAF;AAAUC,IAAAA,GAAV;AAAeE,IAAAA;AAAf,GAAd,EAAwC,OAAOsE,IAAP,KAAgB,WAAhB,GAA8B;AAAEA,IAAAA;AAAF,GAA9B,GAAyC,IAAjF,EAAuFnF,OAAO,CAAC6F,OAAR,GAAkB;AAAEA,IAAAA,OAAO,EAAE7F,OAAO,CAAC6F;AAAnB,GAAlB,GAAiD,IAAxI,CAAP;AACH;;AC9EM,SAASC,oBAAT,CAA8B/F,QAA9B,EAAwCU,KAAxC,EAA+CT,OAA/C,EAAwD;AAC3D,SAAOkF,KAAK,CAAC1E,KAAK,CAACT,QAAD,EAAWU,KAAX,EAAkBT,OAAlB,CAAN,CAAZ;AACH;;ACDM,SAAS+F,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;AACnD,QAAMC,QAAQ,GAAG1F,KAAK,CAACwF,WAAD,EAAcC,WAAd,CAAtB;AACA,QAAME,QAAQ,GAAGL,oBAAoB,CAACvB,IAArB,CAA0B,IAA1B,EAAgC2B,QAAhC,CAAjB;AACA,SAAO1G,MAAM,CAACU,MAAP,CAAciG,QAAd,EAAwB;AAC3BD,IAAAA,QAD2B;AAE3BnG,IAAAA,QAAQ,EAAEgG,YAAY,CAACxB,IAAb,CAAkB,IAAlB,EAAwB2B,QAAxB,CAFiB;AAG3B1F,IAAAA,KAAK,EAAEA,KAAK,CAAC+D,IAAN,CAAW,IAAX,EAAiB2B,QAAjB,CAHoB;AAI3BhB,IAAAA;AAJ2B,GAAxB,CAAP;AAMH;;ACZM,MAAMkB,OAAO,GAAG,mBAAhB;;ACEP,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAnE;AAEA;;AACA,AAAO,MAAMJ,QAAQ,GAAG;AACpBxF,EAAAA,MAAM,EAAE,KADY;AAEpB2E,EAAAA,OAAO,EAAE,wBAFW;AAGpBxE,EAAAA,OAAO,EAAE;AACL4E,IAAAA,MAAM,EAAE,gCADH;AAEL,kBAAcY;AAFT,GAHW;AAOpBtF,EAAAA,SAAS,EAAE;AACP2E,IAAAA,MAAM,EAAE,EADD;AAEP1E,IAAAA,QAAQ,EAAE;AAFH;AAPS,CAAjB;;MCHMmF,QAAQ,GAAGJ,YAAY,CAAC,IAAD,EAAOG,QAAP,CAA7B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/endpoint/dist-src/version.js index 253f86a..930e255 100644 --- a/node_modules/@octokit/endpoint/dist-src/version.js +++ b/node_modules/@octokit/endpoint/dist-src/version.js @@ -1 +1 @@ -export const VERSION = "6.0.11"; +export const VERSION = "6.0.12"; diff --git a/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/endpoint/dist-types/version.d.ts index fb46c4c..330d47a 100644 --- a/node_modules/@octokit/endpoint/dist-types/version.d.ts +++ b/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "6.0.11"; +export declare const VERSION = "6.0.12"; diff --git a/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/endpoint/dist-web/index.js index b6ef563..e152163 100644 --- a/node_modules/@octokit/endpoint/dist-web/index.js +++ b/node_modules/@octokit/endpoint/dist-web/index.js @@ -357,7 +357,7 @@ function withDefaults(oldDefaults, newDefaults) { }); } -const VERSION = "6.0.11"; +const VERSION = "6.0.12"; const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. diff --git a/node_modules/@octokit/endpoint/dist-web/index.js.map b/node_modules/@octokit/endpoint/dist-web/index.js.map index b98ae12..1d60d02 100644 --- a/node_modules/@octokit/endpoint/dist-web/index.js.map +++ b/node_modules/@octokit/endpoint/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"6.0.11\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;AACtC,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AACvD,QAAQ,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAChD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;;ACPO,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;AAC7C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1C,QAAQ,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;AACzC,YAAY,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;AAClC,gBAAgB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/D;AACA,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,SAAS;AACT,aAAa;AACb,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;;ACfM,SAAS,yBAAyB,CAAC,GAAG,EAAE;AAC/C,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AAC3B,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACpC,YAAY,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;ACJM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAChD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7C,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3C,KAAK;AACL;AACA,IAAI,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD;AACA,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,IAAI,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/C,IAAI,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AACxD,QAAQ,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;AACtE,aAAa,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrF,aAAa,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtD,KAAK;AACL,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1H,IAAI,OAAO,aAAa,CAAC;AACzB,CAAC;;ACzBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;AACpD,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AACjD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1C,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK;AAC3B,YAAY,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,gBAAgB,QAAQ,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC1F,aAAa;AACb,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,SAAS,CAAC;AACV,aAAa,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,CAAC;;AChBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,IAAI,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;AAC7C,IAAI,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAChD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;AACzC,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzD,SAAS,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAC9B,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,IAAI,OAAO,GAAG;AACd,SAAS,KAAK,CAAC,oBAAoB,CAAC;AACpC,SAAS,GAAG,CAAC,UAAU,IAAI,EAAE;AAC7B,QAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxC,YAAY,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC7E,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;AACpE,QAAQ,OAAO,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,KAAK,CAAC,CAAC;AACP,CAAC;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;AAC3C,IAAI,KAAK;AACT,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;AAC5C,cAAc,cAAc,CAAC,KAAK,CAAC;AACnC,cAAc,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACtC,IAAI,IAAI,GAAG,EAAE;AACb,QAAQ,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;AACnD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,IAAI,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AACpE,CAAC;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;AACrD,IAAI,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;AAC1C,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1C,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,SAAS,EAAE;AACxC,YAAY,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;AACrC,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AACnE,aAAa;AACb,YAAY,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAC1F,SAAS;AACT,aAAa;AACb,YAAY,IAAI,QAAQ,KAAK,GAAG,EAAE;AAClC,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,aAAa;AACb,iBAAiB;AACjB,gBAAgB,MAAM,GAAG,GAAG,EAAE,CAAC;AAC/B,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,4BAA4B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AACjF,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;AAC7C,oBAAoB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,iBAAiB;AACjB,qBAAqB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3C,oBAAoB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9B,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAClC,gBAAgB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AACnD,aAAa;AACb,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;AACzE,YAAY,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,EAAE;AAC/B,YAAY,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;AACnC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC3C,KAAK,CAAC;AACN,CAAC;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AACnC,IAAI,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;AAC5F,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,QAAQ,GAAG,EAAE,CAAC;AAC9B,YAAY,MAAM,MAAM,GAAG,EAAE,CAAC;AAC9B,YAAY,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;AAChE,gBAAgB,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAChD,gBAAgB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,aAAa;AACb,YAAY,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;AAC/D,gBAAgB,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,gBAAgB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,aAAa,CAAC,CAAC;AACf,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,IAAI,SAAS,GAAG,GAAG,CAAC;AACpC,gBAAgB,IAAI,QAAQ,KAAK,GAAG,EAAE;AACtC,oBAAoB,SAAS,GAAG,GAAG,CAAC;AACpC,iBAAiB;AACjB,qBAAqB,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC3C,oBAAoB,SAAS,GAAG,QAAQ,CAAC;AACzC,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtF,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AAC3C,SAAS;AACT,KAAK,CAAC,CAAC;AACP,CAAC;;AC/JM,SAAS,KAAK,CAAC,OAAO,EAAE;AAC/B;AACA,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;AAC9C;AACA,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACnE,IAAI,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD,IAAI,IAAI,IAAI,CAAC;AACb,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;AAC1D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5B,QAAQ,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AAClD,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9D,SAAS,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,IAAI,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AACpE,IAAI,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;AACtC;AACA,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAC3C,iBAAiB,KAAK,CAAC,GAAG,CAAC;AAC3B,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzJ,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC/C,YAAY,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/F,YAAY,OAAO,CAAC,MAAM,GAAG,wBAAwB;AACrD,iBAAiB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;AACnD,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK;AAClC,gBAAgB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;AACvD,sBAAsB,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACpD,sBAAsB,OAAO,CAAC;AAC9B,gBAAgB,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,aAAa,CAAC;AACd,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC1C,QAAQ,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAC3D,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,mBAAmB,EAAE;AAC3C,YAAY,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;AAC5C,SAAS;AACT,aAAa;AACb,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;AACzD,gBAAgB,IAAI,GAAG,mBAAmB,CAAC;AAC3C,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAC9C,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AACjE,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AACpE,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AAC1E,QAAQ,IAAI,GAAG,EAAE,CAAC;AAClB,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzJ,CAAC;;AC9EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAC/D,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AACvD,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/D,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACzC,QAAQ,KAAK;AACb,KAAK,CAAC,CAAC;AACP,CAAC;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AACrE;AACA;AACA,AAAO,MAAM,QAAQ,GAAG;AACxB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,OAAO,EAAE;AACb,QAAQ,MAAM,EAAE,gCAAgC;AAChD,QAAQ,YAAY,EAAE,SAAS;AAC/B,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,MAAM,EAAE,EAAE;AAClB,QAAQ,QAAQ,EAAE,EAAE;AACpB,KAAK;AACL,CAAC,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"6.0.12\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;AACtC,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AACvD,QAAQ,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAChD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;;ACPO,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;AAC7C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1C,QAAQ,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;AACzC,YAAY,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;AAClC,gBAAgB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/D;AACA,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,SAAS;AACT,aAAa;AACb,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;;ACfM,SAAS,yBAAyB,CAAC,GAAG,EAAE;AAC/C,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AAC3B,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACpC,YAAY,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;ACJM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAChD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7C,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3C,KAAK;AACL;AACA,IAAI,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD;AACA,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,IAAI,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/C,IAAI,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AACxD,QAAQ,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;AACtE,aAAa,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrF,aAAa,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtD,KAAK;AACL,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1H,IAAI,OAAO,aAAa,CAAC;AACzB,CAAC;;ACzBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;AACpD,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AACjD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1C,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK;AAC3B,YAAY,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,gBAAgB,QAAQ,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC1F,aAAa;AACb,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,SAAS,CAAC;AACV,aAAa,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,CAAC;;AChBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,IAAI,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;AAC7C,IAAI,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAChD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;AACzC,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzD,SAAS,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAC9B,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,IAAI,OAAO,GAAG;AACd,SAAS,KAAK,CAAC,oBAAoB,CAAC;AACpC,SAAS,GAAG,CAAC,UAAU,IAAI,EAAE;AAC7B,QAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxC,YAAY,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC7E,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;AACpE,QAAQ,OAAO,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,KAAK,CAAC,CAAC;AACP,CAAC;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;AAC3C,IAAI,KAAK;AACT,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;AAC5C,cAAc,cAAc,CAAC,KAAK,CAAC;AACnC,cAAc,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACtC,IAAI,IAAI,GAAG,EAAE;AACb,QAAQ,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;AACnD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,IAAI,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AACpE,CAAC;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;AACrD,IAAI,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;AAC1C,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1C,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,SAAS,EAAE;AACxC,YAAY,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;AACrC,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AACnE,aAAa;AACb,YAAY,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAC1F,SAAS;AACT,aAAa;AACb,YAAY,IAAI,QAAQ,KAAK,GAAG,EAAE;AAClC,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,aAAa;AACb,iBAAiB;AACjB,gBAAgB,MAAM,GAAG,GAAG,EAAE,CAAC;AAC/B,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,4BAA4B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AACjF,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;AAC7C,oBAAoB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,iBAAiB;AACjB,qBAAqB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3C,oBAAoB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9B,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAClC,gBAAgB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AACnD,aAAa;AACb,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;AACzE,YAAY,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,EAAE;AAC/B,YAAY,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;AACnC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC3C,KAAK,CAAC;AACN,CAAC;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AACnC,IAAI,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;AAC5F,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,QAAQ,GAAG,EAAE,CAAC;AAC9B,YAAY,MAAM,MAAM,GAAG,EAAE,CAAC;AAC9B,YAAY,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;AAChE,gBAAgB,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAChD,gBAAgB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,aAAa;AACb,YAAY,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;AAC/D,gBAAgB,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,gBAAgB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,aAAa,CAAC,CAAC;AACf,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,IAAI,SAAS,GAAG,GAAG,CAAC;AACpC,gBAAgB,IAAI,QAAQ,KAAK,GAAG,EAAE;AACtC,oBAAoB,SAAS,GAAG,GAAG,CAAC;AACpC,iBAAiB;AACjB,qBAAqB,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC3C,oBAAoB,SAAS,GAAG,QAAQ,CAAC;AACzC,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtF,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AAC3C,SAAS;AACT,KAAK,CAAC,CAAC;AACP,CAAC;;AC/JM,SAAS,KAAK,CAAC,OAAO,EAAE;AAC/B;AACA,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;AAC9C;AACA,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACnE,IAAI,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD,IAAI,IAAI,IAAI,CAAC;AACb,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;AAC1D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5B,QAAQ,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AAClD,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9D,SAAS,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,IAAI,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AACpE,IAAI,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;AACtC;AACA,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAC3C,iBAAiB,KAAK,CAAC,GAAG,CAAC;AAC3B,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzJ,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC/C,YAAY,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/F,YAAY,OAAO,CAAC,MAAM,GAAG,wBAAwB;AACrD,iBAAiB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;AACnD,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK;AAClC,gBAAgB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;AACvD,sBAAsB,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACpD,sBAAsB,OAAO,CAAC;AAC9B,gBAAgB,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,aAAa,CAAC;AACd,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC1C,QAAQ,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAC3D,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,mBAAmB,EAAE;AAC3C,YAAY,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;AAC5C,SAAS;AACT,aAAa;AACb,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;AACzD,gBAAgB,IAAI,GAAG,mBAAmB,CAAC;AAC3C,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAC9C,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AACjE,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AACpE,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AAC1E,QAAQ,IAAI,GAAG,EAAE,CAAC;AAClB,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzJ,CAAC;;AC9EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAC/D,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AACvD,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/D,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACzC,QAAQ,KAAK;AACb,KAAK,CAAC,CAAC;AACP,CAAC;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AACrE;AACA;AACA,AAAO,MAAM,QAAQ,GAAG;AACxB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,OAAO,EAAE;AACb,QAAQ,MAAM,EAAE,gCAAgC;AAChD,QAAQ,YAAY,EAAE,SAAS;AAC/B,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,MAAM,EAAE,EAAE;AAClB,QAAQ,QAAQ,EAAE,EAAE;AACpB,KAAK;AACL,CAAC,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/endpoint/package.json index 38e5998..4e4d425 100644 --- a/node_modules/@octokit/endpoint/package.json +++ b/node_modules/@octokit/endpoint/package.json @@ -1,77 +1,44 @@ { - "_from": "@octokit/endpoint@^6.0.1", - "_id": "@octokit/endpoint@6.0.11", - "_inBundle": false, - "_integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==", - "_location": "/@octokit/endpoint", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/endpoint@^6.0.1", - "name": "@octokit/endpoint", - "escapedName": "@octokit%2fendpoint", - "scope": "@octokit", - "rawSpec": "^6.0.1", - "saveSpec": null, - "fetchSpec": "^6.0.1" - }, - "_requiredBy": [ - "/@octokit/request" + "name": "@octokit/endpoint", + "description": "Turns REST API endpoints into generic request options", + "version": "6.0.12", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz", - "_shasum": "082adc2aebca6dcefa1fb383f5efb3ed081949d1", - "_spec": "@octokit/endpoint@^6.0.1", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\request", - "bugs": { - "url": "https://github.com/octokit/endpoint.js/issues" - }, - "bundleDependencies": false, + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "repository": "github:octokit/endpoint.js", "dependencies": { "@octokit/types": "^6.0.3", "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" }, - "deprecated": false, - "description": "Turns REST API endpoints into generic request options", "devDependencies": { "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-web": "^0.9.0", "@pika/plugin-ts-standard-pkg": "^0.9.0", "@types/jest": "^26.0.0", - "jest": "^26.0.1", - "prettier": "2.2.1", + "jest": "^27.0.0", + "prettier": "2.3.1", "semantic-release": "^17.0.0", "semantic-release-plugin-update-version-in-files": "^1.0.0", - "ts-jest": "^26.0.0", + "ts-jest": "^27.0.0-next.12", "typescript": "^4.0.2" }, - "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": "6.0.11" + "main": "dist-node/index.js", + "module": "dist-web/index.js" } diff --git a/node_modules/@octokit/graphql/README.md b/node_modules/@octokit/graphql/README.md index 4965c30..aee921a 100644 --- a/node_modules/@octokit/graphql/README.md +++ b/node_modules/@octokit/graphql/README.md @@ -3,7 +3,7 @@ > 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://github.com/octokit/graphql.js/workflows/Test/badge.svg)](https://github.com/octokit/graphql.js/actions?query=workflow%3ATest+branch%3Amaster) +[![Build Status](https://github.com/octokit/graphql.js/workflows/Test/badge.svg)](https://github.com/octokit/graphql.js/actions?query=workflow%3ATest+branch%3Amain) @@ -35,7 +35,7 @@ Load `@octokit/graphql` directly from [cdn.skypack.dev](https://cdn.skypack.dev) ```html ``` @@ -110,7 +110,7 @@ For more complex authentication strategies such as GitHub Apps or Basic, we reco ```js const { createAppAuth } = require("@octokit/auth-app"); const auth = createAppAuth({ - id: process.env.APP_ID, + appId: process.env.APP_ID, privateKey: process.env.PRIVATE_KEY, installationId: 123, }); @@ -222,7 +222,7 @@ const { withCustomRequest } = require("@octokit/graphql"); let requestCounter = 0; const myRequest = request.defaults({ headers: { - authentication: "token secret123", + authorization: "bearer secret123", }, request: { hook(request, options) { @@ -258,16 +258,17 @@ await myGraphql(` Additionally, `GraphQlQueryResponseData` has been exposed to users: ```ts -import type { GraphQlQueryResponseData } from "octokit/graphql"; +import type { GraphQlQueryResponseData } from "@octokit/graphql"; ``` ## 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. +In case of a GraphQL error, `error.message` is set to a combined message describing all errors returned by the endpoint. +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 -let { graphql } = require("@octokit/graphql"); -graphqlt = graphql.defaults({ +let { graphql, GraphqlResponseError } = require("@octokit/graphql"); +graphql = graphql.defaults({ headers: { authorization: `token secret123`, }, @@ -281,20 +282,30 @@ const query = `{ 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' + if (error instanceof GraphqlResponseError) { + // do something with the error, allowing you to detect a graphql response error, + // compared to accidentally catching unrelated errors. + + // server responds with an object like the following (as an example) + // class GraphqlResponseError { + // "headers": { + // "status": "403", + // }, + // "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' + } else { + // handle non-GraphQL error + } } ``` diff --git a/node_modules/@octokit/graphql/dist-node/index.js b/node_modules/@octokit/graphql/dist-node/index.js index cbfd4a2..2eae1d1 100644 --- a/node_modules/@octokit/graphql/dist-node/index.js +++ b/node_modules/@octokit/graphql/dist-node/index.js @@ -5,35 +5,42 @@ Object.defineProperty(exports, '__esModule', { value: true }); var request = require('@octokit/request'); var universalUserAgent = require('universal-user-agent'); -const VERSION = "4.6.0"; - -class GraphqlError extends Error { - constructor(request, response) { - const message = response.data.errors[0].message; - super(message); - Object.assign(this, response.data); - Object.assign(this, { - headers: response.headers - }); - this.name = "GraphqlError"; - this.request = request; // Maintains proper stack trace (only available on V8) +const VERSION = "5.0.5"; +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors:\n` + data.errors.map(e => ` - ${e.message}`).join("\n"); +} +class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + // Expose the errors and response data in their shorthand properties. + this.errors = response.errors; + this.data = response.data; + // Maintains proper stack trace (only available on V8) /* istanbul ignore next */ - if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } } - } const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; function graphql(request, query, options) { - if (typeof query === "string" && options && "query" in options) { - return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } } - const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; @@ -42,50 +49,38 @@ function graphql(request, query, options) { result[key] = parsedOptions[key]; return result; } - if (!result.variables) { result.variables = {}; } - result.variables[key] = parsedOptions[key]; return result; - }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix + }, {}); + // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 - const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; - if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); } - return request(requestOptions).then(response => { if (response.data.errors) { const headers = {}; - for (const key of Object.keys(response.headers)) { headers[key] = response.headers[key]; } - - throw new GraphqlError(requestOptions, { - headers, - data: response.data - }); + throw new GraphqlResponseError(requestOptions, headers, response.data); } - return response.data.data; }); } -function withDefaults(request$1, newDefaults) { - const newRequest = request$1.defaults(newDefaults); - +function withDefaults(request, newDefaults) { + const newRequest = request.defaults(newDefaults); const newApi = (query, options) => { return graphql(newRequest, query, options); }; - return Object.assign(newApi, { defaults: withDefaults.bind(null, newRequest), - endpoint: request.request.endpoint + endpoint: newRequest.endpoint }); } @@ -103,6 +98,7 @@ function withCustomRequest(customRequest) { }); } +exports.GraphqlResponseError = GraphqlResponseError; exports.graphql = graphql$1; exports.withCustomRequest = withCustomRequest; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/dist-node/index.js.map b/node_modules/@octokit/graphql/dist-node/index.js.map index f2b96f8..911ee9b 100644 --- a/node_modules/@octokit/graphql/dist-node/index.js.map +++ b/node_modules/@octokit/graphql/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/error.js","../dist-src/graphql.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.6.0\";\n","export class GraphqlError extends Error {\n constructor(request, response) {\n const message = response.data.errors[0].message;\n super(message);\n Object.assign(this, response.data);\n Object.assign(this, { headers: response.headers });\n this.name = \"GraphqlError\";\n this.request = request;\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { GraphqlError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nexport function graphql(request, query, options) {\n if (typeof query === \"string\" && options && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlError(requestOptions, {\n headers,\n data: response.data,\n });\n }\n return response.data.data;\n });\n}\n","import { request as Request } from \"@octokit/request\";\nimport { graphql } from \"./graphql\";\nexport function withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: Request.endpoint,\n });\n}\n","import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport { withDefaults } from \"./with-defaults\";\nexport const graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,\n },\n method: \"POST\",\n url: \"/graphql\",\n});\nexport function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\",\n });\n}\n"],"names":["VERSION","GraphqlError","Error","constructor","request","response","message","data","errors","Object","assign","headers","name","captureStackTrace","NON_VARIABLE_OPTIONS","GHES_V3_SUFFIX_REGEX","graphql","query","options","Promise","reject","parsedOptions","requestOptions","keys","reduce","result","key","includes","variables","baseUrl","endpoint","DEFAULTS","test","url","replace","then","withDefaults","newDefaults","newRequest","defaults","newApi","bind","Request","getUserAgent","method","withCustomRequest","customRequest"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAA,MAAMC,YAAN,SAA2BC,KAA3B,CAAiC;AACpCC,EAAAA,WAAW,CAACC,OAAD,EAAUC,QAAV,EAAoB;AAC3B,UAAMC,OAAO,GAAGD,QAAQ,CAACE,IAAT,CAAcC,MAAd,CAAqB,CAArB,EAAwBF,OAAxC;AACA,UAAMA,OAAN;AACAG,IAAAA,MAAM,CAACC,MAAP,CAAc,IAAd,EAAoBL,QAAQ,CAACE,IAA7B;AACAE,IAAAA,MAAM,CAACC,MAAP,CAAc,IAAd,EAAoB;AAAEC,MAAAA,OAAO,EAAEN,QAAQ,CAACM;AAApB,KAApB;AACA,SAAKC,IAAL,GAAY,cAAZ;AACA,SAAKR,OAAL,GAAeA,OAAf,CAN2B;;AAQ3B;;AACA,QAAIF,KAAK,CAACW,iBAAV,EAA6B;AACzBX,MAAAA,KAAK,CAACW,iBAAN,CAAwB,IAAxB,EAA8B,KAAKV,WAAnC;AACH;AACJ;;AAbmC;;ACCxC,MAAMW,oBAAoB,GAAG,CACzB,QADyB,EAEzB,SAFyB,EAGzB,KAHyB,EAIzB,SAJyB,EAKzB,SALyB,EAMzB,OANyB,EAOzB,WAPyB,CAA7B;AASA,MAAMC,oBAAoB,GAAG,eAA7B;AACA,AAAO,SAASC,OAAT,CAAiBZ,OAAjB,EAA0Ba,KAA1B,EAAiCC,OAAjC,EAA0C;AAC7C,MAAI,OAAOD,KAAP,KAAiB,QAAjB,IAA6BC,OAA7B,IAAwC,WAAWA,OAAvD,EAAgE;AAC5D,WAAOC,OAAO,CAACC,MAAR,CAAe,IAAIlB,KAAJ,CAAW,4DAAX,CAAf,CAAP;AACH;;AACD,QAAMmB,aAAa,GAAG,OAAOJ,KAAP,KAAiB,QAAjB,GAA4BR,MAAM,CAACC,MAAP,CAAc;AAAEO,IAAAA;AAAF,GAAd,EAAyBC,OAAzB,CAA5B,GAAgED,KAAtF;AACA,QAAMK,cAAc,GAAGb,MAAM,CAACc,IAAP,CAAYF,aAAZ,EAA2BG,MAA3B,CAAkC,CAACC,MAAD,EAASC,GAAT,KAAiB;AACtE,QAAIZ,oBAAoB,CAACa,QAArB,CAA8BD,GAA9B,CAAJ,EAAwC;AACpCD,MAAAA,MAAM,CAACC,GAAD,CAAN,GAAcL,aAAa,CAACK,GAAD,CAA3B;AACA,aAAOD,MAAP;AACH;;AACD,QAAI,CAACA,MAAM,CAACG,SAAZ,EAAuB;AACnBH,MAAAA,MAAM,CAACG,SAAP,GAAmB,EAAnB;AACH;;AACDH,IAAAA,MAAM,CAACG,SAAP,CAAiBF,GAAjB,IAAwBL,aAAa,CAACK,GAAD,CAArC;AACA,WAAOD,MAAP;AACH,GAVsB,EAUpB,EAVoB,CAAvB,CAL6C;AAiB7C;;AACA,QAAMI,OAAO,GAAGR,aAAa,CAACQ,OAAd,IAAyBzB,OAAO,CAAC0B,QAAR,CAAiBC,QAAjB,CAA0BF,OAAnE;;AACA,MAAId,oBAAoB,CAACiB,IAArB,CAA0BH,OAA1B,CAAJ,EAAwC;AACpCP,IAAAA,cAAc,CAACW,GAAf,GAAqBJ,OAAO,CAACK,OAAR,CAAgBnB,oBAAhB,EAAsC,cAAtC,CAArB;AACH;;AACD,SAAOX,OAAO,CAACkB,cAAD,CAAP,CAAwBa,IAAxB,CAA8B9B,QAAD,IAAc;AAC9C,QAAIA,QAAQ,CAACE,IAAT,CAAcC,MAAlB,EAA0B;AACtB,YAAMG,OAAO,GAAG,EAAhB;;AACA,WAAK,MAAMe,GAAX,IAAkBjB,MAAM,CAACc,IAAP,CAAYlB,QAAQ,CAACM,OAArB,CAAlB,EAAiD;AAC7CA,QAAAA,OAAO,CAACe,GAAD,CAAP,GAAerB,QAAQ,CAACM,OAAT,CAAiBe,GAAjB,CAAf;AACH;;AACD,YAAM,IAAIzB,YAAJ,CAAiBqB,cAAjB,EAAiC;AACnCX,QAAAA,OADmC;AAEnCJ,QAAAA,IAAI,EAAEF,QAAQ,CAACE;AAFoB,OAAjC,CAAN;AAIH;;AACD,WAAOF,QAAQ,CAACE,IAAT,CAAcA,IAArB;AACH,GAZM,CAAP;AAaH;;AC5CM,SAAS6B,YAAT,CAAsBhC,SAAtB,EAA+BiC,WAA/B,EAA4C;AAC/C,QAAMC,UAAU,GAAGlC,SAAO,CAACmC,QAAR,CAAiBF,WAAjB,CAAnB;;AACA,QAAMG,MAAM,GAAG,CAACvB,KAAD,EAAQC,OAAR,KAAoB;AAC/B,WAAOF,OAAO,CAACsB,UAAD,EAAarB,KAAb,EAAoBC,OAApB,CAAd;AACH,GAFD;;AAGA,SAAOT,MAAM,CAACC,MAAP,CAAc8B,MAAd,EAAsB;AACzBD,IAAAA,QAAQ,EAAEH,YAAY,CAACK,IAAb,CAAkB,IAAlB,EAAwBH,UAAxB,CADe;AAEzBR,IAAAA,QAAQ,EAAEY,eAAO,CAACZ;AAFO,GAAtB,CAAP;AAIH;;MCPYd,SAAO,GAAGoB,YAAY,CAAChC,eAAD,EAAU;AACzCO,EAAAA,OAAO,EAAE;AACL,kBAAe,sBAAqBX,OAAQ,IAAG2C,+BAAY,EAAG;AADzD,GADgC;AAIzCC,EAAAA,MAAM,EAAE,MAJiC;AAKzCX,EAAAA,GAAG,EAAE;AALoC,CAAV,CAA5B;AAOP,AAAO,SAASY,iBAAT,CAA2BC,aAA3B,EAA0C;AAC7C,SAAOV,YAAY,CAACU,aAAD,EAAgB;AAC/BF,IAAAA,MAAM,EAAE,MADuB;AAE/BX,IAAAA,GAAG,EAAE;AAF0B,GAAhB,CAAnB;AAIH;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/error.js","../dist-src/graphql.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.0.5\";\n","function _buildMessageForResponseErrors(data) {\n return (`Request failed due to following response errors:\\n` +\n data.errors.map((e) => ` - ${e.message}`).join(\"\\n\"));\n}\nexport class GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n // Expose the errors and response data in their shorthand properties.\n this.errors = response.errors;\n this.data = response.data;\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { GraphqlResponseError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nexport function graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n return response.data.data;\n });\n}\n","import { graphql } from \"./graphql\";\nexport function withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint,\n });\n}\n","import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport { withDefaults } from \"./with-defaults\";\nexport const graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,\n },\n method: \"POST\",\n url: \"/graphql\",\n});\nexport { GraphqlResponseError } from \"./error\";\nexport function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\",\n });\n}\n"],"names":["VERSION","_buildMessageForResponseErrors","data","errors","map","e","message","join","GraphqlResponseError","Error","constructor","request","headers","response","name","captureStackTrace","NON_VARIABLE_OPTIONS","FORBIDDEN_VARIABLE_OPTIONS","GHES_V3_SUFFIX_REGEX","graphql","query","options","Promise","reject","key","includes","parsedOptions","Object","assign","requestOptions","keys","reduce","result","variables","baseUrl","endpoint","DEFAULTS","test","url","replace","then","withDefaults","newDefaults","newRequest","defaults","newApi","bind","getUserAgent","method","withCustomRequest","customRequest"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA1C,SAASC,8BAA8B,CAACC,IAAI,EAAE;EAC1C,OAAS,oDAAmD,GACxDA,IAAI,CAACC,MAAM,CAACC,GAAG,CAAEC,CAAC,IAAM,MAAKA,CAAC,CAACC,OAAQ,EAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAC5D;AACA,AAAO,MAAMC,oBAAoB,SAASC,KAAK,CAAC;EAC5CC,WAAW,CAACC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAE;IACpC,KAAK,CAACZ,8BAA8B,CAACY,QAAQ,CAAC,CAAC;IAC/C,IAAI,CAACF,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,IAAI,GAAG,sBAAsB;;IAElC,IAAI,CAACX,MAAM,GAAGU,QAAQ,CAACV,MAAM;IAC7B,IAAI,CAACD,IAAI,GAAGW,QAAQ,CAACX,IAAI;;;IAGzB,IAAIO,KAAK,CAACM,iBAAiB,EAAE;MACzBN,KAAK,CAACM,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAACL,WAAW,CAAC;;;AAG3D;;ACnBA,MAAMM,oBAAoB,GAAG,CACzB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,SAAS,EACT,SAAS,EACT,OAAO,EACP,WAAW,CACd;AACD,MAAMC,0BAA0B,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC;AAC7D,MAAMC,oBAAoB,GAAG,eAAe;AAC5C,AAAO,SAASC,OAAO,CAACR,OAAO,EAAES,KAAK,EAAEC,OAAO,EAAE;EAC7C,IAAIA,OAAO,EAAE;IACT,IAAI,OAAOD,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAIC,OAAO,EAAE;MACjD,OAAOC,OAAO,CAACC,MAAM,CAAC,IAAId,KAAK,CAAE,4DAA2D,CAAC,CAAC;;IAElG,KAAK,MAAMe,GAAG,IAAIH,OAAO,EAAE;MACvB,IAAI,CAACJ,0BAA0B,CAACQ,QAAQ,CAACD,GAAG,CAAC,EACzC;MACJ,OAAOF,OAAO,CAACC,MAAM,CAAC,IAAId,KAAK,CAAE,uBAAsBe,GAAI,mCAAkC,CAAC,CAAC;;;EAGvG,MAAME,aAAa,GAAG,OAAON,KAAK,KAAK,QAAQ,GAAGO,MAAM,CAACC,MAAM,CAAC;IAAER;GAAO,EAAEC,OAAO,CAAC,GAAGD,KAAK;EAC3F,MAAMS,cAAc,GAAGF,MAAM,CAACG,IAAI,CAACJ,aAAa,CAAC,CAACK,MAAM,CAAC,CAACC,MAAM,EAAER,GAAG,KAAK;IACtE,IAAIR,oBAAoB,CAACS,QAAQ,CAACD,GAAG,CAAC,EAAE;MACpCQ,MAAM,CAACR,GAAG,CAAC,GAAGE,aAAa,CAACF,GAAG,CAAC;MAChC,OAAOQ,MAAM;;IAEjB,IAAI,CAACA,MAAM,CAACC,SAAS,EAAE;MACnBD,MAAM,CAACC,SAAS,GAAG,EAAE;;IAEzBD,MAAM,CAACC,SAAS,CAACT,GAAG,CAAC,GAAGE,aAAa,CAACF,GAAG,CAAC;IAC1C,OAAOQ,MAAM;GAChB,EAAE,EAAE,CAAC;;;EAGN,MAAME,OAAO,GAAGR,aAAa,CAACQ,OAAO,IAAIvB,OAAO,CAACwB,QAAQ,CAACC,QAAQ,CAACF,OAAO;EAC1E,IAAIhB,oBAAoB,CAACmB,IAAI,CAACH,OAAO,CAAC,EAAE;IACpCL,cAAc,CAACS,GAAG,GAAGJ,OAAO,CAACK,OAAO,CAACrB,oBAAoB,EAAE,cAAc,CAAC;;EAE9E,OAAOP,OAAO,CAACkB,cAAc,CAAC,CAACW,IAAI,CAAE3B,QAAQ,IAAK;IAC9C,IAAIA,QAAQ,CAACX,IAAI,CAACC,MAAM,EAAE;MACtB,MAAMS,OAAO,GAAG,EAAE;MAClB,KAAK,MAAMY,GAAG,IAAIG,MAAM,CAACG,IAAI,CAACjB,QAAQ,CAACD,OAAO,CAAC,EAAE;QAC7CA,OAAO,CAACY,GAAG,CAAC,GAAGX,QAAQ,CAACD,OAAO,CAACY,GAAG,CAAC;;MAExC,MAAM,IAAIhB,oBAAoB,CAACqB,cAAc,EAAEjB,OAAO,EAAEC,QAAQ,CAACX,IAAI,CAAC;;IAE1E,OAAOW,QAAQ,CAACX,IAAI,CAACA,IAAI;GAC5B,CAAC;AACN;;AClDO,SAASuC,YAAY,CAAC9B,OAAO,EAAE+B,WAAW,EAAE;EAC/C,MAAMC,UAAU,GAAGhC,OAAO,CAACiC,QAAQ,CAACF,WAAW,CAAC;EAChD,MAAMG,MAAM,GAAG,CAACzB,KAAK,EAAEC,OAAO,KAAK;IAC/B,OAAOF,OAAO,CAACwB,UAAU,EAAEvB,KAAK,EAAEC,OAAO,CAAC;GAC7C;EACD,OAAOM,MAAM,CAACC,MAAM,CAACiB,MAAM,EAAE;IACzBD,QAAQ,EAAEH,YAAY,CAACK,IAAI,CAAC,IAAI,EAAEH,UAAU,CAAC;IAC7CR,QAAQ,EAAEQ,UAAU,CAACR;GACxB,CAAC;AACN;;MCNahB,SAAO,GAAGsB,YAAY,CAAC9B,eAAO,EAAE;EACzCC,OAAO,EAAE;IACL,YAAY,EAAG,sBAAqBZ,OAAQ,IAAG+C,+BAAY,EAAG;GACjE;EACDC,MAAM,EAAE,MAAM;EACdV,GAAG,EAAE;AACT,CAAC,CAAC;AACF,AACO,SAASW,iBAAiB,CAACC,aAAa,EAAE;EAC7C,OAAOT,YAAY,CAACS,aAAa,EAAE;IAC/BF,MAAM,EAAE,MAAM;IACdV,GAAG,EAAE;GACR,CAAC;AACN;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/dist-src/error.js b/node_modules/@octokit/graphql/dist-src/error.js index 37942ba..182f967 100644 --- a/node_modules/@octokit/graphql/dist-src/error.js +++ b/node_modules/@octokit/graphql/dist-src/error.js @@ -1,11 +1,17 @@ -export class GraphqlError extends Error { - constructor(request, response) { - const message = response.data.errors[0].message; - super(message); - Object.assign(this, response.data); - Object.assign(this, { headers: response.headers }); - this.name = "GraphqlError"; +function _buildMessageForResponseErrors(data) { + return (`Request failed due to following response errors:\n` + + data.errors.map((e) => ` - ${e.message}`).join("\n")); +} +export class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + // Expose the errors and response data in their shorthand properties. + this.errors = response.errors; + this.data = response.data; // Maintains proper stack trace (only available on V8) /* istanbul ignore next */ if (Error.captureStackTrace) { diff --git a/node_modules/@octokit/graphql/dist-src/graphql.js b/node_modules/@octokit/graphql/dist-src/graphql.js index deb9488..8297f84 100644 --- a/node_modules/@octokit/graphql/dist-src/graphql.js +++ b/node_modules/@octokit/graphql/dist-src/graphql.js @@ -1,4 +1,4 @@ -import { GraphqlError } from "./error"; +import { GraphqlResponseError } from "./error"; const NON_VARIABLE_OPTIONS = [ "method", "baseUrl", @@ -8,10 +8,18 @@ const NON_VARIABLE_OPTIONS = [ "query", "mediaType", ]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; export function graphql(request, query, options) { - if (typeof query === "string" && options && "query" in options) { - return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } } const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { @@ -37,10 +45,7 @@ export function graphql(request, query, options) { for (const key of Object.keys(response.headers)) { headers[key] = response.headers[key]; } - throw new GraphqlError(requestOptions, { - headers, - data: response.data, - }); + throw new GraphqlResponseError(requestOptions, headers, response.data); } return response.data.data; }); diff --git a/node_modules/@octokit/graphql/dist-src/index.js b/node_modules/@octokit/graphql/dist-src/index.js index b202378..2a7d06b 100644 --- a/node_modules/@octokit/graphql/dist-src/index.js +++ b/node_modules/@octokit/graphql/dist-src/index.js @@ -9,6 +9,7 @@ export const graphql = withDefaults(request, { method: "POST", url: "/graphql", }); +export { GraphqlResponseError } from "./error"; export function withCustomRequest(customRequest) { return withDefaults(customRequest, { method: "POST", diff --git a/node_modules/@octokit/graphql/dist-src/version.js b/node_modules/@octokit/graphql/dist-src/version.js index 0339570..3dc03d4 100644 --- a/node_modules/@octokit/graphql/dist-src/version.js +++ b/node_modules/@octokit/graphql/dist-src/version.js @@ -1 +1 @@ -export const VERSION = "4.6.0"; +export const VERSION = "5.0.5"; diff --git a/node_modules/@octokit/graphql/dist-src/with-defaults.js b/node_modules/@octokit/graphql/dist-src/with-defaults.js index 6ea309e..b94481b 100644 --- a/node_modules/@octokit/graphql/dist-src/with-defaults.js +++ b/node_modules/@octokit/graphql/dist-src/with-defaults.js @@ -1,4 +1,3 @@ -import { request as Request } from "@octokit/request"; import { graphql } from "./graphql"; export function withDefaults(request, newDefaults) { const newRequest = request.defaults(newDefaults); @@ -7,6 +6,6 @@ export function withDefaults(request, newDefaults) { }; return Object.assign(newApi, { defaults: withDefaults.bind(null, newRequest), - endpoint: Request.endpoint, + endpoint: newRequest.endpoint, }); } diff --git a/node_modules/@octokit/graphql/dist-types/error.d.ts b/node_modules/@octokit/graphql/dist-types/error.d.ts index 81b31a4..5730214 100644 --- a/node_modules/@octokit/graphql/dist-types/error.d.ts +++ b/node_modules/@octokit/graphql/dist-types/error.d.ts @@ -1,9 +1,13 @@ import { ResponseHeaders } from "@octokit/types"; import { GraphQlEndpointOptions, GraphQlQueryResponse } from "./types"; -export declare class GraphqlError extends Error { - request: GraphQlEndpointOptions; - constructor(request: GraphQlEndpointOptions, response: { - headers: ResponseHeaders; - data: Required>; - }); +type ServerResponseData = Required>; +export declare class GraphqlResponseError extends Error { + readonly request: GraphQlEndpointOptions; + readonly headers: ResponseHeaders; + readonly response: ServerResponseData; + name: string; + readonly errors: GraphQlQueryResponse["errors"]; + readonly data: ResponseData; + constructor(request: GraphQlEndpointOptions, headers: ResponseHeaders, response: ServerResponseData); } +export {}; diff --git a/node_modules/@octokit/graphql/dist-types/index.d.ts b/node_modules/@octokit/graphql/dist-types/index.d.ts index a0d263b..282f98a 100644 --- a/node_modules/@octokit/graphql/dist-types/index.d.ts +++ b/node_modules/@octokit/graphql/dist-types/index.d.ts @@ -1,4 +1,5 @@ import { request } from "@octokit/request"; export declare const graphql: import("./types").graphql; export { GraphQlQueryResponseData } from "./types"; +export { GraphqlResponseError } from "./error"; export declare function withCustomRequest(customRequest: typeof request): import("./types").graphql; diff --git a/node_modules/@octokit/graphql/dist-types/types.d.ts b/node_modules/@octokit/graphql/dist-types/types.d.ts index a3cf6eb..5af12a6 100644 --- a/node_modules/@octokit/graphql/dist-types/types.d.ts +++ b/node_modules/@octokit/graphql/dist-types/types.d.ts @@ -1,11 +1,11 @@ import { EndpointOptions, RequestParameters as RequestParametersType, EndpointInterface } from "@octokit/types"; -export declare type GraphQlEndpointOptions = EndpointOptions & { +export type GraphQlEndpointOptions = EndpointOptions & { variables?: { [key: string]: unknown; }; }; -export declare type RequestParameters = RequestParametersType; -export declare type Query = string; +export type RequestParameters = RequestParametersType; +export type Query = string; export interface graphql { /** * Sends a GraphQL query request based on endpoint options @@ -30,14 +30,15 @@ export interface graphql { */ endpoint: EndpointInterface; } -export declare type GraphQlResponse = Promise; -export declare type GraphQlQueryResponseData = { +export type GraphQlResponse = Promise; +export type GraphQlQueryResponseData = { [key: string]: any; }; -export declare type GraphQlQueryResponse = { +export type GraphQlQueryResponse = { data: ResponseData; errors?: [ { + type: string; message: string; path: [string]; extensions: { diff --git a/node_modules/@octokit/graphql/dist-types/version.d.ts b/node_modules/@octokit/graphql/dist-types/version.d.ts index 229558b..b74fa9f 100644 --- a/node_modules/@octokit/graphql/dist-types/version.d.ts +++ b/node_modules/@octokit/graphql/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "4.6.0"; +export declare const VERSION = "5.0.5"; diff --git a/node_modules/@octokit/graphql/dist-web/index.js b/node_modules/@octokit/graphql/dist-web/index.js index 6d4e263..6eee986 100644 --- a/node_modules/@octokit/graphql/dist-web/index.js +++ b/node_modules/@octokit/graphql/dist-web/index.js @@ -1,16 +1,22 @@ import { request } from '@octokit/request'; import { getUserAgent } from 'universal-user-agent'; -const VERSION = "4.6.0"; +const VERSION = "5.0.5"; -class GraphqlError extends Error { - constructor(request, response) { - const message = response.data.errors[0].message; - super(message); - Object.assign(this, response.data); - Object.assign(this, { headers: response.headers }); - this.name = "GraphqlError"; +function _buildMessageForResponseErrors(data) { + return (`Request failed due to following response errors:\n` + + data.errors.map((e) => ` - ${e.message}`).join("\n")); +} +class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + // Expose the errors and response data in their shorthand properties. + this.errors = response.errors; + this.data = response.data; // Maintains proper stack trace (only available on V8) /* istanbul ignore next */ if (Error.captureStackTrace) { @@ -28,10 +34,18 @@ const NON_VARIABLE_OPTIONS = [ "query", "mediaType", ]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; function graphql(request, query, options) { - if (typeof query === "string" && options && "query" in options) { - return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } } const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { @@ -57,23 +71,20 @@ function graphql(request, query, options) { for (const key of Object.keys(response.headers)) { headers[key] = response.headers[key]; } - throw new GraphqlError(requestOptions, { - headers, - data: response.data, - }); + throw new GraphqlResponseError(requestOptions, headers, response.data); } return response.data.data; }); } -function withDefaults(request$1, newDefaults) { - const newRequest = request$1.defaults(newDefaults); +function withDefaults(request, newDefaults) { + const newRequest = request.defaults(newDefaults); const newApi = (query, options) => { return graphql(newRequest, query, options); }; return Object.assign(newApi, { defaults: withDefaults.bind(null, newRequest), - endpoint: request.endpoint, + endpoint: newRequest.endpoint, }); } @@ -91,5 +102,5 @@ function withCustomRequest(customRequest) { }); } -export { graphql$1 as graphql, withCustomRequest }; +export { GraphqlResponseError, graphql$1 as graphql, withCustomRequest }; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/dist-web/index.js.map b/node_modules/@octokit/graphql/dist-web/index.js.map index 840bceb..8972bbc 100644 --- a/node_modules/@octokit/graphql/dist-web/index.js.map +++ b/node_modules/@octokit/graphql/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/error.js","../dist-src/graphql.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.6.0\";\n","export class GraphqlError extends Error {\n constructor(request, response) {\n const message = response.data.errors[0].message;\n super(message);\n Object.assign(this, response.data);\n Object.assign(this, { headers: response.headers });\n this.name = \"GraphqlError\";\n this.request = request;\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { GraphqlError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nexport function graphql(request, query, options) {\n if (typeof query === \"string\" && options && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlError(requestOptions, {\n headers,\n data: response.data,\n });\n }\n return response.data.data;\n });\n}\n","import { request as Request } from \"@octokit/request\";\nimport { graphql } from \"./graphql\";\nexport function withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: Request.endpoint,\n });\n}\n","import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport { withDefaults } from \"./with-defaults\";\nexport const graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,\n },\n method: \"POST\",\n url: \"/graphql\",\n});\nexport function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\",\n });\n}\n"],"names":["request","Request","graphql"],"mappings":";;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACAnC,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE;AACnC,QAAQ,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AACxD,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3C,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;AAC3D,QAAQ,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;AACnC,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,KAAK;AACL,CAAC;;ACbD,MAAM,oBAAoB,GAAG;AAC7B,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,OAAO;AACX,IAAI,WAAW;AACf,CAAC,CAAC;AACF,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAC7C,AAAO,SAAS,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;AACjD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,EAAE;AACpE,QAAQ,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,0DAA0D,CAAC,CAAC,CAAC,CAAC;AACvG,KAAK;AACL,IAAI,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;AAChG,IAAI,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AAC9E,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAChD,YAAY,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AAC7C,YAAY,OAAO,MAAM,CAAC;AAC1B,SAAS;AACT,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AAC/B,YAAY,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;AAClC,SAAS;AACT,QAAQ,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AACnD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;AACA;AACA,IAAI,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/E,IAAI,IAAI,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACnF,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK;AACtD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE;AAClC,YAAY,MAAM,OAAO,GAAG,EAAE,CAAC;AAC/B,YAAY,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;AAC7D,gBAAgB,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACrD,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE;AACnD,gBAAgB,OAAO;AACvB,gBAAgB,IAAI,EAAE,QAAQ,CAAC,IAAI;AACnC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;AAClC,KAAK,CAAC,CAAC;AACP,CAAC;;AC5CM,SAAS,YAAY,CAACA,SAAO,EAAE,WAAW,EAAE;AACnD,IAAI,MAAM,UAAU,GAAGA,SAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK;AACvC,QAAQ,OAAO,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACnD,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;AACrD,QAAQ,QAAQ,EAAEC,OAAO,CAAC,QAAQ;AAClC,KAAK,CAAC,CAAC;AACP,CAAC;;ACPW,MAACC,SAAO,GAAG,YAAY,CAAC,OAAO,EAAE;AAC7C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,IAAI,MAAM,EAAE,MAAM;AAClB,IAAI,GAAG,EAAE,UAAU;AACnB,CAAC,CAAC,CAAC;AACH,AAAO,SAAS,iBAAiB,CAAC,aAAa,EAAE;AACjD,IAAI,OAAO,YAAY,CAAC,aAAa,EAAE;AACvC,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,GAAG,EAAE,UAAU;AACvB,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/error.js","../dist-src/graphql.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.0.5\";\n","function _buildMessageForResponseErrors(data) {\n return (`Request failed due to following response errors:\\n` +\n data.errors.map((e) => ` - ${e.message}`).join(\"\\n\"));\n}\nexport class GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n // Expose the errors and response data in their shorthand properties.\n this.errors = response.errors;\n this.data = response.data;\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { GraphqlResponseError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nexport function graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n return response.data.data;\n });\n}\n","import { graphql } from \"./graphql\";\nexport function withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint,\n });\n}\n","import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport { withDefaults } from \"./with-defaults\";\nexport const graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,\n },\n method: \"POST\",\n url: \"/graphql\",\n});\nexport { GraphqlResponseError } from \"./error\";\nexport function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\",\n });\n}\n"],"names":["graphql"],"mappings":";;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C,SAAS,8BAA8B,CAAC,IAAI,EAAE;AAC9C,IAAI,QAAQ,CAAC,kDAAkD,CAAC;AAChE,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAC9D,CAAC;AACD,AAAO,MAAM,oBAAoB,SAAS,KAAK,CAAC;AAChD,IAAI,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC5C,QAAQ,KAAK,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxD,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACjC,QAAQ,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;AAC3C;AACA,QAAQ,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACtC,QAAQ,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;AAClC;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,KAAK;AACL,CAAC;;ACnBD,MAAM,oBAAoB,GAAG;AAC7B,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,OAAO;AACX,IAAI,WAAW;AACf,CAAC,CAAC;AACF,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9D,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAC7C,AAAO,SAAS,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;AACjD,IAAI,IAAI,OAAO,EAAE;AACjB,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,OAAO,EAAE;AAC7D,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,0DAA0D,CAAC,CAAC,CAAC,CAAC;AAC3G,SAAS;AACT,QAAQ,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzD,gBAAgB,SAAS;AACzB,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,oBAAoB,EAAE,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC;AAC5G,SAAS;AACT,KAAK;AACL,IAAI,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;AAChG,IAAI,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AAC9E,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAChD,YAAY,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AAC7C,YAAY,OAAO,MAAM,CAAC;AAC1B,SAAS;AACT,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AAC/B,YAAY,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;AAClC,SAAS;AACT,QAAQ,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AACnD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;AACA;AACA,IAAI,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/E,IAAI,IAAI,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACnF,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK;AACtD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE;AAClC,YAAY,MAAM,OAAO,GAAG,EAAE,CAAC;AAC/B,YAAY,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;AAC7D,gBAAgB,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACrD,aAAa;AACb,YAAY,MAAM,IAAI,oBAAoB,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnF,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;AAClC,KAAK,CAAC,CAAC;AACP,CAAC;;AClDM,SAAS,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE;AACnD,IAAI,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK;AACvC,QAAQ,OAAO,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACnD,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;AACrD,QAAQ,QAAQ,EAAE,UAAU,CAAC,QAAQ;AACrC,KAAK,CAAC,CAAC;AACP,CAAC;;ACNW,MAACA,SAAO,GAAG,YAAY,CAAC,OAAO,EAAE;AAC7C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,IAAI,MAAM,EAAE,MAAM;AAClB,IAAI,GAAG,EAAE,UAAU;AACnB,CAAC,CAAC,CAAC;AACH,AACO,SAAS,iBAAiB,CAAC,aAAa,EAAE;AACjD,IAAI,OAAO,YAAY,CAAC,aAAa,EAAE;AACvC,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,GAAG,EAAE,UAAU;AACvB,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/README.md new file mode 100644 index 0000000..c7b5232 --- /dev/null +++ b/node_modules/@octokit/graphql/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://github.com/octokit/endpoint.js/workflows/Test/badge.svg)](https://github.com/octokit/endpoint.js/actions/workflows/test.yml?query=branch%3Amain) + +`@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(route, options)` or `endpoint(options)`](#endpointroute-options-or-endpointoptions) + - [`endpoint.defaults()`](#endpointdefaults) + - [`endpoint.DEFAULTS`](#endpointdefaults) + - [`endpoint.merge(route, options)` or `endpoint.merge(options)`](#endpointmergeroute-options-or-endpointmergeoptions) + - [`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.skypack.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 common 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/graphql/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-node/index.js new file mode 100644 index 0000000..ef51e39 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-node/index.js @@ -0,0 +1,348 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var isPlainObject = require('is-plain-object'); +var universalUserAgent = 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 mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject.isPlainObject(options[key])) { + if (!(key in defaults)) Object.assign(result, { + [key]: options[key] + });else result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { + [key]: options[key] + }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map(name => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], + result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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 = "7.0.4"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; + +const endpoint = withDefaults(null, DEFAULTS); + +exports.endpoint = endpoint; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-node/index.js.map new file mode 100644 index 0000000..10e5ff9 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","removeUndefinedProperties","obj","undefined","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequest","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;AAAO,SAASA,aAAa,CAACC,MAAM,EAAE;EAClC,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,EAAE;;EAEb,OAAOC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,MAAM,CAAC,CAACC,MAAM,EAAEC,GAAG,KAAK;IAC/CD,MAAM,CAACC,GAAG,CAACC,WAAW,EAAE,CAAC,GAAGN,MAAM,CAACK,GAAG,CAAC;IACvC,OAAOD,MAAM;GAChB,EAAE,EAAE,CAAC;AACV;;ACPO,SAASG,SAAS,CAACC,QAAQ,EAAEC,OAAO,EAAE;EACzC,MAAMC,MAAM,GAAGT,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEH,QAAQ,CAAC;EAC1CP,MAAM,CAACC,IAAI,CAACO,OAAO,CAAC,CAACG,OAAO,CAAEP,GAAG,IAAK;IAClC,IAAIQ,2BAAa,CAACJ,OAAO,CAACJ,GAAG,CAAC,CAAC,EAAE;MAC7B,IAAI,EAAEA,GAAG,IAAIG,QAAQ,CAAC,EAClBP,MAAM,CAACU,MAAM,CAACD,MAAM,EAAE;QAAE,CAACL,GAAG,GAAGI,OAAO,CAACJ,GAAG;OAAG,CAAC,CAAC,KAE/CK,MAAM,CAACL,GAAG,CAAC,GAAGE,SAAS,CAACC,QAAQ,CAACH,GAAG,CAAC,EAAEI,OAAO,CAACJ,GAAG,CAAC,CAAC;KAC3D,MACI;MACDJ,MAAM,CAACU,MAAM,CAACD,MAAM,EAAE;QAAE,CAACL,GAAG,GAAGI,OAAO,CAACJ,GAAG;OAAG,CAAC;;GAErD,CAAC;EACF,OAAOK,MAAM;AACjB;;ACfO,SAASI,yBAAyB,CAACC,GAAG,EAAE;EAC3C,KAAK,MAAMV,GAAG,IAAIU,GAAG,EAAE;IACnB,IAAIA,GAAG,CAACV,GAAG,CAAC,KAAKW,SAAS,EAAE;MACxB,OAAOD,GAAG,CAACV,GAAG,CAAC;;;EAGvB,OAAOU,GAAG;AACd;;ACJO,SAASE,KAAK,CAACT,QAAQ,EAAEU,KAAK,EAAET,OAAO,EAAE;EAC5C,IAAI,OAAOS,KAAK,KAAK,QAAQ,EAAE;IAC3B,IAAI,CAACC,MAAM,EAAEC,GAAG,CAAC,GAAGF,KAAK,CAACG,KAAK,CAAC,GAAG,CAAC;IACpCZ,OAAO,GAAGR,MAAM,CAACU,MAAM,CAACS,GAAG,GAAG;MAAED,MAAM;MAAEC;KAAK,GAAG;MAAEA,GAAG,EAAED;KAAQ,EAAEV,OAAO,CAAC;GAC5E,MACI;IACDA,OAAO,GAAGR,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEO,KAAK,CAAC;;;EAGtCT,OAAO,CAACa,OAAO,GAAGvB,aAAa,CAACU,OAAO,CAACa,OAAO,CAAC;;EAEhDR,yBAAyB,CAACL,OAAO,CAAC;EAClCK,yBAAyB,CAACL,OAAO,CAACa,OAAO,CAAC;EAC1C,MAAMC,aAAa,GAAGhB,SAAS,CAACC,QAAQ,IAAI,EAAE,EAAEC,OAAO,CAAC;;EAExD,IAAID,QAAQ,IAAIA,QAAQ,CAACgB,SAAS,CAACC,QAAQ,CAACC,MAAM,EAAE;IAChDH,aAAa,CAACC,SAAS,CAACC,QAAQ,GAAGjB,QAAQ,CAACgB,SAAS,CAACC,QAAQ,CACzDE,MAAM,CAAEC,OAAO,IAAK,CAACL,aAAa,CAACC,SAAS,CAACC,QAAQ,CAACI,QAAQ,CAACD,OAAO,CAAC,CAAC,CACxEE,MAAM,CAACP,aAAa,CAACC,SAAS,CAACC,QAAQ,CAAC;;EAEjDF,aAAa,CAACC,SAAS,CAACC,QAAQ,GAAGF,aAAa,CAACC,SAAS,CAACC,QAAQ,CAACM,GAAG,CAAEH,OAAO,IAAKA,OAAO,CAACI,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;EACrH,OAAOT,aAAa;AACxB;;ACzBO,SAASU,kBAAkB,CAACb,GAAG,EAAEc,UAAU,EAAE;EAChD,MAAMC,SAAS,GAAG,IAAI,CAACC,IAAI,CAAChB,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;EAC5C,MAAMiB,KAAK,GAAGpC,MAAM,CAACC,IAAI,CAACgC,UAAU,CAAC;EACrC,IAAIG,KAAK,CAACX,MAAM,KAAK,CAAC,EAAE;IACpB,OAAON,GAAG;;EAEd,OAAQA,GAAG,GACPe,SAAS,GACTE,KAAK,CACAN,GAAG,CAAEO,IAAI,IAAK;IACf,IAAIA,IAAI,KAAK,GAAG,EAAE;MACd,OAAQ,IAAI,GAAGJ,UAAU,CAACK,CAAC,CAAClB,KAAK,CAAC,GAAG,CAAC,CAACU,GAAG,CAACS,kBAAkB,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;;IAE5E,OAAQ,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAI,CAAC,CAAE,EAAC;GAC3D,CAAC,CACGG,IAAI,CAAC,GAAG,CAAC;AACtB;;AChBA,MAAMC,gBAAgB,GAAG,YAAY;AACrC,SAASC,cAAc,CAACC,YAAY,EAAE;EAClC,OAAOA,YAAY,CAACZ,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAACX,KAAK,CAAC,GAAG,CAAC;AAC5D;AACA,AAAO,SAASwB,uBAAuB,CAACzB,GAAG,EAAE;EACzC,MAAM0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAK,CAACL,gBAAgB,CAAC;EAC3C,IAAI,CAACI,OAAO,EAAE;IACV,OAAO,EAAE;;EAEb,OAAOA,OAAO,CAACf,GAAG,CAACY,cAAc,CAAC,CAACxC,MAAM,CAAC,CAAC6C,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAAClB,MAAM,CAACmB,CAAC,CAAC,EAAE,EAAE,CAAC;AACxE;;ACVO,SAASC,IAAI,CAAClD,MAAM,EAAEmD,UAAU,EAAE;EACrC,OAAOlD,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CACrB2B,MAAM,CAAEyB,MAAM,IAAK,CAACD,UAAU,CAACtB,QAAQ,CAACuB,MAAM,CAAC,CAAC,CAChDjD,MAAM,CAAC,CAACY,GAAG,EAAEV,GAAG,KAAK;IACtBU,GAAG,CAACV,GAAG,CAAC,GAAGL,MAAM,CAACK,GAAG,CAAC;IACtB,OAAOU,GAAG;GACb,EAAE,EAAE,CAAC;AACV;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASsC,cAAc,CAACC,GAAG,EAAE;EACzB,OAAOA,GAAG,CACLjC,KAAK,CAAC,oBAAoB,CAAC,CAC3BU,GAAG,CAAC,UAAUwB,IAAI,EAAE;IACrB,IAAI,CAAC,cAAc,CAACnB,IAAI,CAACmB,IAAI,CAAC,EAAE;MAC5BA,IAAI,GAAGC,SAAS,CAACD,IAAI,CAAC,CAACvB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;;IAEpE,OAAOuB,IAAI;GACd,CAAC,CACGd,IAAI,CAAC,EAAE,CAAC;AACjB;AACA,SAASgB,gBAAgB,CAACH,GAAG,EAAE;EAC3B,OAAOd,kBAAkB,CAACc,GAAG,CAAC,CAACtB,OAAO,CAAC,UAAU,EAAE,UAAU0B,CAAC,EAAE;IAC5D,OAAO,GAAG,GAAGA,CAAC,CAACC,UAAU,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,WAAW,EAAE;GAC1D,CAAC;AACN;AACA,SAASC,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAE3D,GAAG,EAAE;EACvC2D,KAAK,GACDD,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,GAC9BV,cAAc,CAACW,KAAK,CAAC,GACrBP,gBAAgB,CAACO,KAAK,CAAC;EACjC,IAAI3D,GAAG,EAAE;IACL,OAAOoD,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,GAAG2D,KAAK;GAC7C,MACI;IACD,OAAOA,KAAK;;AAEpB;AACA,SAASC,SAAS,CAACD,KAAK,EAAE;EACtB,OAAOA,KAAK,KAAKhD,SAAS,IAAIgD,KAAK,KAAK,IAAI;AAChD;AACA,SAASE,aAAa,CAACH,QAAQ,EAAE;EAC7B,OAAOA,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG;AACnE;AACA,SAASI,SAAS,CAACC,OAAO,EAAEL,QAAQ,EAAE1D,GAAG,EAAEgE,QAAQ,EAAE;EACjD,IAAIL,KAAK,GAAGI,OAAO,CAAC/D,GAAG,CAAC;IAAEK,MAAM,GAAG,EAAE;EACrC,IAAIuD,SAAS,CAACD,KAAK,CAAC,IAAIA,KAAK,KAAK,EAAE,EAAE;IAClC,IAAI,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,SAAS,EAAE;MAC5BA,KAAK,GAAGA,KAAK,CAACJ,QAAQ,EAAE;MACxB,IAAIS,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;QAC9BL,KAAK,GAAGA,KAAK,CAACM,SAAS,CAAC,CAAC,EAAEC,QAAQ,CAACF,QAAQ,EAAE,EAAE,CAAC,CAAC;;MAEtD3D,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAEE,aAAa,CAACH,QAAQ,CAAC,GAAG1D,GAAG,GAAG,EAAE,CAAC,CAAC;KAChF,MACI;MACD,IAAIgE,QAAQ,KAAK,GAAG,EAAE;QAClB,IAAII,KAAK,CAACC,OAAO,CAACV,KAAK,CAAC,EAAE;UACtBA,KAAK,CAACrC,MAAM,CAACsC,SAAS,CAAC,CAACrD,OAAO,CAAC,UAAUoD,KAAK,EAAE;YAC7CtD,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAEE,aAAa,CAACH,QAAQ,CAAC,GAAG1D,GAAG,GAAG,EAAE,CAAC,CAAC;WAChF,CAAC;SACL,MACI;UACDJ,MAAM,CAACC,IAAI,CAAC8D,KAAK,CAAC,CAACpD,OAAO,CAAC,UAAU+D,CAAC,EAAE;YACpC,IAAIV,SAAS,CAACD,KAAK,CAACW,CAAC,CAAC,CAAC,EAAE;cACrBjE,MAAM,CAAC8D,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAACW,CAAC,CAAC,EAAEA,CAAC,CAAC,CAAC;;WAEtD,CAAC;;OAET,MACI;QACD,MAAMC,GAAG,GAAG,EAAE;QACd,IAAIH,KAAK,CAACC,OAAO,CAACV,KAAK,CAAC,EAAE;UACtBA,KAAK,CAACrC,MAAM,CAACsC,SAAS,CAAC,CAACrD,OAAO,CAAC,UAAUoD,KAAK,EAAE;YAC7CY,GAAG,CAACJ,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAAC,CAAC;WACzC,CAAC;SACL,MACI;UACD/D,MAAM,CAACC,IAAI,CAAC8D,KAAK,CAAC,CAACpD,OAAO,CAAC,UAAU+D,CAAC,EAAE;YACpC,IAAIV,SAAS,CAACD,KAAK,CAACW,CAAC,CAAC,CAAC,EAAE;cACrBC,GAAG,CAACJ,IAAI,CAACf,gBAAgB,CAACkB,CAAC,CAAC,CAAC;cAC7BC,GAAG,CAACJ,IAAI,CAACV,WAAW,CAACC,QAAQ,EAAEC,KAAK,CAACW,CAAC,CAAC,CAACf,QAAQ,EAAE,CAAC,CAAC;;WAE3D,CAAC;;QAEN,IAAIM,aAAa,CAACH,QAAQ,CAAC,EAAE;UACzBrD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,GAAGuE,GAAG,CAACnC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC3D,MACI,IAAImC,GAAG,CAAClD,MAAM,KAAK,CAAC,EAAE;UACvBhB,MAAM,CAAC8D,IAAI,CAACI,GAAG,CAACnC,IAAI,CAAC,GAAG,CAAC,CAAC;;;;GAIzC,MACI;IACD,IAAIsB,QAAQ,KAAK,GAAG,EAAE;MAClB,IAAIE,SAAS,CAACD,KAAK,CAAC,EAAE;QAClBtD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,CAAC;;KAEzC,MACI,IAAI2D,KAAK,KAAK,EAAE,KAAKD,QAAQ,KAAK,GAAG,IAAIA,QAAQ,KAAK,GAAG,CAAC,EAAE;MAC7DrD,MAAM,CAAC8D,IAAI,CAACf,gBAAgB,CAACpD,GAAG,CAAC,GAAG,GAAG,CAAC;KAC3C,MACI,IAAI2D,KAAK,KAAK,EAAE,EAAE;MACnBtD,MAAM,CAAC8D,IAAI,CAAC,EAAE,CAAC;;;EAGvB,OAAO9D,MAAM;AACjB;AACA,AAAO,SAASmE,QAAQ,CAACC,QAAQ,EAAE;EAC/B,OAAO;IACHC,MAAM,EAAEA,MAAM,CAACC,IAAI,CAAC,IAAI,EAAEF,QAAQ;GACrC;AACL;AACA,SAASC,MAAM,CAACD,QAAQ,EAAEV,OAAO,EAAE;EAC/B,IAAIa,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;EACnD,OAAOH,QAAQ,CAAC9C,OAAO,CAAC,4BAA4B,EAAE,UAAUkD,CAAC,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACpF,IAAID,UAAU,EAAE;MACZ,IAAIpB,QAAQ,GAAG,EAAE;MACjB,MAAMsB,MAAM,GAAG,EAAE;MACjB,IAAIJ,SAAS,CAACK,OAAO,CAACH,UAAU,CAACI,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;QAChDxB,QAAQ,GAAGoB,UAAU,CAACI,MAAM,CAAC,CAAC,CAAC;QAC/BJ,UAAU,GAAGA,UAAU,CAACK,MAAM,CAAC,CAAC,CAAC;;MAErCL,UAAU,CAAC9D,KAAK,CAAC,IAAI,CAAC,CAACT,OAAO,CAAC,UAAU6E,QAAQ,EAAE;QAC/C,IAAIb,GAAG,GAAG,2BAA2B,CAACc,IAAI,CAACD,QAAQ,CAAC;QACpDJ,MAAM,CAACb,IAAI,CAACL,SAAS,CAACC,OAAO,EAAEL,QAAQ,EAAEa,GAAG,CAAC,CAAC,CAAC,EAAEA,GAAG,CAAC,CAAC,CAAC,IAAIA,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;OACtE,CAAC;MACF,IAAIb,QAAQ,IAAIA,QAAQ,KAAK,GAAG,EAAE;QAC9B,IAAI5B,SAAS,GAAG,GAAG;QACnB,IAAI4B,QAAQ,KAAK,GAAG,EAAE;UAClB5B,SAAS,GAAG,GAAG;SAClB,MACI,IAAI4B,QAAQ,KAAK,GAAG,EAAE;UACvB5B,SAAS,GAAG4B,QAAQ;;QAExB,OAAO,CAACsB,MAAM,CAAC3D,MAAM,KAAK,CAAC,GAAGqC,QAAQ,GAAG,EAAE,IAAIsB,MAAM,CAAC5C,IAAI,CAACN,SAAS,CAAC;OACxE,MACI;QACD,OAAOkD,MAAM,CAAC5C,IAAI,CAAC,GAAG,CAAC;;KAE9B,MACI;MACD,OAAOY,cAAc,CAAC+B,OAAO,CAAC;;GAErC,CAAC;AACN;;AC/JO,SAASO,KAAK,CAAClF,OAAO,EAAE;;EAE3B,IAAIU,MAAM,GAAGV,OAAO,CAACU,MAAM,CAAC0C,WAAW,EAAE;;EAEzC,IAAIzC,GAAG,GAAG,CAACX,OAAO,CAACW,GAAG,IAAI,GAAG,EAAEY,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;EAC9D,IAAIV,OAAO,GAAGrB,MAAM,CAACU,MAAM,CAAC,EAAE,EAAEF,OAAO,CAACa,OAAO,CAAC;EAChD,IAAIsE,IAAI;EACR,IAAI1D,UAAU,GAAGgB,IAAI,CAACzC,OAAO,EAAE,CAC3B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,CACd,CAAC;;EAEF,MAAMoF,gBAAgB,GAAGhD,uBAAuB,CAACzB,GAAG,CAAC;EACrDA,GAAG,GAAGyD,QAAQ,CAACzD,GAAG,CAAC,CAAC2D,MAAM,CAAC7C,UAAU,CAAC;EACtC,IAAI,CAAC,OAAO,CAACE,IAAI,CAAChB,GAAG,CAAC,EAAE;IACpBA,GAAG,GAAGX,OAAO,CAACqF,OAAO,GAAG1E,GAAG;;EAE/B,MAAM2E,iBAAiB,GAAG9F,MAAM,CAACC,IAAI,CAACO,OAAO,CAAC,CACzCkB,MAAM,CAAEyB,MAAM,IAAKyC,gBAAgB,CAAChE,QAAQ,CAACuB,MAAM,CAAC,CAAC,CACrDtB,MAAM,CAAC,SAAS,CAAC;EACtB,MAAMkE,mBAAmB,GAAG9C,IAAI,CAAChB,UAAU,EAAE6D,iBAAiB,CAAC;EAC/D,MAAME,eAAe,GAAG,4BAA4B,CAAC7D,IAAI,CAACd,OAAO,CAAC4E,MAAM,CAAC;EACzE,IAAI,CAACD,eAAe,EAAE;IAClB,IAAIxF,OAAO,CAACe,SAAS,CAAC2E,MAAM,EAAE;;MAE1B7E,OAAO,CAAC4E,MAAM,GAAG5E,OAAO,CAAC4E,MAAM,CAC1B7E,KAAK,CAAC,GAAG,CAAC,CACVU,GAAG,CAAEH,OAAO,IAAKA,OAAO,CAACI,OAAO,CAAC,kDAAkD,EAAG,uBAAsBvB,OAAO,CAACe,SAAS,CAAC2E,MAAO,EAAC,CAAC,CAAC,CACxI1D,IAAI,CAAC,GAAG,CAAC;;IAElB,IAAIhC,OAAO,CAACe,SAAS,CAACC,QAAQ,CAACC,MAAM,EAAE;MACnC,MAAM0E,wBAAwB,GAAG9E,OAAO,CAAC4E,MAAM,CAACnD,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE;MAClFzB,OAAO,CAAC4E,MAAM,GAAGE,wBAAwB,CACpCtE,MAAM,CAACrB,OAAO,CAACe,SAAS,CAACC,QAAQ,CAAC,CAClCM,GAAG,CAAEH,OAAO,IAAK;QAClB,MAAMuE,MAAM,GAAG1F,OAAO,CAACe,SAAS,CAAC2E,MAAM,GAChC,IAAG1F,OAAO,CAACe,SAAS,CAAC2E,MAAO,EAAC,GAC9B,OAAO;QACb,OAAQ,0BAAyBvE,OAAQ,WAAUuE,MAAO,EAAC;OAC9D,CAAC,CACG1D,IAAI,CAAC,GAAG,CAAC;;;;;EAKtB,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAACZ,QAAQ,CAACV,MAAM,CAAC,EAAE;IAClCC,GAAG,GAAGa,kBAAkB,CAACb,GAAG,EAAE4E,mBAAmB,CAAC;GACrD,MACI;IACD,IAAI,MAAM,IAAIA,mBAAmB,EAAE;MAC/BJ,IAAI,GAAGI,mBAAmB,CAACK,IAAI;KAClC,MACI;MACD,IAAIpG,MAAM,CAACC,IAAI,CAAC8F,mBAAmB,CAAC,CAACtE,MAAM,EAAE;QACzCkE,IAAI,GAAGI,mBAAmB;;;;;EAKtC,IAAI,CAAC1E,OAAO,CAAC,cAAc,CAAC,IAAI,OAAOsE,IAAI,KAAK,WAAW,EAAE;IACzDtE,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC;;;;EAI/D,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAACO,QAAQ,CAACV,MAAM,CAAC,IAAI,OAAOyE,IAAI,KAAK,WAAW,EAAE;IAClEA,IAAI,GAAG,EAAE;;;EAGb,OAAO3F,MAAM,CAACU,MAAM,CAAC;IAAEQ,MAAM;IAAEC,GAAG;IAAEE;GAAS,EAAE,OAAOsE,IAAI,KAAK,WAAW,GAAG;IAAEA;GAAM,GAAG,IAAI,EAAEnF,OAAO,CAAC6F,OAAO,GAAG;IAAEA,OAAO,EAAE7F,OAAO,CAAC6F;GAAS,GAAG,IAAI,CAAC;AACxJ;;AC3EO,SAASC,oBAAoB,CAAC/F,QAAQ,EAAEU,KAAK,EAAET,OAAO,EAAE;EAC3D,OAAOkF,KAAK,CAAC1E,KAAK,CAACT,QAAQ,EAAEU,KAAK,EAAET,OAAO,CAAC,CAAC;AACjD;;ACDO,SAAS+F,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EACnD,MAAMC,QAAQ,GAAG1F,KAAK,CAACwF,WAAW,EAAEC,WAAW,CAAC;EAChD,MAAME,QAAQ,GAAGL,oBAAoB,CAACvB,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;EAC1D,OAAO1G,MAAM,CAACU,MAAM,CAACiG,QAAQ,EAAE;IAC3BD,QAAQ;IACRnG,QAAQ,EAAEgG,YAAY,CAACxB,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;IAC3C1F,KAAK,EAAEA,KAAK,CAAC+D,IAAI,CAAC,IAAI,EAAE2B,QAAQ,CAAC;IACjChB;GACH,CAAC;AACN;;ACZO,MAAMkB,OAAO,GAAG,mBAAmB;;ACE1C,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAC;AACpE;AACA;AACA,AAAO,MAAMJ,QAAQ,GAAG;EACpBxF,MAAM,EAAE,KAAK;EACb2E,OAAO,EAAE,wBAAwB;EACjCxE,OAAO,EAAE;IACL4E,MAAM,EAAE,gCAAgC;IACxC,YAAY,EAAEY;GACjB;EACDtF,SAAS,EAAE;IACP2E,MAAM,EAAE,EAAE;IACV1E,QAAQ,EAAE;;AAElB,CAAC;;MCdYmF,QAAQ,GAAGJ,YAAY,CAAC,IAAI,EAAEG,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/defaults.js new file mode 100644 index 0000000..456e586 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/defaults.js @@ -0,0 +1,17 @@ +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +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/graphql/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js new file mode 100644 index 0000000..5763758 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/index.js new file mode 100644 index 0000000..599917f --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/merge.js new file mode 100644 index 0000000..1abcecf --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,26 @@ +import { lowercaseKeys } from "./util/lowercase-keys"; +import { mergeDeep } from "./util/merge-deep"; +import { removeUndefinedProperties } from "./util/remove-undefined-properties"; +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 = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/parse.js new file mode 100644 index 0000000..8cf5885 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/parse.js @@ -0,0 +1,78 @@ +import { addQueryParameters } from "./util/add-query-parameters"; +import { extractUrlVariableNames } from "./util/extract-url-variable-names"; +import { omit } from "./util/omit"; +import { parseUrl } from "./util/url-template"; +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 = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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/graphql/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js new file mode 100644 index 0000000..d26be31 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,17 @@ +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/graphql/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js new file mode 100644 index 0000000..3e75db2 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js new file mode 100644 index 0000000..0780642 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js new file mode 100644 index 0000000..d92aca3 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js @@ -0,0 +1,16 @@ +import { isPlainObject } from "is-plain-object"; +export function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/omit.js new file mode 100644 index 0000000..6245031 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js new file mode 100644 index 0000000..6b5ee5f --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js @@ -0,0 +1,8 @@ +export function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/url-template.js new file mode 100644 index 0000000..439b3fe --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/util/url-template.js @@ -0,0 +1,164 @@ +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +export function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/version.js new file mode 100644 index 0000000..2d27c3f --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "7.0.4"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-src/with-defaults.js new file mode 100644 index 0000000..81baf6c --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/defaults.d.ts new file mode 100644 index 0000000..30fcd20 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults } from "@octokit/types"; +export declare const DEFAULTS: EndpointDefaults; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts new file mode 100644 index 0000000..ff39e5e --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts @@ -0,0 +1,3 @@ +import { EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { DEFAULTS } from "./defaults"; +export declare function endpointWithDefaults(defaults: typeof DEFAULTS, route: Route | EndpointOptions, options?: RequestParameters): import("@octokit/types").RequestOptions; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/index.d.ts new file mode 100644 index 0000000..1ede136 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const endpoint: import("@octokit/types").EndpointInterface; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/merge.d.ts new file mode 100644 index 0000000..b75a15e --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/merge.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestParameters, Route } from "@octokit/types"; +export declare function merge(defaults: EndpointDefaults | null, route?: Route | RequestParameters, options?: RequestParameters): EndpointDefaults; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/parse.d.ts new file mode 100644 index 0000000..fbe2144 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/parse.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestOptions } from "@octokit/types"; +export declare function parse(options: EndpointDefaults): RequestOptions; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts new file mode 100644 index 0000000..4b192ac --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts new file mode 100644 index 0000000..93586d4 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts new file mode 100644 index 0000000..1daf307 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts @@ -0,0 +1,5 @@ +export declare function lowercaseKeys(object?: { + [key: string]: any; +}): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts new file mode 100644 index 0000000..914411c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts @@ -0,0 +1 @@ +export declare function mergeDeep(defaults: any, options: any): object; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts new file mode 100644 index 0000000..06927d6 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts new file mode 100644 index 0000000..92d8d85 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts @@ -0,0 +1 @@ +export declare function removeUndefinedProperties(obj: any): any; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts new file mode 100644 index 0000000..5d967ca --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts @@ -0,0 +1,3 @@ +export declare function parseUrl(template: string): { + expand: (context: object) => string; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/version.d.ts new file mode 100644 index 0000000..b9cbe53 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "7.0.4"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..6f5afd1 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestParameters, EndpointDefaults } from "@octokit/types"; +export declare function withDefaults(oldDefaults: EndpointDefaults | null, newDefaults: RequestParameters): EndpointInterface; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-web/index.js new file mode 100644 index 0000000..a31b913 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-web/index.js @@ -0,0 +1,378 @@ +import { isPlainObject } from 'is-plain-object'; +import { getUserAgent } from 'universal-user-agent'; + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } + else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return (url + + separator + + names + .map((name) => { + if (name === "q") { + return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+")); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }) + .join("&")); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object) + .filter((option) => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType", + ]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + 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; + } + } + } + // 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 = "7.0.4"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent, + }, + mediaType: { + format: "", + previews: [], + }, +}; + +const endpoint = withDefaults(null, DEFAULTS); + +export { endpoint }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-web/index.js.map b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-web/index.js.map new file mode 100644 index 0000000..08201f9 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;AACtC,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AACvD,QAAQ,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAChD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;;ACPO,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;AAC7C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1C,QAAQ,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;AACzC,YAAY,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;AAClC,gBAAgB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/D;AACA,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,SAAS;AACT,aAAa;AACb,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;;ACfM,SAAS,yBAAyB,CAAC,GAAG,EAAE;AAC/C,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AAC3B,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACpC,YAAY,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;ACJM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAChD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7C,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3C,KAAK;AACL;AACA,IAAI,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD;AACA,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,IAAI,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/C,IAAI,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AACxD,QAAQ,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;AACtE,aAAa,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrF,aAAa,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtD,KAAK;AACL,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1H,IAAI,OAAO,aAAa,CAAC;AACzB,CAAC;;ACzBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;AACpD,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AACjD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1C,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK;AAC3B,YAAY,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,gBAAgB,QAAQ,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC1F,aAAa;AACb,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,SAAS,CAAC;AACV,aAAa,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,CAAC;;AChBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,IAAI,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;AAC7C,IAAI,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAChD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;AACzC,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzD,SAAS,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAC9B,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,IAAI,OAAO,GAAG;AACd,SAAS,KAAK,CAAC,oBAAoB,CAAC;AACpC,SAAS,GAAG,CAAC,UAAU,IAAI,EAAE;AAC7B,QAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxC,YAAY,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC7E,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;AACpE,QAAQ,OAAO,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,KAAK,CAAC,CAAC;AACP,CAAC;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;AAC3C,IAAI,KAAK;AACT,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;AAC5C,cAAc,cAAc,CAAC,KAAK,CAAC;AACnC,cAAc,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACtC,IAAI,IAAI,GAAG,EAAE;AACb,QAAQ,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;AACnD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,IAAI,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AACpE,CAAC;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;AACrD,IAAI,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;AAC1C,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1C,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,SAAS,EAAE;AACxC,YAAY,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;AACrC,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AACnE,aAAa;AACb,YAAY,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAC1F,SAAS;AACT,aAAa;AACb,YAAY,IAAI,QAAQ,KAAK,GAAG,EAAE;AAClC,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,aAAa;AACb,iBAAiB;AACjB,gBAAgB,MAAM,GAAG,GAAG,EAAE,CAAC;AAC/B,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,4BAA4B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AACjF,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;AAC7C,oBAAoB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,iBAAiB;AACjB,qBAAqB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3C,oBAAoB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9B,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAClC,gBAAgB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AACnD,aAAa;AACb,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;AACzE,YAAY,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,EAAE;AAC/B,YAAY,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;AACnC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC3C,KAAK,CAAC;AACN,CAAC;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AACnC,IAAI,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;AAC5F,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,QAAQ,GAAG,EAAE,CAAC;AAC9B,YAAY,MAAM,MAAM,GAAG,EAAE,CAAC;AAC9B,YAAY,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;AAChE,gBAAgB,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAChD,gBAAgB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,aAAa;AACb,YAAY,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;AAC/D,gBAAgB,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,gBAAgB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,aAAa,CAAC,CAAC;AACf,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,IAAI,SAAS,GAAG,GAAG,CAAC;AACpC,gBAAgB,IAAI,QAAQ,KAAK,GAAG,EAAE;AACtC,oBAAoB,SAAS,GAAG,GAAG,CAAC;AACpC,iBAAiB;AACjB,qBAAqB,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC3C,oBAAoB,SAAS,GAAG,QAAQ,CAAC;AACzC,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtF,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AAC3C,SAAS;AACT,KAAK,CAAC,CAAC;AACP,CAAC;;AC/JM,SAAS,KAAK,CAAC,OAAO,EAAE;AAC/B;AACA,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;AAC9C;AACA,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACnE,IAAI,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD,IAAI,IAAI,IAAI,CAAC;AACb,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;AAC1D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5B,QAAQ,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AAClD,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9D,SAAS,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,IAAI,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AACpE,IAAI,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;AACtC;AACA,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAC3C,iBAAiB,KAAK,CAAC,GAAG,CAAC;AAC3B,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzJ,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC/C,YAAY,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/F,YAAY,OAAO,CAAC,MAAM,GAAG,wBAAwB;AACrD,iBAAiB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;AACnD,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK;AAClC,gBAAgB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;AACvD,sBAAsB,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACpD,sBAAsB,OAAO,CAAC;AAC9B,gBAAgB,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,aAAa,CAAC;AACd,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC1C,QAAQ,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAC3D,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,mBAAmB,EAAE;AAC3C,YAAY,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;AAC5C,SAAS;AACT,aAAa;AACb,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;AACzD,gBAAgB,IAAI,GAAG,mBAAmB,CAAC;AAC3C,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AACjE,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AACpE,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AAC1E,QAAQ,IAAI,GAAG,EAAE,CAAC;AAClB,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzJ,CAAC;;AC3EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAC/D,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AACvD,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/D,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACzC,QAAQ,KAAK;AACb,KAAK,CAAC,CAAC;AACP,CAAC;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AACrE;AACA;AACA,AAAO,MAAM,QAAQ,GAAG;AACxB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,OAAO,EAAE;AACb,QAAQ,MAAM,EAAE,gCAAgC;AAChD,QAAQ,YAAY,EAAE,SAAS;AAC/B,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,MAAM,EAAE,EAAE;AAClB,QAAQ,QAAQ,EAAE,EAAE;AACpB,KAAK;AACL,CAAC,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/package.json new file mode 100644 index 0000000..2184bb7 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,47 @@ +{ + "name": "@octokit/endpoint", + "description": "Turns REST API endpoints into generic request options", + "version": "7.0.4", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "repository": "github:octokit/endpoint.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "jest": "^29.0.0", + "prettier": "2.8.3", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/LICENSE b/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 0000000..c61fbbe --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +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/graphql/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 0000000..9da833c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 0000000..26eae6a --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,20 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public" + }, + "version": "16.0.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "10.0.0" + } +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..806b5bc --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,118413 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installations": { + /** + * You must use a [JWT](https://docs.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. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/code_security_and_analysis": { + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + get: operations["secret-scanning/get-security-analysis-settings-for-enterprise"]; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + patch: operations["secret-scanning/patch-security-analysis-settings-for-enterprise"]; + }; + "/enterprises/{enterprise}/dependabot/alerts": { + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["dependabot/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + post: operations["secret-scanning/post-security-product-enablement-for-enterprise"]; + }; + "/events": { + /** 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. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * 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. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** 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. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + /** Gets information about a notification thread. */ + get: operations["activity/get-thread"]; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/orgs/{org}": { + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + get: operations["oidc/get-oidc-custom-sub-template-for-org"]; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + put: operations["oidc/update-oidc-custom-sub-template-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/required_workflows": { + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflows"]; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + post: operations["actions/create-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}": { + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/get-required-workflow"]; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/delete-required-workflow"]; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + patch: operations["actions/update-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": { + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-selected-repositories-required-workflow"]; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/set-selected-repos-to-required-workflow"]; + }; + "/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": { + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + put: operations["actions/add-selected-repo-to-required-workflow"]; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + delete: operations["actions/remove-selected-repo-from-required-workflow"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/actions/variables": { + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-org-variables"]; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + post: operations["actions/create-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}": { + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/get-org-variable"]; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + delete: operations["actions/delete-org-variable"]; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + patch: operations["actions/update-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories": { + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-variable"]; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories/{repository_id}": { + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-variable"]; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-variable"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/codespaces/billing": { + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["codespaces/set-codespaces-billing"]; + }; + "/orgs/{org}/codespaces/secrets": { + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-org-secrets"]; + }; + "/orgs/{org}/codespaces/secrets/public-key": { + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/get-org-public-key"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}": { + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/delete-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + get: operations["codespaces/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + put: operations["codespaces/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/dependabot/alerts": { + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-org"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** 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`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** 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. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** 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. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces": { + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-codespaces-for-user-in-org"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/memberships/{username}": { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations["orgs/get-membership-for-user"]; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * 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. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** 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. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/public_members": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/security-managers": { + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + get: operations["orgs/list-security-manager-teams"]; + }; + "/orgs/{org}/security-managers/teams/{team_slug}": { + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + put: operations["orgs/add-security-manager-team"]; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + delete: operations["orgs/remove-security-manager-team"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/orgs/{org}/{security_product}/{enablement}": { + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** 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: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** 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. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** 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. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** 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. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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: operations["rate-limit/get"]; + }; + "/repos/{org}/{repo}/actions/required_workflows": { + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/list-repo-required-workflows"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": { + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + get: operations["actions/get-repo-required-workflow"]; + }; + "/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": { + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-repo-required-workflow-usage"]; + }; + "/repos/{owner}/{repo}": { + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/get"]; + /** + * 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, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + get: operations["actions/get-custom-oidc-sub-claim-for-repo"]; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/set-custom-oidc-sub-claim-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": { + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + get: operations["actions/list-required-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/variables": { + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/list-repo-variables"]; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + post: operations["actions/create-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/variables/{name}": { + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + get: operations["actions/get-repo-variable"]; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-repo-variable"]; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * 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. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-pull-request-review-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-status-checks-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-all-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations["repos/set-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations["repos/add-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **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: operations["checks/get"]; + /** + * **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. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** 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. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **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. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-alert"]; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases": { + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/list-codeql-databases"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": { + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/check-collaborator"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + put: operations["repos/add-collaborator"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * 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. + * + * + * 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` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * 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`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + get: operations["repos/get-content"]; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * 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 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. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + get: operations["dependabot/get-alert"]; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + patch: operations["dependabot/update-alert"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + get: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * 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. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations["repos/create-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": { + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** 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. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + get: operations["repos/list-webhooks"]; + /** + * 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. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * 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` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * 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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** 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://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": { + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations["issues/check-user-can-be-assigned-to-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** 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. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + put: operations["repos/enable-lfs-for-repo"]; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** Lists all notifications for the current user in the specified repository. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + put: operations["repos/update-information-about-pages-site"]; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + post: operations["repos/create-pages-site"]; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * 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. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployment": { + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + post: operations["repos/create-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/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. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["pulls/list"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + get: operations["pulls/list-requested-reviewers"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["pulls/request-reviewers"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * 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. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * 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. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** 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. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** 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. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** 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://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables": { + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/list-environment-variables"]; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + post: operations["actions/create-environment-variable"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/variables/{name}": { + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + get: operations["actions/get-environment-variable"]; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + delete: operations["actions/delete-environment-variable"]; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + patch: operations["actions/update-environment-variable"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **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. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/publish": { + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/publish-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * 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. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/ssh_signing_keys": { + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/list-ssh-signing-keys-for-authenticated-user"]; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + post: operations["users/create-ssh-signing-key-for-authenticated-user"]; + }; + "/user/ssh_signing_keys/{ssh_signing_key_id}": { + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + get: operations["users/get-ssh-signing-key-for-authenticated-user"]; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + delete: operations["users/delete-ssh-signing-key-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** 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. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/ssh_signing_keys": { + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + get: operations["users/list-ssh-signing-keys-for-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/versions": { + /** Get all supported GitHub API versions. */ + get: operations["meta/get-all-versions"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description A GitHub user. + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description A GitHub user. + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise on GitHub. + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for a repository. + * @enum {string} + */ + repository_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for an organization. + * @enum {string} + */ + organization_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A repository on GitHub. + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # 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 [EMAIL]. 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/ + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** Enterprise Security Analysis Settings */ + "enterprise-security-analysis-settings": { + /** + * @description Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to + * this enterprise. + * @example false + */ + advanced_security_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * enterprise. + * @example false + */ + secret_scanning_enabled_for_new_repositories: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this enterprise. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + /** @description The security alert number. */ + "alert-number": number; + /** @description Details for the vulnerable package. */ + "dependabot-alert-package": { + /** @description The package's language or package management ecosystem. */ + ecosystem: string; + /** @description The unique package name within its ecosystem. */ + name: string; + }; + /** @description Details pertaining to one vulnerable version range for the advisory. */ + "dependabot-alert-security-vulnerability": { + package: components["schemas"]["dependabot-alert-package"]; + /** + * @description The severity of the vulnerability. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Conditions that identify vulnerable versions of this vulnerability's package. */ + vulnerable_version_range: string; + /** @description Details pertaining to the package version that patches this vulnerability. */ + first_patched_version: { + /** @description The package version that patches this vulnerability. */ + identifier: string; + } | null; + }; + /** @description Details for the GitHub Security Advisory. */ + "dependabot-alert-security-advisory": { + /** @description The unique GitHub Security Advisory ID assigned to the advisory. */ + ghsa_id: string; + /** @description The unique CVE ID assigned to the advisory. */ + cve_id: string | null; + /** @description A short, plain text summary of the advisory. */ + summary: string; + /** @description A long-form Markdown-supported description of the advisory. */ + description: string; + /** @description Vulnerable version range information for the advisory. */ + vulnerabilities: components["schemas"]["dependabot-alert-security-vulnerability"][]; + /** + * @description The severity of the advisory. + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + /** @description Details for the advisory pertaining to the Common Vulnerability Scoring System. */ + cvss: { + /** @description The overall CVSS score of the advisory. */ + score: number; + /** @description The full CVSS vector string for the advisory. */ + vector_string: string | null; + }; + /** @description Details for the advisory pertaining to Common Weakness Enumeration. */ + cwes: { + /** @description The unique CWE ID. */ + cwe_id: string; + /** @description The short, plain text name of the CWE. */ + name: string; + }[]; + /** @description Values that identify this advisory among security information sources. */ + identifiers: { + /** + * @description The type of advisory identifier. + * @enum {string} + */ + type: "CVE" | "GHSA"; + /** @description The value of the advisory identifer. */ + value: string; + }[]; + /** @description Links to additional advisory information. */ + references: { + /** + * Format: uri + * @description The URL of the reference. + */ + url: string; + }[]; + /** + * Format: date-time + * @description The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + published_at: string; + /** + * Format: date-time + * @description The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + updated_at: string; + /** + * Format: date-time + * @description The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + withdrawn_at: string | null; + }; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-dismissed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-fixed-at": string | null; + /** + * Simple Repository + * @description A GitHub repository. + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert-with-repository": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + /** + * @description A feed of discussions for a given repository. + * @example https://github.com/{user}/{repo}/discussions + */ + repository_discussions_url?: string; + /** + * @description A feed of discussions for a given repository and category. + * @example https://github.com/{user}/{repo}/discussions/categories/{category} + */ + repository_discussions_category_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + repository_discussions?: components["schemas"]["link-with-type"]; + repository_discussions_category?: components["schemas"]["link-with-type"]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + 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?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * 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. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** + * @example FLAT_RATE + * @enum {string} + */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Simple + * @description A GitHub organization. + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** + * @description Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + * this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + * to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + * @example false + */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * Actions OIDC Subject customization + * @description Actions OIDC Subject customization + */ + "oidc-custom-sub": { + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys: string[]; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "required-workflow": { + /** @description Unique identifier for a required workflow */ + id: number; + /** @description Name present in the workflow file */ + name: string; + /** @description Path of the workflow file */ + path: string; + /** + * @description Scope of the required workflow + * @enum {string} + */ + scope: "all" | "selected"; + /** @description Ref at which the workflow file will be selected */ + ref: string; + /** + * @description State of the required workflow + * @enum {string} + */ + state: "active" | "deleted"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/actions/required_workflows/1/repositories + */ + selected_repositories_url?: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + repository: components["schemas"]["minimal-repository"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Actions Variable for an Organization + * @description Organization variable for GitHub Actions. + */ + "organization-actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + /** + * @description Visibility of a variable + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/variables/USERNAME/repositories + */ + selected_repositories_url?: string; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** + * @description Severity of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-severity": + | "critical" + | "high" + | "medium" + | "low" + | "warning" + | "note" + | "error"; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "alert-instances-url": string; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | ("source" | "generated" | "test" | "library") + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + /** + * @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. + * @example you've used 100% of your spending limit for Codespaces + */ + last_known_stop_notice?: string | null; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + /** @example "member" */ + invitation_source?: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on macOS 12 core runner machines. */ + macos_12_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Team Organization + * @description Team Organization + */ + "team-organization": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Repository + * @description A repository on GitHub. + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Required workflow + * @description A GitHub Actions required workflow + */ + "repo-required-workflow": { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example Required CI */ + name: string; + /** @example .github/workflows/required_ci.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: "active" | "deleted"; + source_repository: components["schemas"]["minimal-repository"]; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/sample-org/sample-repo/actions/required_workflows/5 */ + url: string; + /** @example https://github.com/sample-org/source-repo/blob/main/.github/workflows/required_ci.yaml */ + html_url: string; + /** @example https://github.com/sample-org/sample-repo/workflows/required/sample-org/source-repo/.github/workflows/required_ci.yaml/badge.svg */ + badge_url: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads: boolean; + /** @example true */ + has_discussions: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @example true */ + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + /** + * @description The name of the workflow. + * @example Build + */ + workflow_name: string | null; + /** + * @description The name of the current branch. + * @example main + */ + head_branch: string | null; + }; + /** + * Actions OIDC subject customization for a repository + * @description Actions OIDC subject customization for a repository + */ + "oidc-custom-sub-repo": { + /** @description Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. */ + use_default: boolean; + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys?: string[]; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. + * + * `none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repos only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. + * @enum {string} + */ + access_level: "none" | "user" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description A commit. + */ + "nullable-simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title: string; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: { [key: string]: unknown } | string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** Actions Variable */ + "actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + * @example true + */ + is_alphanumeric: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + * @example true + */ + require_last_push_approval?: boolean; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + 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; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + */ + require_last_push_approval?: boolean; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description A commit. + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @example completed + * @enum {string|null} + */ + status: ("queued" | "in_progress" | "completed") | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "startup_failure" + | "stale" + | null + ) + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** + * CodeQL Database + * @description A CodeQL database. + */ + "code-scanning-codeql-database": { + /** @description The ID of the CodeQL database. */ + id: number; + /** @description The name of the CodeQL database. */ + name: string; + /** @description The language of the CodeQL database. */ + language: string; + uploader: components["schemas"]["simple-user"]; + /** @description The MIME type of the CodeQL database file. */ + content_type: string; + /** @description The size of the CodeQL database file in bytes. */ + size: number; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * Format: uri + * @description The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + */ + url: string; + }; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string | null; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string | null; + target_url: string | null; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + } & { + content: unknown; + encoding: unknown; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + /** @enum {string} */ + type: "dir" | "file" | "submodule" | "symlink"; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + /** @enum {string} */ + type: "file"; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + /** @enum {string} */ + type: "symlink"; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Submodule Content + * @description An object describing a submodule + */ + "content-submodule": { + /** @enum {string} */ + type: "submodule"; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + scope?: ("development" | "runtime") | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | ( + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + ) + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + }; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + /** + * @description Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + * @enum {string} + */ + scope: "unknown" | "runtime" | "development"; + }[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: Partial & Partial & Partial; + }; + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { [key: string]: components["schemas"]["dependency"] }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. */ + manifests?: { [key: string]: components["schemas"]["manifest"] }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy-settings": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + protection_rules?: (Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + }>)[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + "deployment-branch-policy": { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number; + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string; + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: { + /** @example "foo@bar.com" */ + email?: string; + /** @example "foo" */ + password?: string; + /** @example "roomer" */ + room?: string; + /** @example "foo" */ + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + /** @example "sha256" */ + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + /** @example "abc" */ + token?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "reopened" | "not_planned") | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** @example 1 */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + added_by?: string | null; + last_used?: string | null; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + * @example https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + * @example hello-world.github.io + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + * @example monalisa-1231a2312sa32-23sda74.drafts.github.io + */ + preview_url?: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + web_commit_signoff_required?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string | null; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + /** @description An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. */ + "secret-scanning-alert-resolution-comment": string | null; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + /** @description Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. */ + "secret-scanning-location-issue-title": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_title_url: string; + }; + /** @description Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. */ + "secret-scanning-location-issue-body": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_body_url: string; + }; + /** @description Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. */ + "secret-scanning-location-issue-comment": { + /** + * Format: uri + * @description The API URL to get the issue comment where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + */ + issue_comment_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: "commit" | "issue_title" | "issue_body" | "issue_comment"; + details: + | components["schemas"]["secret-scanning-location-commit"] + | components["schemas"]["secret-scanning-location-issue-title"] + | components["schemas"]["secret-scanning-location-issue-body"] + | components["schemas"]["secret-scanning-location-issue-comment"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + has_discussions?: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Codespace + * @description A codespace. + */ + "codespace-with-full-repository": { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["full-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * SSH Signing Key + * @description A public SSH key used to sign Git commits + */ + "ssh-signing-key": { + key: string; + id: number; + title: string; + /** Format: date-time */ + created_at: string; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + /** + * Simple Installation + * @description The GitHub App installation. This property is included when the event is configured for and sent to a GitHub App. + */ + "simple-installation": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + /** + * @description The global node ID of the installation. + * @example MDQ6VXNlcjU4MzIzMQ== + */ + node_id: string; + }; + /** @description A suite of checks performed on the code of a given code change */ + "simple-check-suite": { + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after?: string | null; + app?: components["schemas"]["integration"]; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before?: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion?: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "stale" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at?: string; + /** @example master */ + head_branch?: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha?: string; + /** @example 5 */ + id?: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id?: string; + pull_requests?: components["schemas"]["pull-request-minimal"][]; + repository?: components["schemas"]["minimal-repository"]; + /** + * @example completed + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed" | "pending" | "waiting"; + /** Format: date-time */ + updated_at?: string; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url?: string; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run-with-simple-check-suite": { + app: components["schemas"]["nullable-integration"]; + check_suite: components["schemas"]["simple-check-suite"]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "waiting" + | "pending" + | "startup_failure" + | "stale" + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + deployment?: components["schemas"]["deployment-simple"]; + /** @example https://example.com */ + details_url: string; + /** @example 42 */ + external_id: string; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string; + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + output: { + annotations_count: number; + /** Format: uri */ + annotations_url: string; + summary: string | null; + text: string | null; + title: string | null; + }; + pull_requests: components["schemas"]["pull-request-minimal"][]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "pending"; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + }; + /** + * Projects v2 Item Content Type + * @description The type of content tracked in a project item + * @enum {string} + */ + "projects-v2-item-content-type": "Issue" | "PullRequest" | "DraftIssue"; + /** + * Projects v2 Item + * @description An item belonging to a project + */ + "projects-v2-item": { + id: number; + node_id?: string; + project_node_id?: string; + content_node_id: string; + content_type: components["schemas"]["projects-v2-item-content-type"]; + creator?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + created_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + archived_at: string | null; + }; + /** branch protection rule created event */ + "webhook-branch-protection-rule-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule deleted event */ + "webhook-branch-protection-rule-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** branch protection rule edited event */ + "webhook-branch-protection-rule-edited": { + /** @enum {string} */ + action: "edited"; + /** @description If the action was `edited`, the changes to the rule. */ + changes?: { + admin_enforced?: { + from: boolean | null; + }; + authorized_actor_names?: { + from: string[]; + }; + authorized_actors_only?: { + from: boolean | null; + }; + authorized_dismissal_actors_only?: { + from: boolean | null; + }; + linear_history_requirement_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + required_status_checks?: { + from: string[]; + }; + required_status_checks_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** Check Run Completed Event */ + "webhook-check-run-completed": { + /** @enum {string} */ + action?: "completed"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Completed Event + * @description The check_run.completed webhook encoded with URL encoding + */ + "webhook-check-run-completed-form-encoded": { + /** @description A URL-encoded string of the check_run.completed JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Created Event */ + "webhook-check-run-created": { + /** @enum {string} */ + action?: "created"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Created Event + * @description The check_run.created webhook encoded with URL encoding + */ + "webhook-check-run-created-form-encoded": { + /** @description A URL-encoded string of the check_run.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Requested Action Event */ + "webhook-check-run-requested-action": { + /** @enum {string} */ + action: "requested_action"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + /** @description The action requested by the user. */ + requested_action?: { + /** @description The integrator reference of the action requested by the user. */ + identifier?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Requested Action Event + * @description The check_run.requested_action webhook encoded with URL encoding + */ + "webhook-check-run-requested-action-form-encoded": { + /** @description A URL-encoded string of the check_run.requested_action JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Re-Requested Event */ + "webhook-check-run-rerequested": { + /** @enum {string} */ + action?: "rerequested"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * Check Run Re-Requested Event + * @description The check_run.rerequested webhook encoded with URL encoding + */ + "webhook-check-run-rerequested-form-encoded": { + /** @description A URL-encoded string of the check_run.rerequested JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** check_suite completed event */ + "webhook-check-suite-completed": { + /** @enum {string} */ + action: "completed"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_group" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "projects_v2_item" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ( + | "requested" + | "in_progress" + | "completed" + | "queued" + | null + | "pending" + ) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite requested event */ + "webhook-check-suite-requested": { + /** @enum {string} */ + action: "requested"; + actions_meta?: { [key: string]: unknown } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "secret_scanning_alert_location" + | "projects_v2_item" + | "merge_group" + | "repository_import" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** check_suite rerequested event */ + "webhook-check-suite-rerequested": { + /** @enum {string} */ + action: "rerequested"; + actions_meta?: { + rerun_info?: { + plan_id?: string; + job_ids?: string[]; + }; + } | null; + /** @description The [check_suite](https://docs.github.com/rest/reference/checks#suites). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | ("requested" | "in_progress" | "completed" | "queued" | null) + | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert appeared_in_branch event */ + "webhook-code-scanning-alert-appeared-in-branch": { + /** @enum {string} */ + action: "appeared_in_branch"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert closed_by_user event */ + "webhook-code-scanning-alert-closed-by-user": { + /** @enum {string} */ + action: "closed_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert created event */ + "webhook-code-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string | null; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + fixed_at?: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + } | null; + updated_at?: string | null; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert fixed event */ + "webhook-code-scanning-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + dismissed_reason: + | ("false positive" | "won't fix" | "used in tests" | null) + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Format: uri */ + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened event */ + "webhook-code-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: string | null; + dismissed_by: { [key: string]: unknown } | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: string | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + } | null; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string | null; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** code_scanning_alert reopened_by_user event */ + "webhook-code-scanning-alert-reopened-by-user": { + /** @enum {string} */ + action: "reopened_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown | null; + dismissed_by: unknown | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: ("none" | "note" | "warning" | "error" | null) | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** commit_comment created event */ + "webhook-commit-comment-created": { + /** + * @description The action performed. Can be `created`. + * @enum {string} + */ + action: "created"; + /** @description The [commit comment](https://docs.github.com/rest/reference/repos#get-a-commit-comment) resource. */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + created_at: string; + /** Format: uri */ + html_url: string; + /** @description The ID of the commit comment. */ + id: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the commit comment. */ + node_id: string; + /** @description The relative path of the file to which the comment applies. */ + path: string | null; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** create event */ + "webhook-create": { + /** @description The repository's current description. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The name of the repository's default branch (usually `main`). */ + master_branch: string; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object created in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** delete event */ + "webhook-delete": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/reference/git#get-a-reference) resource. */ + ref: string; + /** + * @description The type of Git ref object deleted in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert created event */ + "webhook-dependabot-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert dismissed event */ + "webhook-dependabot-alert-dismissed": { + /** @enum {string} */ + action: "dismissed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert fixed event */ + "webhook-dependabot-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reintroduced event */ + "webhook-dependabot-alert-reintroduced": { + /** @enum {string} */ + action: "reintroduced"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Dependabot alert reopened event */ + "webhook-dependabot-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + enterprise?: components["schemas"]["enterprise"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key created event */ + "webhook-deploy-key-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deploy_key deleted event */ + "webhook-deploy-key-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [`deploy key`](https://docs.github.com/rest/reference/deployments#get-a-deploy-key) resource. */ + key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** deployment created event */ + "webhook-deployment-created": { + /** @enum {string} */ + action: "created"; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: { [key: string]: unknown } | string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "workflow_job" + | "pull_request_review_thread" + | "merge_queue_entry" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** deployment_status created event */ + "webhook-deployment-status-created": { + /** @enum {string} */ + action: "created"; + check_run?: { + /** Format: date-time */ + completed_at: string | null; + /** + * @description The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: uri */ + details_url: string; + external_id: string; + /** @description The SHA of the commit that is being checked. */ + head_sha: string; + /** Format: uri */ + html_url: string; + /** @description The id of the check. */ + id: number; + /** @description The name of the check run. */ + name: string; + node_id: string; + /** Format: date-time */ + started_at: string; + /** + * @description The current status of the check run. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting" | "pending"; + /** Format: uri */ + url: string; + } | null; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/reference/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: (string | { [key: string]: unknown }) | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_queue_entry" + | "workflow_job" + | "pull_request_review_thread" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + /** @description The [deployment status](https://docs.github.com/rest/reference/deployments#list-deployment-statuses). */ + deployment_status: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + deployment_url: string; + /** @description The optional human-readable description added to the status. */ + description: string; + environment: string; + /** Format: uri */ + environment_url?: string; + id: number; + /** Format: uri */ + log_url?: string; + node_id: string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + | "merge_group" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + /** Format: uri */ + repository_url: string; + /** @description The new state. Can be `pending`, `success`, `failure`, or `error`. */ + state: string; + /** @description The optional link added to the status. */ + target_url: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow?: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Deployment Workflow Run */ + workflow_run?: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown | null; + head_repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: unknown | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** discussion answered event */ + "webhook-discussion-answered": { + /** @enum {string} */ + action: "answered"; + answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** Format: date-time */ + answer_chosen_at: string; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + answer_html_url: string; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion category changed event */ + "webhook-discussion-category-changed": { + /** @enum {string} */ + action: "category_changed"; + changes: { + category: { + from: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment created event */ + "webhook-discussion-comment-created": { + /** @enum {string} */ + action: "created"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment deleted event */ + "webhook-discussion-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion_comment edited event */ + "webhook-discussion-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body: { + from: string; + }; + }; + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion created event */ + "webhook-discussion-created": { + /** @enum {string} */ + action: "created"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string | null; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "converting" | "transferring"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion deleted event */ + "webhook-discussion-deleted": { + /** @enum {string} */ + action: "deleted"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion edited event */ + "webhook-discussion-edited": { + /** @enum {string} */ + action: "edited"; + changes?: { + body?: { + from: string; + }; + title?: { + from: string; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion labeled event */ + "webhook-discussion-labeled": { + /** @enum {string} */ + action: "labeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string | null; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion locked event */ + "webhook-discussion-locked": { + /** @enum {string} */ + action: "locked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string; + answer_chosen_at?: string | null; + answer_chosen_by?: { [key: string]: unknown } | null; + answer_html_url?: string | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: true; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "locked"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion pinned event */ + "webhook-discussion-pinned": { + /** @enum {string} */ + action: "pinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion transferred event */ + "webhook-discussion-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** Discussion */ + new_discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unanswered event */ + "webhook-discussion-unanswered": { + /** @enum {string} */ + action: "unanswered"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + answer_chosen_at: unknown | null; + answer_chosen_by: unknown | null; + answer_html_url: string | null; + author_association?: string; + body?: string; + category: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + /** @enum {boolean} */ + is_answerable: true; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + locked?: boolean; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + old_answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** discussion unlabeled event */ + "webhook-discussion-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unlocked event */ + "webhook-discussion-unlocked": { + /** @enum {string} */ + action: "unlocked"; + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: unknown | null; + answer_chosen_at?: unknown | null; + answer_chosen_by?: unknown | null; + answer_html_url?: unknown | null; + author_association?: string; + body?: string; + category?: { + created_at?: string; + description?: string; + emoji?: string; + id?: number; + is_answerable?: boolean; + name?: string; + node_id?: string; + repository_id?: number; + slug?: string; + updated_at?: string; + }; + comments?: number; + created_at?: string; + html_url?: string; + id?: number; + /** @enum {boolean} */ + locked: false; + node_id?: string; + number?: number; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** discussion unpinned event */ + "webhook-discussion-unpinned": { + /** @enum {string} */ + action: "unpinned"; + /** Discussion */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** @enum {string} */ + state: "open" | "locked" | "converting" | "transferring"; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** + * fork event + * @description A user forks a repository. + */ + "webhook-fork": { + enterprise?: components["schemas"]["enterprise"]; + /** @description The created [`repository`](https://docs.github.com/rest/reference/repos#get-a-repository) resource. */ + forkee: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } & { + allow_forking?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + /** @enum {boolean} */ + fork?: true; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: unknown | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + public?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (unknown | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + }; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** github_app_authorization revoked event */ + "webhook-github-app-authorization-revoked": { + /** @enum {string} */ + action: "revoked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** gollum event */ + "webhook-gollum": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description The pages that were updated. */ + pages: { + /** + * @description The action that was performed on the page. Can be `created` or `edited`. + * @enum {string} + */ + action: "created" | "edited"; + /** + * Format: uri + * @description Points to the HTML wiki page. + */ + html_url: string; + /** @description The name of the page. */ + page_name: string; + /** @description The latest commit SHA of the page. */ + sha: string; + summary: string | null; + /** @description The current page title. */ + title: string; + }[]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** installation created event */ + "webhook-installation-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** User */ + requester?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation deleted event */ + "webhook-installation-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation new_permissions_accepted event */ + "webhook-installation-new-permissions-accepted": { + /** @enum {string} */ + action: "new_permissions_accepted"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories added event */ + "webhook-installation-repositories-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name?: string; + /** @description Unique identifier of the repository */ + id?: number; + /** @description The name of the repository. */ + name?: string; + node_id?: string; + /** @description Whether the repository is private or public. */ + private?: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation_repositories removed event */ + "webhook-installation-repositories-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects, which were added to the installation. */ + repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** User */ + requester: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + }; + /** installation suspend event */ + "webhook-installation-suspend": { + /** @enum {string} */ + action: "suspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + "webhook-installation-target-renamed": { + account: { + avatar_url: string; + created_at?: string; + description?: unknown | null; + events_url?: string; + followers?: number; + followers_url?: string; + following?: number; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + has_organization_projects?: boolean; + has_repository_projects?: boolean; + hooks_url?: string; + html_url: string; + id: number; + is_verified?: boolean; + issues_url?: string; + login?: string; + members_url?: string; + name?: string; + node_id: string; + organizations_url?: string; + public_gists?: number; + public_members_url?: string; + public_repos?: number; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + slug?: string; + starred_url?: string; + subscriptions_url?: string; + type?: string; + updated_at?: string; + url?: string; + website_url?: unknown | null; + }; + action: string; + changes: { + login?: { + from: string; + }; + slug?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + target_type: string; + }; + /** installation unsuspend event */ + "webhook-installation-unsuspend": { + /** @enum {string} */ + action: "unsuspend"; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description An array of repository objects that the installation can access. */ + repositories?: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository"]; + requester?: unknown | null; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment created event */ + "webhook-issue-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment deleted event */ + "webhook-issue-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issue_comment edited event */ + "webhook-issue-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/reference/issues#comments) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the issue comment */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues assigned event */ + "webhook-issues-assigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "assigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues closed event */ + "webhook-issues-closed": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/reference/issues) itself. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "closed" | "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues deleted event */ + "webhook-issues-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues demilestoned event */ + "webhook-issues-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone?: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues edited event */ + "webhook-issues-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the issue. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + title?: { + /** @description The previous version of the title. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues labeled event */ + "webhook-issues-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues locked event */ + "webhook-issues-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "security_and_analysis" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: true; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues milestoned event */ + "webhook-issues-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues opened event */ + "webhook-issues-opened": { + /** @enum {string} */ + action: "opened"; + changes?: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + old_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } | null; + /** + * Repository + * @description A git repository + */ + old_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues pinned event */ + "webhook-issues-pinned": { + /** @enum {string} */ + action: "pinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues reopened event */ + "webhook-issues-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: { [key: string]: unknown } | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues transferred event */ + "webhook-issues-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + new_issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unassigned event */ + "webhook-issues-unassigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlabeled event */ + "webhook-issues-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unlocked event */ + "webhook-issues-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason: unknown | null; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: ({ [key: string]: unknown } | null)[]; + labels_url?: string; + /** @enum {boolean} */ + locked: false; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + performed_via_github_app?: unknown | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + state?: string; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** issues unpinned event */ + "webhook-issues-unpinned": { + /** @enum {string} */ + action: "unpinned"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/reference/issues) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label created event */ + "webhook-label-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** label deleted event */ + "webhook-label-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** label edited event */ + "webhook-label-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the label if the action was `edited`. */ + changes?: { + color?: { + /** @description The previous version of the color if the action was `edited`. */ + from: string; + }; + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase cancelled event */ + "webhook-marketplace-purchase-cancelled": { + /** @enum {string} */ + action: "cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase changed event */ + "webhook-marketplace-purchase-changed": { + /** @enum {string} */ + action: "changed"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean | null; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change event */ + "webhook-marketplace-purchase-pending-change": { + /** @enum {string} */ + action: "pending_change"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase pending_change_cancelled event */ + "webhook-marketplace-purchase-pending-change-cancelled": { + /** @enum {string} */ + action: "pending_change_cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + next_billing_date: string; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** marketplace_purchase purchased event */ + "webhook-marketplace-purchase-purchased": { + /** @enum {string} */ + action: "purchased"; + effective_date: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + } & { + account?: { + id?: number; + login?: string; + node_id?: string; + organization_billing_email?: string | null; + type?: string; + }; + billing_cycle?: string; + free_trial_ends_on?: string | null; + next_billing_date: string | null; + on_free_trial?: boolean; + plan?: { + bullets?: (string | null)[]; + description?: string; + has_free_trial?: boolean; + id?: number; + monthly_price_in_cents?: number; + name?: string; + /** @enum {string} */ + price_model?: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name?: string | null; + yearly_price_in_cents?: number; + }; + unit_count?: number; + }; + organization?: components["schemas"]["organization-simple"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member added event */ + "webhook-member-added": { + /** @enum {string} */ + action: "added"; + changes?: { + permission?: { + /** @enum {string} */ + to: "write" | "admin" | "read"; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member edited event */ + "webhook-member-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the collaborator permissions */ + changes: { + old_permission?: { + /** @description The previous permissions of the collaborator if the action was edited. */ + from: string; + }; + permission?: { + from?: string | null; + to?: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** member removed event */ + "webhook-member-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** membership added event */ + "webhook-membership-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** membership removed event */ + "webhook-membership-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** User */ + member: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team" | "organization"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + "webhook-merge-group-checks-requested": { + action: string; + installation?: components["schemas"]["simple-installation"]; + /** MergeGroup */ + merge_group: { + /** @description The SHA of the merge group. */ + head_sha: string; + /** @description The full ref of the merge group. */ + head_ref: string; + /** @description The SHA of the merge group's parent commit. */ + base_sha: string; + /** @description The full ref of the branch the merge group will be merged into. */ + base_ref: string; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + }; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** meta deleted event */ + "webhook-meta-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + /** @description The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace. */ + hook: { + active: boolean; + config: { + /** @enum {string} */ + content_type: "json" | "form"; + insecure_ssl: string; + secret?: string; + /** Format: uri */ + url: string; + }; + created_at: string; + events: ( + | "*" + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "create" + | "delete" + | "deployment" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "meta" + | "milestone" + | "organization" + | "org_block" + | "package" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "pull_request_review_thread" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_import" + | "repository_vulnerability_alert" + | "secret_scanning_alert" + | "secret_scanning_alert_location" + | "security_and_analysis" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_job" + | "workflow_run" + | "repository_dispatch" + | "projects_v2_item" + )[]; + id: number; + name: string; + type: string; + updated_at: string; + }; + /** @description The id of the modified webhook. */ + hook_id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** milestone closed event */ + "webhook-milestone-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone created event */ + "webhook-milestone-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone deleted event */ + "webhook-milestone-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone edited event */ + "webhook-milestone-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the milestone if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + due_on?: { + /** @description The previous version of the due date if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** milestone opened event */ + "webhook-milestone-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block blocked event */ + "webhook-org-block-blocked": { + /** @enum {string} */ + action: "blocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** org_block unblocked event */ + "webhook-org-block-unblocked": { + /** @enum {string} */ + action: "unblocked"; + /** User */ + blocked_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization deleted event */ + "webhook-organization-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_added event */ + "webhook-organization-member-added": { + /** @enum {string} */ + action: "member_added"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization member_invited event */ + "webhook-organization-member-invited": { + /** @enum {string} */ + action: "member_invited"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The invitation for the user or email if the action is `member_invited`. */ + invitation: { + /** Format: date-time */ + created_at: string; + email: string | null; + /** Format: date-time */ + failed_at: string | null; + failed_reason: string | null; + id: number; + /** Format: uri */ + invitation_teams_url: string; + /** User */ + inviter: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + login: string | null; + node_id: string; + role: string; + team_count: number; + invitation_source?: string; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** organization member_removed event */ + "webhook-organization-member-removed": { + /** @enum {string} */ + action: "member_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** organization renamed event */ + "webhook-organization-renamed": { + /** @enum {string} */ + action: "renamed"; + changes?: { + login?: { + from?: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + membership?: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package published event */ + "webhook-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string | null; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + } | null; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: { [key: string]: unknown } | null; + bugs?: { [key: string]: unknown } | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: { [key: string]: unknown } | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: { [key: string]: unknown } | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: { [key: string]: unknown }[]; + contributors?: { [key: string]: unknown }[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: { [key: string]: unknown } | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: number | string; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + source_url?: string; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** package updated event */ + "webhook-package-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** @description Information about the package. */ + package: { + created_at: string; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string; + size: number; + state: string; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: unknown[]; + /** Format: uri */ + source_url?: string; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** page_build event */ + "webhook-page-build": { + /** @description The [List GitHub Pages builds](https://docs.github.com/rest/reference/repos#list-github-pages-builds) itself. */ + build: { + commit: string | null; + created_at: string; + duration: number; + error: { + message: string | null; + }; + /** User */ + pusher: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + status: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise"]; + id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-ping": { + /** + * Webhook + * @description The webhook that is being pinged + */ + hook?: { + /** @description Determines whether the hook is actually triggered for the events it subscribes to. */ + active: boolean; + /** @description Only included for GitHub Apps. When you register a new GitHub App, GitHub sends a ping event to the webhook URL you specified during registration. The GitHub App ID sent in this field is required for authenticating an app. */ + app_id?: number; + config: { + content_type?: components["schemas"]["webhook-config-content-type"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + secret?: components["schemas"]["webhook-config-secret"]; + url?: components["schemas"]["webhook-config-url"]; + }; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + deliveries_url?: string; + /** @description Determines what events the hook is triggered for. Default: ['push']. */ + events: string[]; + /** @description Unique identifier of the webhook. */ + id: number; + last_response?: components["schemas"]["hook-response"]; + /** + * @description The type of webhook. The only valid value is 'web'. + * @enum {string} + */ + name: "web"; + /** Format: uri */ + ping_url?: string; + /** Format: uri */ + test_url?: string; + type: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url?: string; + }; + /** @description The ID of the webhook that triggered the ping. */ + hook_id?: number; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + /** @description Random string of GitHub zen. */ + zen?: string; + }; + /** @description The webhooks ping payload encoded with URL encoding. */ + "webhook-ping-form-encoded": { + /** @description A URL-encoded string of the ping JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** project_card converted event */ + "webhook-project-card-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + note: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card created event */ + "webhook-project-card-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card deleted event */ + "webhook-project-card-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number | null; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card edited event */ + "webhook-project-card-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + note: { + from: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_card moved event */ + "webhook-project-card-moved": { + /** @enum {string} */ + action: "moved"; + changes?: { + column_id: { + from: number; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } & { + after_id: number | null; + archived?: boolean; + column_id?: number; + column_url?: string; + created_at?: string; + creator?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + id?: number; + node_id?: string; + note?: string | null; + project_url?: string; + updated_at?: string; + url?: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project closed event */ + "webhook-project-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project_column created event */ + "webhook-project-column-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column deleted event */ + "webhook-project-column-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column edited event */ + "webhook-project-column-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + name?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project_column moved event */ + "webhook-project-column-moved": { + /** @enum {string} */ + action: "moved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project Column */ + project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project created event */ + "webhook-project-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** project deleted event */ + "webhook-project-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project edited event */ + "webhook-project-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the project if the action was `edited`. */ + changes?: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The changes to the project if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** project reopened event */ + "webhook-project-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Project */ + project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Archived Event */ + "webhook-projects-v2-item-archived": { + /** @enum {string} */ + action: "archived"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Converted Event */ + "webhook-projects-v2-item-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + content_type?: { + from?: string | null; + to?: string; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Created Event */ + "webhook-projects-v2-item-created": { + /** @enum {string} */ + action: "created"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Deleted Event */ + "webhook-projects-v2-item-deleted": { + /** @enum {string} */ + action: "deleted"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Edited Event */ + "webhook-projects-v2-item-edited": { + /** @enum {string} */ + action: "edited"; + changes?: + | { + field_value: { + field_node_id?: string; + field_type?: string; + }; + } + | { + body: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Reordered Event */ + "webhook-projects-v2-item-reordered": { + /** @enum {string} */ + action: "reordered"; + changes: { + previous_projects_v2_item_node_id?: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** Projects v2 Item Restored Event */ + "webhook-projects-v2-item-restored": { + /** @enum {string} */ + action: "restored"; + changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user"]; + }; + /** public event */ + "webhook-public": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request assigned event */ + "webhook-pull-request-assigned": { + /** @enum {string} */ + action: "assigned"; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_disabled event */ + "webhook-pull-request-auto-merge-disabled": { + /** @enum {string} */ + action: "auto_merge_disabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request auto_merge_enabled event */ + "webhook-pull-request-auto-merge-enabled": { + /** @enum {string} */ + action: "auto_merge_enabled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason?: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request closed event */ + "webhook-pull-request-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string | null; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at?: string | null; + merged_by?: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "closed" | "open"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request converted_to_draft event */ + "webhook-pull-request-converted-to-draft": { + /** @enum {string} */ + action: "converted_to_draft"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + } | null; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + /** @enum {boolean} */ + merged: false; + merged_at: unknown | null; + merged_by: unknown | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + state?: string; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request demilestoned event */ + "webhook-pull-request-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request dequeued event */ + "webhook-pull-request-dequeued": { + /** @enum {string} */ + action: "dequeued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request edited event */ + "webhook-pull-request-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment if the action was `edited`. */ + changes: { + base?: { + ref: { + from: string; + }; + sha: { + from: string; + }; + }; + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request enqueued event */ + "webhook-pull-request-enqueued": { + /** @enum {string} */ + action: "enqueued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request labeled event */ + "webhook-pull-request-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request locked event */ + "webhook-pull-request-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request milestoned event */ + "webhook-pull-request-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise"]; + milestone?: components["schemas"]["milestone"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request opened event */ + "webhook-pull-request-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request ready_for_review event */ + "webhook-pull-request-ready-for-review": { + /** @enum {string} */ + action: "ready_for_review"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: { [key: string]: unknown } | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: string | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request reopened event */ + "webhook-pull-request-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + _links?: { + comments?: { + href?: string; + }; + commits?: { + href?: string; + }; + html?: { + href?: string; + }; + issue?: { + href?: string; + }; + review_comment?: { + href?: string; + }; + review_comments?: { + href?: string; + }; + self?: { + href?: string; + }; + statuses?: { + href?: string; + }; + }; + active_lock_reason?: string | null; + additions?: number; + assignee?: { [key: string]: unknown } | null; + assignees?: ({ [key: string]: unknown } | null)[]; + author_association?: string; + auto_merge?: unknown | null; + base?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + body?: string | null; + changed_files?: number; + closed_at: string | null; + comments?: number; + comments_url?: string; + commits?: number; + commits_url?: string; + created_at?: string; + deletions?: number; + diff_url?: string; + draft?: boolean; + head?: { + label?: string; + ref?: string; + repo?: { + allow_auto_merge?: boolean; + allow_forking?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + archive_url?: string; + archived?: boolean; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + clone_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + created_at?: string; + default_branch?: string; + delete_branch_on_merge?: boolean; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks?: number; + forks_count?: number; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + has_downloads?: boolean; + has_issues?: boolean; + has_pages?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + homepage?: string | null; + hooks_url?: string; + html_url?: string; + id?: number; + is_template?: boolean; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + language?: string | null; + languages_url?: string; + license?: { [key: string]: unknown } | null; + /** @enum {string} */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @enum {string} */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown | null; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + open_issues_count?: number; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + /** @enum {string} */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** @enum {string} */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: (string | null)[]; + trees_url?: string; + updated_at?: string; + url?: string; + use_squash_pr_title_as_default?: boolean; + visibility?: string; + watchers?: number; + watchers_count?: number; + web_commit_signoff_required?: boolean; + }; + sha?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + html_url?: string; + id?: number; + issue_url?: string; + labels?: ({ [key: string]: unknown } | null)[]; + locked?: boolean; + maintainer_can_modify?: boolean; + merge_commit_sha?: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged: boolean; + merged_at: string | null; + merged_by: { [key: string]: unknown } | null; + milestone?: { [key: string]: unknown } | null; + node_id?: string; + number?: number; + patch_url?: string; + rebaseable?: boolean | null; + requested_reviewers?: ({ [key: string]: unknown } | null)[]; + requested_teams?: ({ [key: string]: unknown } | null)[]; + review_comment_url?: string; + review_comments?: number; + review_comments_url?: string; + /** @enum {string} */ + state: "open" | "closed"; + statuses_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment created event */ + "webhook-pull-request-review-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions?: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment deleted event */ + "webhook-pull-request-review-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_comment edited event */ + "webhook-pull-request-review-comment-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/reference/pulls#comments) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review dismissed event */ + "webhook-pull-request-review-dismissed": { + /** @enum {string} */ + action: "dismissed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + /** @enum {string} */ + state: "dismissed" | "approved" | "changes_requested"; + /** Format: date-time */ + submitted_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review edited event */ + "webhook-pull-request-review-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_request_removed event */ + "webhook-pull-request-review-request-removed": + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request review_requested event */ + "webhook-pull-request-review-requested": + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user"]; + } + | { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review submitted event */ + "webhook-pull-request-review-submitted": { + /** @enum {string} */ + action: "submitted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request_review_thread resolved event */ + "webhook-pull-request-review-thread-resolved": { + /** @enum {string} */ + action: "resolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request_review_thread unresolved event */ + "webhook-pull-request-review-thread-unresolved": { + /** @enum {string} */ + action: "unresolved"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: ("LEFT" | "RIGHT" | null) | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request synchronize event */ + "webhook-pull-request-synchronize": { + /** @enum {string} */ + action: "synchronize"; + after: string; + before: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unassigned event */ + "webhook-pull-request-unassigned": { + /** @enum {string} */ + action: "unassigned"; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** pull_request unlabeled event */ + "webhook-pull-request-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** Label */ + label?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** pull_request unlocked event */ + "webhook-pull-request-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | ("resolved" | "off-topic" | "too heated" | "spam" | null) + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: ( + | ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null) + | { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + } + )[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** push event */ + "webhook-push": { + /** @description The SHA of the most recent commit on `ref` after the push. */ + after: string; + base_ref: string | null; + /** @description The SHA of the most recent commit on `ref` before the push. */ + before: string; + /** @description An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/reference/repos#commits) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries. */ + commits: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + }[]; + /** @description URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit. */ + compare: string; + /** @description Whether this push created the `ref`. */ + created: boolean; + /** @description Whether this push deleted the `ref`. */ + deleted: boolean; + enterprise?: components["schemas"]["enterprise"]; + /** @description Whether this push was a force push of the `ref`. */ + forced: boolean; + /** Commit */ + head_commit: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + pusher: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email?: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description The full git ref that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`. */ + ref: string; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sender?: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string | null; + description: string | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author?: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body?: string | { [key: string]: unknown }; + body_html?: string; + container_metadata?: { + labels?: { [key: string]: unknown } | null; + manifest?: { [key: string]: unknown } | null; + tag?: { + digest?: string; + name?: string; + }; + }; + created_at?: string; + description: string; + docker_metadata?: unknown[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { [key: string]: unknown }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: (string | { [key: string]: unknown }) | null; + bugs?: (string | { [key: string]: unknown }) | null; + dependencies?: { [key: string]: unknown }; + dev_dependencies?: { [key: string]: unknown }; + peer_dependencies?: { [key: string]: unknown }; + optional_dependencies?: { [key: string]: unknown }; + description?: string; + dist?: (string | { [key: string]: unknown }) | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: (string | { [key: string]: unknown }) | null; + scripts?: { [key: string]: unknown }; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: string[]; + contributors?: string[]; + engines?: { [key: string]: unknown }; + keywords?: string[]; + files?: string[]; + bin?: { [key: string]: unknown }; + man?: { [key: string]: unknown }; + directories?: (string | { [key: string]: unknown }) | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: (string | { [key: string]: unknown } | number) | null; + name?: string; + value?: + | boolean + | string + | number + | { + url?: string; + branch?: string; + commit?: string; + type?: string; + }; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + prerelease?: boolean; + published_at?: string; + tag_name?: string; + target_commitish?: string; + url?: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + about_url?: string; + name?: string; + type?: string; + url?: string; + vendor?: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + "webhook-registry-package-updated": { + action: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + registry_package: { + created_at: string; + description: unknown | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + package_type: string; + package_version: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: (unknown | null)[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: unknown[]; + name: string; + package_files: { + content_type?: string; + created_at?: string; + download_url?: string; + id?: number; + md5?: string | null; + name?: string; + sha1?: string | null; + sha256?: string; + size?: number; + state?: string; + updated_at?: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + url: string; + }; + rubygems_metadata?: unknown[]; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { [key: string]: unknown } | null; + updated_at: string; + }; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release created event */ + "webhook-release-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release deleted event */ + "webhook-release-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** release edited event */ + "webhook-release-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release prereleased event */ + "webhook-release-prereleased": { + /** @enum {string} */ + action: "prereleased"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + /** + * @description Whether the release is identified as a prerelease or a full release. + * @enum {boolean} + */ + prerelease: true; + published_at?: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release published event */ + "webhook-release-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + /** Format: date-time */ + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release released event */ + "webhook-release-released": { + /** @enum {string} */ + action: "released"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/reference/repos/#get-a-release) object. + */ + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** release unpublished event */ + "webhook-release-unpublished": { + /** @enum {string} */ + action: "unpublished"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + } & { + assets?: ({ [key: string]: unknown } | null)[]; + assets_url?: string; + author?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + body?: string | null; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + node_id?: string; + prerelease?: boolean; + published_at: string | null; + tag_name?: string; + tarball_url?: string | null; + target_commitish?: string; + upload_url?: string; + url?: string; + zipball_url?: string | null; + }; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** repository archived event */ + "webhook-repository-archived": { + /** @enum {string} */ + action: "archived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository created event */ + "webhook-repository-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository deleted event */ + "webhook-repository-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_dispatch event */ + "webhook-repository-dispatch-sample": { + action: string; + branch: string; + client_payload: { [key: string]: unknown } | null; + enterprise?: components["schemas"]["enterprise"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository edited event */ + "webhook-repository-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + default_branch?: { + from: string; + }; + description?: { + from: string | null; + }; + homepage?: { + from: string | null; + }; + topics?: { + from?: string[] | null; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_import event */ + "webhook-repository-import": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @enum {string} */ + status: "success" | "cancelled" | "failure"; + }; + /** repository privatized event */ + "webhook-repository-privatized": { + /** @enum {string} */ + action: "privatized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository publicized event */ + "webhook-repository-publicized": { + /** @enum {string} */ + action: "publicized"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository renamed event */ + "webhook-repository-renamed": { + /** @enum {string} */ + action: "renamed"; + changes: { + repository: { + name: { + from: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository transferred event */ + "webhook-repository-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + owner: { + from: { + /** Organization */ + organization?: { + /** Format: uri */ + avatar_url: string; + description: string | null; + /** Format: uri */ + events_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url?: string; + id: number; + /** Format: uri */ + issues_url: string; + login: string; + /** Format: uri-template */ + members_url: string; + node_id: string; + /** Format: uri-template */ + public_members_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + url: string; + }; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository unarchived event */ + "webhook-repository-unarchived": { + /** @enum {string} */ + action: "unarchived"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert create event */ + "webhook-repository-vulnerability-alert-create": { + /** @enum {string} */ + action: "create"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert dismiss event */ + "webhook-repository-vulnerability-alert-dismiss": { + /** @enum {string} */ + action: "dismiss"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_comment?: string | null; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + dismiss_comment?: string | null; + dismiss_reason: string; + dismissed_at: string; + /** User */ + dismisser: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "dismissed"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert reopen event */ + "webhook-repository-vulnerability-alert-reopen": { + /** @enum {string} */ + action: "reopen"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** repository_vulnerability_alert resolve event */ + "webhook-repository-vulnerability-alert-resolve": { + /** @enum {string} */ + action: "resolve"; + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open" | "dismissed" | "fixed"; + } & { + affected_package_name?: string; + affected_range?: string; + created_at?: string; + external_identifier?: string; + external_reference?: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id?: string; + id?: number; + node_id?: string; + number?: number; + severity?: string; + /** @enum {string} */ + state: "fixed" | "open"; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert created event */ + "webhook-secret-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created": { + /** @enum {string} */ + action?: "created"; + alert: components["schemas"]["secret-scanning-alert"]; + installation?: components["schemas"]["simple-installation"]; + location: components["schemas"]["secret-scanning-location"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created-form-encoded": { + /** @description A URL-encoded string of the secret_scanning_alert_location.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** secret_scanning_alert reopened event */ + "webhook-secret-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert resolved event */ + "webhook-secret-scanning-alert-resolved": { + /** @enum {string} */ + action: "resolved"; + alert: { + created_at?: components["schemas"]["alert-created-at"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + number?: components["schemas"]["alert-number"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + resolution?: + | ( + | null + | "false_positive" + | "wont_fix" + | "revoked" + | "used_in_tests" + | "pattern_deleted" + | "pattern_edited" + ) + | null; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The secret that was detected. */ + secret?: string; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** secret_scanning_alert revoked event */ + "webhook-secret-scanning-alert-revoked": { + /** @enum {string} */ + action: "revoked"; + alert: components["schemas"]["secret-scanning-alert"]; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory published event */ + "webhook-security-advisory-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory updated event */ + "webhook-security-advisory-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_advisory withdrawn event */ + "webhook-security-advisory-withdrawn": { + /** @enum {string} */ + action: "withdrawn"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string; + }; + sender?: components["schemas"]["simple-user"]; + }; + /** security_and_analysis event */ + "webhook-security-and-analysis": { + changes: { + from?: { + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["full-repository"]; + sender?: components["schemas"]["simple-user"]; + }; + /** sponsorship cancelled event */ + "webhook-sponsorship-cancelled": { + /** @enum {string} */ + action: "cancelled"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship created event */ + "webhook-sponsorship-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship edited event */ + "webhook-sponsorship-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + privacy_level?: { + /** @description The `edited` event types include the details about the change when someone edits a sponsorship to change the privacy. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_cancellation event */ + "webhook-sponsorship-pending-cancellation": { + /** @enum {string} */ + action: "pending_cancellation"; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship pending_tier_change event */ + "webhook-sponsorship-pending-tier-change": { + /** @enum {string} */ + action: "pending_tier_change"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + effective_date?: string; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** sponsorship tier_changed event */ + "webhook-sponsorship-tier-changed": { + /** @enum {string} */ + action: "tier_changed"; + changes: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository?: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + sponsorship: { + created_at: string; + maintainer?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** star created event */ + "webhook-star-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: string | null; + }; + /** star deleted event */ + "webhook-star-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: unknown | null; + }; + /** status event */ + "webhook-status": { + /** Format: uri */ + avatar_url?: string | null; + /** @description An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. */ + branches: { + commit: { + sha: string | null; + /** Format: uri */ + url: string | null; + }; + name: string; + protected: boolean; + }[]; + commit: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + comments_url: string; + commit: { + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + comment_count: number; + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification: { + payload: string | null; + /** @enum {string} */ + reason: + | "expired_key" + | "not_signing_key" + | "gpgverify_error" + | "gpgverify_unavailable" + | "unsigned" + | "unknown_signature_type" + | "no_user" + | "unverified_email" + | "bad_email" + | "unknown_key" + | "malformed_signature" + | "invalid" + | "valid" + | "bad_cert" + | "ocsp_pending"; + signature: string | null; + verified: boolean; + }; + }; + /** User */ + committer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + node_id: string; + parents: { + /** Format: uri */ + html_url: string; + sha: string; + /** Format: uri */ + url: string; + }[]; + sha: string; + /** Format: uri */ + url: string; + }; + context: string; + created_at: string; + /** @description The optional human-readable description added to the status. */ + description: string | null; + enterprise?: components["schemas"]["enterprise"]; + /** @description The unique identifier of the status. */ + id: number; + installation?: components["schemas"]["simple-installation"]; + name: string; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** @description The Commit SHA. */ + sha: string; + /** + * @description The new state. Can be `pending`, `success`, `failure`, or `error`. + * @enum {string} + */ + state: "pending" | "success" | "failure" | "error"; + /** @description The optional link added to the status. */ + target_url: string | null; + updated_at: string; + }; + /** team_add event */ + "webhook-team-add": { + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team added_to_repository event */ + "webhook-team-added-to-repository": { + /** @enum {string} */ + action: "added_to_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team created event */ + "webhook-team-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team deleted event */ + "webhook-team-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team edited event */ + "webhook-team-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the team if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + privacy?: { + /** @description The previous version of the team's privacy if the action was `edited`. */ + from: string; + }; + repository?: { + permissions: { + from: { + /** @description The previous version of the team member's `admin` permission on a repository, if the action was `edited`. */ + admin?: boolean; + /** @description The previous version of the team member's `pull` permission on a repository, if the action was `edited`. */ + pull?: boolean; + /** @description The previous version of the team member's `push` permission on a repository, if the action was `edited`. */ + push?: boolean; + }; + }; + }; + }; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** team removed_from_repository event */ + "webhook-team-removed-from-repository": { + /** @enum {string} */ + action: "removed_from_repository"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: (number | string) | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + }; + /** watch started event */ + "webhook-watch-started": { + /** @enum {string} */ + action: "started"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + }; + /** workflow_dispatch event */ + "webhook-workflow-dispatch": { + enterprise?: components["schemas"]["enterprise"]; + inputs: { + name?: string; + number?: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + ref: string; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow: string; + }; + /** workflow_job completed event */ + "webhook-workflow-job-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | null + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out" + ) + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out"; + head_sha?: string; + html_url?: string; + id?: number; + labels?: (string | null)[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + status?: string; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps?: ({ [key: string]: unknown } | null)[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job in_progress event */ + "webhook-workflow-job-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("success" | "failure" | null | "cancelled" | "neutral") + | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | null | "cancelled") + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string | null; + conclusion?: string | null; + head_sha?: string; + html_url?: string; + id?: number; + labels?: string[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps: { + completed_at: string | null; + conclusion: string | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "pending" | "queued"; + }[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job queued event */ + "webhook-workflow-job-queued": { + /** @enum {string} */ + action: "queued"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "completed" | "in_progress" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job waiting event */ + "webhook-workflow-job-waiting": { + /** @enum {string} */ + action: "waiting"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | ("failure" | "skipped" | "success" | "cancelled" | null) + | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: + | "completed" + | "in_progress" + | "queued" + | "pending" + | "waiting"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_run completed event */ + "webhook-workflow-run-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped"; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + } | null; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run in_progress event */ + "webhook-workflow-run-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + } & { + actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + artifacts_url?: string; + cancel_url?: string; + check_suite_id?: number; + check_suite_node_id?: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "skipped" + | "stale" + ) + | null; + created_at?: string; + event?: string; + head_branch?: string | null; + head_commit?: { + author?: { + email?: string; + name?: string; + }; + committer?: { + email?: string; + name?: string; + }; + id?: string; + message?: string; + timestamp?: string; + tree_id?: string; + }; + head_repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string | null; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha?: string; + html_url?: string; + id?: number; + jobs_url?: string; + logs_url?: string; + name?: string | null; + node_id?: string; + path?: string; + previous_attempt_url?: string | null; + pull_requests?: ({ [key: string]: unknown } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + 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; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + 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; + name?: string; + node_id?: string; + notifications_url?: string; + owner?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt?: number; + run_number?: number; + run_started_at?: string; + status?: string; + triggering_actor?: { + avatar_url?: string; + events_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + id?: number; + login?: string; + node_id?: string; + organizations_url?: string; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + url?: string; + }; + updated_at?: string; + url?: string; + workflow_id?: number; + workflow_url?: string; + }; + }; + /** workflow_run requested event */ + "webhook-workflow-run-requested": { + /** @enum {string} */ + action: "requested"; + enterprise?: components["schemas"]["enterprise"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple"]; + repository: components["schemas"]["repository"]; + sender: components["schemas"]["simple-user"]; + /** Workflow */ + workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure" + ) + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + display_title: string; + }; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed, or the endpoint has been spammed. */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** Unavailable due to service under maintenance. */ + porter_maintenance: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** A header with no content is returned. */ + no_content: unknown; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "per-page": number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string; + "delivery-id": number; + /** @description Page number of the results to fetch. */ + page: number; + /** @description 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; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + "dependabot-alert-comma-separated-states": string; + /** + * @description A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + "dependabot-alert-comma-separated-severities": string; + /** + * @description A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + "dependabot-alert-comma-separated-ecosystems": string; + /** @description A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + "dependabot-alert-comma-separated-packages": string; + /** @description The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + "dependabot-alert-scope": "development" | "runtime"; + /** + * @description The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + "dependabot-alert-sort": "created" | "updated"; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + "pagination-after": string; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + "pagination-first": number; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + "pagination-last": number; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type": string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution": string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort": "created" | "updated"; + /** @description The security feature to enable or disable. */ + "enterprise-security-product": + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + "enterprise-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** @description 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; + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description The unique identifier of the required workflow. */ + "required-workflow-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The number of results per page (max 30). */ + "variables-per-page": number; + /** @description The name of the variable. */ + "variable-name": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name": components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid": components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description The unique identifier of the hook. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** + * @description The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": + | "dependency_graph" + | "dependabot_alerts" + | "dependabot_security_updates" + | "advanced_security" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + "org-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The ID of the required workflow that has run at least once in a repository. */ + "repo-required-workflow-id": number; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref": components["schemas"]["code-scanning-ref"]; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key": string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort": + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + "workflow-run-status": + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests": boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id": number; + /** @description Only returns workflow runs that are associated with the specified `head_sha`. */ + "workflow-run-head-sha": string; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name": string; + /** @description Returns check runs with the specified `status`. */ + status: "queued" | "in_progress" | "completed"; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** @description A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + "dependabot-alert-comma-separated-manifests": string; + /** + * @description The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + "dependabot-alert-number": components["schemas"]["alert-number"]; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path": string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per: "" | "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** @description 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"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query": number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + /** @description The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.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. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Gets code security and analysis settings for the specified enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/get-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["enterprise-security-analysis-settings"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise. + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/patch-security-analysis-settings-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." */ + advanced_security_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning)." */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** @description Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + * To disable this functionality, set this field to `null`. + */ + secret_scanning_push_protection_custom_link?: string | null; + }; + }; + }; + }; + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * To use this endpoint, you must be a member of the enterprise, and you must use an + * access token with the `repo` scope or `security_events` scope. + * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "dependabot/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an enterprise. + * + * To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope. + */ + "secret-scanning/post-security-product-enablement-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["enterprise-security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the enterprise. + * `disable_all` means to disable the specified security feature for all repositories in the enterprise. + */ + enablement: components["parameters"]["enterprise-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + 404: components["responses"]["not_found"]; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + /** 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. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + "gists/list-public": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string; + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** 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. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 50). */ + per_page?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications as "read" for the current user. 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + /** Gets information about a notification thread. */ + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean; + /** @example "http://github.blog" */ + blog?: string; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot alerts is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot security updates is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** @description If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. */ + secret_scanning_push_protection_custom_link?: string; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + "oidc/get-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** A JSON serialized template for OIDC subject claim customization */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + }; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + "oidc/update-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all required workflows in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["required-workflow"][]; + }; + }; + }; + }; + }; + /** + * Create a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/create-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Get a required workflow configured in an organization. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/get-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + }; + }; + /** + * Deletes a required workflow configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/delete-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Update a required workflow in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/update-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["required-workflow"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Path of the workflow file to be configured as a required workflow. */ + workflow_file_path?: string; + /** @description The ID of the repository that contains the workflow file. */ + repository_id?: string; + /** + * @description Enable the required workflow for all repositories or selected repositories in the organization. + * @default all + * @enum {string} + */ + scope?: "selected" | "all"; + /** @description A list of repository IDs where you want to enable the required workflow. A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-selected-repositories-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + /** Resource Not Found */ + 404: unknown; + }; + }; + /** + * Sets the repositories for a required workflow that is required for selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/set-selected-repos-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories for which the workflow should be required. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/add-selected-repo-to-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/remove-selected-repo-from-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the required workflow. */ + required_workflow_id: components["parameters"]["required-workflow-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Success */ + 204: never; + /** Resource Not Found */ + 404: unknown; + /** Validation Error */ + 422: unknown; + }; + }; + /** + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-org-variables": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["organization-actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/create-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when creating a variable */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/get-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an organization variable using the variable name. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/delete-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an organization variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. + */ + "actions/update-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility?: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories that can access the organization variable. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-variable": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response when the visibility of the variable is not set to `selected` */ + 409: unknown; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + /** If specified, only code scanning alerts with this severity will be returned. */ + severity?: components["schemas"]["code-scanning-alert-severity"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/set-codespaces-billing": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response when successfully modifying permissions. */ + 204: never; + 304: components["responses"]["not_modified"]; + /** Users are neither members nor collaborators of this organization. */ + 400: unknown; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. + * @enum {string} + */ + visibility: + | "disabled" + | "selected_members" + | "all_members" + | "all_members_and_outside_collaborators"; + /** @description The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. */ + selected_usernames?: string[]; + }; + }; + }; + }; + /** + * Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-org-secret"][]; + }; + }; + }; + }; + }; + /** Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Gets an organization secret without revealing its encrypted value. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description The ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[]; + }; + }; + }; + }; + /** Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ + "codespaces/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + 404: components["responses"]["not_found"]; + /** Conflict when visibility type not set to selected */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Lists Dependabot alerts for an organization. + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * * `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** 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. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/get-codespaces-for-user-in-org": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * 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. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `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. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by an organization. + * + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description 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; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description 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; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.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; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + * + * GitHub Apps must have the `administration` organization read permission to use this endpoint. + */ + "orgs/list-security-manager-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-simple"][]; + }; + }; + }; + }; + /** + * Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/add-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** The organization has reached the maximum number of security manager teams. */ + 409: unknown; + }; + }; + /** + * Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." + * + * To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + * + * GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + */ + "orgs/remove-security-manager-team": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description 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` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * 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. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + */ + permission?: string; + }; + }; + }; + }; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + /** + * Enables or disables the specified security feature for all repositories in an organization. + * + * To use this endpoint, you must be an organization owner or be member of a team with the security manager role. + * A token with the 'write:org' scope is also required. + * + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + * + * For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "orgs/enable-or-disable-security-product-on-all-org-repos": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The security feature to enable or disable. */ + security_product: components["parameters"]["security-product"]; + /** + * The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + enablement: components["parameters"]["org-security-product-enablement"]; + }; + }; + responses: { + /** Action started */ + 204: never; + /** The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: unknown; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** 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. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** 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. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/list-columns": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/list-repo-required-workflows": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + required_workflows: components["schemas"]["repo-required-workflow"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." */ + "actions/get-repo-required-workflow": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-required-workflow"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets the number of billable minutes used by a specific required workflow during the current billing cycle. + * + * Billable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)." + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-repo-required-workflow-usage": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.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. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to archive this repository. `false` will unarchive a previously archived repository. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Filters artifacts by exact match on their name field. */ + name?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + "actions/get-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Status response */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/set-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to private repositories. + * For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)". + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see "[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows)." + */ + "actions/list-required-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the required workflow that has run at least once in a repository. */ + required_workflow_id_for_repo: components["parameters"]["repo-required-workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/list-repo-variables": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Creates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/create-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. */ + "actions/get-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes a repository variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/delete-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates a repository variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. + */ + "actions/update-repo-variable": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + /** Only returns workflow runs that are associated with the specified `head_sha`. */ + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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://docs.github.com/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description 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; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + /** + * @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. + * @default false + */ + lock_branch?: boolean; + /** + * @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. + * @default false + */ + allow_fork_syncing?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description 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; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** 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. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. */ + sort?: "created"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the CodeQL databases that are available in a repository. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/list-codeql-databases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * For private repositories, you must use an access token with the `security_events` scope. + * For public repositories, you can use tokens with the `security_events` or `public_repo` scope. + * GitHub Apps must have the `contents` read permission to use this endpoint. + */ + "code-scanning/get-codeql-database": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The language of the CodeQL database. */ + language: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + *
+ * SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration (For example, for the CodeQL tool, identify and remove the most noisy queries). + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 15 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis 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; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + /** + * @description Whether the SARIF file will be validated according to the code scanning specifications. + * This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. + */ + validate?: boolean; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` + * repository permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + */ + permission?: string; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). */ + 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 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?: components["parameters"]["since"]; + /** 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; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * **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. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * + * 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` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + * + * This endpoint is equivalent to running the `git log BASE...HEAD` command, but it returns commits in a different order. The `git log BASE...HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * 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 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. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** + * A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `dismissed`, `fixed`, `open` + */ + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + /** + * A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + /** + * A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + /** A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + /** A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + manifest?: components["parameters"]["dependabot-alert-comma-separated-manifests"]; + /** The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + scope?: components["parameters"]["dependabot-alert-scope"]; + /** + * The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + sort?: components["parameters"]["dependabot-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** @deprecated **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. */ + page?: number; + /** @deprecated The number of results per page (max 100). */ + per_page?: number; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + first?: components["parameters"]["pagination-first"]; + /** + * **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + last?: components["parameters"]["pagination-last"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + */ + "dependabot/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You must use an access token with the `security_events` scope to use this endpoint with private repositories. + * You can also use tokens with the `public_repo` scope for public repositories only. + * GitHub Apps must have **Dependabot alerts** write permission to use this endpoint. + */ + "dependabot/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** + * The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the Dependabot alert. + * A `dismissed_reason` must be provided when setting the state to `dismissed`. + * @enum {string} + */ + state: "dismissed" | "open"; + /** + * @description **Required when `state` is `dismissed`.** A reason for dismissing the alert. + * @enum {string} + */ + dismissed_reason?: + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk"; + /** @description An optional comment associated with dismissing the alert. */ + dismissed_comment?: string; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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 | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/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[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/deployment-statuses#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description 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`. + * @default + */ + target_url?: string; + /** + * @description 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: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description 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` */ + auto_inactive?: boolean; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists the environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. If the + * repository is private, you must use an access token with the `repo` scope. GitHub + * Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** + * Lists the deployment branch policies for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/list-deployment-branch-policies": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number; + branch_policies: components["schemas"]["deployment-branch-policy"][]; + }; + }; + }; + }; + }; + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/create-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** Response if the same branch name pattern already exists */ + 303: never; + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Gets a deployment branch policy for an environment. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/update-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + }; + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + "repos/delete-deployment-branch-policy": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The unique identifier of the branch policy. */ + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + /** @description When forking from an existing repository, fork with only the default branch. */ + default_branch_only?: boolean; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description 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[]; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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; + }; + }; + }; + }; + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description 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. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. 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. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** 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://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + }; + /** + * List issues in a repository. Only open issues will be listed. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. */ + 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?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description 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 | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ("completed" | "not_planned" | "reopened") | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + "issues/check-user-can-be-assigned-to-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + assignee: string; + }; + }; + responses: { + /** Response if `assignee` can be assigned to `issue_number` */ + 204: never; + /** Response if `assignee` can not be assigned to `issue_number` */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. 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. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. 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. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description 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://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + /** Enables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + /** Disables Git LFS for a repository. Access tokens must have the `admin:enterprise` scope. */ + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** Lists all notifications for the current user in the specified repository. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks all notifications in a repository as "read" for the current user. 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + /** + * Deletes a a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * 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. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Create a GitHub Pages deployment for a repository. + * + * Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + */ + "repos/create-pages-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-deployment"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. */ + artifact_url: string; + /** + * @description The target environment for this GitHub Pages deployment. + * @default github-pages + */ + environment?: string; + /** + * @description A unique string that represents the version of the build for this deployment. + * @default GITHUB_SHA + */ + pages_build_version: string; + /** @description The OIDC token issued by GitHub Actions certifying the origin of the deployment. */ + oidc_token: string; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** 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. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description 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; + /** @description 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; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description 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; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description 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; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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 above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description 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://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description 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; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; + }; + }; + }; + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)." */ + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description 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. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * 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. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Bad request, resolution comment is invalid or the resolution was not changed. */ + 400: unknown; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution or resolution comment */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + resolution_comment?: components["schemas"]["secret-scanning-alert-resolution-comment"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description 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 | null; + /** @description A short description of the status. */ + description?: string | null; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + }; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** 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. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description The new name to be given to the repository. */ + new_name?: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency 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://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) 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. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** Lists all environment variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/list-environment-variables": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 30). */ + per_page?: components["parameters"]["variables-per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Create an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/create-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + }; + /** Gets a specific variable in an environment. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `environments:read` repository permission to use this endpoint. */ + "actions/get-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment. */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Deletes an environment variable using the variable name. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/delete-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates an environment variable that you can reference in a GitHub Actions workflow. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `environment:write` repository permission to use this endpoint. + */ + "actions/update-environment-variable": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the variable. */ + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + "search/code": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + "search/topics": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on 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. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **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. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } + | { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }; + }; + }; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library. + * + * ``` + * const sodium = require('libsodium-wrappers') + * const secret = 'plain-text-secret' // replace with the secret you want to encrypt + * const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key + * + * //Check if libsodium is ready and then proceed. + * sodium.ready.then(() => { + * // Convert Secret & Base64 key to Uint8Array. + * let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL) + * let binsec = sodium.from_string(secret) + * + * //Encrypt the secret using LibSodium + * let encBytes = sodium.crypto_box_seal(binsec, binkey) + * + * // Convert encrypted Uint8Array to Base64 + * let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL) + * + * console.log(output) + * }); + * ``` + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/publish-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["codespace-with-full-repository"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the new repository. */ + name?: string; + /** + * @description Whether the new repository should be private. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @example [] + */ + emails: string[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. + * If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + 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; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** @description 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; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/list-ssh-signing-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/create-ssh-signing-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ + key: string; + }; + }; + }; + }; + /** Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/get-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." */ + "users/delete-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the SSH signing key. */ + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** + * The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `read:packages` and `write:packages` scopes. In addition: + * - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + * - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** Lists the SSH signing keys for a user. This operation is accessible by anyone. */ + "users/list-ssh-signing-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get all supported GitHub API versions. */ + "meta/get-all-versions": { + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/README.md new file mode 100644 index 0000000..343c456 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/README.md @@ -0,0 +1,71 @@ +# 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://github.com/octokit/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit/request-error.js/actions?query=workflow%3ATest) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.skypack.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, { + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz", + }, + headers: { + authorization: "token secret123", + }, + }, + response: { + status: 500, + url: "https://api.github.com/foo", + headers: { + "x-github-request-id": "1:2:3:4", + }, + data: { + foo: "bar", + }, + }, +}); + +error.message; // Oops +error.status; // 500 +error.request; // { method, url, headers, body } +error.response; // { url, status, headers, data } +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-node/index.js new file mode 100644 index 0000000..c676580 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,65 @@ +'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 logOnceCode = once(deprecation => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + } + }); + } +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-node/index.js.map b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-node/index.js.map new file mode 100644 index 0000000..5381b78 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":["logOnceCode","once","deprecation","console","warn","logOnceHeaders","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","headers","response","requestCopy","Object","assign","request","authorization","replace","url","defineProperty","get","Deprecation"],"mappings":";;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACpE,MAAMG,cAAc,GAAGJ,IAAI,CAAEC,WAAW,IAAKC,OAAO,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC;AACvE;AACA;AACA;AACO,MAAMI,YAAY,SAASC,KAAK,CAAC;EACpCC,WAAW,CAACC,OAAO,EAAEC,UAAU,EAAEC,OAAO,EAAE;IACtC,KAAK,CAACF,OAAO,CAAC;;;IAGd,IAAIF,KAAK,CAACK,iBAAiB,EAAE;MACzBL,KAAK,CAACK,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAACJ,WAAW,CAAC;;IAEnD,IAAI,CAACK,IAAI,GAAG,WAAW;IACvB,IAAI,CAACC,MAAM,GAAGJ,UAAU;IACxB,IAAIK,OAAO;IACX,IAAI,SAAS,IAAIJ,OAAO,IAAI,OAAOA,OAAO,CAACI,OAAO,KAAK,WAAW,EAAE;MAChEA,OAAO,GAAGJ,OAAO,CAACI,OAAO;;IAE7B,IAAI,UAAU,IAAIJ,OAAO,EAAE;MACvB,IAAI,CAACK,QAAQ,GAAGL,OAAO,CAACK,QAAQ;MAChCD,OAAO,GAAGJ,OAAO,CAACK,QAAQ,CAACD,OAAO;;;IAGtC,MAAME,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAAC;IACtD,IAAIT,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,EAAE;MACvCJ,WAAW,CAACF,OAAO,GAAGG,MAAM,CAACC,MAAM,CAAC,EAAE,EAAER,OAAO,CAACS,OAAO,CAACL,OAAO,EAAE;QAC7DM,aAAa,EAAEV,OAAO,CAACS,OAAO,CAACL,OAAO,CAACM,aAAa,CAACC,OAAO,CAAC,MAAM,EAAE,aAAa;OACrF,CAAC;;IAENL,WAAW,CAACM,GAAG,GAAGN,WAAW,CAACM;;;KAGzBD,OAAO,CAAC,sBAAsB,EAAE,0BAA0B;;;KAG1DA,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;IAC9D,IAAI,CAACF,OAAO,GAAGH,WAAW;;IAE1BC,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;MAChCC,GAAG,GAAG;QACFzB,WAAW,CAAC,IAAI0B,uBAAW,CAAC,0EAA0E,CAAC,CAAC;QACxG,OAAOhB,UAAU;;KAExB,CAAC;IACFQ,MAAM,CAACM,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;MACnCC,GAAG,GAAG;QACFpB,cAAc,CAAC,IAAIqB,uBAAW,CAAC,uFAAuF,CAAC,CAAC;QACxH,OAAOX,OAAO,IAAI,EAAE;;KAE3B,CAAC;;AAEV;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 0000000..5eb1927 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,55 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 0000000..d6e089c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,33 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +import { 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; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + /** + * error response headers + * + * @deprecated `error.headers` is deprecated in favor of `error.response.headers` + */ + headers: ResponseHeaders; + /** + * Response object if a response was received + */ + response?: OctokitResponse; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 0000000..e5e1fab --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,9 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +export type RequestErrorOptions = { + /** @deprecated set `response` instead */ + headers?: ResponseHeaders; + request: RequestOptions; +} | { + response: OctokitResponse; + request: RequestOptions; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-web/index.js new file mode 100644 index 0000000..0fb64be --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,59 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = 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; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.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; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} + +export { RequestError }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-web/index.js.map b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-web/index.js.map new file mode 100644 index 0000000..78f677f --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACxE;AACA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;AAC9C,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;AAChC,QAAQ,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;AACjC,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW,EAAE;AAC5E,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,SAAS;AACT,QAAQ,IAAI,UAAU,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAC7C,YAAY,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/C,SAAS;AACT;AACA,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/D,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;AACnD,YAAY,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;AAC7E,gBAAgB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;AACnG,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;AACzC;AACA;AACA,aAAa,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AACxE;AACA;AACA,aAAa,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;AACvE,QAAQ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AACnC;AACA,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,YAAY,GAAG,GAAG;AAClB,gBAAgB,WAAW,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;AACzH,gBAAgB,OAAO,UAAU,CAAC;AAClC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;AAC/C,YAAY,GAAG,GAAG;AAClB,gBAAgB,cAAc,CAAC,IAAI,WAAW,CAAC,uFAAuF,CAAC,CAAC,CAAC;AACzI,gBAAgB,OAAO,OAAO,IAAI,EAAE,CAAC;AACrC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/package.json new file mode 100644 index 0000000..2215caa --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request-error/package.json @@ -0,0 +1,49 @@ +{ + "name": "@octokit/request-error", + "description": "Error class for Octokit request errors", + "version": "3.0.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "repository": "github:octokit/request-error.js", + "dependencies": { + "@octokit/types": "^9.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-bundle-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^29.0.0", + "@types/node": "^18.0.0", + "@types/once": "^1.4.0", + "jest": "^29.0.0", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "2.8.3", + "ts-jest": "^29.0.0", + "typescript": "^4.0.0" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/graphql/node_modules/@octokit/request/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/request/README.md b/node_modules/@octokit/graphql/node_modules/@octokit/request/README.md new file mode 100644 index 0000000..82a82a1 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/README.md @@ -0,0 +1,553 @@ +# 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://github.com/octokit/request.js/workflows/Test/badge.svg)](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%3Amain) + +`@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) when the runtime has no native `fetch` API). + + + + + +- [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) +- [Authentication](#authentication) +- [request()](#request) +- [`request.defaults()`](#requestdefaults) +- [`request.endpoint`](#requestendpoint) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter--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: "octokit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"], +}); +``` + +👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) + +😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). + +👍 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). + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from cdn.skypack.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 + +For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) + +```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", +}); +``` + +## Authentication + +The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const requestWithAuth = request.defaults({ + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, +}); +const result = await requestWithAuth("GET /user"); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + appId: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, + mediaType: { + previews: ["machine-man"], + }, +}); + +const { data: app } = await requestWithAuth("GET /app"); +const { data: app } = await requestWithAuth( + "POST /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + title: "Hello from the engine room", + } +); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + **Required**. 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 + + The base URL that route or url will be prefixed with, if they use relative paths. 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 + + 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.log + + object + + Used for internal logging. Defaults to console. +
+ 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. If the request was successful, the promise resolves with an object containing 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 promise is rejected with an `error` object containing 3 keys to help with debugging: + +- `error.status` The http response status code +- `error.request` The request options such as `method`, `url` and `data` +- `error.response` The http response object with `url`, `headers`, and `data` + +If the error is due to an `AbortSignal` being used, the resulting `AbortError` is bubbled up to the caller. + +## `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: + +- [`octokitRequest.endpoint()`](#endpoint) +- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) +- [`octokitRequest.endpoint.merge()`](#endpointdefaults) +- [`octokitRequest.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/graphql/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-node/index.js new file mode 100644 index 0000000..11ac3f4 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,156 @@ +'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 universalUserAgent = require('universal-user-agent'); +var isPlainObject = require('is-plain-object'); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + if (isPlainObject.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 || globalThis.fetch || /* istanbul ignore next */nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)).then(async response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new requestError.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined + }, + request: requestOptions + }); + } + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new requestError.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return getResponseData(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) throw error;else if (error.name === "AbortError") throw error; + throw new requestError.RequestError(error.message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); + +exports.request = request; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-node/index.js.map new file mode 100644 index 0000000..19fd47d --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","log","request","console","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","globalThis","nodeFetch","Object","assign","method","redirect","then","keyAndValue","matches","link","match","deprecationLink","pop","warn","sunset","RequestError","statusText","data","undefined","getResponseData","error","toErrorMessage","catch","name","message","contentType","get","test","json","text","getBuffer","errors","map","join","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","parse","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA3B,SAASC,iBAAiB,CAACC,QAAQ,EAAE;EAChD,OAAOA,QAAQ,CAACC,WAAW,EAAE;AACjC;;ACEe,SAASC,YAAY,CAACC,cAAc,EAAE;EACjD,MAAMC,GAAG,GAAGD,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1DD,cAAc,CAACE,OAAO,CAACD,GAAG,GAC1BE,OAAO;EACb,IAAIC,2BAAa,CAACJ,cAAc,CAACK,IAAI,CAAC,IAClCC,KAAK,CAACC,OAAO,CAACP,cAAc,CAACK,IAAI,CAAC,EAAE;IACpCL,cAAc,CAACK,IAAI,GAAGG,IAAI,CAACC,SAAS,CAACT,cAAc,CAACK,IAAI,CAAC;;EAE7D,IAAIK,OAAO,GAAG,EAAE;EAChB,IAAIC,MAAM;EACV,IAAIC,GAAG;EACP,MAAMC,KAAK,GAAIb,cAAc,CAACE,OAAO,IAAIF,cAAc,CAACE,OAAO,CAACW,KAAK,IACjEC,UAAU,CAACD,KAAK,8BACWE,SAAS;EACxC,OAAOF,KAAK,CAACb,cAAc,CAACY,GAAG,EAAEI,MAAM,CAACC,MAAM,CAAC;IAC3CC,MAAM,EAAElB,cAAc,CAACkB,MAAM;IAC7Bb,IAAI,EAAEL,cAAc,CAACK,IAAI;IACzBK,OAAO,EAAEV,cAAc,CAACU,OAAO;IAC/BS,QAAQ,EAAEnB,cAAc,CAACmB;GAC5B;;;EAGDnB,cAAc,CAACE,OAAO,CAAC,CAAC,CACnBkB,IAAI,CAAC,MAAOvB,QAAQ,IAAK;IAC1Be,GAAG,GAAGf,QAAQ,CAACe,GAAG;IAClBD,MAAM,GAAGd,QAAQ,CAACc,MAAM;IACxB,KAAK,MAAMU,WAAW,IAAIxB,QAAQ,CAACa,OAAO,EAAE;MACxCA,OAAO,CAACW,WAAW,CAAC,CAAC,CAAC,CAAC,GAAGA,WAAW,CAAC,CAAC,CAAC;;IAE5C,IAAI,aAAa,IAAIX,OAAO,EAAE;MAC1B,MAAMY,OAAO,GAAGZ,OAAO,CAACa,IAAI,IAAIb,OAAO,CAACa,IAAI,CAACC,KAAK,CAAC,8BAA8B,CAAC;MAClF,MAAMC,eAAe,GAAGH,OAAO,IAAIA,OAAO,CAACI,GAAG,EAAE;MAChDzB,GAAG,CAAC0B,IAAI,CAAE,uBAAsB3B,cAAc,CAACkB,MAAO,IAAGlB,cAAc,CAACY,GAAI,qDAAoDF,OAAO,CAACkB,MAAO,GAAEH,eAAe,GAAI,SAAQA,eAAgB,EAAC,GAAG,EAAG,EAAC,CAAC;;IAEzM,IAAId,MAAM,KAAK,GAAG,IAAIA,MAAM,KAAK,GAAG,EAAE;MAClC;;;IAGJ,IAAIX,cAAc,CAACkB,MAAM,KAAK,MAAM,EAAE;MAClC,IAAIP,MAAM,GAAG,GAAG,EAAE;QACd;;MAEJ,MAAM,IAAIkB,yBAAY,CAAChC,QAAQ,CAACiC,UAAU,EAAEnB,MAAM,EAAE;QAChDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAEC;SACT;QACD9B,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,KAAK,GAAG,EAAE;MAChB,MAAM,IAAIkB,yBAAY,CAAC,cAAc,EAAElB,MAAM,EAAE;QAC3Cd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB,IAAI,EAAE,MAAME,eAAe,CAACpC,QAAQ;SACvC;QACDK,OAAO,EAAEF;OACZ,CAAC;;IAEN,IAAIW,MAAM,IAAI,GAAG,EAAE;MACf,MAAMoB,IAAI,GAAG,MAAME,eAAe,CAACpC,QAAQ,CAAC;MAC5C,MAAMqC,KAAK,GAAG,IAAIL,yBAAY,CAACM,cAAc,CAACJ,IAAI,CAAC,EAAEpB,MAAM,EAAE;QACzDd,QAAQ,EAAE;UACNe,GAAG;UACHD,MAAM;UACND,OAAO;UACPqB;SACH;QACD7B,OAAO,EAAEF;OACZ,CAAC;MACF,MAAMkC,KAAK;;IAEf,OAAOD,eAAe,CAACpC,QAAQ,CAAC;GACnC,CAAC,CACGuB,IAAI,CAAEW,IAAI,IAAK;IAChB,OAAO;MACHpB,MAAM;MACNC,GAAG;MACHF,OAAO;MACPqB;KACH;GACJ,CAAC,CACGK,KAAK,CAAEF,KAAK,IAAK;IAClB,IAAIA,KAAK,YAAYL,yBAAY,EAC7B,MAAMK,KAAK,CAAC,KACX,IAAIA,KAAK,CAACG,IAAI,KAAK,YAAY,EAChC,MAAMH,KAAK;IACf,MAAM,IAAIL,yBAAY,CAACK,KAAK,CAACI,OAAO,EAAE,GAAG,EAAE;MACvCpC,OAAO,EAAEF;KACZ,CAAC;GACL,CAAC;AACN;AACA,eAAeiC,eAAe,CAACpC,QAAQ,EAAE;EACrC,MAAM0C,WAAW,GAAG1C,QAAQ,CAACa,OAAO,CAAC8B,GAAG,CAAC,cAAc,CAAC;EACxD,IAAI,mBAAmB,CAACC,IAAI,CAACF,WAAW,CAAC,EAAE;IACvC,OAAO1C,QAAQ,CAAC6C,IAAI,EAAE;;EAE1B,IAAI,CAACH,WAAW,IAAI,wBAAwB,CAACE,IAAI,CAACF,WAAW,CAAC,EAAE;IAC5D,OAAO1C,QAAQ,CAAC8C,IAAI,EAAE;;EAE1B,OAAOC,iBAAS,CAAC/C,QAAQ,CAAC;AAC9B;AACA,SAASsC,cAAc,CAACJ,IAAI,EAAE;EAC1B,IAAI,OAAOA,IAAI,KAAK,QAAQ,EACxB,OAAOA,IAAI;;EAEf,IAAI,SAAS,IAAIA,IAAI,EAAE;IACnB,IAAIzB,KAAK,CAACC,OAAO,CAACwB,IAAI,CAACc,MAAM,CAAC,EAAE;MAC5B,OAAQ,GAAEd,IAAI,CAACO,OAAQ,KAAIP,IAAI,CAACc,MAAM,CAACC,GAAG,CAACtC,IAAI,CAACC,SAAS,CAAC,CAACsC,IAAI,CAAC,IAAI,CAAE,EAAC;;IAE3E,OAAOhB,IAAI,CAACO,OAAO;;;EAGvB,OAAQ,kBAAiB9B,IAAI,CAACC,SAAS,CAACsB,IAAI,CAAE,EAAC;AACnD;;ACzHe,SAASiB,YAAY,CAACC,WAAW,EAAEC,WAAW,EAAE;EAC3D,MAAMC,QAAQ,GAAGF,WAAW,CAACG,QAAQ,CAACF,WAAW,CAAC;EAClD,MAAMG,MAAM,GAAG,UAAUC,KAAK,EAAEC,UAAU,EAAE;IACxC,MAAMC,eAAe,GAAGL,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC;IACzD,IAAI,CAACC,eAAe,CAACtD,OAAO,IAAI,CAACsD,eAAe,CAACtD,OAAO,CAACwD,IAAI,EAAE;MAC3D,OAAO3D,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACH,eAAe,CAAC,CAAC;;IAExD,MAAMtD,OAAO,GAAG,CAACoD,KAAK,EAAEC,UAAU,KAAK;MACnC,OAAOxD,YAAY,CAACoD,QAAQ,CAACQ,KAAK,CAACR,QAAQ,CAACM,KAAK,CAACH,KAAK,EAAEC,UAAU,CAAC,CAAC,CAAC;KACzE;IACDvC,MAAM,CAACC,MAAM,CAACf,OAAO,EAAE;MACnBiD,QAAQ;MACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;KAC7C,CAAC;IACF,OAAOK,eAAe,CAACtD,OAAO,CAACwD,IAAI,CAACxD,OAAO,EAAEsD,eAAe,CAAC;GAChE;EACD,OAAOxC,MAAM,CAACC,MAAM,CAACoC,MAAM,EAAE;IACzBF,QAAQ;IACRC,QAAQ,EAAEJ,YAAY,CAACY,IAAI,CAAC,IAAI,EAAET,QAAQ;GAC7C,CAAC;AACN;;MCjBajD,OAAO,GAAG8C,YAAY,CAACG,iBAAQ,EAAE;EAC1CzC,OAAO,EAAE;IACL,YAAY,EAAG,sBAAqBf,OAAQ,IAAGkE,+BAAY,EAAG;;AAEtE,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 0000000..223307a --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,123 @@ +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) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/get-buffer-response.js new file mode 100644 index 0000000..845a394 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 0000000..2460e99 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 0000000..4b40fe8 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 0000000..e206429 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 0000000..4901c79 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,11 @@ +import { EndpointInterface } from "@octokit/types"; +export default function fetchWrapper(requestOptions: ReturnType & { + redirect?: "error" | "follow" | "manual"; +}): Promise<{ + status: number; + url: string; + headers: { + [header: string]: string; + }; + data: any; +}>; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts new file mode 100644 index 0000000..915b705 --- /dev/null +++ b/node_modules/@octokit/graphql/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/graphql/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 0000000..1030809 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("@octokit/types").RequestInterface; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 0000000..b45decc --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "6.2.3"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..0080469 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types"; +export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-web/index.js new file mode 100644 index 0000000..bf549a4 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,162 @@ +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 = "6.2.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + 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) || + globalThis.fetch || + /* istanbul ignore next */ nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +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 }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-web/index.js.map new file mode 100644 index 0000000..b2d1f15 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"6.2.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) ||\n globalThis.fetch ||\n /* istanbul ignore next */ nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA3B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACpD,IAAI,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;AACrD,IAAI,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG;AACpE,UAAU,cAAc,CAAC,OAAO,CAAC,GAAG;AACpC,UAAU,OAAO,CAAC;AAClB,IAAI,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;AAC1C,QAAQ,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK;AACL,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK;AACzE,QAAQ,UAAU,CAAC,KAAK;AACxB,mCAAmC,SAAS,CAAC;AAC7C,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACnD,QAAQ,MAAM,EAAE,cAAc,CAAC,MAAM;AACrC,QAAQ,IAAI,EAAE,cAAc,CAAC,IAAI;AACjC,QAAQ,OAAO,EAAE,cAAc,CAAC,OAAO;AACvC,QAAQ,QAAQ,EAAE,cAAc,CAAC,QAAQ;AACzC,KAAK;AACL;AACA;AACA,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC5B,SAAS,IAAI,CAAC,OAAO,QAAQ,KAAK;AAClC,QAAQ,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC3B,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,QAAQ,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;AACpD,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,aAAa,IAAI,OAAO,EAAE;AACtC,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC/F,YAAY,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7D,YAAY,GAAG,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,kDAAkD,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClN,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;AAC9C,YAAY,OAAO;AACnB,SAAS;AACT;AACA,QAAQ,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9C,YAAY,IAAI,MAAM,GAAG,GAAG,EAAE;AAC9B,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;AAChE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,SAAS;AACnC,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;AAC3D,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,MAAM,eAAe,CAAC,QAAQ,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE;AAC3B,YAAY,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;AACzE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI;AACxB,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzC,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK;AACxB,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,GAAG;AACf,YAAY,OAAO;AACnB,YAAY,IAAI;AAChB,SAAS,CAAC;AACV,KAAK,CAAC;AACN,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1B,QAAQ,IAAI,KAAK,YAAY,YAAY;AACzC,YAAY,MAAM,KAAK,CAAC;AACxB,aAAa,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;AAC5C,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;AACnD,YAAY,OAAO,EAAE,cAAc;AACnC,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;AACD,eAAe,eAAe,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC7D,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AAC/C,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACpE,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AACD,SAAS,cAAc,CAAC,IAAI,EAAE;AAC9B,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AAChC,QAAQ,OAAO,IAAI,CAAC;AACpB;AACA,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE;AAC3B,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACxC,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpF,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL;AACA,IAAI,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;;ACzHc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACvD,IAAI,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;AAChD,QAAQ,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;AACvE,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;AAC/C,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AAC/B,YAAY,QAAQ;AACpB,YAAY,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACtE,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,CAAC;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/request/package.json b/node_modules/@octokit/graphql/node_modules/@octokit/request/package.json new file mode 100644 index 0000000..53910ad --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/request/package.json @@ -0,0 +1,58 @@ +{ + "name": "@octokit/request", + "description": "Send parameterized requests to GitHub's APIs with sensible defaults in browsers and Node", + "version": "6.2.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "repository": "github:octokit/request.js", + "dependencies": { + "@octokit/endpoint": "^7.0.0", + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/auth-app": "^4.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^29.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^18.0.0", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^9.3.1", + "jest": "^29.0.0", + "lolex": "^6.0.0", + "prettier": "2.8.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "string-to-arraybuffer": "^1.0.2", + "ts-jest": "^29.0.0", + "typescript": "^4.0.2" + }, + "engines": { + "node": ">= 14" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/graphql/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +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 (including the next paragraph) 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/node_modules/@octokit/types/README.md b/node_modules/@octokit/graphql/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..20d1e04 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "9.0.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..3b19f1b --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @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`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a04ad60 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * 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 Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + 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: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * 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: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * 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: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..8eccf5e --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..983c79b --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..2daaf34 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..8686e7f --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..4608392 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..4231159 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option 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; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * 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: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): 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: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..4cdfe61 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..f83f5ab --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..bf51f85 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * 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?: Url; + /** + * 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?: RequestRequestOptions; + /** + * 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]: unknown; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..b875b7e --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * 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/graphql/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..ff7af38 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..808991e --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..bdf9700 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..521f5ad --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..a908dd0 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.0.0"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..eb00cf4 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3543 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +type SuccessStatuses = 200 | 201 | 202 | 204; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204; +type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow + */ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-required-workflow + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows + */ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-required-workflows + */ + "GET /repos/{org}/{repo}/actions/required_workflows": Operation<"/repos/{org}/{repo}/actions/required_workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage + */ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": Operation<"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-required-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": Operation<"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-required-workflow + */ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/dependabot#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature + */ + "POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-required-workflow + */ + "POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployment": Operation<"/repos/{owner}/{repo}/pages/deployment", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repositories/{repository_id}/environments/{environment_name}/variables": Operation<"/repositories/{repository_id}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow + */ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing + */ + "PUT /orgs/{org}/codespaces/billing": Operation<"/orgs/{org}/codespaces/billing", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..8b7457a --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "9.0.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/node_modules/@octokit/types/package.json b/node_modules/@octokit/graphql/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..df1fea2 --- /dev/null +++ b/node_modules/@octokit/graphql/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "9.0.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "10.0.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^16.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^3.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^20.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/graphql/package.json b/node_modules/@octokit/graphql/package.json index 41f6d08..c87005a 100644 --- a/node_modules/@octokit/graphql/package.json +++ b/node_modules/@octokit/graphql/package.json @@ -1,80 +1,49 @@ { - "_from": "@octokit/graphql@^4.5.8", - "_id": "@octokit/graphql@4.6.0", - "_inBundle": false, - "_integrity": "sha512-CJ6n7izLFXLvPZaWzCQDjU/RP+vHiZmWdOunaCS87v+2jxMsW9FB5ktfIxybRBxZjxuJGRnxk7xJecWTVxFUYQ==", - "_location": "/@octokit/graphql", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/graphql@^4.5.8", - "name": "@octokit/graphql", - "escapedName": "@octokit%2fgraphql", - "scope": "@octokit", - "rawSpec": "^4.5.8", - "saveSpec": null, - "fetchSpec": "^4.5.8" - }, - "_requiredBy": [ - "/@octokit/core" + "name": "@octokit/graphql", + "description": "GitHub GraphQL API client for browsers and Node", + "version": "5.0.5", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.0.tgz", - "_shasum": "f9abca55f82183964a33439d5264674c701c3327", - "_spec": "@octokit/graphql@^4.5.8", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\core", - "bugs": { - "url": "https://github.com/octokit/graphql.js/issues" - }, - "bundleDependencies": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "graphql" + ], + "repository": "github:octokit/graphql.js", "dependencies": { - "@octokit/request": "^5.3.0", - "@octokit/types": "^6.0.3", + "@octokit/request": "^6.0.0", + "@octokit/types": "^9.0.0", "universal-user-agent": "^6.0.0" }, - "deprecated": false, - "description": "GitHub GraphQL API client for browsers and Node", "devDependencies": { - "@pika/pack": "^0.5.0", + "@pika/pack": "^0.3.7", "@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-web": "^0.9.0", "@pika/plugin-ts-standard-pkg": "^0.9.0", "@types/fetch-mock": "^7.2.5", - "@types/jest": "^26.0.0", - "@types/node": "^14.0.4", + "@types/jest": "^29.0.0", + "@types/node": "^18.0.0", "fetch-mock": "^9.0.0", - "jest": "^26.0.0", - "prettier": "^2.0.0", - "semantic-release": "^17.0.0", + "jest": "^29.0.0", + "prettier": "2.8.3", "semantic-release-plugin-update-version-in-files": "^1.0.0", - "ts-jest": "^26.0.0", + "ts-jest": "^29.0.0", "typescript": "^4.0.0" }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/graphql.js#readme", - "keywords": [ - "octokit", - "github", - "api", - "graphql" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/graphql", - "pika": true, + "engines": { + "node": ">= 14" + }, "publishConfig": { "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/graphql.js.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "4.6.0" + } } diff --git a/node_modules/@octokit/oauth-authorization-url/LICENSE b/node_modules/@octokit/oauth-authorization-url/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/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/oauth-authorization-url/README.md b/node_modules/@octokit/oauth-authorization-url/README.md new file mode 100644 index 0000000..b032aa5 --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/README.md @@ -0,0 +1,281 @@ +# oauth-authorization-url.js + +> Universal library to retrieve GitHub’s identity URL for the OAuth web flow + +[![@latest](https://img.shields.io/npm/v/@octokit/oauth-authorization-url.svg)](https://www.npmjs.com/package/@octokit/oauth-authorization-url) +[![Build Status](https://github.com/octokit/oauth-authorization-url.js/workflows/Test/badge.svg)](https://github.com/octokit/oauth-authorization-url.js/actions?query=workflow%3ATest+branch%3Amaster) + +See [GitHub’s Developer Guide for the OAuth App web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). Note that the [OAuth web application flow for GitHub Apps](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#web-application-flow) is slightly different. GitHub Apps do not support scopes for its user access tokens (they are called user-to-server tokens for GitHub Apps), instead they inherit the user permissions from the GitHub App's registration and the repository/organization access and permissions from the respective installation. + + + +- [Usage](#usage) + - [For OAuth Apps](#for-oauth-apps) + - [For GitHub Apps](#for-github-apps) +- [Options](#options) +- [Result](#result) +- [Types](#types) +- [License](#license) + + + +## Usage + + + + + + + + + + +
+ Browsers + + +Load `@octokit/oauth-authorization-url` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+ Node + + +Install with npm install @octokit/oauth-authorization-url + +```js +const { oauthAuthorizationUrl } = require("@octokit/oauth-authorization-url"); +// or: import { oauthAuthorizationUrl } from "@octokit/oauth-authorization-url"; +``` + +
+ +### For OAuth Apps + +```js +const { + url, + clientId, + redirectUrl, + login, + scopes, + state, +} = oauthAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + redirectUrl: "https://example.com", + login: "octocat", + scopes: ["repo", "admin:org"], + state: "secret123", +}); +``` + +### For GitHub Apps + +```js +const { url, clientId, redirectUrl, login, state } = oauthAuthorizationUrl({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + redirectUrl: "https://example.com", + login: "octocat", + state: "secret123", +}); +``` + +## Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + description +
+ clientId + + Required. The client ID you received from GitHub when you registered. +
+ clientType + + +Must be set to either `"oauth-app"` or `"github-app"`. Defaults to `"oauth-app"`. + +
+ redirectUrl + + The URL in your application where users will be sent after authorization. See Redirect URLs in GitHub’s Developer Guide. +
+ login + + Suggests a specific account to use for signing in and authorizing the app. +
+ scopes + + +Only relevant when `clientType` is set to `"oauth-app"`. + +An array of scope names (or: space-delimited list of scopes). If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. + +Defaults to `[]` if `clientType` is set to `"oauth-app"`. + +
+ state + + An unguessable random string. It is used to protect against cross-site request forgery attacks. + Defaults to Math.random().toString(36).substr(2). +
+ allowSignup + + Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. Use false in the case that a policy prohibits signups. Defaults to true. +
+ baseUrl + + When using GitHub Enterprise Server, set the baseUrl to the origin, e.g. https://github.my-enterprise.com. +
+ +## Result + +`oauthAuthorizationUrl()` returns an object with the following properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + description +
+ allowSignup + + Returns options.allowSignup if it was set. Defaults to true. +
+ clientType + + Returns options.clientType. Defaults to "oauth-app". +
+ clientId + + Returns options.clientId. +
+ login + + Returns options.login if it was set. Defaults to null. +
+ redirectUrl + + Returns options.redirectUrl if it was set. Defaults to null. +
+ scopes + + +Only set if `options.clientType` is set to `"oauth-app"`. + +Returns an array of strings. Returns options.scopes if it was set and turns the string into an array if a string was passed, otherwise []. + +
+ state + + Returns options.state if it was set. Defaults to Defaults to Math.random().toString(36).substr(2). +
+ url + + The authorization URL +
+ +## Types + +```ts +import { + ClientType, + OAuthAppOptions, + OAuthAppResult, + GitHubAppOptions, + GitHubAppResult, +} from "@octokit/oauth-authorization-url"; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/oauth-authorization-url/dist-node/index.js b/node_modules/@octokit/oauth-authorization-url/dist-node/index.js new file mode 100644 index 0000000..a739ce7 --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/dist-node/index.js @@ -0,0 +1,54 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "" + }; + + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes; + } + + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} + +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state" + }; + let url = base; + Object.keys(map) // Filter out keys that are null and remove the url key + .filter(k => options[k] !== null) // Filter out empty scopes array + .filter(k => { + if (k !== "scopes") return true; + if (options.clientType === "github-app") return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map(key => [map[key], `${options[key]}`]) // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} + +exports.oauthAuthorizationUrl = oauthAuthorizationUrl; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map b/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map new file mode 100644 index 0000000..5072026 --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["export function oauthAuthorizationUrl(options) {\n const clientType = options.clientType || \"oauth-app\";\n const baseUrl = options.baseUrl || \"https://github.com\";\n const result = {\n clientType,\n allowSignup: options.allowSignup === false ? false : true,\n clientId: options.clientId,\n login: options.login || null,\n redirectUrl: options.redirectUrl || null,\n state: options.state || Math.random().toString(36).substr(2),\n url: \"\",\n };\n if (clientType === \"oauth-app\") {\n const scopes = \"scopes\" in options ? options.scopes : [];\n result.scopes =\n typeof scopes === \"string\"\n ? scopes.split(/[,\\s]+/).filter(Boolean)\n : scopes;\n }\n result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result);\n return result;\n}\nfunction urlBuilderAuthorize(base, options) {\n const map = {\n allowSignup: \"allow_signup\",\n clientId: \"client_id\",\n login: \"login\",\n redirectUrl: \"redirect_uri\",\n scopes: \"scope\",\n state: \"state\",\n };\n let url = base;\n Object.keys(map)\n // Filter out keys that are null and remove the url key\n .filter((k) => options[k] !== null)\n // Filter out empty scopes array\n .filter((k) => {\n if (k !== \"scopes\")\n return true;\n if (options.clientType === \"github-app\")\n return false;\n return !Array.isArray(options[k]) || options[k].length > 0;\n })\n // Map Array with the proper URL parameter names and change the value to a string using template strings\n // @ts-ignore\n .map((key) => [map[key], `${options[key]}`])\n // Finally, build the URL\n .forEach(([key, value], index) => {\n url += index === 0 ? `?` : \"&\";\n url += `${key}=${encodeURIComponent(value)}`;\n });\n return url;\n}\n"],"names":["oauthAuthorizationUrl","options","clientType","baseUrl","result","allowSignup","clientId","login","redirectUrl","state","Math","random","toString","substr","url","scopes","split","filter","Boolean","urlBuilderAuthorize","base","map","Object","keys","k","Array","isArray","length","key","forEach","value","index","encodeURIComponent"],"mappings":";;;;AAAO,SAASA,qBAAT,CAA+BC,OAA/B,EAAwC;AAC3C,QAAMC,UAAU,GAAGD,OAAO,CAACC,UAAR,IAAsB,WAAzC;AACA,QAAMC,OAAO,GAAGF,OAAO,CAACE,OAAR,IAAmB,oBAAnC;AACA,QAAMC,MAAM,GAAG;AACXF,IAAAA,UADW;AAEXG,IAAAA,WAAW,EAAEJ,OAAO,CAACI,WAAR,KAAwB,KAAxB,GAAgC,KAAhC,GAAwC,IAF1C;AAGXC,IAAAA,QAAQ,EAAEL,OAAO,CAACK,QAHP;AAIXC,IAAAA,KAAK,EAAEN,OAAO,CAACM,KAAR,IAAiB,IAJb;AAKXC,IAAAA,WAAW,EAAEP,OAAO,CAACO,WAAR,IAAuB,IALzB;AAMXC,IAAAA,KAAK,EAAER,OAAO,CAACQ,KAAR,IAAiBC,IAAI,CAACC,MAAL,GAAcC,QAAd,CAAuB,EAAvB,EAA2BC,MAA3B,CAAkC,CAAlC,CANb;AAOXC,IAAAA,GAAG,EAAE;AAPM,GAAf;;AASA,MAAIZ,UAAU,KAAK,WAAnB,EAAgC;AAC5B,UAAMa,MAAM,GAAG,YAAYd,OAAZ,GAAsBA,OAAO,CAACc,MAA9B,GAAuC,EAAtD;AACAX,IAAAA,MAAM,CAACW,MAAP,GACI,OAAOA,MAAP,KAAkB,QAAlB,GACMA,MAAM,CAACC,KAAP,CAAa,QAAb,EAAuBC,MAAvB,CAA8BC,OAA9B,CADN,GAEMH,MAHV;AAIH;;AACDX,EAAAA,MAAM,CAACU,GAAP,GAAaK,mBAAmB,CAAE,GAAEhB,OAAQ,wBAAZ,EAAqCC,MAArC,CAAhC;AACA,SAAOA,MAAP;AACH;;AACD,SAASe,mBAAT,CAA6BC,IAA7B,EAAmCnB,OAAnC,EAA4C;AACxC,QAAMoB,GAAG,GAAG;AACRhB,IAAAA,WAAW,EAAE,cADL;AAERC,IAAAA,QAAQ,EAAE,WAFF;AAGRC,IAAAA,KAAK,EAAE,OAHC;AAIRC,IAAAA,WAAW,EAAE,cAJL;AAKRO,IAAAA,MAAM,EAAE,OALA;AAMRN,IAAAA,KAAK,EAAE;AANC,GAAZ;AAQA,MAAIK,GAAG,GAAGM,IAAV;AACAE,EAAAA,MAAM,CAACC,IAAP,CAAYF,GAAZ;AAAA,GAEKJ,MAFL,CAEaO,CAAD,IAAOvB,OAAO,CAACuB,CAAD,CAAP,KAAe,IAFlC;AAAA,GAIKP,MAJL,CAIaO,CAAD,IAAO;AACf,QAAIA,CAAC,KAAK,QAAV,EACI,OAAO,IAAP;AACJ,QAAIvB,OAAO,CAACC,UAAR,KAAuB,YAA3B,EACI,OAAO,KAAP;AACJ,WAAO,CAACuB,KAAK,CAACC,OAAN,CAAczB,OAAO,CAACuB,CAAD,CAArB,CAAD,IAA8BvB,OAAO,CAACuB,CAAD,CAAP,CAAWG,MAAX,GAAoB,CAAzD;AACH,GAVD;AAYI;AAZJ,GAaKN,GAbL,CAaUO,GAAD,IAAS,CAACP,GAAG,CAACO,GAAD,CAAJ,EAAY,GAAE3B,OAAO,CAAC2B,GAAD,CAAM,EAA3B,CAblB;AAAA,GAeKC,OAfL,CAea,CAAC,CAACD,GAAD,EAAME,KAAN,CAAD,EAAeC,KAAf,KAAyB;AAClCjB,IAAAA,GAAG,IAAIiB,KAAK,KAAK,CAAV,GAAe,GAAf,GAAoB,GAA3B;AACAjB,IAAAA,GAAG,IAAK,GAAEc,GAAI,IAAGI,kBAAkB,CAACF,KAAD,CAAQ,EAA3C;AACH,GAlBD;AAmBA,SAAOhB,GAAP;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/oauth-authorization-url/dist-src/index.js b/node_modules/@octokit/oauth-authorization-url/dist-src/index.js new file mode 100644 index 0000000..3a0be85 --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/dist-src/index.js @@ -0,0 +1,53 @@ +export function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "", + }; + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = + typeof scopes === "string" + ? scopes.split(/[,\s]+/).filter(Boolean) + : scopes; + } + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state", + }; + let url = base; + Object.keys(map) + // Filter out keys that are null and remove the url key + .filter((k) => options[k] !== null) + // Filter out empty scopes array + .filter((k) => { + if (k !== "scopes") + return true; + if (options.clientType === "github-app") + return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) + // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map((key) => [map[key], `${options[key]}`]) + // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} diff --git a/node_modules/@octokit/oauth-authorization-url/dist-src/types.js b/node_modules/@octokit/oauth-authorization-url/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts b/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts new file mode 100644 index 0000000..b4efd4a --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts @@ -0,0 +1,4 @@ +import { OAuthAppOptions, GitHubAppOptions, OAuthAppResult, GitHubAppResult } from "./types"; +export { ClientType, OAuthAppOptions, GitHubAppOptions, OAuthAppResult, GitHubAppResult, } from "./types"; +export declare function oauthAuthorizationUrl(options: OAuthAppOptions): OAuthAppResult; +export declare function oauthAuthorizationUrl(options: GitHubAppOptions): GitHubAppResult; diff --git a/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts b/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts new file mode 100644 index 0000000..0dd3ad1 --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts @@ -0,0 +1,39 @@ +export declare type ClientType = "oauth-app" | "github-app"; +export declare type OAuthAppOptions = { + clientId: string; + clientType?: "oauth-app"; + allowSignup?: boolean; + login?: string; + scopes?: string | string[]; + redirectUrl?: string; + state?: string; + baseUrl?: string; +}; +export declare type GitHubAppOptions = { + clientId: string; + clientType: "github-app"; + allowSignup?: boolean; + login?: string; + redirectUrl?: string; + state?: string; + baseUrl?: string; +}; +export declare type OAuthAppResult = { + allowSignup: boolean; + clientId: string; + clientType: "oauth-app"; + login: string | null; + redirectUrl: string | null; + scopes: string[]; + state: string; + url: string; +}; +export declare type GitHubAppResult = { + allowSignup: boolean; + clientId: string; + clientType: "github-app"; + login: string | null; + redirectUrl: string | null; + state: string; + url: string; +}; diff --git a/node_modules/@octokit/oauth-authorization-url/dist-web/index.js b/node_modules/@octokit/oauth-authorization-url/dist-web/index.js new file mode 100644 index 0000000..e778a09 --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/dist-web/index.js @@ -0,0 +1,56 @@ +function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "", + }; + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = + typeof scopes === "string" + ? scopes.split(/[,\s]+/).filter(Boolean) + : scopes; + } + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state", + }; + let url = base; + Object.keys(map) + // Filter out keys that are null and remove the url key + .filter((k) => options[k] !== null) + // Filter out empty scopes array + .filter((k) => { + if (k !== "scopes") + return true; + if (options.clientType === "github-app") + return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }) + // Map Array with the proper URL parameter names and change the value to a string using template strings + // @ts-ignore + .map((key) => [map[key], `${options[key]}`]) + // Finally, build the URL + .forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} + +export { oauthAuthorizationUrl }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map b/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map new file mode 100644 index 0000000..cad5e93 --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["export function oauthAuthorizationUrl(options) {\n const clientType = options.clientType || \"oauth-app\";\n const baseUrl = options.baseUrl || \"https://github.com\";\n const result = {\n clientType,\n allowSignup: options.allowSignup === false ? false : true,\n clientId: options.clientId,\n login: options.login || null,\n redirectUrl: options.redirectUrl || null,\n state: options.state || Math.random().toString(36).substr(2),\n url: \"\",\n };\n if (clientType === \"oauth-app\") {\n const scopes = \"scopes\" in options ? options.scopes : [];\n result.scopes =\n typeof scopes === \"string\"\n ? scopes.split(/[,\\s]+/).filter(Boolean)\n : scopes;\n }\n result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result);\n return result;\n}\nfunction urlBuilderAuthorize(base, options) {\n const map = {\n allowSignup: \"allow_signup\",\n clientId: \"client_id\",\n login: \"login\",\n redirectUrl: \"redirect_uri\",\n scopes: \"scope\",\n state: \"state\",\n };\n let url = base;\n Object.keys(map)\n // Filter out keys that are null and remove the url key\n .filter((k) => options[k] !== null)\n // Filter out empty scopes array\n .filter((k) => {\n if (k !== \"scopes\")\n return true;\n if (options.clientType === \"github-app\")\n return false;\n return !Array.isArray(options[k]) || options[k].length > 0;\n })\n // Map Array with the proper URL parameter names and change the value to a string using template strings\n // @ts-ignore\n .map((key) => [map[key], `${options[key]}`])\n // Finally, build the URL\n .forEach(([key, value], index) => {\n url += index === 0 ? `?` : \"&\";\n url += `${key}=${encodeURIComponent(value)}`;\n });\n return url;\n}\n"],"names":[],"mappings":"AAAO,SAAS,qBAAqB,CAAC,OAAO,EAAE;AAC/C,IAAI,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,WAAW,CAAC;AACzD,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,oBAAoB,CAAC;AAC5D,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,UAAU;AAClB,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW,KAAK,KAAK,GAAG,KAAK,GAAG,IAAI;AACjE,QAAQ,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAClC,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI;AACpC,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI;AAChD,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACpE,QAAQ,GAAG,EAAE,EAAE;AACf,KAAK,CAAC;AACN,IAAI,IAAI,UAAU,KAAK,WAAW,EAAE;AACpC,QAAQ,MAAM,MAAM,GAAG,QAAQ,IAAI,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;AACjE,QAAQ,MAAM,CAAC,MAAM;AACrB,YAAY,OAAO,MAAM,KAAK,QAAQ;AACtC,kBAAkB,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACxD,kBAAkB,MAAM,CAAC;AACzB,KAAK;AACL,IAAI,MAAM,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC,CAAC;AACjF,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,SAAS,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE;AAC5C,IAAI,MAAM,GAAG,GAAG;AAChB,QAAQ,WAAW,EAAE,cAAc;AACnC,QAAQ,QAAQ,EAAE,WAAW;AAC7B,QAAQ,KAAK,EAAE,OAAO;AACtB,QAAQ,WAAW,EAAE,cAAc;AACnC,QAAQ,MAAM,EAAE,OAAO;AACvB,QAAQ,KAAK,EAAE,OAAO;AACtB,KAAK,CAAC;AACN,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC;AACnB,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACpB;AACA,SAAS,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAC3C;AACA,SAAS,MAAM,CAAC,CAAC,CAAC,KAAK;AACvB,QAAQ,IAAI,CAAC,KAAK,QAAQ;AAC1B,YAAY,OAAO,IAAI,CAAC;AACxB,QAAQ,IAAI,OAAO,CAAC,UAAU,KAAK,YAAY;AAC/C,YAAY,OAAO,KAAK,CAAC;AACzB,QAAQ,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACnE,KAAK,CAAC;AACN;AACA;AACA,SAAS,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD;AACA,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK;AAC1C,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AACvC,QAAQ,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,GAAG,CAAC;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/oauth-authorization-url/package.json b/node_modules/@octokit/oauth-authorization-url/package.json new file mode 100644 index 0000000..e059406 --- /dev/null +++ b/node_modules/@octokit/oauth-authorization-url/package.json @@ -0,0 +1,39 @@ +{ + "name": "@octokit/oauth-authorization-url", + "description": "Universal library to retrieve GitHub’s identity URL for the OAuth web flow", + "version": "4.3.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "oauth" + ], + "repository": "github:octokit/oauth-authorization-url.js", + "dependencies": {}, + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^26.0.0", + "jest": "^27.0.0", + "pika-plugin-unpkg-field": "^1.0.1", + "semantic-release": "^17.0.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "unpkg": "dist-web/index.js" +} diff --git a/node_modules/@octokit/oauth-methods/LICENSE b/node_modules/@octokit/oauth-methods/LICENSE new file mode 100644 index 0000000..57049d0 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 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/oauth-methods/README.md b/node_modules/@octokit/oauth-methods/README.md new file mode 100644 index 0000000..acaac06 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/README.md @@ -0,0 +1,1607 @@ +# oauth-methods.js + +> Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps + +[![@latest](https://img.shields.io/npm/v/@octokit/oauth-methods.svg)](https://www.npmjs.com/package/@octokit/oauth-methods) +[![Build Status](https://github.com/octokit/oauth-methods.js/workflows/Test/badge.svg)](https://github.com/octokit/oauth-methods.js/actions?query=workflow%3ATest+branch%3Amain) + + + +- [Usage](#usage) + - [OAuth Web Flow](#oauth-web-flow) + - [OAuth Device Flow](#oauth-device-flow) +- [Methods](#methods) + - [`getWebFlowAuthorizationUrl()`](#getwebflowauthorizationurl) + - [`exchangeWebFlowCode()`](#exchangewebflowcode) + - [`createDeviceCode()`](#createdevicecode) + - [`exchangeDeviceCode()`](#exchangedevicecode) + - [`checkToken()`](#checktoken) + - [`refreshToken()`](#refreshtoken) + - [`scopeToken()`](#scopetoken) + - [`resetToken()`](#resettoken) + - [`deleteToken()`](#deletetoken) + - [`deleteAuthorization()`](#deleteauthorization) +- [Authentication object](#authentication-object) + - [OAuth APP authentication](#oauth-app-authentication) + - [GitHub App with non-expiring user authentication](#github-app-with-non-expiring-user-authentication) + - [GitHub App with expiring user authentication](#github-app-with-expiring-user-authentication) +- [Types](#types) +- [Contributing](#contributing) +- [License](#license) + + + +The OAuth endpoints related to user access tokens are not all part of GitHub's REST API and they behave slightly different. The methods exported by `@octokit/normalize the differences so you don't have to. + +## Usage + + + + + + +
+ +Browsers + + + +`@octokit/oauth-methods` is not meant for browser usage. + +Some of the methods will work, but others do not have CORS headers enabled and will fail (`exchangeWebFlowCode()`, `createDeviceCode()`, `exchangeDeviceCode()`, `refreshToken()`). Also the Client Secret should not be exposed to clients as it can be used for a [Person-in-the-middle attack](https://en.wikipedia.org/wiki/Person-in-the-middle_attack). + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/oauth-methods` + +```js +const { + exchangeWebFlowCode, + createDeviceCode, + exchangeDeviceCode, + checkToken, + refreshToken, + scopeToken, + resetToken, + deleteToken, + deleteAuthorization, +} = require("@octokit/oauth-methods"); +``` + +
+ +### OAuth Web Flow + +After a user granted access to an OAuth App or GitHub App on [Step 1 of GitHub's OAuth Web Flow](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#1-request-a-users-github-identity), they get redirected to a URL controlled by your app with a `?code=...` query parameter. + +You can exchange that code for a user access token as described in [Step 2 of GitHub's OAuth Web Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github). + +Setting `clientType` is required because there are slight differences between `"oauth-app"` and `"github-app"`. Most importantly, GitHub Apps do not support scopes. + +```js +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", + scopes: ["repo"], +}); +``` + +`data` is the raw response data. `authentication` is a [User Authentication object](#authentication-object). + +### OAuth Device Flow + +In [step 1 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github), you need to create a device and user code + +```js +const { + data: { device_code, user_code, verification_uri }, +} = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +In [step 2 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser), the user has to enter `user_code` on `verification_uri` (https://github.com/login/device unless you use GitHub Enterprise Server). + +Once the user entered the code and granted access, you can exchange the `device_code` for a user access token in [step 3 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device) + +```js +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: device_code, +}); +``` + +`data` is the raw response data. `authentication` is a [User Authentication object](#authentication-object). + +## Methods + +### `getWebFlowAuthorizationUrl()` + +This is a wrapper around [`@octokit/oauth-authorization-url`](https://github.com/octokit/oauth-authorization-url.js#readme) that accepts a `request` option instead of `baseUrl` for consistency with the other OAuth methods. `getWebFlowAuthorizationUrl()` is a synchronous method and does not send any request. + +```js +const { url } = getWebFlowAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. The client ID you received from GitHub when you registered. +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app". +
+ redirectUrl + + string + + The URL in your application where users will be sent after authorization. See Redirect URLs in GitHub’s Developer Guide. +
+ login + + string + + Suggests a specific account to use for signing in and authorizing the app. +
+ scopes + + array of strings + + +Only relevant if `clientType` is set to `"oauth-app"`. + +An array of scope names (or: space-delimited list of scopes). If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. + +Defaults to `[]`. + +
+ state + + string + + An unguessable random string. It is used to protect against cross-site request forgery attacks. + Defaults to Math.random().toString(36).substr(2). +
+ allowSignup + + boolean + + Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. Use false in the case that a policy prohibits signups. Defaults to true. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { url } = getWebFlowAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +The `getWebFlowAuthorizationUrl` method is synchronous and returns an object with the following properties. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ allowSignup + + boolean + + Returns options.allowSignup if it was set. Defaults to true. +
+ clientType + + string + + Returns options.clientType +
+ clientId + + string + + Returns options.clientId. +
+ login + + string + + Returns options.login if it was set. Defaults to null. +
+ redirectUrl + + string + + Returns options.redirectUrl if it was set. Defaults to null. +
+ scopes + + array of strings + + +Only set if `options.clientType` is set to `"oauth-app"`. + +Returns an array of strings. Returns options.scopes if it was set and turns the string into an array if a string was passed, otherwise []. + +
+ state + + string + + Returns options.state if it was set. Defaults to Math.random().toString(36).substr(2). +
+ url + + string + + The authorization URL +
+ +### `exchangeWebFlowCode()` + +```js +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ code + + string + + Required. The code from GitHub's OAuth flow redirect's ?code=... query parameter +
+ redirectUrl + + string + + The redirectUrl option you passed to getWebFlowAuthorizationUrl() +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /login/oauth/access_token`](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#response) (JSON) with an additional `authentication` key which is the [authentication object](#authentication-object). + +### `createDeviceCode()` + +```js +const { data, authentication } = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ scopes + + array of strings + + +Only permitted if `clientType` is set to `"oauth-app"`. GitHub Apps do not support scopes. + +Array of [scope names](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes) you want to request for the user access token. + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data } = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST https://github.com/login/device/code`](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#response-1) (JSON). + +### `exchangeDeviceCode()` + +```js +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: "code123", +}); +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ code + + string + + Required. The decive_code from the createDeviceCode() response +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: "code123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### `checkToken()` + +```js +const { data, authentication } = await checkToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to check +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await checkToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) with an additional `authentication` key which is the [authentication object](#authentication-object). Note that the `authentication` object will not include the keys for expiring authentication. + +### `refreshToken()` + +Expiring user access tokens are currently in preview. You can [enable them for any of your GitHub apps](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens#configuring-expiring-user-tokens-for-an-existing-github-app). OAuth Apps do not support expiring user access tokens + +When a user access token expires it can be [refreshed using a refresh token](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens). Refreshing a token invalidates the current user access token. + +```js +const { data, authentication } = await refreshToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + refreshToken: "r1.refreshtoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ refreshToken + + string + + Required. The refresh token that was received alongside the user access token. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await refreshToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + refreshToken: "r1.refreshtoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /login/oauth/access_token`](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens#response) with an additional `authentication` key which is the [GitHub App expiring user authentication](#github-app-with-expiring-user-authentication). + +### `scopeToken()` + +```js +const { data, authentication } = await scopeToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", + target: "octokit", + repositories: ["oauth-methods.js"], + permissions: { + issues: "write", + }, +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to "github-app". +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ target + + string + + Required unless targetId is set. The name of the user or organization to scope the user-to-server access token to. +
+ targetId + + integer + + Required unless target is set. The ID of the user or organization to scope the user-to-server access token to. +
+ repositories + + array of strings + + The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified. +
+ repository_ids + + array of integers + + The list of repository IDs to scope the user-to-server access token to. repositories may not be specified if repositories is specified. +
+ permissions + + object + + The permissions granted to the user-to-server access token. See GitHub App Permissions. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await scopeToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + token: "usertoken123", + target: "octokit", + repositories: ["oauth-methods.js"], + permissions: { + issues: "write", + }, + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) with an additional `authentication` key which is the new [authentication object](#authentication-object). + +### `resetToken()` + +```js +const { data, authentication } = await resetToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app". +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to reset +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await resetToken({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) with an additional `authentication` key which is the new [authentication object](#authentication-object). + +### `deleteToken()` + +```js +const { status } = await deleteToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to delete +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await deleteToken({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) (which is an empty `204` response). + +### `deleteAuthorization()` + +```js +const { status } = await deleteAuthorization({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. A valid user access token for the authorization +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +const { request } = require("@octokit/request"); +const { data, authentication } = await deleteAuthorization({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) (which is an empty `204` response). + +## Authentication object + +The `authentication` object returned by the methods have one of three formats. + +1. [OAuth APP authentication token](#oauth-app-authentication-token) +1. [GitHub APP non-expiring user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) +1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +Note that the `clientSecret` may not be set when using [`exchangeDeviceCode()`](#exchangedevicecode) as `clientSecret` is not required for the OAuth device flow. + +### OAuth APP authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub App with non-expiring user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ +### GitHub App with expiring user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## Types + +```ts +import { + OAuthAppAuthentication, + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, + GetWebFlowAuthorizationUrlOAuthAppOptions, + GetWebFlowAuthorizationUrlGitHubAppOptions, + GetWebFlowAuthorizationUrlOAuthAppResult, + GetWebFlowAuthorizationUrlGitHubAppResult, + CheckTokenOAuthAppOptions, + CheckTokenGitHubAppOptions, + CheckTokenOAuthAppResponse, + CheckTokenGitHubAppResponse, + ExchangeWebFlowCodeOAuthAppOptions, + ExchangeWebFlowCodeGitHubAppOptions, + ExchangeWebFlowCodeOAuthAppResponse, + ExchangeWebFlowCodeGitHubAppResponse, + CreateDeviceCodeOAuthAppOptions, + CreateDeviceCodeGitHubAppOptions, + CreateDeviceCodeDeviceTokenResponse, + ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret, + ExchangeDeviceCodeOAuthAppOptions, + ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret, + ExchangeDeviceCodeGitHubAppOptions, + ExchangeDeviceCodeOAuthAppResponse, + ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret, + ExchangeDeviceCodeGitHubAppResponse, + ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret, + RefreshTokenOptions, + RefreshTokenResponse, + ScopeTokenOptions, + ScopeTokenResponse, + ResetTokenOAuthAppOptions, + ResetTokenGitHubAppOptions, + ResetTokenOAuthAppResponse, + ResetTokenGitHubAppResponse, + DeleteTokenOAuthAppOptions, + DeleteTokenGitHubAppOptions, + DeleteTokenResponse, + DeleteAuthorizationOAuthAppOptions, + DeleteAuthorizationGitHubAppOptions, + DeleteAuthorizationResponse, +} from "@octokit/oauth-methods"; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/oauth-methods/dist-node/index.js b/node_modules/@octokit/oauth-methods/dist-node/index.js new file mode 100644 index 0000000..0881cf6 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-node/index.js @@ -0,0 +1,393 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var oauthAuthorizationUrl = require('@octokit/oauth-authorization-url'); +var request = require('@octokit/request'); +var requestError = require('@octokit/request-error'); +var btoa = _interopDefault(require('btoa-lite')); + +const VERSION = "1.2.6"; + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +async function oauthRequest(request, route, parameters) { + const withOAuthParameters = _objectSpread2({ + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json" + } + }, parameters); + + const response = await request(route, withOAuthParameters); + + if ("error" in response.data) { + const error = new requestError.RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { + request: request.endpoint.merge(route, withOAuthParameters), + headers: response.headers + }); // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved + + error.response = response; + throw error; + } + + return response; +} + +const _excluded = ["request"]; +function getWebFlowAuthorizationUrl(_ref) { + let { + request: request$1 = request.request + } = _ref, + options = _objectWithoutProperties(_ref, _excluded); + + const baseUrl = requestToOAuthBaseUrl(request$1); // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\_(ツ)_/¯ + + return oauthAuthorizationUrl.oauthAuthorizationUrl(_objectSpread2(_objectSpread2({}, options), {}, { + baseUrl + })); +} + +async function exchangeWebFlowCode(options) { + const request$1 = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in), authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in); + } + + delete authentication.scopes; + } + + return _objectSpread2(_objectSpread2({}, response), {}, { + authentication + }); +} + +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +async function createDeviceCode(options) { + const request$1 = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const parameters = { + client_id: options.clientId + }; + + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + + return oauthRequest(request$1, "POST /login/device/code", parameters); +} + +async function exchangeDeviceCode(options) { + const request$1 = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code" + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp$1(apiTimeInMs, response.data.expires_in), authentication.refreshTokenExpiresAt = toTimestamp$1(apiTimeInMs, response.data.refresh_token_expires_in); + } + + delete authentication.scopes; + } + + return _objectSpread2(_objectSpread2({}, response), {}, { + authentication + }); +} + +function toTimestamp$1(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +async function checkToken(options) { + const request$1 = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await request$1("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) authentication.expiresAt = response.data.expires_at; + + if (options.clientType === "github-app") { + delete authentication.scopes; + } + + return _objectSpread2(_objectSpread2({}, response), {}, { + authentication + }); +} + +async function refreshToken(options) { + const request$1 = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const response = await oauthRequest(request$1, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken + }); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp$2(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp$2(apiTimeInMs, response.data.refresh_token_expires_in) + }; + return _objectSpread2(_objectSpread2({}, response), {}, { + authentication + }); +} + +function toTimestamp$2(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} + +const _excluded$1 = ["request", "clientType", "clientId", "clientSecret", "token"]; +async function scopeToken(options) { + const { + request: request$1, + clientType, + clientId, + clientSecret, + token + } = options, + requestOptions = _objectWithoutProperties(options, _excluded$1); + + const response = await (request$1 || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request)("POST /applications/{client_id}/token/scoped", _objectSpread2({ + headers: { + authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}` + }, + client_id: clientId, + access_token: token + }, requestOptions)); + const authentication = Object.assign({ + clientType, + clientId, + clientSecret, + token: response.data.token + }, response.data.expires_at ? { + expiresAt: response.data.expires_at + } : {}); + return _objectSpread2(_objectSpread2({}, response), {}, { + authentication + }); +} + +async function resetToken(options) { + const request$1 = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + const response = await request$1("PATCH /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) authentication.expiresAt = response.data.expires_at; + + if (options.clientType === "github-app") { + delete authentication.scopes; + } + + return _objectSpread2(_objectSpread2({}, response), {}, { + authentication + }); +} + +async function deleteToken(options) { + const request$1 = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request$1("DELETE /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); +} + +async function deleteAuthorization(options) { + const request$1 = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + request.request; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request$1("DELETE /applications/{client_id}/grant", { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + }); +} + +exports.VERSION = VERSION; +exports.checkToken = checkToken; +exports.createDeviceCode = createDeviceCode; +exports.deleteAuthorization = deleteAuthorization; +exports.deleteToken = deleteToken; +exports.exchangeDeviceCode = exchangeDeviceCode; +exports.exchangeWebFlowCode = exchangeWebFlowCode; +exports.getWebFlowAuthorizationUrl = getWebFlowAuthorizationUrl; +exports.refreshToken = refreshToken; +exports.resetToken = resetToken; +exports.scopeToken = scopeToken; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/oauth-methods/dist-node/index.js.map b/node_modules/@octokit/oauth-methods/dist-node/index.js.map new file mode 100644 index 0000000..19669f0 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/utils.js","../dist-src/get-web-flow-authorization-url.js","../dist-src/exchange-web-flow-code.js","../dist-src/create-device-code.js","../dist-src/exchange-device-code.js","../dist-src/check-token.js","../dist-src/refresh-token.js","../dist-src/scope-token.js","../dist-src/reset-token.js","../dist-src/delete-token.js","../dist-src/delete-authorization.js"],"sourcesContent":["export const VERSION = \"1.2.6\";\n","import { RequestError } from \"@octokit/request-error\";\nexport function requestToOAuthBaseUrl(request) {\n const endpointDefaults = request.endpoint.DEFAULTS;\n return /^https:\\/\\/(api\\.)?github\\.com$/.test(endpointDefaults.baseUrl)\n ? \"https://github.com\"\n : endpointDefaults.baseUrl.replace(\"/api/v3\", \"\");\n}\nexport async function oauthRequest(request, route, parameters) {\n const withOAuthParameters = {\n baseUrl: requestToOAuthBaseUrl(request),\n headers: {\n accept: \"application/json\",\n },\n ...parameters,\n };\n const response = await request(route, withOAuthParameters);\n if (\"error\" in response.data) {\n const error = new RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, {\n request: request.endpoint.merge(route, withOAuthParameters),\n headers: response.headers,\n });\n // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved\n error.response = response;\n throw error;\n }\n return response;\n}\n","import { oauthAuthorizationUrl, } from \"@octokit/oauth-authorization-url\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { requestToOAuthBaseUrl } from \"./utils\";\nexport function getWebFlowAuthorizationUrl({ request = defaultRequest, ...options }) {\n const baseUrl = requestToOAuthBaseUrl(request);\n // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\\_(ツ)_/¯\n return oauthAuthorizationUrl({\n ...options,\n baseUrl,\n });\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function exchangeWebFlowCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n client_secret: options.clientSecret,\n code: options.code,\n redirect_uri: options.redirectUrl,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.access_token,\n scopes: response.data.scope.split(/\\s+/).filter(Boolean),\n };\n if (options.clientType === \"github-app\") {\n if (\"refresh_token\" in response.data) {\n const apiTimeInMs = new Date(response.headers.date).getTime();\n (authentication.refreshToken = response.data.refresh_token),\n (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)),\n (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in));\n }\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function createDeviceCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const parameters = {\n client_id: options.clientId,\n };\n if (\"scopes\" in options && Array.isArray(options.scopes)) {\n parameters.scope = options.scopes.join(\" \");\n }\n return oauthRequest(request, \"POST /login/device/code\", parameters);\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function exchangeDeviceCode(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n device_code: options.code,\n grant_type: \"urn:ietf:params:oauth:grant-type:device_code\",\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n token: response.data.access_token,\n scopes: response.data.scope.split(/\\s+/).filter(Boolean),\n };\n if (\"clientSecret\" in options) {\n authentication.clientSecret = options.clientSecret;\n }\n if (options.clientType === \"github-app\") {\n if (\"refresh_token\" in response.data) {\n const apiTimeInMs = new Date(response.headers.date).getTime();\n (authentication.refreshToken = response.data.refresh_token),\n (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)),\n (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in));\n }\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function checkToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await request(\"POST /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: options.token,\n scopes: response.data.scopes,\n };\n if (response.data.expires_at)\n authentication.expiresAt = response.data.expires_at;\n if (options.clientType === \"github-app\") {\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils\";\nexport async function refreshToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(request, \"POST /login/oauth/access_token\", {\n client_id: options.clientId,\n client_secret: options.clientSecret,\n grant_type: \"refresh_token\",\n refresh_token: options.refreshToken,\n });\n const apiTimeInMs = new Date(response.headers.date).getTime();\n const authentication = {\n clientType: \"github-app\",\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.access_token,\n refreshToken: response.data.refresh_token,\n expiresAt: toTimestamp(apiTimeInMs, response.data.expires_in),\n refreshTokenExpiresAt: toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in),\n };\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString();\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function scopeToken(options) {\n const { request, clientType, clientId, clientSecret, token, ...requestOptions } = options;\n const response = await (request ||\n /* istanbul ignore next: we always pass a custom request in tests */ defaultRequest)(\"POST /applications/{client_id}/token/scoped\", {\n headers: {\n authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`,\n },\n client_id: clientId,\n access_token: token,\n ...requestOptions,\n });\n const authentication = Object.assign({\n clientType,\n clientId,\n clientSecret,\n token: response.data.token,\n }, response.data.expires_at ? { expiresAt: response.data.expires_at } : {});\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function resetToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n const response = await request(\"PATCH /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.token,\n scopes: response.data.scopes,\n };\n if (response.data.expires_at)\n authentication.expiresAt = response.data.expires_at;\n if (options.clientType === \"github-app\") {\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function deleteToken(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n return request(\"DELETE /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n}\n","import { request as defaultRequest } from \"@octokit/request\";\nimport btoa from \"btoa-lite\";\nexport async function deleteAuthorization(options) {\n const request = options.request ||\n /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n return request(\"DELETE /applications/{client_id}/grant\", {\n headers: {\n authorization: `basic ${auth}`,\n },\n client_id: options.clientId,\n access_token: options.token,\n });\n}\n"],"names":["VERSION","requestToOAuthBaseUrl","request","endpointDefaults","endpoint","DEFAULTS","test","baseUrl","replace","oauthRequest","route","parameters","withOAuthParameters","headers","accept","response","data","error","RequestError","error_description","error_uri","merge","getWebFlowAuthorizationUrl","defaultRequest","options","oauthAuthorizationUrl","exchangeWebFlowCode","client_id","clientId","client_secret","clientSecret","code","redirect_uri","redirectUrl","authentication","clientType","token","access_token","scopes","scope","split","filter","Boolean","apiTimeInMs","Date","date","getTime","refreshToken","refresh_token","expiresAt","toTimestamp","expires_in","refreshTokenExpiresAt","refresh_token_expires_in","expirationInSeconds","toISOString","createDeviceCode","Array","isArray","join","exchangeDeviceCode","device_code","grant_type","checkToken","authorization","btoa","expires_at","scopeToken","requestOptions","Object","assign","resetToken","auth","deleteToken","deleteAuthorization"],"mappings":";;;;;;;;;;;MAAaA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACChB,SAASC,qBAAT,CAA+BC,OAA/B,EAAwC;AAC3C,QAAMC,gBAAgB,GAAGD,OAAO,CAACE,QAAR,CAAiBC,QAA1C;AACA,SAAO,kCAAkCC,IAAlC,CAAuCH,gBAAgB,CAACI,OAAxD,IACD,oBADC,GAEDJ,gBAAgB,CAACI,OAAjB,CAAyBC,OAAzB,CAAiC,SAAjC,EAA4C,EAA5C,CAFN;AAGH;AACD,AAAO,eAAeC,YAAf,CAA4BP,OAA5B,EAAqCQ,KAArC,EAA4CC,UAA5C,EAAwD;AAC3D,QAAMC,mBAAmB;AACrBL,IAAAA,OAAO,EAAEN,qBAAqB,CAACC,OAAD,CADT;AAErBW,IAAAA,OAAO,EAAE;AACLC,MAAAA,MAAM,EAAE;AADH;AAFY,KAKlBH,UALkB,CAAzB;;AAOA,QAAMI,QAAQ,GAAG,MAAMb,OAAO,CAACQ,KAAD,EAAQE,mBAAR,CAA9B;;AACA,MAAI,WAAWG,QAAQ,CAACC,IAAxB,EAA8B;AAC1B,UAAMC,KAAK,GAAG,IAAIC,yBAAJ,CAAkB,GAAEH,QAAQ,CAACC,IAAT,CAAcG,iBAAkB,KAAIJ,QAAQ,CAACC,IAAT,CAAcC,KAAM,KAAIF,QAAQ,CAACC,IAAT,CAAcI,SAAU,GAAxG,EAA4G,GAA5G,EAAiH;AAC3HlB,MAAAA,OAAO,EAAEA,OAAO,CAACE,QAAR,CAAiBiB,KAAjB,CAAuBX,KAAvB,EAA8BE,mBAA9B,CADkH;AAE3HC,MAAAA,OAAO,EAAEE,QAAQ,CAACF;AAFyG,KAAjH,CAAd,CAD0B;;AAM1BI,IAAAA,KAAK,CAACF,QAAN,GAAiBA,QAAjB;AACA,UAAME,KAAN;AACH;;AACD,SAAOF,QAAP;AACH;;;AC1BD,AAGO,SAASO,0BAAT,OAA8E;AAAA,MAA1C;AAAEpB,aAAAA,SAAO,GAAGqB;AAAZ,GAA0C;AAAA,MAAXC,OAAW;;AACjF,QAAMjB,OAAO,GAAGN,qBAAqB,CAACC,SAAD,CAArC,CADiF;;AAGjF,SAAOuB,2CAAqB,mCACrBD,OADqB;AAExBjB,IAAAA;AAFwB,KAA5B;AAIH;;ACRM,eAAemB,mBAAf,CAAmCF,OAAnC,EAA4C;AAC/C,QAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAR;AACZ;AACAqB,EAAAA,eAFJ;AAGA,QAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAD,EAAU,gCAAV,EAA4C;AAC3EyB,IAAAA,SAAS,EAAEH,OAAO,CAACI,QADwD;AAE3EC,IAAAA,aAAa,EAAEL,OAAO,CAACM,YAFoD;AAG3EC,IAAAA,IAAI,EAAEP,OAAO,CAACO,IAH6D;AAI3EC,IAAAA,YAAY,EAAER,OAAO,CAACS;AAJqD,GAA5C,CAAnC;AAMA,QAAMC,cAAc,GAAG;AACnBC,IAAAA,UAAU,EAAEX,OAAO,CAACW,UADD;AAEnBP,IAAAA,QAAQ,EAAEJ,OAAO,CAACI,QAFC;AAGnBE,IAAAA,YAAY,EAAEN,OAAO,CAACM,YAHH;AAInBM,IAAAA,KAAK,EAAErB,QAAQ,CAACC,IAAT,CAAcqB,YAJF;AAKnBC,IAAAA,MAAM,EAAEvB,QAAQ,CAACC,IAAT,CAAcuB,KAAd,CAAoBC,KAApB,CAA0B,KAA1B,EAAiCC,MAAjC,CAAwCC,OAAxC;AALW,GAAvB;;AAOA,MAAIlB,OAAO,CAACW,UAAR,KAAuB,YAA3B,EAAyC;AACrC,QAAI,mBAAmBpB,QAAQ,CAACC,IAAhC,EAAsC;AAClC,YAAM2B,WAAW,GAAG,IAAIC,IAAJ,CAAS7B,QAAQ,CAACF,OAAT,CAAiBgC,IAA1B,EAAgCC,OAAhC,EAApB;AACCZ,MAAAA,cAAc,CAACa,YAAf,GAA8BhC,QAAQ,CAACC,IAAT,CAAcgC,aAA7C,EACKd,cAAc,CAACe,SAAf,GAA2BC,WAAW,CAACP,WAAD,EAAc5B,QAAQ,CAACC,IAAT,CAAcmC,UAA5B,CAD3C,EAEKjB,cAAc,CAACkB,qBAAf,GAAuCF,WAAW,CAACP,WAAD,EAAc5B,QAAQ,CAACC,IAAT,CAAcqC,wBAA5B,CAFvD;AAGH;;AACD,WAAOnB,cAAc,CAACI,MAAtB;AACH;;AACD,2CAAYvB,QAAZ;AAAsBmB,IAAAA;AAAtB;AACH;;AACD,SAASgB,WAAT,CAAqBP,WAArB,EAAkCW,mBAAlC,EAAuD;AACnD,SAAO,IAAIV,IAAJ,CAASD,WAAW,GAAGW,mBAAmB,GAAG,IAA7C,EAAmDC,WAAnD,EAAP;AACH;;AC9BM,eAAeC,gBAAf,CAAgChC,OAAhC,EAAyC;AAC5C,QAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAR;AACZ;AACAqB,EAAAA,eAFJ;AAGA,QAAMZ,UAAU,GAAG;AACfgB,IAAAA,SAAS,EAAEH,OAAO,CAACI;AADJ,GAAnB;;AAGA,MAAI,YAAYJ,OAAZ,IAAuBiC,KAAK,CAACC,OAAN,CAAclC,OAAO,CAACc,MAAtB,CAA3B,EAA0D;AACtD3B,IAAAA,UAAU,CAAC4B,KAAX,GAAmBf,OAAO,CAACc,MAAR,CAAeqB,IAAf,CAAoB,GAApB,CAAnB;AACH;;AACD,SAAOlD,YAAY,CAACP,SAAD,EAAU,yBAAV,EAAqCS,UAArC,CAAnB;AACH;;ACXM,eAAeiD,kBAAf,CAAkCpC,OAAlC,EAA2C;AAC9C,QAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAR;AACZ;AACAqB,EAAAA,eAFJ;AAGA,QAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAD,EAAU,gCAAV,EAA4C;AAC3EyB,IAAAA,SAAS,EAAEH,OAAO,CAACI,QADwD;AAE3EiC,IAAAA,WAAW,EAAErC,OAAO,CAACO,IAFsD;AAG3E+B,IAAAA,UAAU,EAAE;AAH+D,GAA5C,CAAnC;AAKA,QAAM5B,cAAc,GAAG;AACnBC,IAAAA,UAAU,EAAEX,OAAO,CAACW,UADD;AAEnBP,IAAAA,QAAQ,EAAEJ,OAAO,CAACI,QAFC;AAGnBQ,IAAAA,KAAK,EAAErB,QAAQ,CAACC,IAAT,CAAcqB,YAHF;AAInBC,IAAAA,MAAM,EAAEvB,QAAQ,CAACC,IAAT,CAAcuB,KAAd,CAAoBC,KAApB,CAA0B,KAA1B,EAAiCC,MAAjC,CAAwCC,OAAxC;AAJW,GAAvB;;AAMA,MAAI,kBAAkBlB,OAAtB,EAA+B;AAC3BU,IAAAA,cAAc,CAACJ,YAAf,GAA8BN,OAAO,CAACM,YAAtC;AACH;;AACD,MAAIN,OAAO,CAACW,UAAR,KAAuB,YAA3B,EAAyC;AACrC,QAAI,mBAAmBpB,QAAQ,CAACC,IAAhC,EAAsC;AAClC,YAAM2B,WAAW,GAAG,IAAIC,IAAJ,CAAS7B,QAAQ,CAACF,OAAT,CAAiBgC,IAA1B,EAAgCC,OAAhC,EAApB;AACCZ,MAAAA,cAAc,CAACa,YAAf,GAA8BhC,QAAQ,CAACC,IAAT,CAAcgC,aAA7C,EACKd,cAAc,CAACe,SAAf,GAA2BC,aAAW,CAACP,WAAD,EAAc5B,QAAQ,CAACC,IAAT,CAAcmC,UAA5B,CAD3C,EAEKjB,cAAc,CAACkB,qBAAf,GAAuCF,aAAW,CAACP,WAAD,EAAc5B,QAAQ,CAACC,IAAT,CAAcqC,wBAA5B,CAFvD;AAGH;;AACD,WAAOnB,cAAc,CAACI,MAAtB;AACH;;AACD,2CAAYvB,QAAZ;AAAsBmB,IAAAA;AAAtB;AACH;;AACD,SAASgB,aAAT,CAAqBP,WAArB,EAAkCW,mBAAlC,EAAuD;AACnD,SAAO,IAAIV,IAAJ,CAASD,WAAW,GAAGW,mBAAmB,GAAG,IAA7C,EAAmDC,WAAnD,EAAP;AACH;;AC/BM,eAAeQ,UAAf,CAA0BvC,OAA1B,EAAmC;AACtC,QAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAR;AACZ;AACAqB,EAAAA,eAFJ;AAGA,QAAMR,QAAQ,GAAG,MAAMb,SAAO,CAAC,sCAAD,EAAyC;AACnEW,IAAAA,OAAO,EAAE;AACLmD,MAAAA,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAA7C,CAAgD;AADvE,KAD0D;AAInEH,IAAAA,SAAS,EAAEH,OAAO,CAACI,QAJgD;AAKnES,IAAAA,YAAY,EAAEb,OAAO,CAACY;AAL6C,GAAzC,CAA9B;AAOA,QAAMF,cAAc,GAAG;AACnBC,IAAAA,UAAU,EAAEX,OAAO,CAACW,UADD;AAEnBP,IAAAA,QAAQ,EAAEJ,OAAO,CAACI,QAFC;AAGnBE,IAAAA,YAAY,EAAEN,OAAO,CAACM,YAHH;AAInBM,IAAAA,KAAK,EAAEZ,OAAO,CAACY,KAJI;AAKnBE,IAAAA,MAAM,EAAEvB,QAAQ,CAACC,IAAT,CAAcsB;AALH,GAAvB;AAOA,MAAIvB,QAAQ,CAACC,IAAT,CAAckD,UAAlB,EACIhC,cAAc,CAACe,SAAf,GAA2BlC,QAAQ,CAACC,IAAT,CAAckD,UAAzC;;AACJ,MAAI1C,OAAO,CAACW,UAAR,KAAuB,YAA3B,EAAyC;AACrC,WAAOD,cAAc,CAACI,MAAtB;AACH;;AACD,2CAAYvB,QAAZ;AAAsBmB,IAAAA;AAAtB;AACH;;ACxBM,eAAea,YAAf,CAA4BvB,OAA5B,EAAqC;AACxC,QAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAR;AACZ;AACAqB,EAAAA,eAFJ;AAGA,QAAMR,QAAQ,GAAG,MAAMN,YAAY,CAACP,SAAD,EAAU,gCAAV,EAA4C;AAC3EyB,IAAAA,SAAS,EAAEH,OAAO,CAACI,QADwD;AAE3EC,IAAAA,aAAa,EAAEL,OAAO,CAACM,YAFoD;AAG3EgC,IAAAA,UAAU,EAAE,eAH+D;AAI3Ed,IAAAA,aAAa,EAAExB,OAAO,CAACuB;AAJoD,GAA5C,CAAnC;AAMA,QAAMJ,WAAW,GAAG,IAAIC,IAAJ,CAAS7B,QAAQ,CAACF,OAAT,CAAiBgC,IAA1B,EAAgCC,OAAhC,EAApB;AACA,QAAMZ,cAAc,GAAG;AACnBC,IAAAA,UAAU,EAAE,YADO;AAEnBP,IAAAA,QAAQ,EAAEJ,OAAO,CAACI,QAFC;AAGnBE,IAAAA,YAAY,EAAEN,OAAO,CAACM,YAHH;AAInBM,IAAAA,KAAK,EAAErB,QAAQ,CAACC,IAAT,CAAcqB,YAJF;AAKnBU,IAAAA,YAAY,EAAEhC,QAAQ,CAACC,IAAT,CAAcgC,aALT;AAMnBC,IAAAA,SAAS,EAAEC,aAAW,CAACP,WAAD,EAAc5B,QAAQ,CAACC,IAAT,CAAcmC,UAA5B,CANH;AAOnBC,IAAAA,qBAAqB,EAAEF,aAAW,CAACP,WAAD,EAAc5B,QAAQ,CAACC,IAAT,CAAcqC,wBAA5B;AAPf,GAAvB;AASA,2CAAYtC,QAAZ;AAAsBmB,IAAAA;AAAtB;AACH;;AACD,SAASgB,aAAT,CAAqBP,WAArB,EAAkCW,mBAAlC,EAAuD;AACnD,SAAO,IAAIV,IAAJ,CAASD,WAAW,GAAGW,mBAAmB,GAAG,IAA7C,EAAmDC,WAAnD,EAAP;AACH;;;AC1BD,AAEO,eAAeY,UAAf,CAA0B3C,OAA1B,EAAmC;AACtC,QAAM;AAAEtB,aAAAA,SAAF;AAAWiC,IAAAA,UAAX;AAAuBP,IAAAA,QAAvB;AAAiCE,IAAAA,YAAjC;AAA+CM,IAAAA;AAA/C,MAA4EZ,OAAlF;AAAA,QAA+D4C,cAA/D,4BAAkF5C,OAAlF;;AACA,QAAMT,QAAQ,GAAG,MAAM,CAACb,SAAO;AAC3B;AAAqEqB,EAAAA,eADlD,EACkE,6CADlE;AAEnBV,IAAAA,OAAO,EAAE;AACLmD,MAAAA,aAAa,EAAG,SAAQC,IAAI,CAAE,GAAErC,QAAS,IAAGE,YAAa,EAA7B,CAAgC;AADvD,KAFU;AAKnBH,IAAAA,SAAS,EAAEC,QALQ;AAMnBS,IAAAA,YAAY,EAAED;AANK,KAOhBgC,cAPgB,EAAvB;AASA,QAAMlC,cAAc,GAAGmC,MAAM,CAACC,MAAP,CAAc;AACjCnC,IAAAA,UADiC;AAEjCP,IAAAA,QAFiC;AAGjCE,IAAAA,YAHiC;AAIjCM,IAAAA,KAAK,EAAErB,QAAQ,CAACC,IAAT,CAAcoB;AAJY,GAAd,EAKpBrB,QAAQ,CAACC,IAAT,CAAckD,UAAd,GAA2B;AAAEjB,IAAAA,SAAS,EAAElC,QAAQ,CAACC,IAAT,CAAckD;AAA3B,GAA3B,GAAqE,EALjD,CAAvB;AAMA,2CAAYnD,QAAZ;AAAsBmB,IAAAA;AAAtB;AACH;;AClBM,eAAeqC,UAAf,CAA0B/C,OAA1B,EAAmC;AACtC,QAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAR;AACZ;AACAqB,EAAAA,eAFJ;AAGA,QAAMiD,IAAI,GAAGP,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAA7C,CAAjB;AACA,QAAMf,QAAQ,GAAG,MAAMb,SAAO,CAAC,uCAAD,EAA0C;AACpEW,IAAAA,OAAO,EAAE;AACLmD,MAAAA,aAAa,EAAG,SAAQQ,IAAK;AADxB,KAD2D;AAIpE7C,IAAAA,SAAS,EAAEH,OAAO,CAACI,QAJiD;AAKpES,IAAAA,YAAY,EAAEb,OAAO,CAACY;AAL8C,GAA1C,CAA9B;AAOA,QAAMF,cAAc,GAAG;AACnBC,IAAAA,UAAU,EAAEX,OAAO,CAACW,UADD;AAEnBP,IAAAA,QAAQ,EAAEJ,OAAO,CAACI,QAFC;AAGnBE,IAAAA,YAAY,EAAEN,OAAO,CAACM,YAHH;AAInBM,IAAAA,KAAK,EAAErB,QAAQ,CAACC,IAAT,CAAcoB,KAJF;AAKnBE,IAAAA,MAAM,EAAEvB,QAAQ,CAACC,IAAT,CAAcsB;AALH,GAAvB;AAOA,MAAIvB,QAAQ,CAACC,IAAT,CAAckD,UAAlB,EACIhC,cAAc,CAACe,SAAf,GAA2BlC,QAAQ,CAACC,IAAT,CAAckD,UAAzC;;AACJ,MAAI1C,OAAO,CAACW,UAAR,KAAuB,YAA3B,EAAyC;AACrC,WAAOD,cAAc,CAACI,MAAtB;AACH;;AACD,2CAAYvB,QAAZ;AAAsBmB,IAAAA;AAAtB;AACH;;ACzBM,eAAeuC,WAAf,CAA2BjD,OAA3B,EAAoC;AACvC,QAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAR;AACZ;AACAqB,EAAAA,eAFJ;AAGA,QAAMiD,IAAI,GAAGP,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAA7C,CAAjB;AACA,SAAO5B,SAAO,CAAC,wCAAD,EAA2C;AACrDW,IAAAA,OAAO,EAAE;AACLmD,MAAAA,aAAa,EAAG,SAAQQ,IAAK;AADxB,KAD4C;AAIrD7C,IAAAA,SAAS,EAAEH,OAAO,CAACI,QAJkC;AAKrDS,IAAAA,YAAY,EAAEb,OAAO,CAACY;AAL+B,GAA3C,CAAd;AAOH;;ACZM,eAAesC,mBAAf,CAAmClD,OAAnC,EAA4C;AAC/C,QAAMtB,SAAO,GAAGsB,OAAO,CAACtB,OAAR;AACZ;AACAqB,EAAAA,eAFJ;AAGA,QAAMiD,IAAI,GAAGP,IAAI,CAAE,GAAEzC,OAAO,CAACI,QAAS,IAAGJ,OAAO,CAACM,YAAa,EAA7C,CAAjB;AACA,SAAO5B,SAAO,CAAC,wCAAD,EAA2C;AACrDW,IAAAA,OAAO,EAAE;AACLmD,MAAAA,aAAa,EAAG,SAAQQ,IAAK;AADxB,KAD4C;AAIrD7C,IAAAA,SAAS,EAAEH,OAAO,CAACI,QAJkC;AAKrDS,IAAAA,YAAY,EAAEb,OAAO,CAACY;AAL+B,GAA3C,CAAd;AAOH;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/oauth-methods/dist-src/check-token.js b/node_modules/@octokit/oauth-methods/dist-src/check-token.js new file mode 100644 index 0000000..1f65e94 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/check-token.js @@ -0,0 +1,27 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function checkToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await request("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}`, + }, + client_id: options.clientId, + access_token: options.token, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes, + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js b/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js new file mode 100644 index 0000000..bdb3b3d --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js @@ -0,0 +1,14 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function createDeviceCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const parameters = { + client_id: options.clientId, + }; + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + return oauthRequest(request, "POST /login/device/code", parameters); +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js b/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js new file mode 100644 index 0000000..ab5ce7d --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js @@ -0,0 +1,15 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function deleteAuthorization(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request("DELETE /applications/{client_id}/grant", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/delete-token.js b/node_modules/@octokit/oauth-methods/dist-src/delete-token.js new file mode 100644 index 0000000..e94ccb9 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/delete-token.js @@ -0,0 +1,15 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function deleteToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request("DELETE /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js b/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js new file mode 100644 index 0000000..8e54319 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js @@ -0,0 +1,34 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function exchangeDeviceCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code", + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean), + }; + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + (authentication.refreshToken = response.data.refresh_token), + (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)), + (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in)); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js b/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js new file mode 100644 index 0000000..412ad0f --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js @@ -0,0 +1,33 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function exchangeWebFlowCode(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean), + }; + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + (authentication.refreshToken = response.data.refresh_token), + (authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in)), + (authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in)); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js b/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js new file mode 100644 index 0000000..e742964 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js @@ -0,0 +1,11 @@ +import { oauthAuthorizationUrl, } from "@octokit/oauth-authorization-url"; +import { request as defaultRequest } from "@octokit/request"; +import { requestToOAuthBaseUrl } from "./utils"; +export function getWebFlowAuthorizationUrl({ request = defaultRequest, ...options }) { + const baseUrl = requestToOAuthBaseUrl(request); + // @ts-expect-error TypeScript wants `clientType` to be set explicitly ¯\_(ツ)_/¯ + return oauthAuthorizationUrl({ + ...options, + baseUrl, + }); +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/index.js b/node_modules/@octokit/oauth-methods/dist-src/index.js new file mode 100644 index 0000000..1337e19 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/index.js @@ -0,0 +1,11 @@ +export { VERSION } from "./version"; +export * from "./get-web-flow-authorization-url"; +export * from "./exchange-web-flow-code"; +export * from "./create-device-code"; +export * from "./exchange-device-code"; +export * from "./check-token"; +export * from "./refresh-token"; +export * from "./scope-token"; +export * from "./reset-token"; +export * from "./delete-token"; +export * from "./delete-authorization"; diff --git a/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js b/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js new file mode 100644 index 0000000..0ce9bf8 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js @@ -0,0 +1,27 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils"; +export async function refreshToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest(request, "POST /login/oauth/access_token", { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken, + }); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in), + }; + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1000).toISOString(); +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/reset-token.js b/node_modules/@octokit/oauth-methods/dist-src/reset-token.js new file mode 100644 index 0000000..3e87a10 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/reset-token.js @@ -0,0 +1,28 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function resetToken(options) { + const request = options.request || + /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + const response = await request("PATCH /applications/{client_id}/token", { + headers: { + authorization: `basic ${auth}`, + }, + client_id: options.clientId, + access_token: options.token, + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes, + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/scope-token.js b/node_modules/@octokit/oauth-methods/dist-src/scope-token.js new file mode 100644 index 0000000..e14bbf5 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/scope-token.js @@ -0,0 +1,21 @@ +import { request as defaultRequest } from "@octokit/request"; +import btoa from "btoa-lite"; +export async function scopeToken(options) { + const { request, clientType, clientId, clientSecret, token, ...requestOptions } = options; + const response = await (request || + /* istanbul ignore next: we always pass a custom request in tests */ defaultRequest)("POST /applications/{client_id}/token/scoped", { + headers: { + authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`, + }, + client_id: clientId, + access_token: token, + ...requestOptions, + }); + const authentication = Object.assign({ + clientType, + clientId, + clientSecret, + token: response.data.token, + }, response.data.expires_at ? { expiresAt: response.data.expires_at } : {}); + return { ...response, authentication }; +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/types.js b/node_modules/@octokit/oauth-methods/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/oauth-methods/dist-src/utils.js b/node_modules/@octokit/oauth-methods/dist-src/utils.js new file mode 100644 index 0000000..a2540b0 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/utils.js @@ -0,0 +1,27 @@ +import { RequestError } from "@octokit/request-error"; +export function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) + ? "https://github.com" + : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +export async function oauthRequest(request, route, parameters) { + const withOAuthParameters = { + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json", + }, + ...parameters, + }; + const response = await request(route, withOAuthParameters); + if ("error" in response.data) { + const error = new RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { + request: request.endpoint.merge(route, withOAuthParameters), + headers: response.headers, + }); + // @ts-ignore add custom response property until https://github.com/octokit/request-error.js/issues/169 is resolved + error.response = response; + throw error; + } + return response; +} diff --git a/node_modules/@octokit/oauth-methods/dist-src/version.js b/node_modules/@octokit/oauth-methods/dist-src/version.js new file mode 100644 index 0000000..3f50c75 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "1.2.6"; diff --git a/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts b/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts new file mode 100644 index 0000000..234ec3c --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts @@ -0,0 +1,24 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +export declare type CheckTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type CheckTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type CheckTokenOAuthAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & { + authentication: OAuthAppAuthentication; +}; +export declare type CheckTokenGitHubAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function checkToken(options: CheckTokenOAuthAppOptions): Promise; +export declare function checkToken(options: CheckTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts b/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts new file mode 100644 index 0000000..65c121e --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts @@ -0,0 +1,20 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +export declare type CreateDeviceCodeOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + scopes?: string[]; + request?: RequestInterface; +}; +export declare type CreateDeviceCodeGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + request?: RequestInterface; +}; +export declare type CreateDeviceCodeDeviceTokenResponse = OctokitResponse<{ + device_code: string; + user_code: string; + verification_uri: string; + expires_in: number; + interval: number; +}>; +export declare function createDeviceCode(options: CreateDeviceCodeOAuthAppOptions | CreateDeviceCodeGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts b/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts new file mode 100644 index 0000000..fee77d1 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts @@ -0,0 +1,18 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +export declare type DeleteAuthorizationOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteAuthorizationGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteAuthorizationResponse = Endpoints["DELETE /applications/{client_id}/grant"]["response"]; +export declare function deleteAuthorization(options: DeleteAuthorizationOAuthAppOptions): Promise; +export declare function deleteAuthorization(options: DeleteAuthorizationGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts b/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts new file mode 100644 index 0000000..d777357 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts @@ -0,0 +1,18 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +export declare type DeleteTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type DeleteTokenResponse = Endpoints["DELETE /applications/{client_id}/token"]["response"]; +export declare function deleteToken(options: DeleteTokenOAuthAppOptions): Promise; +export declare function deleteToken(options: DeleteTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts b/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts new file mode 100644 index 0000000..3528761 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts @@ -0,0 +1,57 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret = { + clientType: "oauth-app"; + clientId: string; + code: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; + scopes?: string[]; +}; +export declare type ExchangeDeviceCodeOAuthAppOptions = ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret & { + clientSecret: string; +}; +export declare type ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret = { + clientType: "github-app"; + clientId: string; + code: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type ExchangeDeviceCodeGitHubAppOptions = ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret & { + clientSecret: string; +}; +declare type OAuthAppAuthenticationWithoutClientSecret = Omit; +declare type GitHubAppAuthenticationWithoutClientSecret = Omit; +declare type GitHubAppAuthenticationWithExpirationWithoutClientSecret = Omit; +export declare type ExchangeDeviceCodeOAuthAppResponse = OctokitResponse & { + authentication: OAuthAppAuthentication; +}; +export declare type ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret = OctokitResponse & { + authentication: OAuthAppAuthenticationWithoutClientSecret; +}; +export declare type ExchangeDeviceCodeGitHubAppResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken; +}; +export declare type ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret = OctokitResponse & { + authentication: GitHubAppAuthenticationWithoutClientSecret | GitHubAppAuthenticationWithExpirationWithoutClientSecret; +}; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeOAuthAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps without clientSecret + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps. `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeGitHubAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps without using `clientSecret`. `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret): Promise; +export {}; diff --git a/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts b/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts new file mode 100644 index 0000000..68b7c6d --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts @@ -0,0 +1,32 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type ExchangeWebFlowCodeOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + code: string; + redirectUrl?: string; + request?: RequestInterface; +}; +export declare type ExchangeWebFlowCodeGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + code: string; + redirectUrl?: string; + request?: RequestInterface; +}; +export declare type ExchangeWebFlowCodeOAuthAppResponse = OctokitResponse & { + authentication: OAuthAppAuthentication; +}; +export declare type ExchangeWebFlowCodeGitHubAppResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken; +}; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps. + */ +export declare function exchangeWebFlowCode(options: ExchangeWebFlowCodeOAuthAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps. Note that `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeWebFlowCode(options: ExchangeWebFlowCodeGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts b/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts new file mode 100644 index 0000000..c721600 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts @@ -0,0 +1,25 @@ +import { OAuthAppResult, GitHubAppResult } from "@octokit/oauth-authorization-url"; +import { RequestInterface } from "@octokit/types"; +export declare type GetWebFlowAuthorizationUrlOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + allowSignup?: boolean; + login?: string; + scopes?: string | string[]; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type GetWebFlowAuthorizationUrlGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + allowSignup?: boolean; + login?: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export declare type GetWebFlowAuthorizationUrlOAuthAppResult = OAuthAppResult; +export declare type GetWebFlowAuthorizationUrlGitHubAppResult = GitHubAppResult; +export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlOAuthAppOptions): OAuthAppResult; +export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlGitHubAppOptions): GitHubAppResult; diff --git a/node_modules/@octokit/oauth-methods/dist-types/index.d.ts b/node_modules/@octokit/oauth-methods/dist-types/index.d.ts new file mode 100644 index 0000000..0157ae2 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/index.d.ts @@ -0,0 +1,12 @@ +export { VERSION } from "./version"; +export * from "./get-web-flow-authorization-url"; +export * from "./exchange-web-flow-code"; +export * from "./create-device-code"; +export * from "./exchange-device-code"; +export * from "./check-token"; +export * from "./refresh-token"; +export * from "./scope-token"; +export * from "./reset-token"; +export * from "./delete-token"; +export * from "./delete-authorization"; +export { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithRefreshToken, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types"; diff --git a/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts b/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts new file mode 100644 index 0000000..246e4f3 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts @@ -0,0 +1,13 @@ +import { OctokitResponse, RequestInterface } from "@octokit/types"; +import { GitHubAppAuthenticationWithRefreshToken, GitHubAppCreateTokenWithExpirationResponseData } from "./types"; +export declare type RefreshTokenOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + refreshToken: string; + request?: RequestInterface; +}; +export declare type RefreshTokenResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithRefreshToken; +}; +export declare function refreshToken(options: RefreshTokenOptions): Promise; diff --git a/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts b/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts new file mode 100644 index 0000000..ca5402b --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts @@ -0,0 +1,24 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +export declare type ResetTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type ResetTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export declare type ResetTokenOAuthAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & { + authentication: OAuthAppAuthentication; +}; +export declare type ResetTokenGitHubAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function resetToken(options: ResetTokenOAuthAppOptions): Promise; +export declare function resetToken(options: ResetTokenGitHubAppOptions): Promise; diff --git a/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts b/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts new file mode 100644 index 0000000..d1cb95d --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts @@ -0,0 +1,29 @@ +import { RequestInterface, Endpoints } from "@octokit/types"; +import { GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types"; +declare type CommonOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + permissions?: Endpoint["parameters"]["permissions"]; + request?: RequestInterface; +}; +declare type TargetOption = { + target: string; +}; +declare type TargetIdOption = { + target_id: number; +}; +declare type RepositoriesOption = { + repositories?: string[]; +}; +declare type RepositoryIdsOption = { + repository_ids?: number[]; +}; +declare type Endpoint = Endpoints["POST /applications/{client_id}/token/scoped"]; +export declare type ScopeTokenOptions = (CommonOptions & TargetOption & RepositoriesOption) | (CommonOptions & TargetIdOption & RepositoriesOption) | (CommonOptions & TargetOption & RepositoryIdsOption) | (CommonOptions & TargetIdOption & RepositoryIdsOption); +export declare type ScopeTokenResponse = Endpoint["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function scopeToken(options: ScopeTokenOptions): Promise; +export {}; diff --git a/node_modules/@octokit/oauth-methods/dist-types/types.d.ts b/node_modules/@octokit/oauth-methods/dist-types/types.d.ts new file mode 100644 index 0000000..afeffee --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/types.d.ts @@ -0,0 +1,58 @@ +export declare type OAuthAppAuthentication = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + scopes: string[]; +}; +export declare type GitHubAppAuthenticationWithExpirationDisabled = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; +}; +export declare type GitHubAppAuthenticationWithExpirationEnabled = GitHubAppAuthenticationWithExpirationDisabled & { + expiresAt: string; +}; +export declare type GitHubAppAuthenticationWithRefreshToken = GitHubAppAuthenticationWithExpirationEnabled & { + refreshToken: string; + refreshTokenExpiresAt: string; +}; +/** + * @deprecated Use `GitHubAppAuthenticationWithExpirationDisabled` or + * `GitHubAppAuthenticationWithExpirationEnabled` instead. + */ +export declare type GitHubAppAuthentication = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; +}; +/** + * @deprecated Use `GitHubAppAuthenticationWithRefreshToken` instead. + */ +export declare type GitHubAppAuthenticationWithExpiration = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + refreshToken: string; + expiresAt: string; + refreshTokenExpiresAt: string; +}; +export declare type OAuthAppCreateTokenResponseData = { + access_token: string; + scope: string; + token_type: "bearer"; +}; +export declare type GitHubAppCreateTokenResponseData = { + access_token: string; + token_type: "bearer"; +}; +export declare type GitHubAppCreateTokenWithExpirationResponseData = { + access_token: string; + token_type: "bearer"; + expires_in: number; + refresh_token: string; + refresh_token_expires_in: number; +}; diff --git a/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts b/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts new file mode 100644 index 0000000..ac692f5 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts @@ -0,0 +1,3 @@ +import { RequestInterface } from "@octokit/types"; +export declare function requestToOAuthBaseUrl(request: RequestInterface): string; +export declare function oauthRequest(request: RequestInterface, route: string, parameters: Record): Promise>; diff --git a/node_modules/@octokit/oauth-methods/dist-types/version.d.ts b/node_modules/@octokit/oauth-methods/dist-types/version.d.ts new file mode 100644 index 0000000..16fa93d --- /dev/null +++ b/node_modules/@octokit/oauth-methods/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "1.2.6"; diff --git a/node_modules/@octokit/oauth-methods/package.json b/node_modules/@octokit/oauth-methods/package.json new file mode 100644 index 0000000..9670b41 --- /dev/null +++ b/node_modules/@octokit/oauth-methods/package.json @@ -0,0 +1,50 @@ +{ + "name": "@octokit/oauth-methods", + "description": "Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps", + "version": "1.2.6", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "oauth" + ], + "repository": "https://github.com/octokit/oauth-methods.js", + "dependencies": { + "@octokit/oauth-authorization-url": "^4.3.1", + "@octokit/request": "^5.4.14", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.12.2", + "btoa-lite": "^1.0.0" + }, + "peerDependencies": {}, + "devDependencies": { + "@octokit/tsconfig": "^1.0.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.2", + "@pika/plugin-ts-standard-pkg": "^0.9.2", + "@types/btoa-lite": "^1.0.0", + "@types/jest": "^27.0.0", + "@types/node": "^14.14.35", + "fetch-mock": "^9.11.0", + "jest": "^27.0.0", + "prettier": "2.4.1", + "semantic-release": "^18.0.0", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.2.3" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js" +} diff --git a/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/openapi-types/README.md index 47acb12..9da833c 100644 --- a/node_modules/@octokit/openapi-types/README.md +++ b/node_modules/@octokit/openapi-types/README.md @@ -1,8 +1,16 @@ -# openapi-types.ts +# @octokit/openapi-types > Generated TypeScript definitions based on GitHub's OpenAPI spec -This repository continously converts [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) into TypeScript definitions and publishes them to npm as `@octokit/openapi-types` +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` ## License diff --git a/node_modules/@octokit/openapi-types/dist-node/index.js.map b/node_modules/@octokit/openapi-types/dist-node/index.js.map deleted file mode 100644 index 9b411e4..0000000 --- a/node_modules/@octokit/openapi-types/dist-node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js"],"sourcesContent":["export const VERSION = \"5.1.0\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/openapi-types/dist-src/generated/types.js b/node_modules/@octokit/openapi-types/dist-src/generated/types.js deleted file mode 100644 index 6738d94..0000000 --- a/node_modules/@octokit/openapi-types/dist-src/generated/types.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ -export {}; diff --git a/node_modules/@octokit/openapi-types/dist-src/index.js b/node_modules/@octokit/openapi-types/dist-src/index.js deleted file mode 100644 index 5d08066..0000000 --- a/node_modules/@octokit/openapi-types/dist-src/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./generated/types"; -export * from "./version"; diff --git a/node_modules/@octokit/openapi-types/dist-src/version.js b/node_modules/@octokit/openapi-types/dist-src/version.js deleted file mode 100644 index d80bdf7..0000000 --- a/node_modules/@octokit/openapi-types/dist-src/version.js +++ /dev/null @@ -1 +0,0 @@ -export const VERSION = "5.1.0"; diff --git a/node_modules/@octokit/openapi-types/dist-types/generated/types.d.ts b/node_modules/@octokit/openapi-types/dist-types/generated/types.d.ts deleted file mode 100644 index 7347c7a..0000000 --- a/node_modules/@octokit/openapi-types/dist-types/generated/types.d.ts +++ /dev/null @@ -1,30383 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ -export interface paths { - "/": { - /** Get Hypermedia links to resources accessible in GitHub's REST API */ - get: operations["meta/root"]; - }; - "/app": { - /** - * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations["apps/get-authenticated"]; - }; - "/app-manifests/{code}/conversions": { - /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ - post: operations["apps/create-from-manifest"]; - }; - "/app/hook/config": { - /** - * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations["apps/get-webhook-config-for-app"]; - /** - * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - patch: operations["apps/update-webhook-config-for-app"]; - }; - "/app/installations": { - /** - * You must use a [JWT](https://docs.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. - */ - get: operations["apps/list-installations"]; - }; - "/app/installations/{installation_id}": { - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (`target_type`) will be either an organization or a user account, depending which account the repository belongs to. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations["apps/get-installation"]; - /** - * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/v3/apps/#suspend-an-app-installation)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - delete: operations["apps/delete-installation"]; - }; - "/app/installations/{installation_id}/access_tokens": { - /** - * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - post: operations["apps/create-installation-access-token"]; - }; - "/app/installations/{installation_id}/suspended": { - /** - * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - put: operations["apps/suspend-installation"]; - /** - * Removes a GitHub App installation suspension. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - delete: operations["apps/unsuspend-installation"]; - }; - "/applications/grants": { - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * 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://docs.github.com/rest/reference/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"]`. - */ - get: operations["oauth-authorizations/list-grants"]; - }; - "/applications/grants/{grant_id}": { - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - get: operations["oauth-authorizations/get-grant"]; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-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). - */ - delete: operations["oauth-authorizations/delete-grant"]; - }; - "/applications/{client_id}/grant": { - /** - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). - */ - delete: operations["apps/delete-authorization"]; - }; - "/applications/{client_id}/grants/{access_token}": { - /** - * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - * - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. 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 Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). - */ - delete: operations["apps/revoke-grant-for-application"]; - }; - "/applications/{client_id}/token": { - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - post: operations["apps/check-token"]; - /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ - delete: operations["apps/delete-token"]; - /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - patch: operations["apps/reset-token"]; - }; - "/applications/{client_id}/token/scoped": { - /** Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - post: operations["apps/scope-token"]; - }; - "/applications/{client_id}/tokens/{access_token}": { - /** - * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - * - * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - */ - get: operations["apps/check-authorization"]; - /** - * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - */ - post: operations["apps/reset-authorization"]; - /** - * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - * - * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. - */ - delete: operations["apps/revoke-authorization-for-application"]; - }; - "/apps/{app_slug}": { - /** - * **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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - get: operations["apps/get-by-slug"]; - }; - "/authorizations": { - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - get: operations["oauth-authorizations/list-authorizations"]; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * 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 allowed. Read more about allowing tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). - */ - post: operations["oauth-authorizations/create-authorization"]; - }; - "/authorizations/clients/{client_id}": { - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * 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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - */ - put: operations["oauth-authorizations/get-or-create-authorization-for-app"]; - }; - "/authorizations/clients/{client_id}/{fingerprint}": { - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * 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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - */ - put: operations["oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint"]; - }; - "/authorizations/{authorization_id}": { - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - get: operations["oauth-authorizations/get-authorization"]; - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - delete: operations["oauth-authorizations/delete-authorization"]; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * You can only send one of these scope keys at a time. - */ - patch: operations["oauth-authorizations/update-authorization"]; - }; - "/codes_of_conduct": { - get: operations["codes-of-conduct/get-all-codes-of-conduct"]; - }; - "/codes_of_conduct/{key}": { - get: operations["codes-of-conduct/get-conduct-code"]; - }; - "/content_references/{content_reference_id}/attachments": { - /** - * 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://docs.github.com/webhooks/event-payloads/#content_reference) 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://docs.github.com/apps/using-content-attachments/)" for details about content attachments. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - post: operations["apps/create-content-attachment"]; - }; - "/emojis": { - /** Lists all the emojis available to use on GitHub. */ - get: operations["emojis/get"]; - }; - "/enterprises/{enterprise}/actions/permissions": { - /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/get-github-actions-permissions-enterprise"]; - /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations["enterprise-admin/set-github-actions-permissions-enterprise"]; - }; - "/enterprises/{enterprise}/actions/permissions/organizations": { - /** - * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise"]; - /** - * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations["enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise"]; - }; - "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { - /** - * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; - /** - * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - delete: operations["enterprise-admin/disable-selected-organization-github-actions-enterprise"]; - }; - "/enterprises/{enterprise}/actions/permissions/selected-actions": { - /** - * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/get-allowed-actions-enterprise"]; - /** - * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations["enterprise-admin/set-allowed-actions-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runner-groups": { - /** - * Lists all self-hosted runner groups for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { - /** - * Gets a specific self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; - /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - delete: operations["enterprise-admin/delete-self-hosted-runner-group-from-enterprise"]; - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - patch: operations["enterprise-admin/update-self-hosted-runner-group-for-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": { - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise"]; - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations["enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { - /** - * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; - /** - * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - delete: operations["enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": { - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/list-self-hosted-runners-in-group-for-enterprise"]; - /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations["enterprise-admin/set-self-hosted-runners-in-group-for-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { - /** - * Adds a self-hosted runner to a runner group configured in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` - * scope to use this endpoint. - */ - put: operations["enterprise-admin/add-self-hosted-runner-to-group-for-enterprise"]; - /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runners": { - /** - * Lists all self-hosted runners configured for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/list-self-hosted-runners-for-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runners/downloads": { - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/list-runner-applications-for-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runners/registration-token": { - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` - */ - post: operations["enterprise-admin/create-registration-token-for-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runners/remove-token": { - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - post: operations["enterprise-admin/create-remove-token-for-enterprise"]; - }; - "/enterprises/{enterprise}/actions/runners/{runner_id}": { - /** - * Gets a specific self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations["enterprise-admin/get-self-hosted-runner-for-enterprise"]; - /** - * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; - }; - "/enterprises/{enterprise}/audit-log": { - /** - * **Note:** The audit log REST API is currently in beta and is subject to change. - * - * Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. - */ - get: operations["audit-log/get-audit-log"]; - }; - "/enterprises/{enterprise}/settings/billing/actions": { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - get: operations["billing/get-github-actions-billing-ghe"]; - }; - "/enterprises/{enterprise}/settings/billing/packages": { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - get: operations["billing/get-github-packages-billing-ghe"]; - }; - "/enterprises/{enterprise}/settings/billing/shared-storage": { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - get: operations["billing/get-shared-storage-billing-ghe"]; - }; - "/events": { - /** 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. */ - get: operations["activity/list-public-events"]; - }; - "/feeds": { - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. - */ - get: operations["activity/get-feeds"]; - }; - "/gists": { - /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ - get: operations["gists/list"]; - /** - * 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. - */ - post: operations["gists/create"]; - }; - "/gists/public": { - /** - * List public gists sorted by most recently updated to least recently updated. - * - * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. - */ - get: operations["gists/list-public"]; - }; - "/gists/starred": { - /** List the authenticated user's starred gists: */ - get: operations["gists/list-starred"]; - }; - "/gists/{gist_id}": { - get: operations["gists/get"]; - delete: operations["gists/delete"]; - /** 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. */ - patch: operations["gists/update"]; - }; - "/gists/{gist_id}/comments": { - get: operations["gists/list-comments"]; - post: operations["gists/create-comment"]; - }; - "/gists/{gist_id}/comments/{comment_id}": { - get: operations["gists/get-comment"]; - delete: operations["gists/delete-comment"]; - patch: operations["gists/update-comment"]; - }; - "/gists/{gist_id}/commits": { - get: operations["gists/list-commits"]; - }; - "/gists/{gist_id}/forks": { - get: operations["gists/list-forks"]; - /** **Note**: This was previously `/gists/:gist_id/fork`. */ - post: operations["gists/fork"]; - }; - "/gists/{gist_id}/star": { - get: operations["gists/check-is-starred"]; - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - put: operations["gists/star"]; - delete: operations["gists/unstar"]; - }; - "/gists/{gist_id}/{sha}": { - get: operations["gists/get-revision"]; - }; - "/gitignore/templates": { - /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ - get: operations["gitignore/get-all-templates"]; - }; - "/gitignore/templates/{name}": { - /** - * The API also allows fetching the source of a single template. - * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. - */ - get: operations["gitignore/get-template"]; - }; - "/installation/repositories": { - /** - * List repositories that an app installation can access. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - get: operations["apps/list-repos-accessible-to-installation"]; - }; - "/installation/token": { - /** - * Revokes the installation token you're using to authenticate as an installation and access this endpoint. - * - * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - delete: operations["apps/revoke-installation-access-token"]; - }; - "/issues": { - /** - * List issues assigned to the authenticated user across all visible repositories including owned repositories, member - * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not - * necessarily assigned to you. - * - * - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations["issues/list"]; - }; - "/licenses": { - get: operations["licenses/get-all-commonly-used"]; - }; - "/licenses/{license}": { - get: operations["licenses/get"]; - }; - "/markdown": { - post: operations["markdown/render"]; - }; - "/markdown/raw": { - /** 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. */ - post: operations["markdown/render-raw"]; - }; - "/marketplace_listing/accounts/{account_id}": { - /** - * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations["apps/get-subscription-plan-for-account"]; - }; - "/marketplace_listing/plans": { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations["apps/list-plans"]; - }; - "/marketplace_listing/plans/{plan_id}/accounts": { - /** - * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations["apps/list-accounts-for-plan"]; - }; - "/marketplace_listing/stubbed/accounts/{account_id}": { - /** - * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations["apps/get-subscription-plan-for-account-stubbed"]; - }; - "/marketplace_listing/stubbed/plans": { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations["apps/list-plans-stubbed"]; - }; - "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { - /** - * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations["apps/list-accounts-for-plan-stubbed"]; - }; - "/meta": { - /** - * Returns meta information about GitHub, including 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/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ - get: operations["meta/get"]; - }; - "/networks/{owner}/{repo}/events": { - get: operations["activity/list-public-events-for-repo-network"]; - }; - "/notifications": { - /** List all notifications for the current user, sorted by most recently updated. */ - get: operations["activity/list-notifications-for-authenticated-user"]; - /** Marks all notifications 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ - put: operations["activity/mark-notifications-as-read"]; - }; - "/notifications/threads/{thread_id}": { - get: operations["activity/get-thread"]; - patch: operations["activity/mark-thread-as-read"]; - }; - "/notifications/threads/{thread_id}/subscription": { - /** - * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. - */ - get: operations["activity/get-thread-subscription-for-authenticated-user"]; - /** - * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. - * - * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. - * - * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. - */ - put: operations["activity/set-thread-subscription"]; - /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ - delete: operations["activity/delete-thread-subscription"]; - }; - "/octocat": { - /** Get the octocat as ASCII art */ - get: operations["meta/get-octocat"]; - }; - "/organizations": { - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. - */ - get: operations["orgs/list"]; - }; - "/orgs/{org}": { - /** - * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." - */ - get: operations["orgs/get"]; - /** - * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). - * - * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. - */ - patch: operations["orgs/update"]; - }; - "/orgs/{org}/actions/permissions": { - /** - * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - get: operations["actions/get-github-actions-permissions-organization"]; - /** - * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations["actions/set-github-actions-permissions-organization"]; - }; - "/orgs/{org}/actions/permissions/repositories": { - /** - * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; - /** - * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; - }; - "/orgs/{org}/actions/permissions/repositories/{repository_id}": { - /** - * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations["actions/enable-selected-repository-github-actions-organization"]; - /** - * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - delete: operations["actions/disable-selected-repository-github-actions-organization"]; - }; - "/orgs/{org}/actions/permissions/selected-actions": { - /** - * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - get: operations["actions/get-allowed-actions-organization"]; - /** - * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings. - * - * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations["actions/set-allowed-actions-organization"]; - }; - "/orgs/{org}/actions/runner-groups": { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations["actions/list-self-hosted-runner-groups-for-org"]; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Creates a new self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - post: operations["actions/create-self-hosted-runner-group-for-org"]; - }; - "/orgs/{org}/actions/runner-groups/{runner_group_id}": { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Gets a specific self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations["actions/get-self-hosted-runner-group-for-org"]; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Deletes a self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations["actions/delete-self-hosted-runner-group-from-org"]; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Updates the `name` and `visibility` of a self-hosted runner group in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - patch: operations["actions/update-self-hosted-runner-group-for-org"]; - }; - "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists the repositories with access to a self-hosted runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; - }; - "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. - */ - put: operations["actions/add-repo-access-to-self-hosted-runner-group-in-org"]; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; - }; - "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists self-hosted runners that are in a specific organization group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations["actions/list-self-hosted-runners-in-group-for-org"]; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Replaces the list of self-hosted runners that are part of an organization runner group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - put: operations["actions/set-self-hosted-runners-in-group-for-org"]; - }; - "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Adds a self-hosted runner to a runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. - */ - put: operations["actions/add-self-hosted-runner-to-group-for-org"]; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; - }; - "/orgs/{org}/actions/runners": { - /** - * Lists all self-hosted runners configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations["actions/list-self-hosted-runners-for-org"]; - }; - "/orgs/{org}/actions/runners/downloads": { - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations["actions/list-runner-applications-for-org"]; - }; - "/orgs/{org}/actions/runners/registration-token": { - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/octo-org --token TOKEN - * ``` - */ - post: operations["actions/create-registration-token-for-org"]; - }; - "/orgs/{org}/actions/runners/remove-token": { - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - post: operations["actions/create-remove-token-for-org"]; - }; - "/orgs/{org}/actions/runners/{runner_id}": { - /** - * Gets a specific self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations["actions/get-self-hosted-runner-for-org"]; - /** - * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations["actions/delete-self-hosted-runner-from-org"]; - }; - "/orgs/{org}/actions/secrets": { - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - get: operations["actions/list-org-secrets"]; - }; - "/orgs/{org}/actions/secrets/public-key": { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - get: operations["actions/get-org-public-key"]; - }; - "/orgs/{org}/actions/secrets/{secret_name}": { - /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - get: operations["actions/get-org-secret"]; - /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations["actions/create-or-update-org-secret"]; - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - delete: operations["actions/delete-org-secret"]; - }; - "/orgs/{org}/actions/secrets/{secret_name}/repositories": { - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - get: operations["actions/list-selected-repos-for-org-secret"]; - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - put: operations["actions/set-selected-repos-for-org-secret"]; - }; - "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - put: operations["actions/add-selected-repo-to-org-secret"]; - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - delete: operations["actions/remove-selected-repo-from-org-secret"]; - }; - "/orgs/{org}/audit-log": { - /** - * **Note:** The audit log REST API is currently in beta and is subject to change. - * - * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." - * - * To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. - */ - get: operations["orgs/get-audit-log"]; - }; - "/orgs/{org}/blocks": { - /** List the users blocked by an organization. */ - get: operations["orgs/list-blocked-users"]; - }; - "/orgs/{org}/blocks/{username}": { - get: operations["orgs/check-blocked-user"]; - put: operations["orgs/block-user"]; - delete: operations["orgs/unblock-user"]; - }; - "/orgs/{org}/credential-authorizations": { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://help.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - get: operations["orgs/list-saml-sso-authorizations"]; - }; - "/orgs/{org}/credential-authorizations/{credential_id}": { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - delete: operations["orgs/remove-saml-sso-authorization"]; - }; - "/orgs/{org}/events": { - get: operations["activity/list-public-org-events"]; - }; - "/orgs/{org}/failed_invitations": { - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - get: operations["orgs/list-failed-invitations"]; - }; - "/orgs/{org}/hooks": { - get: operations["orgs/list-webhooks"]; - /** Here's how you can create a hook that posts payloads in JSON format: */ - post: operations["orgs/create-webhook"]; - }; - "/orgs/{org}/hooks/{hook_id}": { - /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ - get: operations["orgs/get-webhook"]; - delete: operations["orgs/delete-webhook"]; - /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ - patch: operations["orgs/update-webhook"]; - }; - "/orgs/{org}/hooks/{hook_id}/config": { - /** - * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." - * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. - */ - get: operations["orgs/get-webhook-config-for-org"]; - /** - * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." - * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. - */ - patch: operations["orgs/update-webhook-config-for-org"]; - }; - "/orgs/{org}/hooks/{hook_id}/pings": { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - post: operations["orgs/ping-webhook"]; - }; - "/orgs/{org}/installation": { - /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations["apps/get-org-installation"]; - }; - "/orgs/{org}/installations": { - /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ - get: operations["orgs/list-app-installations"]; - }; - "/orgs/{org}/interaction-limits": { - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - get: operations["interactions/get-restrictions-for-org"]; - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - put: operations["interactions/set-restrictions-for-org"]; - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - delete: operations["interactions/remove-restrictions-for-org"]; - }; - "/orgs/{org}/invitations": { - /** 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`. */ - get: operations["orgs/list-pending-invitations"]; - /** - * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations["orgs/create-invitation"]; - }; - "/orgs/{org}/invitations/{invitation_id}": { - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - delete: operations["orgs/cancel-invitation"]; - }; - "/orgs/{org}/invitations/{invitation_id}/teams": { - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - get: operations["orgs/list-invitation-teams"]; - }; - "/orgs/{org}/issues": { - /** - * List issues in an organization assigned to the authenticated user. - * - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations["issues/list-for-org"]; - }; - "/orgs/{org}/members": { - /** 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. */ - get: operations["orgs/list-members"]; - }; - "/orgs/{org}/members/{username}": { - /** Check if a user is, publicly or privately, a member of the organization. */ - get: operations["orgs/check-membership-for-user"]; - /** 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. */ - delete: operations["orgs/remove-member"]; - }; - "/orgs/{org}/memberships/{username}": { - /** In order to get a user's membership with an organization, the authenticated user must be an organization member. */ - get: operations["orgs/get-membership-for-user"]; - /** - * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. - */ - put: operations["orgs/set-membership-for-user"]; - /** - * 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. - */ - delete: operations["orgs/remove-membership-for-user"]; - }; - "/orgs/{org}/migrations": { - /** Lists the most recent migrations. */ - get: operations["migrations/list-for-org"]; - /** Initiates the generation of a migration archive. */ - post: operations["migrations/start-for-org"]; - }; - "/orgs/{org}/migrations/{migration_id}": { - /** - * 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. - */ - get: operations["migrations/get-status-for-org"]; - }; - "/orgs/{org}/migrations/{migration_id}/archive": { - /** Fetches the URL to a migration archive. */ - get: operations["migrations/download-archive-for-org"]; - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - delete: operations["migrations/delete-archive-for-org"]; - }; - "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - delete: operations["migrations/unlock-repo-for-org"]; - }; - "/orgs/{org}/migrations/{migration_id}/repositories": { - /** List all the repositories for this organization migration. */ - get: operations["migrations/list-repos-for-org"]; - }; - "/orgs/{org}/outside_collaborators": { - /** List all users who are outside collaborators of an organization. */ - get: operations["orgs/list-outside-collaborators"]; - }; - "/orgs/{org}/outside_collaborators/{username}": { - /** 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/)". */ - put: operations["orgs/convert-member-to-outside-collaborator"]; - /** Removing a user from this list will remove them from all the organization's repositories. */ - delete: operations["orgs/remove-outside-collaborator"]; - }; - "/orgs/{org}/packages/{package_type}/{package_name}": { - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-package-for-organization"]; - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations["packages/delete-package-for-org"]; - }; - "/orgs/{org}/packages/{package_type}/{package_name}/restore": { - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations["packages/restore-package-for-org"]; - }; - "/orgs/{org}/packages/{package_type}/{package_name}/versions": { - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-all-package-versions-for-a-package-owned-by-an-org"]; - }; - "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { - /** - * Gets a specific package version in an organization. - * - * You must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-package-version-for-organization"]; - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations["packages/delete-package-version-for-org"]; - }; - "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations["packages/restore-package-version-for-org"]; - }; - "/orgs/{org}/projects": { - /** 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. */ - get: operations["projects/list-for-org"]; - /** 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. */ - post: operations["projects/create-for-org"]; - }; - "/orgs/{org}/public_members": { - /** Members of an organization can choose to have their membership publicized or not. */ - get: operations["orgs/list-public-members"]; - }; - "/orgs/{org}/public_members/{username}": { - get: operations["orgs/check-public-membership-for-user"]; - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - put: operations["orgs/set-public-membership-for-authenticated-user"]; - delete: operations["orgs/remove-public-membership-for-authenticated-user"]; - }; - "/orgs/{org}/repos": { - /** Lists repositories for the specified organization. */ - get: operations["repos/list-for-org"]; - /** - * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.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 - */ - post: operations["repos/create-in-org"]; - }; - "/orgs/{org}/settings/billing/actions": { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations["billing/get-github-actions-billing-org"]; - }; - "/orgs/{org}/settings/billing/packages": { - /** - * Gets the free and paid storage usued for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations["billing/get-github-packages-billing-org"]; - }; - "/orgs/{org}/settings/billing/shared-storage": { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations["billing/get-shared-storage-billing-org"]; - }; - "/orgs/{org}/team-sync/groups": { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - * - * The `per_page` parameter provides pagination for a list of IdP groups the authenticated user can access in an organization. For example, if the user `octocat` wants to see two groups per page in `octo-org` via cURL, it would look like this: - */ - get: operations["teams/list-idp-groups-for-org"]; - }; - "/orgs/{org}/teams": { - /** Lists all teams in an organization that are visible to the authenticated user. */ - get: operations["teams/list"]; - /** - * 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)." - * - * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". - */ - post: operations["teams/create"]; - }; - "/orgs/{org}/teams/{team_slug}": { - /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. - */ - get: operations["teams/get-by-name"]; - /** - * To delete a team, the authenticated user must be an organization owner or team maintainer. - * - * If you are an organization owner, deleting a parent team will delete all of its child teams as well. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. - */ - delete: operations["teams/delete-in-org"]; - /** - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. - */ - patch: operations["teams/update-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/discussions": { - /** - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. - */ - get: operations["teams/list-discussions-in-org"]; - /** - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. - */ - post: operations["teams/create-discussion-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { - /** - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - get: operations["teams/get-discussion-in-org"]; - /** - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - delete: operations["teams/delete-discussion-in-org"]; - /** - * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - patch: operations["teams/update-discussion-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { - /** - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - get: operations["teams/list-discussion-comments-in-org"]; - /** - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - post: operations["teams/create-discussion-comment-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { - /** - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - get: operations["teams/get-discussion-comment-in-org"]; - /** - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - delete: operations["teams/delete-discussion-comment-in-org"]; - /** - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - patch: operations["teams/update-discussion-comment-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { - /** - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - get: operations["reactions/list-for-team-discussion-comment-in-org"]; - /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.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. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - post: operations["reactions/create-for-team-discussion-comment-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { - /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. - * - * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - delete: operations["reactions/delete-for-team-discussion-comment"]; - }; - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { - /** - * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - get: operations["reactions/list-for-team-discussion-in-org"]; - /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.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. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - post: operations["reactions/create-for-team-discussion-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { - /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. - * - * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - delete: operations["reactions/delete-for-team-discussion"]; - }; - "/orgs/{org}/teams/{team_slug}/invitations": { - /** - * 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`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. - */ - get: operations["teams/list-pending-invitations-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/members": { - /** - * Team members will include the members of child teams. - * - * To list members in a team, the team must be visible to the authenticated user. - */ - get: operations["teams/list-members-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/memberships/{username}": { - /** - * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. - * - * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - get: operations["teams/get-membership-for-user-in-org"]; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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/)." - * - * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. - * - * 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 team maintainer. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - put: operations["teams/add-or-update-membership-for-user-in-org"]; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-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/)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - delete: operations["teams/remove-membership-for-user-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/projects": { - /** - * Lists the organization projects for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. - */ - get: operations["teams/list-projects-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { - /** - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - get: operations["teams/check-permissions-for-project-in-org"]; - /** - * 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. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - put: operations["teams/add-or-update-project-permissions-in-org"]; - /** - * 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. This endpoint removes the project from the team, but does not delete the project. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - delete: operations["teams/remove-project-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/repos": { - /** - * Lists a team's repositories visible to the authenticated user. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. - */ - get: operations["teams/list-repos-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { - /** - * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. - * - * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - */ - get: operations["teams/check-permissions-for-repo-in-org"]; - /** - * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - * - * For more information about the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". - */ - put: operations["teams/add-or-update-repo-permissions-in-org"]; - /** - * 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. This does not delete the repository, it just removes it from the team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - */ - delete: operations["teams/remove-repo-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/team-sync/group-mappings": { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - get: operations["teams/list-idp-groups-in-org"]; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - patch: operations["teams/create-or-update-idp-group-connections-in-org"]; - }; - "/orgs/{org}/teams/{team_slug}/teams": { - /** - * Lists the child teams of the team specified by `{team_slug}`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. - */ - get: operations["teams/list-child-in-org"]; - }; - "/projects/columns/cards/{card_id}": { - get: operations["projects/get-card"]; - delete: operations["projects/delete-card"]; - patch: operations["projects/update-card"]; - }; - "/projects/columns/cards/{card_id}/moves": { - post: operations["projects/move-card"]; - }; - "/projects/columns/{column_id}": { - get: operations["projects/get-column"]; - delete: operations["projects/delete-column"]; - patch: operations["projects/update-column"]; - }; - "/projects/columns/{column_id}/cards": { - get: operations["projects/list-cards"]; - /** - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - post: operations["projects/create-card"]; - }; - "/projects/columns/{column_id}/moves": { - post: operations["projects/move-column"]; - }; - "/projects/{project_id}": { - /** 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: operations["projects/get"]; - /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ - delete: operations["projects/delete"]; - /** 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. */ - patch: operations["projects/update"]; - }; - "/projects/{project_id}/collaborators": { - /** 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. */ - get: operations["projects/list-collaborators"]; - }; - "/projects/{project_id}/collaborators/{username}": { - /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ - put: operations["projects/add-collaborator"]; - /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ - delete: operations["projects/remove-collaborator"]; - }; - "/projects/{project_id}/collaborators/{username}/permission": { - /** 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. */ - get: operations["projects/get-permission-for-user"]; - }; - "/projects/{project_id}/columns": { - get: operations["projects/list-columns"]; - post: operations["projects/create-column"]; - }; - "/rate_limit": { - /** - * **Note:** Accessing this endpoint does not count against your REST API rate limit. - * - * **Note:** The `rate` object 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: operations["rate-limit/get"]; - }; - "/reactions/{reaction_id}": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - delete: operations["reactions/delete-legacy"]; - }; - "/repos/{owner}/{repo}": { - /** - * When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file. - * - * 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: operations["repos/get"]; - /** - * 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, you will get a `403 Forbidden` response. - */ - delete: operations["repos/delete"]; - /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ - patch: operations["repos/update"]; - }; - "/repos/{owner}/{repo}/actions/artifacts": { - /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations["actions/list-artifacts-for-repo"]; - }; - "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { - /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations["actions/get-artifact"]; - /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - delete: operations["actions/delete-artifact"]; - }; - "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { - /** - * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in - * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to - * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - * GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations["actions/download-artifact"]; - }; - "/repos/{owner}/{repo}/actions/jobs/{job_id}": { - /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations["actions/get-job-for-workflow-run"]; - }; - "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { - /** - * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look - * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can - * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must - * have the `actions:read` permission to use this endpoint. - */ - get: operations["actions/download-job-logs-for-workflow-run"]; - }; - "/repos/{owner}/{repo}/actions/permissions": { - /** - * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - get: operations["actions/get-github-actions-permissions-repository"]; - /** - * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. - * - * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - put: operations["actions/set-github-actions-permissions-repository"]; - }; - "/repos/{owner}/{repo}/actions/permissions/selected-actions": { - /** - * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - get: operations["actions/get-allowed-actions-repository"]; - /** - * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." - * - * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings. - * - * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - put: operations["actions/set-allowed-actions-repository"]; - }; - "/repos/{owner}/{repo}/actions/runners": { - /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ - get: operations["actions/list-self-hosted-runners-for-repo"]; - }; - "/repos/{owner}/{repo}/actions/runners/downloads": { - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. - */ - get: operations["actions/list-runner-applications-for-repo"]; - }; - "/repos/{owner}/{repo}/actions/runners/registration-token": { - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate - * using an access token with the `repo` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN - * ``` - */ - post: operations["actions/create-registration-token-for-repo"]; - }; - "/repos/{owner}/{repo}/actions/runners/remove-token": { - /** - * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. - * You must authenticate using an access token with the `repo` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - post: operations["actions/create-remove-token-for-repo"]; - }; - "/repos/{owner}/{repo}/actions/runners/{runner_id}": { - /** - * Gets a specific self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - get: operations["actions/get-self-hosted-runner-for-repo"]; - /** - * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `repo` - * scope to use this endpoint. - */ - delete: operations["actions/delete-self-hosted-runner-from-repo"]; - }; - "/repos/{owner}/{repo}/actions/runs": { - /** - * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations["actions/list-workflow-runs-for-repo"]; - }; - "/repos/{owner}/{repo}/actions/runs/{run_id}": { - /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations["actions/get-workflow-run"]; - /** - * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is - * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use - * this endpoint. - */ - delete: operations["actions/delete-workflow-run"]; - }; - "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { - /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations["actions/list-workflow-run-artifacts"]; - }; - "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { - /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - post: operations["actions/cancel-workflow-run"]; - }; - "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { - /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ - get: operations["actions/list-jobs-for-workflow-run"]; - }; - "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { - /** - * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for - * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use - * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have - * the `actions:read` permission to use this endpoint. - */ - get: operations["actions/download-workflow-run-logs"]; - /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - delete: operations["actions/delete-workflow-run-logs"]; - }; - "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { - /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - post: operations["actions/re-run-workflow"]; - }; - "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations["actions/get-workflow-run-usage"]; - }; - "/repos/{owner}/{repo}/actions/secrets": { - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations["actions/list-repo-secrets"]; - }; - "/repos/{owner}/{repo}/actions/secrets/public-key": { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations["actions/get-repo-public-key"]; - }; - "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations["actions/get-repo-secret"]; - /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations["actions/create-or-update-repo-secret"]; - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - delete: operations["actions/delete-repo-secret"]; - }; - "/repos/{owner}/{repo}/actions/workflows": { - /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations["actions/list-repo-workflows"]; - }; - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { - /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations["actions/get-workflow"]; - }; - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { - /** - * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - put: operations["actions/disable-workflow"]; - }; - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { - /** - * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)." - */ - post: operations["actions/create-workflow-dispatch"]; - }; - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { - /** - * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - put: operations["actions/enable-workflow"]; - }; - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { - /** - * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - */ - get: operations["actions/list-workflow-runs"]; - }; - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations["actions/get-workflow-usage"]; - }; - "/repos/{owner}/{repo}/assignees": { - /** Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ - get: operations["issues/list-assignees"]; - }; - "/repos/{owner}/{repo}/assignees/{assignee}": { - /** - * 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. - */ - get: operations["issues/check-user-can-be-assigned"]; - }; - "/repos/{owner}/{repo}/automated-security-fixes": { - /** 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)". */ - put: operations["repos/enable-automated-security-fixes"]; - /** 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)". */ - delete: operations["repos/disable-automated-security-fixes"]; - }; - "/repos/{owner}/{repo}/branches": { - get: operations["repos/list-branches"]; - }; - "/repos/{owner}/{repo}/branches/{branch}": { - get: operations["repos/get-branch"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection": { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations["repos/get-branch-protection"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. - */ - put: operations["repos/update-branch-protection"]; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - delete: operations["repos/delete-branch-protection"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations["repos/get-admin-branch-protection"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - post: operations["repos/set-admin-branch-protection"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - delete: operations["repos/delete-admin-branch-protection"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations["repos/get-pull-request-review-protection"]; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - delete: operations["repos/delete-pull-request-review-protection"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - patch: operations["repos/update-pull-request-review-protection"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - get: operations["repos/get-commit-signature-protection"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - post: operations["repos/create-commit-signature-protection"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - delete: operations["repos/delete-commit-signature-protection"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations["repos/get-status-checks-protection"]; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - delete: operations["repos/remove-status-check-protection"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. - */ - patch: operations["repos/update-status-check-protection"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations["repos/get-all-status-check-contexts"]; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - put: operations["repos/set-status-check-contexts"]; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - post: operations["repos/add-status-check-contexts"]; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - delete: operations["repos/remove-status-check-contexts"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists who has access to this protected branch. - * - * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. - */ - get: operations["repos/get-access-restrictions"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Disables the ability to restrict who can push to this branch. - */ - delete: operations["repos/delete-access-restrictions"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - */ - get: operations["repos/get-apps-with-access-to-protected-branch"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - put: operations["repos/set-app-access-restrictions"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - post: operations["repos/add-app-access-restrictions"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - delete: operations["repos/remove-app-access-restrictions"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the teams who have push access to this branch. The list includes child teams. - */ - get: operations["repos/get-teams-with-access-to-protected-branch"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. - * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - put: operations["repos/set-team-access-restrictions"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | - */ - post: operations["repos/add-team-access-restrictions"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of a team to push to this branch. You can also remove push access for child teams. - * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - delete: operations["repos/remove-team-access-restrictions"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the people who have push access to this branch. - */ - get: operations["repos/get-users-with-access-to-protected-branch"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | - */ - put: operations["repos/set-user-access-restrictions"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | - */ - post: operations["repos/add-user-access-restrictions"]; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of a user to push to this branch. - * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - delete: operations["repos/remove-user-access-restrictions"]; - }; - "/repos/{owner}/{repo}/branches/{branch}/rename": { - /** - * Renames a branch in a repository. - * - * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". - * - * The permissions required to use this endpoint depends on whether you are renaming the default branch. - * - * To rename a non-default branch: - * - * * Users must have push access. - * * GitHub Apps must have the `contents:write` repository permission. - * - * To rename the default branch: - * - * * Users must have admin or owner permissions. - * * GitHub Apps must have the `administration:write` repository permission. - */ - post: operations["repos/rename-branch"]; - }; - "/repos/{owner}/{repo}/check-runs": { - /** - * **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. - * - * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. - */ - post: operations["checks/create"]; - }; - "/repos/{owner}/{repo}/check-runs/{check_run_id}": { - /** - * **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: operations["checks/get"]; - /** - * **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. - */ - patch: operations["checks/update"]; - }; - "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { - /** 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. */ - get: operations["checks/list-annotations"]; - }; - "/repos/{owner}/{repo}/check-suites": { - /** - * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - post: operations["checks/create-suite"]; - }; - "/repos/{owner}/{repo}/check-suites/preferences": { - /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ - patch: operations["checks/set-suites-preferences"]; - }; - "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { - /** - * **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. - */ - get: operations["checks/get-suite"]; - }; - "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { - /** - * **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. - */ - get: operations["checks/list-for-suite"]; - }; - "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { - /** - * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. - */ - post: operations["checks/rerequest-suite"]; - }; - "/repos/{owner}/{repo}/code-scanning/alerts": { - /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint. GitHub Apps must have the `security_events` read permission to use - * this endpoint. - * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the the default branch or for the specified Git reference - * (if you used `ref` in the request). - */ - get: operations["code-scanning/list-alerts-for-repo"]; - }; - "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { - /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. - */ - get: operations["code-scanning/get-alert"]; - /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. */ - patch: operations["code-scanning/update-alert"]; - }; - "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { - /** Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - get: operations["code-scanning/list-alerts-instances"]; - }; - "/repos/{owner}/{repo}/code-scanning/analyses": { - /** - * Lists the details of all code scanning analyses for a repository, - * starting with the most recent. - * The response is paginated and you can use the `page` and `per_page` parameters - * to list the analyses you're interested in. - * By default 30 analyses are listed per page. - * - * The `rules_count` field in the response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * You must use an access token with the `security_events` scope to use this endpoint. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - get: operations["code-scanning/list-recent-analyses"]; - }; - "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { - /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. - * - * The `rules_count` field in the default response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * If you use the Accept header `application/sarif+json`, - * the response contains the analysis data that was uploaded. - * This is formatted as - * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). - * For an example response, see "[Custom media type for code scanning](#custom-media-type-for-code-scanning)." - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - get: operations["code-scanning/get-analysis"]; - /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` and `repo:security_events` scopes. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set - * (see the example default response below). - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in the set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find the deletable analysis for one of the sets, - * step through deleting the analyses in that set, - * and then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `next_analysis_url` and, if found, use this in the next iteration. - * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `next_analysis_url` value. Alternatively, you could use the `confirm_delete_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. - */ - delete: operations["code-scanning/delete-analysis"]; - }; - "/repos/{owner}/{repo}/code-scanning/sarifs": { - /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 - * ``` - * - * SARIF upload supports a maximum of 1000 results per analysis run. Any results over this limit are ignored. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. - * - * The `202 Accepted`, response includes an `id` value. - * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. - * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." - */ - post: operations["code-scanning/upload-sarif"]; - }; - "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - get: operations["code-scanning/get-sarif"]; - }; - "/repos/{owner}/{repo}/collaborators": { - /** - * 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. - * - * Team members will include the members of child teams. - */ - get: operations["repos/list-collaborators"]; - }; - "/repos/{owner}/{repo}/collaborators/{username}": { - /** - * 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. - * - * Team members will include the members of child teams. - */ - get: operations["repos/check-collaborator"]; - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - * - * For more information the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". - * - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/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. - */ - put: operations["repos/add-collaborator"]; - delete: operations["repos/remove-collaborator"]; - }; - "/repos/{owner}/{repo}/collaborators/{username}/permission": { - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - get: operations["repos/get-collaborator-permission-level"]; - }; - "/repos/{owner}/{repo}/comments": { - /** - * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). - * - * Comments are ordered by ascending ID. - */ - get: operations["repos/list-commit-comments-for-repo"]; - }; - "/repos/{owner}/{repo}/comments/{comment_id}": { - get: operations["repos/get-commit-comment"]; - delete: operations["repos/delete-commit-comment"]; - patch: operations["repos/update-commit-comment"]; - }; - "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - get: operations["reactions/list-for-commit-comment"]; - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. */ - post: operations["reactions/create-for-commit-comment"]; - }; - "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - */ - delete: operations["reactions/delete-for-commit-comment"]; - }; - "/repos/{owner}/{repo}/commits": { - /** - * **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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - get: operations["repos/list-commits"]; - }; - "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - get: operations["repos/list-branches-for-head-commit"]; - }; - "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - get: operations["repos/list-comments-for-commit"]; - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations["repos/create-commit-comment"]; - }; - "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { - /** 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://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - get: operations["repos/list-pull-requests-associated-with-commit"]; - }; - "/repos/{owner}/{repo}/commits/{ref}": { - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. - * - * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - get: operations["repos/get-commit"]; - }; - "/repos/{owner}/{repo}/commits/{ref}/check-runs": { - /** - * **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. - */ - get: operations["checks/list-for-ref"]; - }; - "/repos/{owner}/{repo}/commits/{ref}/check-suites": { - /** - * **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. - */ - get: operations["checks/list-suites-for-ref"]; - }; - "/repos/{owner}/{repo}/commits/{ref}/status": { - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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` - */ - get: operations["repos/get-combined-status-for-ref"]; - }; - "/repos/{owner}/{repo}/commits/{ref}/statuses": { - /** - * 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`. - */ - get: operations["repos/list-commit-statuses-for-ref"]; - }; - "/repos/{owner}/{repo}/community/code_of_conduct": { - /** - * Returns the contents of the repository's code of conduct file, if one is detected. - * - * A code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching. - */ - get: operations["codes-of-conduct/get-for-repo"]; - }; - "/repos/{owner}/{repo}/community/profile": { - /** - * 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. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - get: operations["repos/get-community-profile-metrics"]; - }; - "/repos/{owner}/{repo}/compare/{base}...{head}": { - /** - * 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://docs.github.com/rest/overview/media-types/#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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) 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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - get: operations["repos/compare-commits"]; - }; - "/repos/{owner}/{repo}/contents/{path}": { - /** - * 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 the repository's root directory. See the description below regarding what the API response includes for directories. - * - * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for - * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media - * type](https://docs.github.com/rest/reference/repos#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://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * #### If the content is a directory - * 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 content is a symlink - * 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 in the example. Otherwise, the API responds with an object - * describing the symlink itself. - * - * #### If the content is a submodule - * 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. - */ - get: operations["repos/get-content"]; - /** Creates a new file or replaces an existing file in a repository. */ - put: operations["repos/create-or-update-file-contents"]; - /** - * 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. - */ - delete: operations["repos/delete-file"]; - }; - "/repos/{owner}/{repo}/contributors": { - /** - * 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. - */ - get: operations["repos/list-contributors"]; - }; - "/repos/{owner}/{repo}/deployments": { - /** Simple filtering of deployments is available via query parameters: */ - get: operations["repos/list-deployments"]; - /** - * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/reference/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. - * - * #### Merged branch response - * 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. - * - * #### Merge conflict 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. - * - * #### Failed commit status checks - * 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`. - */ - post: operations["repos/create-deployment"]; - }; - "/repos/{owner}/{repo}/deployments/{deployment_id}": { - get: operations["repos/get-deployment"]; - /** - * To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive deployment. - * - * To set a deployment as inactive, you must: - * - * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. - * * Mark the active deployment as inactive by adding any non-successful deployment status. - * - * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." - */ - delete: operations["repos/delete-deployment"]; - }; - "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { - /** Users with pull access can view deployment statuses for a deployment: */ - get: operations["repos/list-deployment-statuses"]; - /** - * 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. - */ - post: operations["repos/create-deployment-status"]; - }; - "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { - /** Users with pull access can view a deployment status for a deployment: */ - get: operations["repos/get-deployment-status"]; - }; - "/repos/{owner}/{repo}/dispatches": { - /** - * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." - * - * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. - * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. - * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. - */ - post: operations["repos/create-dispatch-event"]; - }; - "/repos/{owner}/{repo}/events": { - get: operations["activity/list-repo-events"]; - }; - "/repos/{owner}/{repo}/forks": { - get: operations["repos/list-forks"]; - /** - * 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://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com). - */ - post: operations["repos/create-fork"]; - }; - "/repos/{owner}/{repo}/git/blobs": { - post: operations["git/create-blob"]; - }; - "/repos/{owner}/{repo}/git/blobs/{file_sha}": { - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - get: operations["git/get-blob"]; - }; - "/repos/{owner}/{repo}/git/commits": { - /** - * Creates a new 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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - post: operations["git/create-commit"]; - }; - "/repos/{owner}/{repo}/git/commits/{commit_sha}": { - /** - * 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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - get: operations["git/get-commit"]; - }; - "/repos/{owner}/{repo}/git/matching-refs/{ref}": { - /** - * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. - * - * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. - * - * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. - */ - get: operations["git/list-matching-refs"]; - }; - "/repos/{owner}/{repo}/git/ref/{ref}": { - /** - * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. - * - * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - */ - get: operations["git/get-ref"]; - }; - "/repos/{owner}/{repo}/git/refs": { - /** 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. */ - post: operations["git/create-ref"]; - }; - "/repos/{owner}/{repo}/git/refs/{ref}": { - delete: operations["git/delete-ref"]; - patch: operations["git/update-ref"]; - }; - "/repos/{owner}/{repo}/git/tags": { - /** - * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - post: operations["git/create-tag"]; - }; - "/repos/{owner}/{repo}/git/tags/{tag_sha}": { - /** - * **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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - get: operations["git/get-tag"]; - }; - "/repos/{owner}/{repo}/git/trees": { - /** - * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. - * - * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." - */ - post: operations["git/create-tree"]; - }; - "/repos/{owner}/{repo}/git/trees/{tree_sha}": { - /** - * Returns a single tree using the SHA1 value for that tree. - * - * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. - */ - get: operations["git/get-tree"]; - }; - "/repos/{owner}/{repo}/hooks": { - get: operations["repos/list-webhooks"]; - /** - * 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. - */ - post: operations["repos/create-webhook"]; - }; - "/repos/{owner}/{repo}/hooks/{hook_id}": { - /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ - get: operations["repos/get-webhook"]; - delete: operations["repos/delete-webhook"]; - /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ - patch: operations["repos/update-webhook"]; - }; - "/repos/{owner}/{repo}/hooks/{hook_id}/config": { - /** - * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." - * - * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. - */ - get: operations["repos/get-webhook-config-for-repo"]; - /** - * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." - * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. - */ - patch: operations["repos/update-webhook-config-for-repo"]; - }; - "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - post: operations["repos/ping-webhook"]; - }; - "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { - /** - * 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` - */ - post: operations["repos/test-push-webhook"]; - }; - "/repos/{owner}/{repo}/import": { - /** - * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. - */ - get: operations["migrations/get-import-status"]; - /** Start a source import to a GitHub repository using GitHub Importer. */ - put: operations["migrations/start-import"]; - /** Stop an import for a repository. */ - delete: operations["migrations/cancel-import"]; - /** - * 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. - */ - patch: operations["migrations/update-import"]; - }; - "/repos/{owner}/{repo}/import/authors": { - /** - * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - get: operations["migrations/get-commit-authors"]; - }; - "/repos/{owner}/{repo}/import/authors/{author_id}": { - /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ - patch: operations["migrations/map-commit-author"]; - }; - "/repos/{owner}/{repo}/import/large_files": { - /** List files larger than 100MB found during the import */ - get: operations["migrations/get-large-files"]; - }; - "/repos/{owner}/{repo}/import/lfs": { - /** 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/). */ - patch: operations["migrations/set-lfs-preference"]; - }; - "/repos/{owner}/{repo}/installation": { - /** - * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations["apps/get-repo-installation"]; - }; - "/repos/{owner}/{repo}/interaction-limits": { - /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ - get: operations["interactions/get-restrictions-for-repo"]; - /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - put: operations["interactions/set-restrictions-for-repo"]; - /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - delete: operations["interactions/remove-restrictions-for-repo"]; - }; - "/repos/{owner}/{repo}/invitations": { - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - get: operations["repos/list-invitations"]; - }; - "/repos/{owner}/{repo}/invitations/{invitation_id}": { - delete: operations["repos/delete-invitation"]; - patch: operations["repos/update-invitation"]; - }; - "/repos/{owner}/{repo}/issues": { - /** - * List issues in a repository. - * - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations["issues/list-for-repo"]; - /** - * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. - */ - post: operations["issues/create"]; - }; - "/repos/{owner}/{repo}/issues/comments": { - /** By default, Issue Comments are ordered by ascending ID. */ - get: operations["issues/list-comments-for-repo"]; - }; - "/repos/{owner}/{repo}/issues/comments/{comment_id}": { - get: operations["issues/get-comment"]; - delete: operations["issues/delete-comment"]; - patch: operations["issues/update-comment"]; - }; - "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - get: operations["reactions/list-for-issue-comment"]; - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. */ - post: operations["reactions/create-for-issue-comment"]; - }; - "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). - */ - delete: operations["reactions/delete-for-issue-comment"]; - }; - "/repos/{owner}/{repo}/issues/events": { - get: operations["issues/list-events-for-repo"]; - }; - "/repos/{owner}/{repo}/issues/events/{event_id}": { - get: operations["issues/get-event"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}": { - /** - * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-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://docs.github.com/webhooks/event-payloads/#issues) 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations["issues/get"]; - /** Issue owners and users with push access can edit an issue. */ - patch: operations["issues/update"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - post: operations["issues/add-assignees"]; - /** Removes one or more assignees from an issue. */ - delete: operations["issues/remove-assignees"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/comments": { - /** Issue Comments are ordered by ascending ID. */ - get: operations["issues/list-comments"]; - /** This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ - post: operations["issues/create-comment"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/events": { - get: operations["issues/list-events"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/labels": { - get: operations["issues/list-labels-on-issue"]; - /** Removes any previous labels and sets the new labels for an issue. */ - put: operations["issues/set-labels"]; - post: operations["issues/add-labels"]; - delete: operations["issues/remove-all-labels"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { - /** 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. */ - delete: operations["issues/remove-label"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/lock": { - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - put: operations["issues/lock"]; - /** Users with push access can unlock an issue's conversation. */ - delete: operations["issues/unlock"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - get: operations["reactions/list-for-issue"]; - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. */ - post: operations["reactions/create-for-issue"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. - * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). - */ - delete: operations["reactions/delete-for-issue"]; - }; - "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { - get: operations["issues/list-events-for-timeline"]; - }; - "/repos/{owner}/{repo}/keys": { - get: operations["repos/list-deploy-keys"]; - /** You can create a read-only deploy key. */ - post: operations["repos/create-deploy-key"]; - }; - "/repos/{owner}/{repo}/keys/{key_id}": { - get: operations["repos/get-deploy-key"]; - /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ - delete: operations["repos/delete-deploy-key"]; - }; - "/repos/{owner}/{repo}/labels": { - get: operations["issues/list-labels-for-repo"]; - post: operations["issues/create-label"]; - }; - "/repos/{owner}/{repo}/labels/{name}": { - get: operations["issues/get-label"]; - delete: operations["issues/delete-label"]; - patch: operations["issues/update-label"]; - }; - "/repos/{owner}/{repo}/languages": { - /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ - get: operations["repos/list-languages"]; - }; - "/repos/{owner}/{repo}/license": { - /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. - */ - get: operations["licenses/get-for-repo"]; - }; - "/repos/{owner}/{repo}/merges": { - post: operations["repos/merge"]; - }; - "/repos/{owner}/{repo}/milestones": { - get: operations["issues/list-milestones"]; - post: operations["issues/create-milestone"]; - }; - "/repos/{owner}/{repo}/milestones/{milestone_number}": { - get: operations["issues/get-milestone"]; - delete: operations["issues/delete-milestone"]; - patch: operations["issues/update-milestone"]; - }; - "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { - get: operations["issues/list-labels-for-milestone"]; - }; - "/repos/{owner}/{repo}/notifications": { - /** List all notifications for the current user. */ - get: operations["activity/list-repo-notifications-for-authenticated-user"]; - /** Marks 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ - put: operations["activity/mark-repo-notifications-as-read"]; - }; - "/repos/{owner}/{repo}/pages": { - get: operations["repos/get-pages"]; - /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ - put: operations["repos/update-information-about-pages-site"]; - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - post: operations["repos/create-pages-site"]; - delete: operations["repos/delete-pages-site"]; - }; - "/repos/{owner}/{repo}/pages/builds": { - get: operations["repos/list-pages-builds"]; - /** - * 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. - */ - post: operations["repos/request-pages-build"]; - }; - "/repos/{owner}/{repo}/pages/builds/latest": { - get: operations["repos/get-latest-pages-build"]; - }; - "/repos/{owner}/{repo}/pages/builds/{build_id}": { - get: operations["repos/get-pages-build"]; - }; - "/repos/{owner}/{repo}/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. */ - get: operations["projects/list-for-repo"]; - /** 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. */ - post: operations["projects/create-for-repo"]; - }; - "/repos/{owner}/{repo}/pulls": { - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations["pulls/list"]; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations["pulls/create"]; - }; - "/repos/{owner}/{repo}/pulls/comments": { - /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ - get: operations["pulls/list-review-comments-for-repo"]; - }; - "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { - /** Provides details for a review comment. */ - get: operations["pulls/get-review-comment"]; - /** Deletes a review comment. */ - delete: operations["pulls/delete-review-comment"]; - /** Enables you to edit a review comment. */ - patch: operations["pulls/update-review-comment"]; - }; - "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { - /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ - get: operations["reactions/list-for-pull-request-review-comment"]; - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. */ - post: operations["reactions/create-for-pull-request-review-comment"]; - }; - "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` - * - * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). - */ - delete: operations["reactions/delete-for-pull-request-comment"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}": { - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - */ - get: operations["pulls/get"]; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - patch: operations["pulls/update"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - get: operations["pulls/list-review-comments"]; - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see the [`comfort-fade` preview notice](https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request-preview-notices). - * - * **Note:** 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. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations["pulls/create-review-comment"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations["pulls/create-reply-for-review-comment"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { - /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ - get: operations["pulls/list-commits"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/files": { - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - get: operations["pulls/list-files"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { - get: operations["pulls/check-if-merged"]; - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ - put: operations["pulls/merge"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { - get: operations["pulls/list-requested-reviewers"]; - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ - post: operations["pulls/request-reviewers"]; - delete: operations["pulls/remove-requested-reviewers"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { - /** The list of reviews returns in chronological order. */ - get: operations["pulls/list-reviews"]; - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. - */ - post: operations["pulls/create-review"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { - get: operations["pulls/get-review"]; - /** Update the review summary comment with new text. */ - put: operations["pulls/update-review"]; - delete: operations["pulls/delete-pending-review"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { - /** List comments for a specific pull request review. */ - get: operations["pulls/list-comments-for-review"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { - /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ - put: operations["pulls/dismiss-review"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { - post: operations["pulls/submit-review"]; - }; - "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { - /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ - put: operations["pulls/update-branch"]; - }; - "/repos/{owner}/{repo}/readme": { - /** - * Gets the preferred README for a repository. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - get: operations["repos/get-readme"]; - }; - "/repos/{owner}/{repo}/releases": { - /** - * 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://docs.github.com/rest/reference/repos#list-repository-tags). - * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. - */ - get: operations["repos/list-releases"]; - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations["repos/create-release"]; - }; - "/repos/{owner}/{repo}/releases/assets/{asset_id}": { - /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ - get: operations["repos/get-release-asset"]; - delete: operations["repos/delete-release-asset"]; - /** Users with push access to the repository can edit a release asset. */ - patch: operations["repos/update-release-asset"]; - }; - "/repos/{owner}/{repo}/releases/latest": { - /** - * 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. - */ - get: operations["repos/get-latest-release"]; - }; - "/repos/{owner}/{repo}/releases/tags/{tag}": { - /** Get a published release with the specified tag. */ - get: operations["repos/get-release-by-tag"]; - }; - "/repos/{owner}/{repo}/releases/{release_id}": { - /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ - get: operations["repos/get-release"]; - /** Users with push access to the repository can delete a release. */ - delete: operations["repos/delete-release"]; - /** Users with push access to the repository can edit a release. */ - patch: operations["repos/update-release"]; - }; - "/repos/{owner}/{repo}/releases/{release_id}/assets": { - get: operations["repos/list-release-assets"]; - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - post: operations["repos/upload-release-asset"]; - }; - "/repos/{owner}/{repo}/secret-scanning/alerts": { - /** - * Lists all secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - get: operations["secret-scanning/list-alerts-for-repo"]; - }; - "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { - /** - * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - get: operations["secret-scanning/get-alert"]; - /** - * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. - */ - patch: operations["secret-scanning/update-alert"]; - }; - "/repos/{owner}/{repo}/stargazers": { - /** - * Lists the people that have starred the repository. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - get: operations["activity/list-stargazers-for-repo"]; - }; - "/repos/{owner}/{repo}/stats/code_frequency": { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - get: operations["repos/get-code-frequency-stats"]; - }; - "/repos/{owner}/{repo}/stats/commit_activity": { - /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - get: operations["repos/get-commit-activity-stats"]; - }; - "/repos/{owner}/{repo}/stats/contributors": { - /** - * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: - * - * * `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 - */ - get: operations["repos/get-contributors-stats"]; - }; - "/repos/{owner}/{repo}/stats/participation": { - /** - * 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. - */ - get: operations["repos/get-participation-stats"]; - }; - "/repos/{owner}/{repo}/stats/punch_card": { - /** - * 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. - */ - get: operations["repos/get-punch-card-stats"]; - }; - "/repos/{owner}/{repo}/statuses/{sha}": { - /** - * 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. - */ - post: operations["repos/create-commit-status"]; - }; - "/repos/{owner}/{repo}/subscribers": { - /** Lists the people watching the specified repository. */ - get: operations["activity/list-watchers-for-repo"]; - }; - "/repos/{owner}/{repo}/subscription": { - get: operations["activity/get-repo-subscription"]; - /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ - put: operations["activity/set-repo-subscription"]; - /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ - delete: operations["activity/delete-repo-subscription"]; - }; - "/repos/{owner}/{repo}/tags": { - get: operations["repos/list-tags"]; - }; - "/repos/{owner}/{repo}/tarball/{ref}": { - /** - * Gets a redirect URL to download a tar archive for a repository. 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. - */ - get: operations["repos/download-tarball-archive"]; - }; - "/repos/{owner}/{repo}/teams": { - get: operations["repos/list-teams"]; - }; - "/repos/{owner}/{repo}/topics": { - get: operations["repos/get-all-topics"]; - put: operations["repos/replace-all-topics"]; - }; - "/repos/{owner}/{repo}/traffic/clones": { - /** 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. */ - get: operations["repos/get-clones"]; - }; - "/repos/{owner}/{repo}/traffic/popular/paths": { - /** Get the top 10 popular contents over the last 14 days. */ - get: operations["repos/get-top-paths"]; - }; - "/repos/{owner}/{repo}/traffic/popular/referrers": { - /** Get the top 10 referrers over the last 14 days. */ - get: operations["repos/get-top-referrers"]; - }; - "/repos/{owner}/{repo}/traffic/views": { - /** 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. */ - get: operations["repos/get-views"]; - }; - "/repos/{owner}/{repo}/transfer": { - /** 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/). */ - post: operations["repos/transfer"]; - }; - "/repos/{owner}/{repo}/vulnerability-alerts": { - /** Shows whether dependency 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)". */ - get: operations["repos/check-vulnerability-alerts"]; - /** Enables dependency 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)". */ - put: operations["repos/enable-vulnerability-alerts"]; - /** Disables dependency 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)". */ - delete: operations["repos/disable-vulnerability-alerts"]; - }; - "/repos/{owner}/{repo}/zipball/{ref}": { - /** - * Gets a redirect URL to download a zip archive for a repository. 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. - */ - get: operations["repos/download-zipball-archive"]; - }; - "/repos/{template_owner}/{template_repo}/generate": { - /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.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 - */ - post: operations["repos/create-using-template"]; - }; - "/repositories": { - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. - */ - get: operations["repos/list-public"]; - }; - "/scim/v2/enterprises/{enterprise}/Groups": { - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - get: operations["enterprise-admin/list-provisioned-groups-enterprise"]; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. - */ - post: operations["enterprise-admin/provision-and-invite-enterprise-group"]; - }; - "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": { - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - get: operations["enterprise-admin/get-provisioning-information-for-enterprise-group"]; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. - */ - put: operations["enterprise-admin/set-information-for-provisioned-enterprise-group"]; - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - delete: operations["enterprise-admin/delete-scim-group-from-enterprise"]; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - */ - patch: operations["enterprise-admin/update-attribute-for-enterprise-group"]; - }; - "/scim/v2/enterprises/{enterprise}/Users": { - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. - * - * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. - * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. - * - * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: - * - * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. - * - * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. - * - * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: - * - If the user signs in, their GitHub account is linked to this entry. - * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. - */ - get: operations["enterprise-admin/list-provisioned-identities-enterprise"]; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Provision enterprise membership for a user, and send organization invitation emails to the email address. - * - * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. - */ - post: operations["enterprise-admin/provision-and-invite-enterprise-user"]; - }; - "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": { - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - get: operations["enterprise-admin/get-provisioning-information-for-enterprise-user"]; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. - * - * You must at least provide the required values for the user: `userName`, `name`, and `emails`. - * - * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. - */ - put: operations["enterprise-admin/set-information-for-provisioned-enterprise-user"]; - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - delete: operations["enterprise-admin/delete-user-from-enterprise"]; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - * - * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. - * - * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. - * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` - */ - patch: operations["enterprise-admin/update-attribute-for-enterprise-user"]; - }; - "/scim/v2/organizations/{org}/Users": { - /** - * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. - * - * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. - * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. - * - * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: - * - * 1. The user is granted access by the IdP and is not a member of the GitHub organization. - * - * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. - * - * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: - * - If the user signs in, their GitHub account is linked to this entry. - * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. - */ - get: operations["scim/list-provisioned-identities"]; - /** Provision organization membership for a user, and send an activation email to the email address. */ - post: operations["scim/provision-and-invite-user"]; - }; - "/scim/v2/organizations/{org}/Users/{scim_user_id}": { - get: operations["scim/get-provisioning-information-for-user"]; - /** - * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. - * - * You must at least provide the required values for the user: `userName`, `name`, and `emails`. - * - * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. - */ - put: operations["scim/set-information-for-provisioned-user"]; - delete: operations["scim/delete-user-from-org"]; - /** - * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - * - * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. - * - * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. - * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` - */ - patch: operations["scim/update-attribute-for-user"]; - }; - "/search/code": { - /** - * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: - * - * `q=addClass+in:file+language:js+repo:jquery/jquery` - * - * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. - * - * #### 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. - */ - get: operations["search/code"]; - }; - "/search/commits": { - /** - * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if 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: - * - * `q=repo:octocat/Spoon-Knife+css` - */ - get: operations["search/commits"]; - }; - "/search/issues": { - /** - * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. - * - * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` - * - * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. - * - * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." - */ - get: operations["search/issues-and-pull-requests"]; - }; - "/search/labels": { - /** - * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: - * - * `q=bug+defect+enhancement&repository_id=64778136` - * - * The labels that best match the query appear first in the search results. - */ - get: operations["search/labels"]; - }; - "/search/repositories": { - /** - * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: - * - * `q=tetris+language:assembly&sort=stars&order=desc` - * - * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. - * - * When you include the `mercy` preview header, you can also search for multiple topics by adding more `topic:` instances. For example, your query might look like this: - * - * `q=topic:ruby+topic:rails` - */ - get: operations["search/repos"]; - }; - "/search/topics": { - /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * 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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` - * - * This query searches for topics with the keyword `ruby` and limits 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. - */ - get: operations["search/topics"]; - }; - "/search/users": { - /** - * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you're looking for a list of popular users, you might try this query: - * - * `q=tom+repos:%3E42+followers:%3E1000` - * - * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. - */ - get: operations["search/users"]; - }; - "/teams/{team_id}": { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ - get: operations["teams/get-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. - * - * To delete a team, the authenticated user must be an organization owner or team maintainer. - * - * If you are an organization owner, deleting a parent team will delete all of its child teams as well. - */ - delete: operations["teams/delete-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. - * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. - * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. - */ - patch: operations["teams/update-legacy"]; - }; - "/teams/{team_id}/discussions": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. - * - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations["teams/list-discussions-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. - * - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations["teams/create-discussion-legacy"]; - }; - "/teams/{team_id}/discussions/{discussion_number}": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. - * - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations["teams/get-discussion-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. - * - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - delete: operations["teams/delete-discussion-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - patch: operations["teams/update-discussion-legacy"]; - }; - "/teams/{team_id}/discussions/{discussion_number}/comments": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. - * - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations["teams/list-discussion-comments-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. - * - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations["teams/create-discussion-comment-legacy"]; - }; - "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. - * - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations["teams/get-discussion-comment-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. - * - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - delete: operations["teams/delete-discussion-comment-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. - * - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - patch: operations["teams/update-discussion-comment-legacy"]; - }; - "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - * - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations["reactions/list-for-team-discussion-comment-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. - * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.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. - */ - post: operations["reactions/create-for-team-discussion-comment-legacy"]; - }; - "/teams/{team_id}/discussions/{discussion_number}/reactions": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. - * - * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations["reactions/list-for-team-discussion-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. - * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.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. - */ - post: operations["reactions/create-for-team-discussion-legacy"]; - }; - "/teams/{team_id}/invitations": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. - */ - get: operations["teams/list-pending-invitations-legacy"]; - }; - "/teams/{team_id}/members": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. - * - * Team members will include the members of child teams. - */ - get: operations["teams/list-members-legacy"]; - }; - "/teams/{team_id}/members/{username}": { - /** - * The "Get team member" endpoint (described below) is deprecated. - * - * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. - */ - get: operations["teams/get-member-legacy"]; - /** - * The "Add team member" endpoint (described below) is deprecated. - * - * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - put: operations["teams/add-member-legacy"]; - /** - * The "Remove team member" endpoint (described below) is deprecated. - * - * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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/github/getting-started-with-github/githubs-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/)." - */ - delete: operations["teams/remove-member-legacy"]; - }; - "/teams/{team_id}/memberships/{username}": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. - * - * 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 a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - get: operations["teams/get-membership-for-user-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-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 team maintainer. - * - * **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 team maintainer. - */ - put: operations["teams/add-or-update-membership-for-user-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-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/)." - */ - delete: operations["teams/remove-membership-for-user-legacy"]; - }; - "/teams/{team_id}/projects": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. - * - * Lists the organization projects for a team. - */ - get: operations["teams/list-projects-legacy"]; - }; - "/teams/{team_id}/projects/{project_id}": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. - * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - */ - get: operations["teams/check-permissions-for-project-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. - */ - put: operations["teams/add-or-update-project-permissions-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. - */ - delete: operations["teams/remove-project-legacy"]; - }; - "/teams/{team_id}/repos": { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ - get: operations["teams/list-repos-legacy"]; - }; - "/teams/{team_id}/repos/{owner}/{repo}": { - /** - * **Note**: Repositories inherited through a parent team will also be checked. - * - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. - * - * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - get: operations["teams/check-permissions-for-repo-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. - * - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - put: operations["teams/add-or-update-repo-permissions-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. - */ - delete: operations["teams/remove-repo-legacy"]; - }; - "/teams/{team_id}/team-sync/group-mappings": { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - get: operations["teams/list-idp-groups-for-legacy"]; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - patch: operations["teams/create-or-update-idp-group-connections-legacy"]; - }; - "/teams/{team_id}/teams": { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - get: operations["teams/list-child-legacy"]; - }; - "/user": { - /** - * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. - * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. - */ - get: operations["users/get-authenticated"]; - /** **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. */ - patch: operations["users/update-authenticated"]; - }; - "/user/blocks": { - /** List the users you've blocked on your personal account. */ - get: operations["users/list-blocked-by-authenticated"]; - }; - "/user/blocks/{username}": { - get: operations["users/check-blocked"]; - put: operations["users/block"]; - delete: operations["users/unblock"]; - }; - "/user/email/visibility": { - /** Sets the visibility for your primary email addresses. */ - patch: operations["users/set-primary-email-visibility-for-authenticated"]; - }; - "/user/emails": { - /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ - get: operations["users/list-emails-for-authenticated"]; - /** This endpoint is accessible with the `user` scope. */ - post: operations["users/add-email-for-authenticated"]; - /** This endpoint is accessible with the `user` scope. */ - delete: operations["users/delete-email-for-authenticated"]; - }; - "/user/followers": { - /** Lists the people following the authenticated user. */ - get: operations["users/list-followers-for-authenticated-user"]; - }; - "/user/following": { - /** Lists the people who the authenticated user follows. */ - get: operations["users/list-followed-by-authenticated"]; - }; - "/user/following/{username}": { - get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. - */ - put: operations["users/follow"]; - /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ - delete: operations["users/unfollow"]; - }; - "/user/gpg_keys": { - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - get: operations["users/list-gpg-keys-for-authenticated"]; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - post: operations["users/create-gpg-key-for-authenticated"]; - }; - "/user/gpg_keys/{gpg_key_id}": { - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - get: operations["users/get-gpg-key-for-authenticated"]; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - delete: operations["users/delete-gpg-key-for-authenticated"]; - }; - "/user/installations": { - /** - * 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://docs.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. - */ - get: operations["apps/list-installations-for-authenticated-user"]; - }; - "/user/installations/{installation_id}/repositories": { - /** - * 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://docs.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. - */ - get: operations["apps/list-installation-repos-for-authenticated-user"]; - }; - "/user/installations/{installation_id}/repositories/{repository_id}": { - /** - * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. - */ - put: operations["apps/add-repo-to-installation"]; - /** - * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. - */ - delete: operations["apps/remove-repo-from-installation"]; - }; - "/user/interaction-limits": { - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. If there are no restrictions, you will see an empty response. */ - get: operations["interactions/get-restrictions-for-authenticated-user"]; - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - put: operations["interactions/set-restrictions-for-authenticated-user"]; - /** Removes any interaction restrictions from your public repositories. */ - delete: operations["interactions/remove-restrictions-for-authenticated-user"]; - }; - "/user/issues": { - /** - * List issues across owned and member repositories assigned to the authenticated user. - * - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations["issues/list-for-authenticated-user"]; - }; - "/user/keys": { - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - get: operations["users/list-public-ssh-keys-for-authenticated"]; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - post: operations["users/create-public-ssh-key-for-authenticated"]; - }; - "/user/keys/{key_id}": { - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - get: operations["users/get-public-ssh-key-for-authenticated"]; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - delete: operations["users/delete-public-ssh-key-for-authenticated"]; - }; - "/user/marketplace_purchases": { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations["apps/list-subscriptions-for-authenticated-user"]; - }; - "/user/marketplace_purchases/stubbed": { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; - }; - "/user/memberships/orgs": { - get: operations["orgs/list-memberships-for-authenticated-user"]; - }; - "/user/memberships/orgs/{org}": { - get: operations["orgs/get-membership-for-authenticated-user"]; - patch: operations["orgs/update-membership-for-authenticated-user"]; - }; - "/user/migrations": { - /** Lists all migrations a user has started. */ - get: operations["migrations/list-for-authenticated-user"]; - /** Initiates the generation of a user migration archive. */ - post: operations["migrations/start-for-authenticated-user"]; - }; - "/user/migrations/{migration_id}": { - /** - * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). - */ - get: operations["migrations/get-status-for-authenticated-user"]; - }; - "/user/migrations/{migration_id}/archive": { - /** - * 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. - */ - get: operations["migrations/get-archive-for-authenticated-user"]; - /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ - delete: operations["migrations/delete-archive-for-authenticated-user"]; - }; - "/user/migrations/{migration_id}/repos/{repo_name}/lock": { - /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ - delete: operations["migrations/unlock-repo-for-authenticated-user"]; - }; - "/user/migrations/{migration_id}/repositories": { - /** Lists all the repositories for this user migration. */ - get: operations["migrations/list-repos-for-user"]; - }; - "/user/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. - */ - get: operations["orgs/list-for-authenticated-user"]; - }; - "/user/packages/{package_type}/{package_name}": { - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-package-for-authenticated-user"]; - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations["packages/delete-package-for-authenticated-user"]; - }; - "/user/packages/{package_type}/{package_name}/restore": { - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations["packages/restore-package-for-authenticated-user"]; - }; - "/user/packages/{package_type}/{package_name}/versions": { - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-all-package-versions-for-a-package-owned-by-the-authenticated-user"]; - }; - "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-package-version-for-authenticated-user"]; - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations["packages/delete-package-version-for-authenticated-user"]; - }; - "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations["packages/restore-package-version-for-authenticated-user"]; - }; - "/user/projects": { - post: operations["projects/create-for-authenticated-user"]; - }; - "/user/public_emails": { - /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ - get: operations["users/list-public-emails-for-authenticated"]; - }; - "/user/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. - */ - get: operations["repos/list-for-authenticated-user"]; - /** - * Creates a new repository for the authenticated user. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.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 - */ - post: operations["repos/create-for-authenticated-user"]; - }; - "/user/repository_invitations": { - /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ - get: operations["repos/list-invitations-for-authenticated-user"]; - }; - "/user/repository_invitations/{invitation_id}": { - delete: operations["repos/decline-invitation"]; - patch: operations["repos/accept-invitation"]; - }; - "/user/starred": { - /** - * Lists repositories the authenticated user has starred. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - get: operations["activity/list-repos-starred-by-authenticated-user"]; - }; - "/user/starred/{owner}/{repo}": { - get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - put: operations["activity/star-repo-for-authenticated-user"]; - delete: operations["activity/unstar-repo-for-authenticated-user"]; - }; - "/user/subscriptions": { - /** Lists repositories the authenticated user is watching. */ - get: operations["activity/list-watched-repos-for-authenticated-user"]; - }; - "/user/teams": { - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ - get: operations["teams/list-for-authenticated-user"]; - }; - "/users": { - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. - */ - get: operations["users/list"]; - }; - "/users/{username}": { - /** - * 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://docs.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' below" - * - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". - */ - get: operations["users/get-by-username"]; - }; - "/users/{username}/events": { - /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ - get: operations["activity/list-events-for-authenticated-user"]; - }; - "/users/{username}/events/orgs/{org}": { - /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ - get: operations["activity/list-org-events-for-authenticated-user"]; - }; - "/users/{username}/events/public": { - get: operations["activity/list-public-events-for-user"]; - }; - "/users/{username}/followers": { - /** Lists the people following the specified user. */ - get: operations["users/list-followers-for-user"]; - }; - "/users/{username}/following": { - /** Lists the people who the specified user follows. */ - get: operations["users/list-following-for-user"]; - }; - "/users/{username}/following/{target_user}": { - get: operations["users/check-following-for-user"]; - }; - "/users/{username}/gists": { - /** Lists public gists for the specified user: */ - get: operations["gists/list-for-user"]; - }; - "/users/{username}/gpg_keys": { - /** Lists the GPG keys for a user. This information is accessible by anyone. */ - get: operations["users/list-gpg-keys-for-user"]; - }; - "/users/{username}/hovercard": { - /** - * 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: - * - * ```shell - * curl -u username:token - * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 - * ``` - */ - get: operations["users/get-context-for-user"]; - }; - "/users/{username}/installation": { - /** - * Enables an authenticated GitHub App to find the user’s installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations["apps/get-user-installation"]; - }; - "/users/{username}/keys": { - /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ - get: operations["users/list-public-keys-for-user"]; - }; - "/users/{username}/orgs": { - /** - * 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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. - */ - get: operations["orgs/list-for-user"]; - }; - "/users/{username}/packages/{package_type}/{package_name}": { - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-package-for-user"]; - }; - "/users/{username}/packages/{package_type}/{package_name}/versions": { - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; - }; - "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations["packages/get-package-version-for-user"]; - }; - "/users/{username}/projects": { - get: operations["projects/list-for-user"]; - }; - "/users/{username}/received_events": { - /** 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. */ - get: operations["activity/list-received-events-for-user"]; - }; - "/users/{username}/received_events/public": { - get: operations["activity/list-received-public-events-for-user"]; - }; - "/users/{username}/repos": { - /** Lists public repositories for the specified user. */ - get: operations["repos/list-for-user"]; - }; - "/users/{username}/settings/billing/actions": { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - get: operations["billing/get-github-actions-billing-user"]; - }; - "/users/{username}/settings/billing/packages": { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations["billing/get-github-packages-billing-user"]; - }; - "/users/{username}/settings/billing/shared-storage": { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations["billing/get-shared-storage-billing-user"]; - }; - "/users/{username}/starred": { - /** - * Lists repositories a user has starred. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - get: operations["activity/list-repos-starred-by-user"]; - }; - "/users/{username}/subscriptions": { - /** Lists repositories a user is watching. */ - get: operations["activity/list-repos-watched-by-user"]; - }; - "/zen": { - /** Get a random sentence from the Zen of GitHub */ - get: operations["meta/get-zen"]; - }; -} -export interface components { - schemas: { - /** Simple User */ - "simple-user": { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string | null; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - starred_at?: string; - } | null; - /** GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. */ - integration: { - /** Unique identifier of the GitHub app */ - id: number; - /** The slug name of the GitHub app */ - slug?: string; - node_id: string; - owner: components["schemas"]["simple-user"] | null; - /** The name of the GitHub app */ - name: string; - description: string | null; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - /** The set of permissions for the GitHub app */ - permissions: { - issues?: string; - checks?: string; - metadata?: string; - contents?: string; - deployments?: string; - } & { - [key: string]: string; - }; - /** The list of events for the GitHub app */ - events: string[]; - /** The number of installations associated with the GitHub app */ - installations_count?: number; - client_id?: string; - client_secret?: string; - webhook_secret?: string; - pem?: string; - } & { - [key: string]: any; - }; - /** Basic Error */ - "basic-error": { - message?: string; - documentation_url?: string; - }; - /** Validation Error Simple */ - "validation-error-simple": { - message: string; - documentation_url: string; - errors?: string[]; - }; - /** The URL to which the payloads will be delivered. */ - "webhook-config-url": string; - /** The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ - "webhook-config-content-type": string; - /** If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). */ - "webhook-config-secret": string; - /** Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.** */ - "webhook-config-insecure-ssl": string; - /** Configuration object of the webhook */ - "webhook-config": { - url?: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - }; - /** An enterprise account */ - enterprise: { - /** A short description of the enterprise. */ - description?: string | null; - html_url: string; - /** The enterprise's website URL. */ - website_url?: string | null; - /** Unique identifier of the enterprise */ - id: number; - node_id: string; - /** The name of the enterprise. */ - name: string; - /** The slug url identifier for the enterprise. */ - slug: string; - created_at: string | null; - updated_at: string | null; - avatar_url: string; - }; - /** Installation */ - installation: { - /** The ID of the installation. */ - id: number; - account: (Partial & Partial) | null; - /** Describe whether all repositories have been selected or there's a selection involved */ - repository_selection: "all" | "selected"; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - /** The ID of the user or organization this token is being scoped to. */ - target_id: number; - target_type: string; - permissions: { - deployments?: string; - checks?: string; - metadata?: string; - contents?: string; - pull_requests?: string; - statuses?: string; - issues?: string; - organization_administration?: string; - }; - events: string[]; - created_at: string; - updated_at: string; - single_file_name: string | null; - has_multiple_single_files?: boolean; - single_file_paths?: string[]; - app_slug: string; - suspended_by?: components["schemas"]["simple-user"] | null; - suspended_at?: string | null; - contact_email?: string | null; - }; - /** The permissions granted to the user-to-server access token. */ - "app-permissions": { - /** The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. */ - actions?: "read" | "write"; - /** The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. */ - administration?: "read" | "write"; - /** The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. */ - checks?: "read" | "write"; - /** The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: `read` or `write`. */ - content_references?: "read" | "write"; - /** The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. */ - contents?: "read" | "write"; - /** The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. */ - deployments?: "read" | "write"; - /** The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. */ - environments?: "read" | "write"; - /** The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. */ - issues?: "read" | "write"; - /** The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. */ - metadata?: "read" | "write"; - /** The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. */ - packages?: "read" | "write"; - /** The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. */ - pages?: "read" | "write"; - /** The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. */ - pull_requests?: "read" | "write"; - /** The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. */ - repository_hooks?: "read" | "write"; - /** The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. */ - repository_projects?: "read" | "write" | "admin"; - /** The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. */ - secret_scanning_alerts?: "read" | "write"; - /** The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. */ - secrets?: "read" | "write"; - /** The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. */ - security_events?: "read" | "write"; - /** The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. */ - single_file?: "read" | "write"; - /** The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. */ - statuses?: "read" | "write"; - /** The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: `read`. */ - vulnerability_alerts?: "read"; - /** The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. */ - workflows?: "write"; - /** The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. */ - members?: "read" | "write"; - /** The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. */ - organization_administration?: "read" | "write"; - /** The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. */ - organization_hooks?: "read" | "write"; - /** The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. */ - organization_plan?: "read"; - /** The level of permission to grant the access token to manage organization projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. */ - organization_projects?: "read" | "write" | "admin"; - /** The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. */ - organization_secrets?: "read" | "write"; - /** The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. */ - organization_self_hosted_runners?: "read" | "write"; - /** The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. */ - organization_user_blocking?: "read" | "write"; - /** The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. */ - team_discussions?: "read" | "write"; - }; - /** License Simple */ - "license-simple": { - key: string; - name: string; - url: string | null; - spdx_id: string | null; - node_id: string; - html_url?: string; - }; - /** A git repository */ - repository: { - /** Unique identifier of the repository */ - id: number; - node_id: string; - /** The name of the repository. */ - name: string; - full_name: string; - license: components["schemas"]["license-simple"] | null; - forks: number; - permissions?: { - admin: boolean; - pull: boolean; - triage?: boolean; - push: boolean; - maintain?: boolean; - }; - owner: components["schemas"]["simple-user"] | null; - /** Whether the repository is private or public. */ - private: boolean; - html_url: string; - description: string | null; - 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 | null; - hooks_url: string; - svn_url: string; - homepage: string | null; - language: string | null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - /** The default branch of the repository. */ - default_branch: string; - open_issues_count: number; - /** Whether this repository acts as a template that can be used to generate new repositories. */ - is_template?: boolean; - topics?: string[]; - /** Whether issues are enabled. */ - has_issues: boolean; - /** Whether projects are enabled. */ - has_projects: boolean; - /** Whether the wiki is enabled. */ - has_wiki: boolean; - has_pages: boolean; - /** Whether downloads are enabled. */ - has_downloads: boolean; - /** Whether the repository is archived. */ - archived: boolean; - /** Returns whether or not this repository disabled. */ - disabled: boolean; - /** The repository visibility: public, private, or internal. */ - visibility?: string; - pushed_at: string | null; - created_at: string | null; - updated_at: string | null; - /** Whether to allow rebase merges for pull requests. */ - allow_rebase_merge?: boolean; - template_repository?: { - id?: number; - node_id?: string; - name?: string; - full_name?: string; - owner?: { - login?: string; - id?: number; - node_id?: string; - avatar_url?: string; - gravatar_id?: string; - url?: string; - html_url?: string; - followers_url?: string; - following_url?: string; - gists_url?: string; - starred_url?: string; - subscriptions_url?: string; - organizations_url?: string; - repos_url?: string; - events_url?: string; - received_events_url?: string; - type?: string; - site_admin?: boolean; - }; - 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?: string; - forks_count?: number; - stargazers_count?: number; - watchers_count?: number; - size?: number; - default_branch?: string; - open_issues_count?: number; - is_template?: boolean; - topics?: string[]; - has_issues?: boolean; - has_projects?: boolean; - has_wiki?: boolean; - has_pages?: boolean; - has_downloads?: boolean; - archived?: boolean; - disabled?: boolean; - visibility?: string; - pushed_at?: string; - created_at?: string; - updated_at?: string; - permissions?: { - admin?: boolean; - push?: boolean; - pull?: boolean; - }; - allow_rebase_merge?: boolean; - temp_clone_token?: string; - allow_squash_merge?: boolean; - delete_branch_on_merge?: boolean; - allow_merge_commit?: boolean; - subscribers_count?: number; - network_count?: number; - } | null; - temp_clone_token?: string; - /** Whether to allow squash merges for pull requests. */ - allow_squash_merge?: boolean; - /** Whether to delete head branches when pull requests are merged */ - delete_branch_on_merge?: boolean; - /** Whether to allow merge commits for pull requests. */ - allow_merge_commit?: boolean; - subscribers_count?: number; - network_count?: number; - open_issues: number; - watchers: number; - master_branch?: string; - starred_at?: string; - }; - /** Authentication token for a GitHub App installed on a user or org. */ - "installation-token": { - token: string; - expires_at: string; - permissions?: { - issues?: string; - contents?: string; - metadata?: string; - single_file?: string; - }; - repository_selection?: "all" | "selected"; - repositories?: components["schemas"]["repository"][]; - single_file?: string; - has_multiple_single_files?: boolean; - single_file_paths?: string[]; - }; - /** Validation Error */ - "validation-error": { - message: string; - documentation_url: string; - errors?: { - resource?: string; - field?: string; - message?: string; - code: string; - index?: number; - value?: (string | null) | (number | null) | (string[] | null); - }[]; - }; - /** The authorization associated with an OAuth Access. */ - "application-grant": { - id: number; - url: string; - app: { - client_id: string; - name: string; - url: string; - }; - created_at: string; - updated_at: string; - scopes: string[]; - user?: components["schemas"]["simple-user"] | null; - }; - "scoped-installation": { - permissions: components["schemas"]["app-permissions"]; - /** Describe whether all repositories have been selected or there's a selection involved */ - repository_selection: "all" | "selected"; - single_file_name: string | null; - has_multiple_single_files?: boolean; - single_file_paths?: string[]; - repositories_url: string; - account: components["schemas"]["simple-user"]; - }; - /** The authorization for an OAuth app, GitHub App, or a Personal Access Token. */ - authorization: { - id: number; - url: string; - /** A list of scopes that this authorization is in. */ - scopes: string[] | null; - token: string; - token_last_eight: string | null; - hashed_token: string | null; - app: { - client_id: string; - name: string; - url: string; - }; - note: string | null; - note_url: string | null; - updated_at: string; - created_at: string; - fingerprint: string | null; - user?: components["schemas"]["simple-user"] | null; - installation?: components["schemas"]["scoped-installation"] | null; - }; - /** Code Of Conduct */ - "code-of-conduct": { - key: string; - name: string; - url: string; - body?: string; - html_url: string | null; - }; - /** Content Reference attachments allow you to provide context around URLs posted in comments */ - "content-reference-attachment": { - /** The ID of the attachment */ - id: number; - /** The title of the attachment */ - title: string; - /** The body of the attachment */ - body: string; - /** The node_id of the content attachment */ - node_id?: string; - }; - /** The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */ - "enabled-organizations": "all" | "none" | "selected"; - /** The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. */ - "allowed-actions": "all" | "local_only" | "selected"; - /** The API URL to use to get or set the actions that are allowed to run, when `allowed_actions` is set to `selected`. */ - "selected-actions-url": string; - "actions-enterprise-permissions": { - enabled_organizations: components["schemas"]["enabled-organizations"]; - /** The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. */ - selected_organizations_url?: string; - allowed_actions: components["schemas"]["allowed-actions"]; - selected_actions_url?: components["schemas"]["selected-actions-url"]; - }; - /** Organization Simple */ - "organization-simple": { - 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 | null; - }; - "selected-actions": { - /** Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ - github_owned_allowed: boolean; - /** Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */ - verified_allowed: boolean; - /** Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ - patterns_allowed: string[]; - }; - "runner-groups-enterprise": { - id: number; - name: string; - visibility: string; - default: boolean; - selected_organizations_url?: string; - runners_url: string; - allows_public_repositories: boolean; - }; - /** A self hosted runner */ - runner: { - /** The id of the runner. */ - id: number; - /** The name of the runner. */ - name: string; - /** The Operating System of the runner. */ - os: string; - /** The status of the runner. */ - status: string; - busy: boolean; - labels: { - /** Unique identifier of the label. */ - id?: number; - /** Name of the label. */ - name?: string; - /** The type of label. Read-only labels are applied automatically when the runner is configured. */ - type?: "read-only" | "custom"; - }[]; - }; - /** Runner Application */ - "runner-application": { - os: string; - architecture: string; - download_url: string; - filename: string; - }; - /** Authentication Token */ - "authentication-token": { - /** The token used for authentication */ - token: string; - /** The time this token expires */ - expires_at: string; - permissions?: { - [key: string]: any; - }; - /** The repositories this token has access to */ - repositories?: components["schemas"]["repository"][]; - single_file?: string | null; - /** Describe whether all repositories have been selected or there's a selection involved */ - repository_selection?: "all" | "selected"; - }; - "audit-log-event": { - /** The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ - "@timestamp"?: number; - /** The name of the action that was performed, for example `user.login` or `repo.create`. */ - action?: string; - active?: boolean; - active_was?: boolean; - /** The actor who performed the action. */ - actor?: string; - /** The username of the account being blocked. */ - blocked_user?: string; - business?: string; - config?: any[]; - config_was?: any[]; - content_type?: string; - /** The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ - created_at?: number; - deploy_key_fingerprint?: string; - emoji?: string; - events?: any[]; - events_were?: any[]; - explanation?: string; - fingerprint?: string; - hook_id?: number; - limited_availability?: boolean; - message?: string; - name?: string; - old_user?: string; - openssh_public_key?: string; - org?: string; - previous_visibility?: string; - read_only?: boolean; - /** The name of the repository. */ - repo?: string; - /** The name of the repository. */ - repository?: string; - repository_public?: boolean; - target_login?: string; - team?: string; - /** The type of protocol (for example, HTTP or SSH) used to transfer Git data. */ - transport_protocol?: number; - /** A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. */ - transport_protocol_name?: string; - /** The user that was affected by the action performed (if available). */ - user?: string; - /** The repository visibility, for example `public` or `private`. */ - visibility?: string; - }; - "actions-billing-usage": { - /** The sum of the free and paid GitHub Actions minutes used. */ - total_minutes_used: number; - /** The total paid GitHub Actions minutes used. */ - total_paid_minutes_used: number; - /** The amount of free GitHub Actions minutes available. */ - included_minutes: number; - minutes_used_breakdown: { - /** Total minutes used on Ubuntu runner machines. */ - UBUNTU?: number; - /** Total minutes used on macOS runner machines. */ - MACOS?: number; - /** Total minutes used on Windows runner machines. */ - WINDOWS?: number; - }; - }; - "packages-billing-usage": { - /** Sum of the free and paid storage space (GB) for GitHuub Packages. */ - total_gigabytes_bandwidth_used: number; - /** Total paid storage space (GB) for GitHuub Packages. */ - total_paid_gigabytes_bandwidth_used: number; - /** Free storage space (GB) for GitHub Packages. */ - included_gigabytes_bandwidth: number; - }; - "combined-billing-usage": { - /** Numbers of days left in billing cycle. */ - days_left_in_billing_cycle: number; - /** Estimated storage space (GB) used in billing cycle. */ - estimated_paid_storage_for_month: number; - /** Estimated sum of free and paid storage space (GB) used in billing cycle. */ - estimated_storage_for_month: number; - }; - /** Actor */ - actor: { - id: number; - login: string; - display_login?: string; - gravatar_id: string | null; - url: string; - avatar_url: string; - }; - /** Color-coded labels help you categorize and filter your issues (just like labels in Gmail). */ - label: { - id: number; - node_id: string; - /** URL for the label */ - url: string; - /** The name of the label. */ - name: string; - description: string | null; - /** 6-character hex code, without the leading #, identifying the color */ - color: string; - default: boolean; - }; - /** A collection of related issues and pull requests. */ - milestone: { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - /** The number of the milestone. */ - number: number; - /** The state of the milestone. */ - state: "open" | "closed"; - /** The title of the milestone. */ - title: string; - description: string | null; - creator: components["schemas"]["simple-user"] | null; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string | null; - due_on: string | null; - }; - /** How the author is associated with the repository. */ - author_association: "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MANNEQUIN" | "MEMBER" | "NONE" | "OWNER"; - /** Issue Simple */ - "issue-simple": { - 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: components["schemas"]["simple-user"] | null; - labels: components["schemas"]["label"][]; - assignee: components["schemas"]["simple-user"] | null; - assignees?: components["schemas"]["simple-user"][] | null; - milestone: components["schemas"]["milestone"] | null; - locked: boolean; - active_lock_reason?: string | null; - comments: number; - pull_request?: { - merged_at?: string | null; - diff_url: string | null; - html_url: string | null; - patch_url: string | null; - url: string | null; - }; - closed_at: string | null; - created_at: string; - updated_at: string; - author_association: components["schemas"]["author_association"]; - body_html?: string; - body_text?: string; - timeline_url?: string; - repository?: components["schemas"]["repository"]; - performed_via_github_app?: components["schemas"]["integration"] | null; - }; - "reaction-rollup": { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - eyes: number; - rocket: number; - }; - /** Comments provide a way for people to collaborate on an issue. */ - "issue-comment": { - /** Unique identifier of the issue comment */ - id: number; - node_id: string; - /** URL for the issue comment */ - url: string; - /** Contents of the issue comment */ - body?: string; - body_text?: string; - body_html?: string; - html_url: string; - user: components["schemas"]["simple-user"] | null; - created_at: string; - updated_at: string; - issue_url: string; - author_association: components["schemas"]["author_association"]; - performed_via_github_app?: components["schemas"]["integration"] | null; - reactions?: components["schemas"]["reaction-rollup"]; - }; - /** Event */ - event: { - id: string; - type: string | null; - actor: components["schemas"]["actor"]; - repo: { - id: number; - name: string; - url: string; - }; - org?: components["schemas"]["actor"]; - payload: { - action: string; - issue?: components["schemas"]["issue-simple"]; - comment?: components["schemas"]["issue-comment"]; - pages?: { - page_name?: string; - title?: string; - summary?: string | null; - action?: string; - sha?: string; - html_url?: string; - }[]; - }; - public: boolean; - created_at: string | null; - }; - /** Hypermedia Link with Type */ - "link-with-type": { - href: string; - type: string; - }; - /** Feed */ - feed: { - 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?: string[]; - security_advisories_url?: string; - _links: { - timeline: components["schemas"]["link-with-type"]; - user: components["schemas"]["link-with-type"]; - security_advisories?: components["schemas"]["link-with-type"]; - current_user?: components["schemas"]["link-with-type"]; - current_user_public?: components["schemas"]["link-with-type"]; - current_user_actor?: components["schemas"]["link-with-type"]; - current_user_organization?: components["schemas"]["link-with-type"]; - current_user_organizations?: components["schemas"]["link-with-type"][]; - }; - }; - /** Base Gist */ - "base-gist": { - 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: { - [key: string]: { - filename?: string; - type?: string; - language?: string; - raw_url?: string; - size?: number; - }; - }; - public: boolean; - created_at: string; - updated_at: string; - description: string | null; - comments: number; - user: components["schemas"]["simple-user"] | null; - comments_url: string; - owner?: components["schemas"]["simple-user"] | null; - truncated?: boolean; - forks?: { - [key: string]: any; - }[]; - history?: { - [key: string]: any; - }[]; - }; - /** Gist Simple */ - "gist-simple": { - 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?: { - [key: string]: { - filename?: string; - type?: string; - language?: string; - raw_url?: string; - size?: number; - truncated?: boolean; - content?: string; - } | null; - }; - public?: boolean; - created_at?: string; - updated_at?: string; - description?: string | null; - comments?: number; - user?: string | null; - comments_url?: string; - owner?: components["schemas"]["simple-user"]; - truncated?: boolean; - }; - /** A comment made to a gist. */ - "gist-comment": { - id: number; - node_id: string; - url: string; - /** The comment text. */ - body: string; - user: components["schemas"]["simple-user"] | null; - created_at: string; - updated_at: string; - author_association: components["schemas"]["author_association"]; - }; - /** Gist Commit */ - "gist-commit": { - url: string; - version: string; - user: components["schemas"]["simple-user"] | null; - change_status: { - total?: number; - additions?: number; - deletions?: number; - }; - committed_at: string; - }; - /** Gitignore Template */ - "gitignore-template": { - name: string; - source: string; - }; - /** Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. */ - issue: { - id: number; - node_id: string; - /** URL for the issue */ - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - /** Number uniquely identifying the issue within its repository */ - number: number; - /** State of the issue; either 'open' or 'closed' */ - state: string; - /** Title of the issue */ - title: string; - /** Contents of the issue */ - body?: string; - user: components["schemas"]["simple-user"] | null; - /** Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository */ - labels: (string | { - id?: number; - node_id?: string; - url?: string; - name?: string; - description?: string | null; - color?: string | null; - default?: boolean; - })[]; - assignee: components["schemas"]["simple-user"] | null; - assignees?: components["schemas"]["simple-user"][] | null; - milestone: components["schemas"]["milestone"] | null; - locked: boolean; - active_lock_reason?: string | null; - comments: number; - pull_request?: { - merged_at?: string | null; - diff_url: string | null; - html_url: string | null; - patch_url: string | null; - url: string | null; - }; - closed_at: string | null; - created_at: string; - updated_at: string; - closed_by?: components["schemas"]["simple-user"] | null; - body_html?: string; - body_text?: string; - timeline_url?: string; - repository?: components["schemas"]["repository"]; - performed_via_github_app?: components["schemas"]["integration"] | null; - author_association: components["schemas"]["author_association"]; - reactions?: components["schemas"]["reaction-rollup"]; - }; - /** License */ - license: { - key: string; - name: string; - spdx_id: string | null; - url: string | null; - node_id: string; - html_url: string; - description: string; - implementation: string; - permissions: string[]; - conditions: string[]; - limitations: string[]; - body: string; - featured: boolean; - }; - /** Marketplace Listing Plan */ - "marketplace-listing-plan": { - 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: string | null; - state: string; - bullets: string[]; - }; - /** Marketplace Purchase */ - "marketplace-purchase": { - url: string; - type: string; - id: number; - login: string; - organization_billing_email?: string; - marketplace_pending_change?: { - is_installed?: boolean; - effective_date?: string; - unit_count?: number | null; - id?: number; - plan?: components["schemas"]["marketplace-listing-plan"]; - } | null; - marketplace_purchase: { - billing_cycle?: string; - next_billing_date?: string | null; - is_installed?: boolean; - unit_count?: number | null; - on_free_trial?: boolean; - free_trial_ends_on?: string | null; - updated_at?: string; - plan?: components["schemas"]["marketplace-listing-plan"]; - }; - }; - /** Api Overview */ - "api-overview": { - verifiable_password_authentication: boolean; - ssh_key_fingerprints?: { - SHA256_RSA?: string; - SHA256_DSA?: string; - }; - hooks?: string[]; - web?: string[]; - api?: string[]; - git?: string[]; - pages?: string[]; - importer?: string[]; - actions?: string[]; - }; - /** Minimal Repository */ - "minimal-repository": { - id: number; - node_id: string; - name: string; - full_name: string; - owner: components["schemas"]["simple-user"] | null; - private: boolean; - html_url: string; - description: string | null; - 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 | null; - hooks_url: string; - svn_url?: string; - homepage?: string | null; - language?: string | null; - forks_count?: number; - stargazers_count?: number; - watchers_count?: number; - size?: number; - default_branch?: string; - open_issues_count?: number; - is_template?: boolean; - topics?: string[]; - has_issues?: boolean; - has_projects?: boolean; - has_wiki?: boolean; - has_pages?: boolean; - has_downloads?: boolean; - archived?: boolean; - disabled?: boolean; - visibility?: string; - pushed_at?: string | null; - created_at?: string | null; - updated_at?: string | null; - permissions?: { - admin?: boolean; - push?: boolean; - pull?: boolean; - }; - template_repository?: components["schemas"]["repository"] | null; - temp_clone_token?: string; - delete_branch_on_merge?: boolean; - subscribers_count?: number; - network_count?: number; - license?: { - key?: string; - name?: string; - spdx_id?: string; - url?: string; - node_id?: string; - } | null; - forks?: number; - open_issues?: number; - watchers?: number; - }; - /** Thread */ - thread: { - id: string; - repository: components["schemas"]["minimal-repository"]; - subject: { - title: string; - url: string; - latest_comment_url: string; - type: string; - }; - reason: string; - unread: boolean; - updated_at: string; - last_read_at: string | null; - url: string; - subscription_url: string; - }; - /** Thread Subscription */ - "thread-subscription": { - subscribed: boolean; - ignored: boolean; - reason: string | null; - created_at: string | null; - url: string; - thread_url?: string; - repository_url?: string; - }; - /** Organization Full */ - "organization-full": { - 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 | null; - name?: string; - company?: string; - blog?: string; - location?: string; - email?: string; - twitter_username?: string | null; - 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 | null; - disk_usage?: number | null; - collaborators?: number | null; - billing_email?: string | null; - plan?: { - name: string; - space: number; - private_repos: number; - filled_seats?: number; - seats?: number; - }; - default_repository_permission?: string | null; - members_can_create_repositories?: boolean | null; - two_factor_requirement_enabled?: boolean | null; - members_allowed_repository_creation_type?: string; - members_can_create_public_repositories?: boolean; - members_can_create_private_repositories?: boolean; - members_can_create_internal_repositories?: boolean; - members_can_create_pages?: boolean; - updated_at: string; - }; - /** The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */ - "enabled-repositories": "all" | "none" | "selected"; - "actions-organization-permissions": { - enabled_repositories: components["schemas"]["enabled-repositories"]; - /** The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ - selected_repositories_url?: string; - allowed_actions: components["schemas"]["allowed-actions"]; - selected_actions_url?: components["schemas"]["selected-actions-url"]; - }; - "runner-groups-org": { - id: number; - name: string; - visibility: string; - default: boolean; - /** Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ - selected_repositories_url?: string; - runners_url: string; - inherited: boolean; - inherited_allows_public_repositories?: boolean; - allows_public_repositories: boolean; - }; - /** Secrets for GitHub Actions for an organization. */ - "organization-actions-secret": { - /** The name of the secret. */ - name: string; - created_at: string; - updated_at: string; - /** Visibility of a secret */ - visibility: "all" | "private" | "selected"; - selected_repositories_url?: string; - }; - /** The public key used for setting Actions Secrets. */ - "actions-public-key": { - /** The identifier for the key. */ - key_id: string; - /** The Base64 encoded public key. */ - key: string; - id?: number; - url?: string; - title?: string; - created_at?: string; - }; - /** Credential Authorization */ - "credential-authorization": { - /** User login that owns the underlying credential. */ - login: string; - /** Unique identifier for the credential. */ - credential_id: number; - /** Human-readable description of the credential type. */ - credential_type: string; - /** Last eight characters of the credential. Only included in responses with credential_type of personal access token. */ - token_last_eight?: string; - /** Date when the credential was authorized for use. */ - credential_authorized_at: string; - /** List of oauth scopes the token has been granted. */ - scopes?: string[]; - /** Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. */ - fingerprint?: string; - /** Date when the credential was last accessed. May be null if it was never accessed */ - credential_accessed_at?: string | null; - authorized_credential_id?: number | null; - /** The title given to the ssh key. This will only be present when the credential is an ssh key. */ - authorized_credential_title?: string | null; - /** The note given to the token. This will only be present when the credential is a token. */ - authorized_credential_note?: string | null; - }; - /** Organization Invitation */ - "organization-invitation": { - id: number; - login: string | null; - email: string | null; - role: string; - created_at: string; - failed_at?: string; - failed_reason?: string; - inviter: components["schemas"]["simple-user"]; - team_count: number; - invitation_team_url: string; - node_id: string; - invitation_teams_url?: string; - }; - /** Org Hook */ - "org-hook": { - id: number; - url: string; - ping_url: string; - name: string; - events: string[]; - active: boolean; - config: { - url?: string; - insecure_ssl?: string; - content_type?: string; - secret?: string; - }; - updated_at: string; - created_at: string; - type: string; - }; - /** The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. */ - "interaction-group": "existing_users" | "contributors_only" | "collaborators_only"; - /** Interaction limit settings. */ - "interaction-limit-response": { - limit: components["schemas"]["interaction-group"]; - origin: string; - expires_at: string; - }; - /** The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. */ - "interaction-expiry": "one_day" | "three_days" | "one_week" | "one_month" | "six_months"; - /** Limit interactions to a specific type of user for a specified duration */ - "interaction-limit": { - limit: components["schemas"]["interaction-group"]; - expiry?: components["schemas"]["interaction-expiry"]; - }; - /** Groups of organization members that gives permissions on specified repositories. */ - "team-simple": { - /** Unique identifier of the team */ - id: number; - node_id: string; - /** URL for the team */ - url: string; - members_url: string; - /** Name of the team */ - name: string; - /** Description of the team */ - description: string | null; - /** Permission that the team will have for its repositories */ - permission: string; - /** The level of privacy this team should have */ - privacy?: string; - html_url: string; - repositories_url: string; - slug: string; - /** Distinguished Name (DN) that team maps to within LDAP environment */ - ldap_dn?: string; - } | null; - /** Groups of organization members that gives permissions on specified repositories. */ - team: { - id: number; - node_id: string; - name: string; - slug: string; - description: string | null; - privacy?: string; - permission: string; - url: string; - html_url: string; - members_url: string; - repositories_url: string; - parent?: components["schemas"]["team-simple"] | null; - }; - /** Org Membership */ - "org-membership": { - url: string; - state: string; - role: string; - organization_url: string; - organization: components["schemas"]["organization-simple"]; - user: components["schemas"]["simple-user"] | null; - permissions?: { - can_create_repository: boolean; - }; - }; - /** A migration. */ - migration: { - id: number; - owner: components["schemas"]["simple-user"] | null; - guid: string; - state: string; - lock_repositories: boolean; - exclude_attachments: boolean; - repositories: components["schemas"]["repository"][]; - url: string; - created_at: string; - updated_at: string; - node_id: string; - archive_url?: string; - exclude?: { - [key: string]: any; - }[]; - }; - /** A software package */ - package: { - /** Unique identifier of the package. */ - id: number; - /** The name of the package. */ - name: string; - package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; - url: string; - html_url: string; - /** The number of versions of the package. */ - version_count: number; - visibility: "private" | "public"; - owner?: components["schemas"]["simple-user"] | null; - repository?: components["schemas"]["minimal-repository"] | null; - created_at: string; - updated_at: string; - }; - /** A version of a software package */ - "package-version": { - /** Unique identifier of the package version. */ - id: number; - /** The name of the package version. */ - name: string; - url: string; - package_html_url: string; - html_url?: string; - license?: string; - description?: string; - created_at: string; - updated_at: string; - deleted_at?: string; - metadata?: { - package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; - container?: { - tags: any[]; - }; - docker?: { - tag?: any[]; - }; - }; - }; - /** Projects are a way to organize columns and cards of work. */ - project: { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - /** Name of the project */ - name: string; - /** Body of the project */ - body: string | null; - number: number; - /** State of the project; either 'open' or 'closed' */ - state: string; - creator: components["schemas"]["simple-user"] | null; - created_at: string; - updated_at: string; - /** The baseline permission that all organization members have on this project. Only present if owner is an organization. */ - organization_permission?: "read" | "write" | "admin" | "none"; - /** Whether or not this project can be seen by everyone. Only present if owner is an organization. */ - private?: boolean; - }; - /** External Groups to be mapped to a team for membership */ - "group-mapping": { - /** Array of groups to be mapped to this team */ - groups?: { - /** The ID of the group */ - group_id: string; - /** The name of the group */ - group_name: string; - /** a description of the group */ - group_description: string; - /** synchronization status for this group mapping */ - status?: string; - /** the time of the last sync for this group-mapping */ - synced_at?: string; - }[]; - }; - /** Groups of organization members that gives permissions on specified repositories. */ - "team-full": { - /** Unique identifier of the team */ - id: number; - node_id: string; - /** URL for the team */ - url: string; - html_url: string; - /** Name of the team */ - name: string; - slug: string; - description: string | null; - /** The level of privacy this team should have */ - privacy?: "closed" | "secret"; - /** Permission that the team will have for its repositories */ - permission: string; - members_url: string; - repositories_url: string; - parent?: components["schemas"]["team-simple"] | null; - members_count: number; - repos_count: number; - created_at: string; - updated_at: string; - organization: components["schemas"]["organization-full"]; - /** Distinguished Name (DN) that team maps to within LDAP environment */ - ldap_dn?: string; - }; - /** A team discussion is a persistent record of a free-form conversation within a team. */ - "team-discussion": { - author: components["schemas"]["simple-user"] | null; - /** The main text of the discussion. */ - body: string; - body_html: string; - /** The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. */ - body_version: string; - comments_count: number; - comments_url: string; - created_at: string; - last_edited_at: string | null; - html_url: string; - node_id: string; - /** The unique sequence number of a team discussion. */ - number: number; - /** Whether or not this discussion should be pinned for easy retrieval. */ - pinned: boolean; - /** Whether or not this discussion should be restricted to team members and organization administrators. */ - private: boolean; - team_url: string; - /** The title of the discussion. */ - title: string; - updated_at: string; - url: string; - reactions?: components["schemas"]["reaction-rollup"]; - }; - /** A reply to a discussion within a team. */ - "team-discussion-comment": { - author: components["schemas"]["simple-user"] | null; - /** The main text of the comment. */ - body: string; - body_html: string; - /** The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. */ - body_version: string; - created_at: string; - last_edited_at: string | null; - discussion_url: string; - html_url: string; - node_id: string; - /** The unique sequence number of a team discussion comment. */ - number: number; - updated_at: string; - url: string; - reactions?: components["schemas"]["reaction-rollup"]; - }; - /** Reactions to conversations provide a way to help people express their feelings more simply and effectively. */ - reaction: { - id: number; - node_id: string; - user: components["schemas"]["simple-user"] | null; - /** The reaction to use */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - created_at: string; - }; - /** Team Membership */ - "team-membership": { - url: string; - /** The role of the user in the team. */ - role: "member" | "maintainer"; - state: string; - }; - /** A team's access to a project. */ - "team-project": { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string | null; - number: number; - state: string; - creator: components["schemas"]["simple-user"]; - created_at: string; - updated_at: string; - /** The organization permission for this project. Only present when owner is an organization. */ - organization_permission?: string; - /** Whether the project is private or not. Only present when owner is an organization. */ - private?: boolean; - permissions: { - read: boolean; - write: boolean; - admin: boolean; - }; - }; - /** A team's access to a repository. */ - "team-repository": { - /** Unique identifier of the repository */ - id: number; - node_id: string; - /** The name of the repository. */ - name: string; - full_name: string; - license: components["schemas"]["license-simple"] | null; - forks: number; - permissions?: { - admin: boolean; - pull: boolean; - triage?: boolean; - push: boolean; - maintain?: boolean; - }; - owner: components["schemas"]["simple-user"] | null; - /** Whether the repository is private or public. */ - private: boolean; - html_url: string; - description: string | null; - 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 | null; - hooks_url: string; - svn_url: string; - homepage: string | null; - language: string | null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - /** The default branch of the repository. */ - default_branch: string; - open_issues_count: number; - /** Whether this repository acts as a template that can be used to generate new repositories. */ - is_template?: boolean; - topics?: string[]; - /** Whether issues are enabled. */ - has_issues: boolean; - /** Whether projects are enabled. */ - has_projects: boolean; - /** Whether the wiki is enabled. */ - has_wiki: boolean; - has_pages: boolean; - /** Whether downloads are enabled. */ - has_downloads: boolean; - /** Whether the repository is archived. */ - archived: boolean; - /** Returns whether or not this repository disabled. */ - disabled: boolean; - /** The repository visibility: public, private, or internal. */ - visibility?: string; - pushed_at: string | null; - created_at: string | null; - updated_at: string | null; - /** Whether to allow rebase merges for pull requests. */ - allow_rebase_merge?: boolean; - template_repository?: components["schemas"]["repository"] | null; - temp_clone_token?: string; - /** Whether to allow squash merges for pull requests. */ - allow_squash_merge?: boolean; - /** Whether to delete head branches when pull requests are merged */ - delete_branch_on_merge?: boolean; - /** Whether to allow merge commits for pull requests. */ - allow_merge_commit?: boolean; - subscribers_count?: number; - network_count?: number; - open_issues: number; - watchers: number; - master_branch?: string; - }; - /** Project cards represent a scope of work. */ - "project-card": { - url: string; - /** The project card's ID */ - id: number; - node_id: string; - note: string | null; - creator: components["schemas"]["simple-user"] | null; - created_at: string; - updated_at: string; - /** Whether or not the card is archived */ - archived?: boolean; - column_url: string; - content_url?: string; - project_url: string; - }; - /** Project columns contain cards of work. */ - "project-column": { - url: string; - project_url: string; - cards_url: string; - /** The unique identifier of the project column */ - id: number; - node_id: string; - /** Name of the project column */ - name: string; - created_at: string; - updated_at: string; - }; - /** Repository Collaborator Permission */ - "repository-collaborator-permission": { - permission: string; - user: components["schemas"]["simple-user"] | null; - }; - "rate-limit": { - limit: number; - remaining: number; - reset: number; - }; - /** Rate Limit Overview */ - "rate-limit-overview": { - resources: { - core: components["schemas"]["rate-limit"]; - graphql?: components["schemas"]["rate-limit"]; - search: components["schemas"]["rate-limit"]; - source_import?: components["schemas"]["rate-limit"]; - integration_manifest?: components["schemas"]["rate-limit"]; - code_scanning_upload?: components["schemas"]["rate-limit"]; - }; - rate: components["schemas"]["rate-limit"]; - }; - /** Code of Conduct Simple */ - "code-of-conduct-simple": { - url: string; - key: string; - name: string; - html_url: string | null; - }; - /** Full Repository */ - "full-repository": { - id: number; - node_id: string; - name: string; - full_name: string; - owner: components["schemas"]["simple-user"] | null; - private: boolean; - html_url: string; - description: string | null; - 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 | null; - hooks_url: string; - svn_url: string; - homepage: string | null; - language: string | null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template?: boolean; - topics?: string[]; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - /** Returns whether or not this repository disabled. */ - disabled: boolean; - /** The repository visibility: public, private, or internal. */ - visibility?: string; - pushed_at: string; - created_at: string; - updated_at: string; - permissions?: { - admin: boolean; - pull: boolean; - push: boolean; - }; - allow_rebase_merge?: boolean; - template_repository?: components["schemas"]["repository"] | null; - temp_clone_token?: string | null; - allow_squash_merge?: boolean; - delete_branch_on_merge?: boolean; - allow_merge_commit?: boolean; - subscribers_count: number; - network_count: number; - license: components["schemas"]["license-simple"] | null; - organization?: components["schemas"]["simple-user"] | null; - parent?: components["schemas"]["repository"]; - source?: components["schemas"]["repository"]; - forks: number; - master_branch?: string; - open_issues: number; - watchers: number; - /** Whether anonymous git access is allowed. */ - anonymous_access_enabled?: boolean; - code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; - }; - /** An artifact */ - artifact: { - id: number; - node_id: string; - /** The name of the artifact. */ - name: string; - /** The size in bytes of the artifact. */ - size_in_bytes: number; - url: string; - archive_download_url: string; - /** Whether or not the artifact has expired. */ - expired: boolean; - created_at: string | null; - expires_at: string; - updated_at: string | null; - }; - /** Information of a job execution in a workflow run */ - job: { - /** The id of the job. */ - id: number; - /** The id of the associated workflow run. */ - run_id: number; - run_url: string; - node_id: string; - /** The SHA of the commit that is being run. */ - head_sha: string; - url: string; - html_url: string | null; - /** The phase of the lifecycle that the job is currently in. */ - status: "queued" | "in_progress" | "completed"; - /** The outcome of the job. */ - conclusion: string | null; - /** The time that the job started, in ISO 8601 format. */ - started_at: string; - /** The time that the job finished, in ISO 8601 format. */ - completed_at: string | null; - /** The name of the job. */ - name: string; - /** Steps in this job. */ - steps?: { - /** The phase of the lifecycle that the job is currently in. */ - status: "queued" | "in_progress" | "completed"; - /** The outcome of the job. */ - conclusion: string | null; - /** The name of the job. */ - name: string; - number: number; - /** The time that the step started, in ISO 8601 format. */ - started_at?: string | null; - /** The time that the job finished, in ISO 8601 format. */ - completed_at?: string | null; - }[]; - check_run_url: string; - }; - /** Whether GitHub Actions is enabled on the repository. */ - "actions-enabled": boolean; - "actions-repository-permissions": { - enabled: components["schemas"]["actions-enabled"]; - allowed_actions: components["schemas"]["allowed-actions"]; - selected_actions_url?: components["schemas"]["selected-actions-url"]; - }; - "pull-request-minimal": { - id: number; - number: number; - url: string; - head: { - ref: string; - sha: string; - repo: { - id: number; - url: string; - name: string; - }; - }; - base: { - ref: string; - sha: string; - repo: { - id: number; - url: string; - name: string; - }; - }; - }; - /** Simple Commit */ - "simple-commit": { - id: string; - tree_id: string; - message: string; - timestamp: string; - author: { - name: string; - email: string; - } | null; - committer: { - name: string; - email: string; - } | null; - }; - /** An invocation of a workflow */ - "workflow-run": { - /** The ID of the workflow run. */ - id: number; - /** The name of the workflow run. */ - name?: string; - node_id: string; - head_branch: string | null; - /** The SHA of the head commit that points to the version of the worflow being run. */ - head_sha: string; - /** The auto incrementing run number for the workflow run. */ - run_number: number; - event: string; - status: string | null; - conclusion: string | null; - /** The ID of the parent workflow. */ - workflow_id: number; - /** The URL to the workflow run. */ - url: string; - html_url: string; - pull_requests: components["schemas"]["pull-request-minimal"][] | null; - created_at: string; - updated_at: string; - /** The URL to the jobs for the workflow run. */ - jobs_url: string; - /** The URL to download the logs for the workflow run. */ - logs_url: string; - /** The URL to the associated check suite. */ - check_suite_url: string; - /** The URL to the artifacts for the workflow run. */ - artifacts_url: string; - /** The URL to cancel the workflow run. */ - cancel_url: string; - /** The URL to rerun the workflow run. */ - rerun_url: string; - /** The URL to the workflow. */ - workflow_url: string; - head_commit: components["schemas"]["simple-commit"]; - repository: components["schemas"]["minimal-repository"]; - head_repository: components["schemas"]["minimal-repository"]; - head_repository_id?: number; - }; - /** Workflow Run Usage */ - "workflow-run-usage": { - billable: { - UBUNTU?: { - total_ms: number; - jobs: number; - }; - MACOS?: { - total_ms: number; - jobs: number; - }; - WINDOWS?: { - total_ms: number; - jobs: number; - }; - }; - run_duration_ms: number; - }; - /** Set secrets for GitHub Actions. */ - "actions-secret": { - /** The name of the secret. */ - name: string; - created_at: string; - updated_at: string; - }; - /** A GitHub Actions workflow */ - workflow: { - id: number; - node_id: string; - name: string; - path: string; - state: "active" | "deleted"; - created_at: string; - updated_at: string; - url: string; - html_url: string; - badge_url: string; - deleted_at?: string; - }; - /** Workflow Usage */ - "workflow-usage": { - billable: { - UBUNTU?: { - total_ms?: number; - }; - MACOS?: { - total_ms?: number; - }; - WINDOWS?: { - total_ms?: number; - }; - }; - }; - /** Protected Branch Admin Enforced */ - "protected-branch-admin-enforced": { - url: string; - enabled: boolean; - }; - /** Protected Branch Pull Request Review */ - "protected-branch-pull-request-review": { - url?: string; - dismissal_restrictions?: { - /** The list of users with review dismissal access. */ - users?: components["schemas"]["simple-user"][]; - /** The list of teams with review dismissal access. */ - teams?: components["schemas"]["team"][]; - url?: string; - users_url?: string; - teams_url?: string; - }; - dismiss_stale_reviews: boolean; - require_code_owner_reviews: boolean; - required_approving_review_count?: number; - }; - /** Branch Restriction Policy */ - "branch-restriction-policy": { - url: string; - users_url: string; - teams_url: string; - apps_url: string; - users: { - login?: string; - id?: number; - node_id?: string; - avatar_url?: string; - gravatar_id?: string; - url?: string; - html_url?: string; - followers_url?: string; - following_url?: string; - gists_url?: string; - starred_url?: string; - subscriptions_url?: string; - organizations_url?: string; - repos_url?: string; - events_url?: string; - received_events_url?: string; - type?: string; - site_admin?: boolean; - }[]; - teams: { - id?: number; - node_id?: string; - url?: string; - html_url?: string; - name?: string; - slug?: string; - description?: string | null; - privacy?: string; - permission?: string; - members_url?: string; - repositories_url?: string; - parent?: string | null; - }[]; - apps: { - id?: number; - slug?: string; - node_id?: string; - owner?: { - 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; - }; - name?: string; - description?: string; - external_url?: string; - html_url?: string; - created_at?: string; - updated_at?: string; - permissions?: { - metadata?: string; - contents?: string; - issues?: string; - single_file?: string; - }; - events?: string[]; - }[]; - }; - /** Branch Protection */ - "branch-protection": { - url?: string; - required_status_checks: { - url?: string; - enforcement_level: string; - contexts: string[]; - contexts_url?: string; - }; - enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; - required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; - restrictions?: components["schemas"]["branch-restriction-policy"]; - required_linear_history?: { - enabled?: boolean; - }; - allow_force_pushes?: { - enabled?: boolean; - }; - allow_deletions?: { - enabled?: boolean; - }; - enabled: boolean; - name?: string; - protection_url?: string; - }; - /** Short Branch */ - "short-branch": { - name: string; - commit: { - sha: string; - url: string; - }; - protected: boolean; - protection?: components["schemas"]["branch-protection"]; - protection_url?: string; - }; - /** Metaproperties for Git author/committer information. */ - "git-user": { - name?: string; - email?: string; - date?: string; - }; - verification: { - verified: boolean; - reason: string; - payload: string | null; - signature: string | null; - }; - /** Commit */ - commit: { - url: string; - sha: string; - node_id: string; - html_url: string; - comments_url: string; - commit: { - url: string; - author: components["schemas"]["git-user"] | null; - committer: components["schemas"]["git-user"] | null; - message: string; - comment_count: number; - tree: { - sha: string; - url: string; - }; - verification?: components["schemas"]["verification"]; - }; - author: components["schemas"]["simple-user"] | null; - committer: components["schemas"]["simple-user"] | null; - parents: { - sha: string; - url: string; - html_url?: string; - }[]; - stats?: { - additions?: number; - deletions?: number; - total?: number; - }; - files?: { - filename?: string; - additions?: number; - deletions?: number; - changes?: number; - status?: string; - raw_url?: string; - blob_url?: string; - patch?: string; - sha?: string; - contents_url?: string; - previous_filename?: string; - }[]; - }; - /** Branch With Protection */ - "branch-with-protection": { - name: string; - commit: components["schemas"]["commit"]; - _links: { - html: string; - self: string; - }; - protected: boolean; - protection: components["schemas"]["branch-protection"]; - protection_url: string; - pattern?: string; - required_approving_review_count?: number; - }; - /** Status Check Policy */ - "status-check-policy": { - url: string; - strict: boolean; - contexts: string[]; - contexts_url: string; - }; - /** Branch protections protect branches */ - "protected-branch": { - url: string; - required_status_checks?: components["schemas"]["status-check-policy"]; - required_pull_request_reviews?: { - url: string; - dismiss_stale_reviews?: boolean; - require_code_owner_reviews?: boolean; - required_approving_review_count?: number; - dismissal_restrictions?: { - url: string; - users_url: string; - teams_url: string; - users: components["schemas"]["simple-user"][]; - teams: components["schemas"]["team"][]; - }; - }; - required_signatures?: { - url: string; - enabled: boolean; - }; - enforce_admins?: { - url: string; - enabled: boolean; - }; - required_linear_history?: { - enabled: boolean; - }; - allow_force_pushes?: { - enabled: boolean; - }; - allow_deletions?: { - enabled: boolean; - }; - restrictions?: components["schemas"]["branch-restriction-policy"]; - }; - /** A check performed on the code of a given code change */ - "check-run": { - /** The id of the check. */ - id: number; - /** The SHA of the commit that is being checked. */ - head_sha: string; - node_id: string; - external_id: string | null; - url: string; - html_url: string | null; - details_url: string | null; - /** The phase of the lifecycle that the check is currently in. */ - status: "queued" | "in_progress" | "completed"; - conclusion: ("success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required") | null; - started_at: string | null; - completed_at: string | null; - output: { - title: string | null; - summary: string | null; - text: string | null; - annotations_count: number; - annotations_url: string; - }; - /** The name of the check. */ - name: string; - check_suite: { - id: number; - } | null; - app: components["schemas"]["integration"] | null; - pull_requests: components["schemas"]["pull-request-minimal"][]; - }; - /** Check Annotation */ - "check-annotation": { - path: string; - start_line: number; - end_line: number; - start_column: number | null; - end_column: number | null; - annotation_level: string | null; - title: string | null; - message: string | null; - raw_details: string | null; - blob_href: string; - }; - /** A suite of checks performed on the code of a given code change */ - "check-suite": { - id: number; - node_id: string; - head_branch: string | null; - /** The SHA of the head commit that is being checked. */ - head_sha: string; - status: ("queued" | "in_progress" | "completed") | null; - conclusion: ("success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required") | null; - url: string | null; - before: string | null; - after: string | null; - pull_requests: components["schemas"]["pull-request-minimal"][] | null; - app: components["schemas"]["integration"] | null; - repository: components["schemas"]["minimal-repository"]; - created_at: string | null; - updated_at: string | null; - head_commit: components["schemas"]["simple-commit"]; - latest_check_runs_count: number; - check_runs_url: string; - }; - /** Check suite configuration preferences for a repository. */ - "check-suite-preference": { - preferences: { - auto_trigger_checks?: { - app_id: number; - setting: boolean; - }[]; - }; - repository: components["schemas"]["repository"]; - }; - /** The name of the tool used to generate the code scanning analysis. */ - "code-scanning-analysis-tool-name": string; - /** The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ - "code-scanning-analysis-tool-guid": string | null; - /** The full Git reference, formatted as `refs/heads/`. */ - "code-scanning-ref": string; - /** State of a code scanning alert. */ - "code-scanning-alert-state": "open" | "dismissed" | "fixed"; - /** The security alert number. */ - "alert-number": number; - /** The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - "alert-created-at": string; - /** The REST API URL of the alert resource. */ - "alert-url": string; - /** The GitHub URL of the alert resource. */ - "alert-html-url": string; - /** The REST API URL for fetching the list of instances for an alert. */ - "alert-instances-url": string; - /** The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - "code-scanning-alert-dismissed-at": string | null; - /** **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ - "code-scanning-alert-dismissed-reason": string | null; - "code-scanning-alert-rule-summary": { - /** A unique identifier for the rule used to detect the alert. */ - id?: string | null; - /** The name of the rule used to detect the alert. */ - name?: string; - /** The severity of the alert. */ - severity?: ("none" | "note" | "warning" | "error") | null; - /** A short description of the rule used to detect the alert. */ - description?: string; - }; - /** The version of the tool used to generate the code scanning analysis. */ - "code-scanning-analysis-tool-version": string | null; - "code-scanning-analysis-tool": { - name?: components["schemas"]["code-scanning-analysis-tool-name"]; - version?: components["schemas"]["code-scanning-analysis-tool-version"]; - guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; - }; - /** Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ - "code-scanning-analysis-analysis-key": string; - /** Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ - "code-scanning-alert-environment": string; - /** Describe a region within a file for the alert. */ - "code-scanning-alert-location": { - path?: string; - start_line?: number; - end_line?: number; - start_column?: number; - end_column?: number; - }; - /** A classification of the file. For example to identify it as generated. */ - "code-scanning-alert-classification": ("source" | "generated" | "test" | "library") | null; - "code-scanning-alert-instance": { - ref?: components["schemas"]["code-scanning-ref"]; - analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; - environment?: components["schemas"]["code-scanning-alert-environment"]; - state?: components["schemas"]["code-scanning-alert-state"]; - commit_sha?: string; - message?: { - text?: string; - }; - location?: components["schemas"]["code-scanning-alert-location"]; - html_url?: string; - /** - * Classifications that have been applied to the file that triggered the alert. - * For example identifying it as documentation, or a generated file. - */ - classifications?: components["schemas"]["code-scanning-alert-classification"][]; - }; - "code-scanning-alert-items": { - number: components["schemas"]["alert-number"]; - created_at: components["schemas"]["alert-created-at"]; - url: components["schemas"]["alert-url"]; - html_url: components["schemas"]["alert-html-url"]; - instances_url: components["schemas"]["alert-instances-url"]; - state: components["schemas"]["code-scanning-alert-state"]; - dismissed_by: components["schemas"]["simple-user"]; - dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; - dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; - rule: components["schemas"]["code-scanning-alert-rule-summary"]; - tool: components["schemas"]["code-scanning-analysis-tool"]; - most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; - }; - "code-scanning-alert-rule": { - /** A unique identifier for the rule used to detect the alert. */ - id?: string | null; - /** The name of the rule used to detect the alert. */ - name?: string; - /** The severity of the alert. */ - severity?: ("none" | "note" | "warning" | "error") | null; - /** A short description of the rule used to detect the alert. */ - description?: string; - /** description of the rule used to detect the alert. */ - full_description?: string; - /** A set of tags applicable for the rule. */ - tags?: string[]; - /** Detailed documentation for the rule as GitHub Flavored Markdown. */ - help?: string; - }; - "code-scanning-alert": { - number: components["schemas"]["alert-number"]; - created_at: components["schemas"]["alert-created-at"]; - url: components["schemas"]["alert-url"]; - html_url: components["schemas"]["alert-html-url"]; - instances_url: components["schemas"]["alert-instances-url"]; - state: components["schemas"]["code-scanning-alert-state"]; - dismissed_by: components["schemas"]["simple-user"]; - dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; - dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; - rule: components["schemas"]["code-scanning-alert-rule"]; - tool: components["schemas"]["code-scanning-analysis-tool"]; - most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; - }; - /** Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. */ - "code-scanning-alert-set-state": "open" | "dismissed"; - /** An identifier for the upload. */ - "code-scanning-analysis-sarif-id": string; - /** The SHA of the commit to which the analysis you are uploading relates. */ - "code-scanning-analysis-commit-sha": string; - /** Identifies the variable values associated with the environment in which this analysis was performed. */ - "code-scanning-analysis-environment": string; - /** The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - "code-scanning-analysis-created-at": string; - /** The REST API URL of the analysis resource. */ - "code-scanning-analysis-url": string; - "code-scanning-analysis": { - ref: components["schemas"]["code-scanning-ref"]; - commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; - analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; - environment: components["schemas"]["code-scanning-analysis-environment"]; - error: string; - created_at: components["schemas"]["code-scanning-analysis-created-at"]; - /** The total number of results in the analysis. */ - results_count: number; - /** The total number of rules used in the analysis. */ - rules_count: number; - /** Unique identifier for this analysis. */ - id: number; - url: components["schemas"]["code-scanning-analysis-url"]; - sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; - tool: components["schemas"]["code-scanning-analysis-tool"]; - deletable: boolean; - }; - /** Successful deletion of a code scanning analysis */ - "code-scanning-analysis-deletion": { - /** Next deletable analysis in chain, without last analysis deletion confirmation */ - next_analysis_url: string | null; - /** Next deletable analysis in chain, with last analysis deletion confirmation */ - confirm_delete_url: string | null; - }; - /** Scim Error */ - "scim-error": { - message?: string | null; - documentation_url?: string | null; - detail?: string | null; - status?: number; - scimType?: string | null; - schemas?: string[]; - }; - /** A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/sarif-support-for-code-scanning)." */ - "code-scanning-analysis-sarif-file": string; - "code-scanning-sarifs-receipt": { - id?: components["schemas"]["code-scanning-analysis-sarif-id"]; - /** The REST API URL for checking the status of the upload. */ - url?: string; - }; - "code-scanning-sarifs-status": { - /** `pending` files have not yet been processed, while `complete` means all results in the SARIF have been stored. */ - processing_status?: "pending" | "complete"; - /** The REST API URL for getting the analyses associated with the upload. */ - analyses_url?: string | null; - }; - /** Collaborator */ - collaborator: { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string | null; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - 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?: { - pull: boolean; - push: boolean; - admin: boolean; - }; - }; - /** Repository invitations let you manage who you collaborate with. */ - "repository-invitation": { - /** Unique identifier of the repository invitation. */ - id: number; - repository: components["schemas"]["minimal-repository"]; - invitee: components["schemas"]["simple-user"] | null; - inviter: components["schemas"]["simple-user"] | null; - /** The permission associated with the invitation. */ - permissions: "read" | "write" | "admin"; - created_at: string; - /** Whether or not the invitation has expired */ - expired?: boolean; - /** URL for the repository invitation */ - url: string; - html_url: string; - node_id: string; - }; - /** Commit Comment */ - "commit-comment": { - html_url: string; - url: string; - id: number; - node_id: string; - body: string; - path: string | null; - position: number | null; - line: number | null; - commit_id: string; - user: components["schemas"]["simple-user"] | null; - created_at: string; - updated_at: string; - author_association: components["schemas"]["author_association"]; - reactions?: components["schemas"]["reaction-rollup"]; - }; - /** Branch Short */ - "branch-short": { - name: string; - commit: { - sha: string; - url: string; - }; - protected: boolean; - }; - /** Hypermedia Link */ - link: { - href: string; - }; - /** The status of auto merging a pull request. */ - auto_merge: { - enabled_by: components["schemas"]["simple-user"]; - /** The merge method to use. */ - merge_method: "merge" | "squash" | "rebase"; - /** Title for the merge commit message. */ - commit_title: string; - /** Commit message for the merge commit. */ - commit_message: string; - } | null; - /** Pull Request Simple */ - "pull-request-simple": { - 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: components["schemas"]["simple-user"] | null; - body: string | null; - labels: { - id?: number; - node_id?: string; - url?: string; - name?: string; - description?: string; - color?: string; - default?: boolean; - }[]; - milestone: components["schemas"]["milestone"] | null; - active_lock_reason?: string | null; - created_at: string; - updated_at: string; - closed_at: string | null; - merged_at: string | null; - merge_commit_sha: string | null; - assignee: components["schemas"]["simple-user"] | null; - assignees?: components["schemas"]["simple-user"][] | null; - requested_reviewers?: components["schemas"]["simple-user"][] | null; - requested_teams?: components["schemas"]["team-simple"][] | null; - head: { - label: string; - ref: string; - repo: components["schemas"]["repository"]; - sha: string; - user: components["schemas"]["simple-user"] | null; - }; - base: { - label: string; - ref: string; - repo: components["schemas"]["repository"]; - sha: string; - user: components["schemas"]["simple-user"] | null; - }; - _links: { - comments: components["schemas"]["link"]; - commits: components["schemas"]["link"]; - statuses: components["schemas"]["link"]; - html: components["schemas"]["link"]; - issue: components["schemas"]["link"]; - review_comments: components["schemas"]["link"]; - review_comment: components["schemas"]["link"]; - self: components["schemas"]["link"]; - }; - author_association: components["schemas"]["author_association"]; - auto_merge: components["schemas"]["auto_merge"]; - /** Indicates whether or not the pull request is a draft. */ - draft?: boolean; - }; - "simple-commit-status": { - description: string | null; - id: number; - node_id: string; - state: string; - context: string; - target_url: string; - required?: boolean | null; - avatar_url: string | null; - url: string; - created_at: string; - updated_at: string; - }; - /** Combined Commit Status */ - "combined-commit-status": { - state: string; - statuses: components["schemas"]["simple-commit-status"][]; - sha: string; - total_count: number; - repository: components["schemas"]["minimal-repository"]; - commit_url: string; - url: string; - }; - /** The status of a commit. */ - status: { - url: string; - avatar_url: string | null; - id: number; - node_id: string; - state: string; - description: string; - target_url: string; - context: string; - created_at: string; - updated_at: string; - creator: components["schemas"]["simple-user"]; - }; - "community-health-file": { - url: string; - html_url: string; - }; - /** Community Profile */ - "community-profile": { - health_percentage: number; - description: string | null; - documentation: string | null; - files: { - code_of_conduct: components["schemas"]["code-of-conduct-simple"] | null; - license: components["schemas"]["license-simple"] | null; - contributing: components["schemas"]["community-health-file"] | null; - readme: components["schemas"]["community-health-file"] | null; - issue_template: components["schemas"]["community-health-file"] | null; - pull_request_template: components["schemas"]["community-health-file"] | null; - }; - updated_at: string | null; - content_reports_enabled?: boolean; - }; - /** Diff Entry */ - "diff-entry": { - sha: string; - filename: string; - status: string; - additions: number; - deletions: number; - changes: number; - blob_url: string; - raw_url: string; - contents_url: string; - patch?: string; - previous_filename?: string; - }; - /** Commit Comparison */ - "commit-comparison": { - url: string; - html_url: string; - permalink_url: string; - diff_url: string; - patch_url: string; - base_commit: components["schemas"]["commit"]; - merge_base_commit: components["schemas"]["commit"]; - status: "diverged" | "ahead" | "behind" | "identical"; - ahead_by: number; - behind_by: number; - total_commits: number; - commits: components["schemas"]["commit"][]; - files: components["schemas"]["diff-entry"][]; - }; - /** Content Tree */ - "content-tree": { - type: string; - size: number; - name: string; - path: string; - sha: string; - url: string; - git_url: string | null; - html_url: string | null; - download_url: string | null; - entries?: { - type: string; - size: number; - name: string; - path: string; - content?: string; - sha: string; - url: string; - git_url: string | null; - html_url: string | null; - download_url: string | null; - _links: { - git: string | null; - html: string | null; - self: string; - }; - }[]; - _links: { - git: string | null; - html: string | null; - self: string; - }; - }; - /** A list of directory items */ - "content-directory": { - type: string; - size: number; - name: string; - path: string; - content?: string; - sha: string; - url: string; - git_url: string | null; - html_url: string | null; - download_url: string | null; - _links: { - git: string | null; - html: string | null; - self: string; - }; - }[]; - /** Content File */ - "content-file": { - type: string; - encoding: string; - size: number; - name: string; - path: string; - content: string; - sha: string; - url: string; - git_url: string | null; - html_url: string | null; - download_url: string | null; - _links: { - git: string | null; - html: string | null; - self: string; - }; - target?: string; - submodule_git_url?: string; - }; - /** An object describing a symlink */ - "content-symlink": { - type: string; - target: string; - size: number; - name: string; - path: string; - sha: string; - url: string; - git_url: string | null; - html_url: string | null; - download_url: string | null; - _links: { - git: string | null; - html: string | null; - self: string; - }; - }; - /** An object describing a symlink */ - "content-submodule": { - type: string; - submodule_git_url: string; - size: number; - name: string; - path: string; - sha: string; - url: string; - git_url: string | null; - html_url: string | null; - download_url: string | null; - _links: { - git: string | null; - html: string | null; - self: string; - }; - }; - /** File Commit */ - "file-commit": { - content: { - name?: string; - path?: string; - sha?: string; - size?: number; - url?: string; - html_url?: string; - git_url?: string; - download_url?: string; - type?: string; - _links?: { - self?: string; - git?: string; - html?: string; - }; - } | null; - commit: { - sha?: string; - node_id?: string; - url?: string; - html_url?: string; - author?: { - date?: string; - name?: string; - email?: string; - }; - committer?: { - date?: string; - name?: string; - email?: string; - }; - message?: string; - tree?: { - url?: string; - sha?: string; - }; - parents?: { - url?: string; - html_url?: string; - sha?: string; - }[]; - verification?: { - verified?: boolean; - reason?: string; - signature?: string | null; - payload?: string | null; - }; - }; - }; - /** Contributor */ - contributor: { - login?: string; - id?: number; - node_id?: string; - avatar_url?: string; - gravatar_id?: string | null; - url?: string; - html_url?: string; - followers_url?: string; - following_url?: string; - gists_url?: string; - starred_url?: string; - subscriptions_url?: string; - organizations_url?: string; - repos_url?: string; - events_url?: string; - received_events_url?: string; - type: string; - site_admin?: boolean; - contributions: number; - email?: string; - name?: string; - }; - /** A request for a specific ref(branch,sha,tag) to be deployed */ - deployment: { - url: string; - /** Unique identifier of the deployment */ - id: number; - node_id: string; - sha: string; - /** The ref to deploy. This can be a branch, tag, or sha. */ - ref: string; - /** Parameter to specify a task to execute */ - task: string; - payload: { - [key: string]: any; - }; - original_environment?: string; - /** Name for the target deployment environment. */ - environment: string; - description: string | null; - creator: components["schemas"]["simple-user"] | null; - created_at: string; - updated_at: string; - statuses_url: string; - repository_url: string; - /** Specifies if the given environment is will no longer exist at some point in the future. Default: false. */ - transient_environment?: boolean; - /** Specifies if the given environment is one that end-users directly interact with. Default: false. */ - production_environment?: boolean; - performed_via_github_app?: components["schemas"]["integration"] | null; - }; - /** The status of a deployment. */ - "deployment-status": { - url: string; - id: number; - node_id: string; - /** The state of the status. */ - state: "error" | "failure" | "inactive" | "pending" | "success" | "queued" | "in_progress"; - creator: components["schemas"]["simple-user"] | null; - /** A short description of the status. */ - description: string; - /** The environment of the deployment that the status is for. */ - environment?: string; - /** Deprecated: the URL to associate with this status. */ - target_url: string; - created_at: string; - updated_at: string; - deployment_url: string; - repository_url: string; - /** The URL for accessing your environment. */ - environment_url?: string; - /** The URL to associate with this status. */ - log_url?: string; - performed_via_github_app?: components["schemas"]["integration"] | null; - }; - /** Short Blob */ - "short-blob": { - url: string; - sha: string; - }; - /** Blob */ - blob: { - content: string; - encoding: string; - url: string; - sha: string; - size: number | null; - node_id: string; - highlighted_content?: string; - }; - /** Low-level Git commit operations within a repository */ - "git-commit": { - /** SHA for the commit */ - sha: string; - node_id: string; - url: string; - /** Identifying information for the git-user */ - author: { - /** Timestamp of the commit */ - date: string; - /** Git email address of the user */ - email: string; - /** Name of the git user */ - name: string; - }; - /** Identifying information for the git-user */ - committer: { - /** Timestamp of the commit */ - date: string; - /** Git email address of the user */ - email: string; - /** Name of the git user */ - name: string; - }; - /** Message describing the purpose of the commit */ - message: string; - tree: { - /** SHA for the commit */ - sha: string; - url: string; - }; - parents: { - /** SHA for the commit */ - sha: string; - url: string; - html_url: string; - }[]; - verification: { - verified: boolean; - reason: string; - signature: string | null; - payload: string | null; - }; - html_url: string; - }; - /** Git references within a repository */ - "git-ref": { - ref: string; - node_id: string; - url: string; - object: { - type: string; - /** SHA for the reference */ - sha: string; - url: string; - }; - }; - /** Metadata for a Git tag */ - "git-tag": { - node_id: string; - /** Name of the tag */ - tag: string; - sha: string; - /** URL for the tag */ - url: string; - /** Message describing the purpose of the tag */ - message: string; - tagger: { - date: string; - email: string; - name: string; - }; - object: { - sha: string; - type: string; - url: string; - }; - verification?: components["schemas"]["verification"]; - }; - /** The hierarchy between files in a Git repository. */ - "git-tree": { - sha: string; - url: string; - truncated: boolean; - /** Objects specifying a tree structure */ - tree: { - path?: string; - mode?: string; - type?: string; - sha?: string; - size?: number; - url?: string; - }[]; - }; - "hook-response": { - code: number | null; - status: string | null; - message: string | null; - }; - /** Webhooks for repositories. */ - hook: { - type: string; - /** Unique identifier of the webhook. */ - id: number; - /** The name of a valid service, use 'web' for a webhook. */ - name: string; - /** Determines whether the hook is actually triggered on pushes. */ - active: boolean; - /** Determines what events the hook is triggered for. Default: ['push']. */ - events: string[]; - config: { - email?: string; - password?: string; - room?: string; - subdomain?: string; - url?: components["schemas"]["webhook-config-url"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - digest?: string; - secret?: components["schemas"]["webhook-config-secret"]; - token?: string; - }; - updated_at: string; - created_at: string; - url: string; - test_url: string; - ping_url: string; - last_response: components["schemas"]["hook-response"]; - }; - /** A repository import from an external source. */ - import: { - vcs: string | null; - use_lfs?: string; - /** The URL of the originating repository. */ - vcs_url: string; - svc_root?: string; - tfvc_project?: string; - status: "auth" | "error" | "none" | "detecting" | "choose" | "auth_failed" | "importing" | "mapping" | "waiting_to_push" | "pushing" | "complete" | "setup" | "unknown" | "detection_found_multiple" | "detection_found_nothing" | "detection_needs_auth"; - status_text?: string | null; - failed_step?: string | null; - error_message?: string | null; - import_percent?: number | null; - commit_count?: number | null; - push_percent?: number | null; - has_large_files?: boolean; - large_files_size?: number; - large_files_count?: number; - project_choices?: { - vcs?: string; - tfvc_project?: string; - human_name?: string; - }[]; - message?: string; - authors_count?: number | null; - url: string; - html_url: string; - authors_url: string; - repository_url: string; - svn_root?: string; - }; - /** Porter Author */ - "porter-author": { - id: number; - remote_id: string; - remote_name: string; - email: string; - name: string; - url: string; - import_url: string; - }; - /** Porter Large File */ - "porter-large-file": { - ref_name: string; - path: string; - oid: string; - size: number; - }; - /** Issue Event Label */ - "issue-event-label": { - name: string | null; - color: string | null; - }; - "issue-event-dismissed-review": { - state: string; - review_id: number; - dismissal_message: string | null; - dismissal_commit_id?: string | null; - }; - /** Issue Event Milestone */ - "issue-event-milestone": { - title: string; - }; - /** Issue Event Project Card */ - "issue-event-project-card": { - url: string; - id: number; - project_url: string; - project_id: number; - column_name: string; - previous_column_name?: string; - }; - /** Issue Event Rename */ - "issue-event-rename": { - from: string; - to: string; - }; - /** Issue Event */ - "issue-event": { - id: number; - node_id: string; - url: string; - actor: components["schemas"]["simple-user"] | null; - event: string; - commit_id: string | null; - commit_url: string | null; - created_at: string; - issue?: components["schemas"]["issue-simple"]; - label?: components["schemas"]["issue-event-label"]; - assignee?: components["schemas"]["simple-user"] | null; - assigner?: components["schemas"]["simple-user"] | null; - review_requester?: components["schemas"]["simple-user"] | null; - requested_reviewer?: components["schemas"]["simple-user"] | null; - requested_team?: components["schemas"]["team"]; - dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; - milestone?: components["schemas"]["issue-event-milestone"]; - project_card?: components["schemas"]["issue-event-project-card"]; - rename?: components["schemas"]["issue-event-rename"]; - author_association?: components["schemas"]["author_association"]; - lock_reason?: string | null; - }; - /** Issue Event for Issue */ - "issue-event-for-issue": { - id?: number; - node_id?: string; - url?: string; - actor?: components["schemas"]["simple-user"]; - event?: string; - commit_id?: string | null; - commit_url?: string | null; - created_at?: string; - sha?: string; - html_url?: string; - message?: string; - issue_url?: string; - updated_at?: string; - author_association?: components["schemas"]["author_association"]; - body?: string; - lock_reason?: string; - submitted_at?: string; - state?: string; - pull_request_url?: string; - body_html?: string; - body_text?: string; - }; - /** An SSH key granting access to a single repository. */ - "deploy-key": { - id: number; - key: string; - url: string; - title: string; - verified: boolean; - created_at: string; - read_only: boolean; - }; - /** Language */ - language: { - [key: string]: number; - }; - /** License Content */ - "license-content": { - name: string; - path: string; - sha: string; - size: number; - url: string; - html_url: string | null; - git_url: string | null; - download_url: string | null; - type: string; - content: string; - encoding: string; - _links: { - git: string | null; - html: string | null; - self: string; - }; - license: components["schemas"]["license-simple"] | null; - }; - "pages-source-hash": { - branch: string; - path: string; - }; - /** The configuration for GitHub Pages for a repository. */ - page: { - /** The API address for accessing this Page resource. */ - url: string; - /** The status of the most recent build of the Page. */ - status: ("built" | "building" | "errored") | null; - /** The Pages site's custom domain */ - cname: string | null; - /** Whether the Page has a custom 404 page. */ - custom_404: boolean; - /** The web address the Page can be accessed from. */ - html_url?: string; - source?: components["schemas"]["pages-source-hash"]; - /** Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. */ - public: boolean; - }; - /** Page Build */ - "page-build": { - url: string; - status: string; - error: { - message: string | null; - }; - pusher: components["schemas"]["simple-user"] | null; - commit: string; - duration: number; - created_at: string; - updated_at: string; - }; - /** Page Build Status */ - "page-build-status": { - url: string; - status: string; - }; - /** Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. */ - "pull-request": { - 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 uniquely identifying the pull request within its repository. */ - number: number; - /** State of this Pull Request. Either `open` or `closed`. */ - state: "open" | "closed"; - locked: boolean; - /** The title of the pull request. */ - title: string; - user: components["schemas"]["simple-user"] | null; - body: string | null; - labels: { - id?: number; - node_id?: string; - url?: string; - name?: string; - description?: string | null; - color?: string; - default?: boolean; - }[]; - milestone: components["schemas"]["milestone"] | null; - active_lock_reason?: string | null; - created_at: string; - updated_at: string; - closed_at: string | null; - merged_at: string | null; - merge_commit_sha: string | null; - assignee: components["schemas"]["simple-user"] | null; - assignees?: components["schemas"]["simple-user"][] | null; - requested_reviewers?: components["schemas"]["simple-user"][] | null; - requested_teams?: components["schemas"]["team-simple"][] | null; - head: { - label: string; - ref: string; - repo: { - 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; - description: string | null; - downloads_url: string; - events_url: string; - fork: boolean; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - hooks_url: string; - html_url: string; - id: number; - node_id: 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; - name: string; - notifications_url: string; - owner: { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string | null; - html_url: string; - id: number; - node_id: string; - login: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; - }; - private: boolean; - pulls_url: string; - releases_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - url: string; - clone_url: string; - default_branch: string; - forks: number; - forks_count: number; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - homepage: string | null; - language: string | null; - master_branch?: string; - archived: boolean; - disabled: boolean; - mirror_url: string | null; - open_issues: number; - open_issues_count: number; - permissions?: { - admin: boolean; - pull: boolean; - push: boolean; - }; - temp_clone_token?: string; - allow_merge_commit?: boolean; - allow_squash_merge?: boolean; - allow_rebase_merge?: boolean; - license: { - key: string; - name: string; - url: string | null; - spdx_id: string | null; - node_id: string; - } | null; - pushed_at: string; - size: number; - ssh_url: string; - stargazers_count: number; - svn_url: string; - topics?: string[]; - watchers: number; - watchers_count: number; - created_at: string; - updated_at: string; - }; - sha: string; - user: { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string | null; - html_url: string; - id: number; - node_id: string; - login: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; - }; - }; - base: { - label: string; - ref: string; - repo: { - 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; - description: string | null; - downloads_url: string; - events_url: string; - fork: boolean; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - hooks_url: string; - html_url: string; - id: number; - node_id: 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; - name: string; - notifications_url: string; - owner: { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string | null; - html_url: string; - id: number; - node_id: string; - login: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; - }; - private: boolean; - pulls_url: string; - releases_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - url: string; - clone_url: string; - default_branch: string; - forks: number; - forks_count: number; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - homepage: string | null; - language: string | null; - master_branch?: string; - archived: boolean; - disabled: boolean; - mirror_url: string | null; - open_issues: number; - open_issues_count: number; - permissions?: { - admin: boolean; - pull: boolean; - push: boolean; - }; - temp_clone_token?: string; - allow_merge_commit?: boolean; - allow_squash_merge?: boolean; - allow_rebase_merge?: boolean; - license: components["schemas"]["license-simple"] | null; - pushed_at: string; - size: number; - ssh_url: string; - stargazers_count: number; - svn_url: string; - topics?: string[]; - watchers: number; - watchers_count: number; - created_at: string; - updated_at: string; - }; - sha: string; - user: { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string | null; - html_url: string; - id: number; - node_id: string; - login: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; - }; - }; - _links: { - comments: components["schemas"]["link"]; - commits: components["schemas"]["link"]; - statuses: components["schemas"]["link"]; - html: components["schemas"]["link"]; - issue: components["schemas"]["link"]; - review_comments: components["schemas"]["link"]; - review_comment: components["schemas"]["link"]; - self: components["schemas"]["link"]; - }; - author_association: components["schemas"]["author_association"]; - auto_merge: components["schemas"]["auto_merge"]; - /** Indicates whether or not the pull request is a draft. */ - draft?: boolean; - merged: boolean; - mergeable: boolean | null; - rebaseable?: boolean | null; - mergeable_state: string; - merged_by: components["schemas"]["simple-user"] | null; - comments: number; - review_comments: number; - /** Indicates whether maintainers can modify the pull request. */ - maintainer_can_modify: boolean; - commits: number; - additions: number; - deletions: number; - changed_files: number; - }; - /** Pull Request Review Comments are comments on a portion of the Pull Request's diff. */ - "pull-request-review-comment": { - /** URL for the pull request review comment */ - url: string; - /** The ID of the pull request review to which the comment belongs. */ - pull_request_review_id: number | null; - /** The ID of the pull request review comment. */ - id: number; - /** The node ID of the pull request review comment. */ - node_id: string; - /** The diff of the line that the comment refers to. */ - diff_hunk: string; - /** The relative path of the file to which the comment applies. */ - path: string; - /** The line index in the diff to which the comment applies. */ - position: number; - /** The index of the original line in the diff to which the comment applies. */ - original_position: number; - /** The SHA of the commit to which the comment applies. */ - commit_id: string; - /** The SHA of the original commit to which the comment applies. */ - original_commit_id: string; - /** The comment ID to reply to. */ - in_reply_to_id?: number; - user: components["schemas"]["simple-user"]; - /** The text of the comment. */ - body: string; - created_at: string; - updated_at: string; - /** HTML URL for the pull request review comment. */ - html_url: string; - /** URL for the pull request that the review comment belongs to. */ - pull_request_url: string; - author_association: components["schemas"]["author_association"]; - _links: { - self: { - href: string; - }; - html: { - href: string; - }; - pull_request: { - href: string; - }; - }; - /** The first line of the range for a multi-line comment. */ - start_line?: number | null; - /** The first line of the range for a multi-line comment. */ - original_start_line?: number | null; - /** The side of the first line of the range for a multi-line comment. */ - start_side?: ("LEFT" | "RIGHT") | null; - /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ - line?: number; - /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ - original_line?: number; - /** The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment */ - side?: "LEFT" | "RIGHT"; - reactions?: components["schemas"]["reaction-rollup"]; - body_html?: string; - body_text?: string; - }; - /** Pull Request Merge Result */ - "pull-request-merge-result": { - sha: string; - merged: boolean; - message: string; - }; - /** Pull Request Review Request */ - "pull-request-review-request": { - users: components["schemas"]["simple-user"][]; - teams: components["schemas"]["team-simple"][]; - }; - /** Pull Request Reviews are reviews on pull requests. */ - "pull-request-review": { - /** Unique identifier of the review */ - id: number; - node_id: string; - user: components["schemas"]["simple-user"] | null; - /** The text of the review. */ - body: string; - state: string; - html_url: string; - pull_request_url: string; - _links: { - html: { - href: string; - }; - pull_request: { - href: string; - }; - }; - submitted_at?: string; - /** A commit SHA for the review. */ - commit_id: string; - body_html?: string; - body_text?: string; - author_association: components["schemas"]["author_association"]; - }; - /** Legacy Review Comment */ - "review-comment": { - url: string; - pull_request_review_id: number | null; - id: number; - node_id: string; - diff_hunk: string; - path: string; - position: number | null; - original_position: number; - commit_id: string; - original_commit_id: string; - in_reply_to_id?: number; - user: components["schemas"]["simple-user"] | null; - body: string; - created_at: string; - updated_at: string; - html_url: string; - pull_request_url: string; - author_association: components["schemas"]["author_association"]; - _links: { - self: components["schemas"]["link"]; - html: components["schemas"]["link"]; - pull_request: components["schemas"]["link"]; - }; - body_text?: string; - body_html?: string; - /** The side of the first line of the range for a multi-line comment. */ - side?: "LEFT" | "RIGHT"; - /** The side of the first line of the range for a multi-line comment. */ - start_side?: ("LEFT" | "RIGHT") | null; - /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ - line?: number; - /** The original line of the blob to which the comment applies. The last line of the range for a multi-line comment */ - original_line?: number; - /** The first line of the range for a multi-line comment. */ - start_line?: number | null; - /** The original first line of the range for a multi-line comment. */ - original_start_line?: number | null; - }; - /** Data related to a release. */ - "release-asset": { - url: string; - browser_download_url: string; - id: number; - node_id: string; - /** The file name of the asset. */ - name: string; - label: string | null; - /** State of the release asset. */ - state: "uploaded" | "open"; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: components["schemas"]["simple-user"] | null; - }; - /** A release. */ - release: { - url: string; - html_url: string; - assets_url: string; - upload_url: string; - tarball_url: string | null; - zipball_url: string | null; - id: number; - node_id: string; - /** The name of the tag. */ - tag_name: string; - /** Specifies the commitish value that determines where the Git tag is created from. */ - target_commitish: string; - name: string | null; - body?: string | null; - /** true to create a draft (unpublished) release, false to create a published one. */ - draft: boolean; - /** Whether to identify the release as a prerelease or a full release. */ - prerelease: boolean; - created_at: string; - published_at: string | null; - author: components["schemas"]["simple-user"]; - assets: components["schemas"]["release-asset"][]; - body_html?: string; - body_text?: string; - }; - /** Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. */ - "secret-scanning-alert-state": "open" | "resolved"; - /** **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. */ - "secret-scanning-alert-resolution": string | null; - "secret-scanning-alert": { - number?: components["schemas"]["alert-number"]; - created_at?: components["schemas"]["alert-created-at"]; - url?: components["schemas"]["alert-url"]; - html_url?: components["schemas"]["alert-html-url"]; - state?: components["schemas"]["secret-scanning-alert-state"]; - resolution?: components["schemas"]["secret-scanning-alert-resolution"]; - /** The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - resolved_at?: string | null; - resolved_by?: components["schemas"]["simple-user"]; - /** The type of secret that secret scanning detected. */ - secret_type?: string; - /** The secret that was detected. */ - secret?: string; - }; - /** Stargazer */ - stargazer: { - starred_at: string; - user: components["schemas"]["simple-user"] | null; - }; - /** Code Frequency Stat */ - "code-frequency-stat": number[]; - /** Commit Activity */ - "commit-activity": { - days: number[]; - total: number; - week: number; - }; - /** Contributor Activity */ - "contributor-activity": { - author: components["schemas"]["simple-user"] | null; - total: number; - weeks: { - w?: string; - a?: number; - d?: number; - c?: number; - }[]; - }; - "participation-stats": { - all: number[]; - owner: number[]; - }; - /** Repository invitations let you manage who you collaborate with. */ - "repository-subscription": { - /** Determines if notifications should be received from this repository. */ - subscribed: boolean; - /** Determines if all notifications should be blocked from this repository. */ - ignored: boolean; - reason: string | null; - created_at: string; - url: string; - repository_url: string; - }; - /** Tag */ - tag: { - name: string; - commit: { - sha: string; - url: string; - }; - zipball_url: string; - tarball_url: string; - node_id: string; - }; - /** A topic aggregates entities that are related to a subject. */ - topic: { - names: string[]; - }; - traffic: { - timestamp: string; - uniques: number; - count: number; - }; - /** Clone Traffic */ - "clone-traffic": { - count: number; - uniques: number; - clones: components["schemas"]["traffic"][]; - }; - /** Content Traffic */ - "content-traffic": { - path: string; - title: string; - count: number; - uniques: number; - }; - /** Referrer Traffic */ - "referrer-traffic": { - referrer: string; - count: number; - uniques: number; - }; - /** View Traffic */ - "view-traffic": { - count: number; - uniques: number; - views: components["schemas"]["traffic"][]; - }; - "scim-group-list-enterprise": { - schemas: string[]; - totalResults: number; - itemsPerPage: number; - startIndex: number; - Resources: { - schemas: string[]; - id: string; - externalId?: string | null; - displayName?: string; - members?: { - value?: string; - $ref?: string; - display?: string; - }[]; - meta?: { - resourceType?: string; - created?: string; - lastModified?: string; - location?: string; - }; - }[]; - }; - "scim-enterprise-group": { - schemas: string[]; - id: string; - externalId?: string | null; - displayName?: string; - members?: { - value?: string; - $ref?: string; - display?: string; - }[]; - meta?: { - resourceType?: string; - created?: string; - lastModified?: string; - location?: string; - }; - }; - "scim-user-list-enterprise": { - schemas: string[]; - totalResults: number; - itemsPerPage: number; - startIndex: number; - Resources: { - schemas: string[]; - id: string; - externalId?: string; - userName?: string; - name?: { - givenName?: string; - familyName?: string; - }; - emails?: { - value?: string; - primary?: boolean; - type?: string; - }[]; - groups?: { - value?: string; - }[]; - active?: boolean; - meta?: { - resourceType?: string; - created?: string; - lastModified?: string; - location?: string; - }; - }[]; - }; - "scim-enterprise-user": { - schemas: string[]; - id: string; - externalId?: string; - userName?: string; - name?: { - givenName?: string; - familyName?: string; - }; - emails?: { - value?: string; - type?: string; - primary?: boolean; - }[]; - groups?: { - value?: string; - }[]; - active?: boolean; - meta?: { - resourceType?: string; - created?: string; - lastModified?: string; - location?: string; - }; - }; - /** SCIM /Users provisioning endpoints */ - "scim-user": { - /** SCIM schema used. */ - schemas: string[]; - /** Unique identifier of an external identity */ - id: string; - /** The ID of the User. */ - externalId: string | null; - /** Configured by the admin. Could be an email, login, or username */ - userName: string | null; - /** The name of the user, suitable for display to end-users */ - displayName?: string | null; - name: { - givenName: string | null; - familyName: string | null; - formatted?: string | null; - }; - /** user emails */ - emails: { - value: string; - primary?: boolean; - }[]; - /** The active status of the User. */ - active: boolean; - meta: { - resourceType?: string; - created?: string; - lastModified?: string; - location?: string; - }; - /** The ID of the organization. */ - organization_id?: number; - /** Set of operations to be performed */ - operations?: { - op: "add" | "remove" | "replace"; - path?: string; - value?: string | { - [key: string]: any; - } | { - [key: string]: any; - }[]; - }[]; - /** associated groups */ - groups?: { - value?: string; - display?: string; - }[]; - }; - /** SCIM User List */ - "scim-user-list": { - /** SCIM schema used. */ - schemas: string[]; - totalResults: number; - itemsPerPage: number; - startIndex: number; - Resources: components["schemas"]["scim-user"][]; - }; - "search-result-text-matches": { - object_url?: string; - object_type?: string | null; - property?: string; - fragment?: string; - matches?: { - text?: string; - indices?: number[]; - }[]; - }[]; - /** Code Search Result Item */ - "code-search-result-item": { - name: string; - path: string; - sha: string; - url: string; - git_url: string; - html_url: string; - repository: components["schemas"]["minimal-repository"]; - score: number; - file_size?: number; - language?: string | null; - last_modified_at?: string; - line_numbers?: string[]; - text_matches?: components["schemas"]["search-result-text-matches"]; - }; - /** Commit Search Result Item */ - "commit-search-result-item": { - url: string; - sha: string; - html_url: string; - comments_url: string; - commit: { - author: { - name: string; - email: string; - date: string; - }; - committer: components["schemas"]["git-user"] | null; - comment_count: number; - message: string; - tree: { - sha: string; - url: string; - }; - url: string; - verification?: components["schemas"]["verification"]; - }; - author: components["schemas"]["simple-user"] | null; - committer: components["schemas"]["git-user"] | null; - parents: { - url?: string; - html_url?: string; - sha?: string; - }[]; - repository: components["schemas"]["minimal-repository"]; - score: number; - node_id: string; - text_matches?: components["schemas"]["search-result-text-matches"]; - }; - /** Issue Search Result Item */ - "issue-search-result-item": { - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - id: number; - node_id: string; - number: number; - title: string; - locked: boolean; - active_lock_reason?: string | null; - assignees?: components["schemas"]["simple-user"][] | null; - user: components["schemas"]["simple-user"] | null; - labels: { - id?: number; - node_id?: string; - url?: string; - name?: string; - color?: string; - default?: boolean; - description?: string | null; - }[]; - state: string; - assignee: components["schemas"]["simple-user"] | null; - milestone: components["schemas"]["milestone"] | null; - comments: number; - created_at: string; - updated_at: string; - closed_at: string | null; - text_matches?: components["schemas"]["search-result-text-matches"]; - pull_request?: { - merged_at?: string | null; - diff_url: string | null; - html_url: string | null; - patch_url: string | null; - url: string | null; - }; - body?: string; - score: number; - author_association: components["schemas"]["author_association"]; - draft?: boolean; - repository?: components["schemas"]["repository"]; - body_html?: string; - body_text?: string; - timeline_url?: string; - performed_via_github_app?: components["schemas"]["integration"] | null; - }; - /** Label Search Result Item */ - "label-search-result-item": { - id: number; - node_id: string; - url: string; - name: string; - color: string; - default: boolean; - description: string | null; - score: number; - text_matches?: components["schemas"]["search-result-text-matches"]; - }; - /** Repo Search Result Item */ - "repo-search-result-item": { - id: number; - node_id: string; - name: string; - full_name: string; - owner: components["schemas"]["simple-user"] | null; - private: boolean; - html_url: string; - description: string | null; - fork: boolean; - url: string; - created_at: string; - updated_at: string; - pushed_at: string; - homepage: string | null; - size: number; - stargazers_count: number; - watchers_count: number; - language: string | null; - forks_count: number; - open_issues_count: number; - master_branch?: string; - default_branch: string; - score: number; - forks_url: string; - keys_url: string; - collaborators_url: string; - teams_url: string; - hooks_url: string; - issue_events_url: string; - events_url: string; - assignees_url: string; - branches_url: string; - tags_url: string; - blobs_url: string; - git_tags_url: string; - git_refs_url: string; - trees_url: string; - statuses_url: string; - languages_url: string; - stargazers_url: string; - contributors_url: string; - subscribers_url: string; - subscription_url: string; - commits_url: string; - git_commits_url: string; - comments_url: string; - issue_comment_url: string; - contents_url: string; - compare_url: string; - merges_url: string; - archive_url: string; - downloads_url: string; - issues_url: string; - pulls_url: string; - milestones_url: string; - notifications_url: string; - labels_url: string; - releases_url: string; - deployments_url: string; - git_url: string; - ssh_url: string; - clone_url: string; - svn_url: string; - forks: number; - open_issues: number; - watchers: number; - topics?: string[]; - mirror_url: string | null; - has_issues: boolean; - has_projects: boolean; - has_pages: boolean; - has_wiki: boolean; - has_downloads: boolean; - archived: boolean; - /** Returns whether or not this repository disabled. */ - disabled: boolean; - license: components["schemas"]["license-simple"] | null; - permissions?: { - admin: boolean; - pull: boolean; - push: boolean; - }; - text_matches?: components["schemas"]["search-result-text-matches"]; - temp_clone_token?: string; - allow_merge_commit?: boolean; - allow_squash_merge?: boolean; - allow_rebase_merge?: boolean; - delete_branch_on_merge?: boolean; - }; - /** Topic Search Result Item */ - "topic-search-result-item": { - name: string; - display_name: string | null; - short_description: string | null; - description: string | null; - created_by: string | null; - released: string | null; - created_at: string; - updated_at: string; - featured: boolean; - curated: boolean; - score: number; - repository_count?: number | null; - logo_url?: string | null; - text_matches?: components["schemas"]["search-result-text-matches"]; - related?: { - topic_relation?: { - id?: number; - name?: string; - topic_id?: number; - relation_type?: string; - }; - }[] | null; - aliases?: { - topic_relation?: { - id?: number; - name?: string; - topic_id?: number; - relation_type?: string; - }; - }[] | null; - }; - /** User Search Result Item */ - "user-search-result-item": { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string | null; - url: string; - html_url: string; - followers_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - received_events_url: string; - type: string; - score: number; - following_url: string; - gists_url: string; - starred_url: string; - events_url: string; - public_repos?: number; - public_gists?: number; - followers?: number; - following?: number; - created_at?: string; - updated_at?: string; - name?: string | null; - bio?: string | null; - email?: string | null; - location?: string | null; - site_admin: boolean; - hireable?: boolean | null; - text_matches?: components["schemas"]["search-result-text-matches"]; - blog?: string | null; - company?: string | null; - suspended_at?: string | null; - }; - /** Private User */ - "private-user": { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string | null; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - 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 | null; - company: string | null; - blog: string | null; - location: string | null; - email: string | null; - hireable: boolean | null; - bio: string | null; - twitter_username?: string | null; - 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?: { - collaborators: number; - name: string; - space: number; - private_repos: number; - }; - suspended_at?: string | null; - business_plus?: boolean; - ldap_dn?: string; - }; - /** Public User */ - "public-user": { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string | null; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - 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 | null; - company: string | null; - blog: string | null; - location: string | null; - email: string | null; - hireable: boolean | null; - bio: string | null; - twitter_username?: string | null; - public_repos: number; - public_gists: number; - followers: number; - following: number; - created_at: string; - updated_at: string; - plan?: { - collaborators: number; - name: string; - space: number; - private_repos: number; - }; - suspended_at?: string | null; - private_gists?: number; - total_private_repos?: number; - owned_private_repos?: number; - disk_usage?: number; - collaborators?: number; - }; - /** Email */ - email: { - email: string; - primary: boolean; - verified: boolean; - visibility: string | null; - }; - /** A unique encryption key */ - "gpg-key": { - id: number; - primary_key_id: number | null; - key_id: string; - public_key: string; - emails: { - email?: string; - verified?: boolean; - }[]; - subkeys: { - id?: number; - primary_key_id?: number; - key_id?: string; - public_key?: string; - emails?: { - [key: string]: any; - }[]; - subkeys?: { - [key: string]: any; - }[]; - can_sign?: boolean; - can_encrypt_comms?: boolean; - can_encrypt_storage?: boolean; - can_certify?: boolean; - created_at?: string; - expires_at?: string | null; - raw_key?: string | null; - }[]; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: string | null; - raw_key: string | null; - }; - /** Key */ - key: { - key_id: string; - key: string; - id: number; - url: string; - title: string; - created_at: string; - verified: boolean; - read_only: boolean; - }; - "marketplace-account": { - url: string; - id: number; - type: string; - node_id?: string; - login: string; - email?: string | null; - organization_billing_email?: string | null; - }; - /** User Marketplace Purchase */ - "user-marketplace-purchase": { - billing_cycle: string; - next_billing_date: string | null; - unit_count: number | null; - on_free_trial: boolean; - free_trial_ends_on: string | null; - updated_at: string | null; - account: components["schemas"]["marketplace-account"]; - plan: components["schemas"]["marketplace-listing-plan"]; - }; - /** Starred Repository */ - "starred-repository": { - starred_at: string; - repo: components["schemas"]["repository"]; - }; - /** Hovercard */ - hovercard: { - contexts: { - message: string; - octicon: string; - }[]; - }; - /** Key Simple */ - "key-simple": { - id: number; - key: string; - }; - }; - responses: { - /** Resource Not Found */ - not_found: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - /** Validation Failed */ - validation_failed_simple: { - content: { - "application/json": components["schemas"]["validation-error-simple"]; - }; - }; - /** Preview Header Missing */ - preview_header_missing: { - content: { - "application/json": { - message: string; - documentation_url: string; - }; - }; - }; - /** Forbidden */ - forbidden: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - /** Requires Authentication */ - requires_authentication: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - /** Validation Failed */ - validation_failed: { - content: { - "application/json": components["schemas"]["validation-error"]; - }; - }; - /** Not Modified */ - not_modified: unknown; - /** Gone */ - gone: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - /** Service Unavailable */ - service_unavailable: { - content: { - "application/json": { - code?: string; - message?: string; - documentation_url?: string; - }; - }; - }; - /** Forbidden Gist */ - forbidden_gist: { - content: { - "application/json": { - block?: { - reason?: string; - created_at?: string; - html_url?: string | null; - }; - message?: string; - documentation_url?: string; - }; - }; - }; - /** Moved Permanently */ - moved_permanently: unknown; - /** Conflict */ - conflict: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - /** Response if github advanced security is not enabled for this repository */ - code_scanning_forbidden_read: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - /** Response if the repository is archived or if github advanced security is not enabled for this repository */ - code_scanning_forbidden_write: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - /** Bad Request */ - bad_request: { - content: { - "application/json": components["schemas"]["basic-error"]; - "application/scim+json": components["schemas"]["scim-error"]; - }; - }; - /** Internal Error */ - internal_error: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - /** Found */ - found: unknown; - /** Resource Not Found */ - scim_not_found: { - content: { - "application/json": components["schemas"]["scim-error"]; - "application/scim+json": components["schemas"]["scim-error"]; - }; - }; - /** Forbidden */ - scim_forbidden: { - content: { - "application/json": components["schemas"]["scim-error"]; - "application/scim+json": components["schemas"]["scim-error"]; - }; - }; - /** Bad Request */ - scim_bad_request: { - content: { - "application/json": components["schemas"]["scim-error"]; - "application/scim+json": components["schemas"]["scim-error"]; - }; - }; - /** Internal Error */ - scim_internal_error: { - content: { - "application/json": components["schemas"]["scim-error"]; - "application/scim+json": components["schemas"]["scim-error"]; - }; - }; - /** Conflict */ - scim_conflict: { - content: { - "application/json": components["schemas"]["scim-error"]; - "application/scim+json": components["schemas"]["scim-error"]; - }; - }; - }; - parameters: { - /** Results per page (max 100). */ - per_page: number; - /** Page number of the results to fetch. */ - page: number; - /** 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; - /** installation_id parameter */ - installation_id: number; - /** grant_id parameter */ - grant_id: number; - /** The client ID of your GitHub app. */ - "client-id": string; - "access-token": string; - app_slug: string; - /** authorization_id parameter */ - authorization_id: number; - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: string; - /** Unique identifier of an organization. */ - org_id: number; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: number; - /** Unique identifier of the self-hosted runner. */ - runner_id: number; - /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ - "audit-log-phrase": string; - /** - * The event types to include: - * - * - `web` - returns web (non-Git) events - * - `git` - returns Git events - * - `all` - returns both web and Git events - * - * The default is `web`. - */ - "audit-log-include": "web" | "git" | "all"; - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - "audit-log-after": string; - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - "audit-log-before": string; - /** - * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. - * - * The default is `desc`. - */ - "audit-log-order": "desc" | "asc"; - /** gist_id parameter */ - gist_id: string; - /** comment_id parameter */ - comment_id: number; - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels: string; - /** One of `asc` (ascending) or `desc` (descending). */ - direction: "asc" | "desc"; - /** account_id parameter */ - account_id: number; - /** plan_id parameter */ - plan_id: number; - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort: "created" | "updated"; - 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 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; - /** thread_id parameter */ - thread_id: number; - /** An organization ID. Only return organizations with an ID greater than this ID. */ - "since-org": number; - org: string; - repository_id: number; - /** secret_name parameter */ - secret_name: string; - username: string; - "hook-id": number; - /** invitation_id parameter */ - invitation_id: number; - /** migration_id parameter */ - migration_id: number; - /** repo_name parameter */ - repo_name: string; - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; - /** The name of the package. */ - package_name: string; - /** Unique identifier of the package version. */ - package_version_id: number; - /** team_slug parameter */ - team_slug: string; - "discussion-number": number; - "comment-number": number; - "reaction-id": number; - "project-id": number; - /** card_id parameter */ - card_id: number; - /** column_id parameter */ - column_id: number; - /** artifact_id parameter */ - artifact_id: number; - /** job_id parameter */ - job_id: number; - /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ - actor: string; - /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ - "workflow-run-branch": string; - /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ - event: string; - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ - "workflow-run-status": "completed" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out" | "in_progress" | "queued" | "requested" | "waiting"; - "run-id": number; - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - "workflow-id": number | string; - /** The name of the branch. */ - branch: string; - /** check_run_id parameter */ - check_run_id: number; - /** check_suite_id parameter */ - 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"; - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name: components["schemas"]["code-scanning-analysis-tool-name"]; - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid: components["schemas"]["code-scanning-analysis-tool-guid"]; - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - git_ref: components["schemas"]["code-scanning-ref"]; - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components["schemas"]["alert-number"]; - /** commit_sha parameter */ - commit_sha: string; - /** deployment_id parameter */ - deployment_id: number; - /** A user ID. Only return users with an ID greater than this ID. */ - "since-user": number; - /** issue_number parameter */ - issue_number: number; - /** key_id parameter */ - key_id: number; - /** milestone_number parameter */ - milestone_number: number; - "pull-number": number; - /** review_id parameter */ - review_id: number; - /** asset_id parameter */ - asset_id: number; - /** release_id parameter */ - release_id: number; - /** Must be one of: `day`, `week`. */ - per: "day" | "week"; - /** A repository ID. Only return repositories with an ID greater than this ID. */ - "since-repo": number; - /** Used for pagination: the index of the first result to return. */ - start_index: number; - /** Used for pagination: the number of results to return. */ - count: number; - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: string; - /** scim_user_id parameter */ - scim_user_id: string; - /** 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"; - "team-id": number; - /** gpg_key_id parameter */ - gpg_key_id: number; - }; - headers: { - link?: string; - "content-type"?: string; - "x-common-marker-version"?: string; - "x-rate-limit-limit"?: number; - "x-rate-limit-remaining"?: number; - "x-rate-limit-reset"?: number; - location?: string; - }; -} -export interface operations { - /** Get Hypermedia links to resources accessible in GitHub's REST API */ - "meta/root": { - responses: { - /** response */ - 200: { - content: { - "application/json": { - current_user_url: string; - current_user_authorizations_html_url: string; - authorizations_url: string; - code_search_url: string; - commit_search_url: string; - emails_url: string; - emojis_url: string; - events_url: string; - feeds_url: string; - followers_url: string; - following_url: string; - gists_url: string; - hub_url: string; - issue_search_url: string; - issues_url: string; - keys_url: string; - label_search_url: string; - notifications_url: string; - organization_url: string; - organization_repositories_url: string; - organization_teams_url: string; - public_gists_url: string; - rate_limit_url: string; - repository_url: string; - repository_search_url: string; - current_user_repositories_url: string; - starred_url: string; - starred_gists_url: string; - topic_search_url?: string; - user_url: string; - user_organizations_url: string; - user_repositories_url: string; - user_search_url: string; - }; - }; - }; - }; - }; - /** - * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/get-authenticated": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["integration"]; - }; - }; - }; - }; - /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ - "apps/create-from-manifest": { - parameters: { - path: { - code: string; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["integration"] & ({ - client_id: string; - client_secret: string; - webhook_secret: string; - pem: string; - } & { - [key: string]: any; - }); - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed_simple"]; - }; - }; - /** - * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/get-webhook-config-for-app": { - responses: { - /** Default response */ - 200: { - content: { - "application/json": components["schemas"]["webhook-config"]; - }; - }; - }; - }; - /** - * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/update-webhook-config-for-app": { - responses: { - /** Default response */ - 200: { - content: { - "application/json": components["schemas"]["webhook-config"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - url?: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - }; - }; - }; - }; - /** - * You must use a [JWT](https://docs.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. - */ - "apps/list-installations": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - /** 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?: components["parameters"]["since"]; - outdated?: string; - }; - }; - responses: { - /** The permissions the installation has are included under the `permissions` key. */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["installation"][]; - }; - }; - }; - }; - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (`target_type`) will be either an organization or a user account, depending which account the repository belongs to. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/get-installation": { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components["parameters"]["installation_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["installation"]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/v3/apps/#suspend-an-app-installation)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/delete-installation": { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components["parameters"]["installation_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/create-installation-access-token": { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components["parameters"]["installation_id"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["installation-token"]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** List of repository names that the token should have access to */ - repositories?: string[]; - /** List of repository IDs that the token should have access to */ - repository_ids?: number[]; - permissions?: components["schemas"]["app-permissions"]; - }; - }; - }; - }; - /** - * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/suspend-installation": { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components["parameters"]["installation_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Removes a GitHub App installation suspension. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/unsuspend-installation": { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components["parameters"]["installation_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * 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://docs.github.com/rest/reference/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"]`. - */ - "oauth-authorizations/list-grants": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["application-grant"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - "oauth-authorizations/get-grant": { - parameters: { - path: { - /** grant_id parameter */ - grant_id: components["parameters"]["grant_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["application-grant"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-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). - */ - "oauth-authorizations/delete-grant": { - parameters: { - path: { - /** grant_id parameter */ - grant_id: components["parameters"]["grant_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). - */ - "apps/delete-authorization": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The OAuth access token used to authenticate to the GitHub API. */ - access_token?: string; - }; - }; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - * - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. 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 Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). - */ - "apps/revoke-grant-for-application": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - access_token: components["parameters"]["access-token"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - "apps/check-token": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The access_token of the OAuth application. */ - access_token: string; - }; - }; - }; - }; - /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ - "apps/delete-token": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The OAuth access token used to authenticate to the GitHub API. */ - access_token?: string; - }; - }; - }; - }; - /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - "apps/reset-token": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The access_token of the OAuth application. */ - access_token: string; - }; - }; - }; - }; - /** Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - "apps/scope-token": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** **Required.** The OAuth access token used to authenticate to the GitHub API. */ - access_token?: string; - /** The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. */ - target?: string; - /** The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. */ - target_id?: number; - /** The list of repository IDs to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ - repositories?: string[]; - /** The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */ - repository_ids?: number[]; - permissions?: components["schemas"]["app-permissions"]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - * - * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - */ - "apps/check-authorization": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - access_token: components["parameters"]["access-token"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["authorization"] | null; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - */ - "apps/reset-authorization": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - access_token: components["parameters"]["access-token"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - * - * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. - */ - "apps/revoke-authorization-for-application": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - access_token: components["parameters"]["access-token"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * **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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - "apps/get-by-slug": { - parameters: { - path: { - app_slug: components["parameters"]["app_slug"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["integration"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - "oauth-authorizations/list-authorizations": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["authorization"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * 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 allowed. Read more about allowing tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). - */ - "oauth-authorizations/create-authorization": { - parameters: {}; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** A list of scopes that this authorization is in. */ - scopes?: string[] | null; - /** 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; - /** The OAuth app client key for which to create the token. */ - client_id?: string; - /** The 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; - }; - }; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * 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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - */ - "oauth-authorizations/get-or-create-authorization-for-app": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - }; - }; - responses: { - /** Response if returning an existing token */ - 200: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The OAuth app client secret for which to create the token. */ - client_secret: string; - /** A list of scopes that this authorization is in. */ - scopes?: string[] | null; - /** 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 ID and user. */ - fingerprint?: string; - }; - }; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * 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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - */ - "oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint": { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components["parameters"]["client-id"]; - fingerprint: string; - }; - }; - responses: { - /** Response if returning an existing token */ - 200: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - /** Response if returning a new token */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The OAuth app client secret for which to create the token. */ - client_secret: string; - /** A list of scopes that this authorization is in. */ - scopes?: string[] | null; - /** 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; - }; - }; - }; - }; - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - "oauth-authorizations/get-authorization": { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components["parameters"]["authorization_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - "oauth-authorizations/delete-authorization": { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components["parameters"]["authorization_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * You can only send one of these scope keys at a time. - */ - "oauth-authorizations/update-authorization": { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components["parameters"]["authorization_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["authorization"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** A list of scopes that this authorization is in. */ - scopes?: string[] | null; - /** 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. */ - 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; - }; - }; - }; - }; - "codes-of-conduct/get-all-codes-of-conduct": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-of-conduct"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - "codes-of-conduct/get-conduct-code": { - parameters: { - path: { - key: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-of-conduct"]; - }; - }; - 304: components["responses"]["not_modified"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * 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://docs.github.com/webhooks/event-payloads/#content_reference) 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://docs.github.com/apps/using-content-attachments/)" for details about content attachments. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - "apps/create-content-attachment": { - parameters: { - path: { - content_reference_id: number; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["content-reference-attachment"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The title of the attachment */ - title: string; - /** The body of the attachment */ - body: string; - }; - }; - }; - }; - /** Lists all the emojis available to use on GitHub. */ - "emojis/get": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": { - [key: string]: string; - }; - }; - }; - 304: components["responses"]["not_modified"]; - }; - }; - /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/get-github-actions-permissions-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-enterprise-permissions"]; - }; - }; - }; - }; - /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/set-github-actions-permissions-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - enabled_organizations: components["schemas"]["enabled-organizations"]; - allowed_actions?: components["schemas"]["allowed-actions"]; - }; - }; - }; - }; - /** - * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - organizations: components["schemas"]["organization-simple"][]; - }; - }; - }; - }; - }; - /** - * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** List of organization IDs to enable for GitHub Actions. */ - selected_organization_ids: number[]; - }; - }; - }; - }; - /** - * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/enable-selected-organization-github-actions-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of an organization. */ - org_id: components["parameters"]["org_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/disable-selected-organization-github-actions-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of an organization. */ - org_id: components["parameters"]["org_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/get-allowed-actions-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["selected-actions"]; - }; - }; - }; - }; - /** - * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/set-allowed-actions-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["selected-actions"]; - }; - }; - }; - /** - * Lists all self-hosted runner groups for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - runner_groups: components["schemas"]["runner-groups-enterprise"][]; - }; - }; - }; - }; - }; - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["runner-groups-enterprise"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** Name of the runner group. */ - name: string; - /** Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` */ - visibility?: "selected" | "all"; - /** List of organization IDs that can access the runner group. */ - selected_organization_ids?: number[]; - /** List of runner IDs to add to the runner group. */ - runners?: number[]; - }; - }; - }; - }; - /** - * Gets a specific self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner-groups-enterprise"]; - }; - }; - }; - }; - /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/delete-self-hosted-runner-group-from-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/update-self-hosted-runner-group-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner-groups-enterprise"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** Name of the runner group. */ - name?: string; - /** Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` */ - visibility?: "selected" | "all"; - }; - }; - }; - }; - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - organizations: components["schemas"]["organization-simple"][]; - }; - }; - }; - }; - }; - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** List of organization IDs that can access the runner group. */ - selected_organization_ids: number[]; - }; - }; - }; - }; - /** - * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - /** Unique identifier of an organization. */ - org_id: components["parameters"]["org_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - /** Unique identifier of an organization. */ - org_id: components["parameters"]["org_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/list-self-hosted-runners-in-group-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - runners: components["schemas"]["runner"][]; - }; - }; - }; - }; - }; - /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/set-self-hosted-runners-in-group-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** List of runner IDs to add to the runner group. */ - runners: number[]; - }; - }; - }; - }; - /** - * Adds a self-hosted runner to a runner group configured in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` - * scope to use this endpoint. - */ - "enterprise-admin/add-self-hosted-runner-to-group-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Lists all self-hosted runners configured for an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/list-self-hosted-runners-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count?: number; - runners?: components["schemas"]["runner"][]; - }; - }; - }; - }; - }; - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/list-runner-applications-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner-application"][]; - }; - }; - }; - }; - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` - */ - "enterprise-admin/create-registration-token-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["authentication-token"]; - }; - }; - }; - }; - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - "enterprise-admin/create-remove-token-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["authentication-token"]; - }; - }; - }; - }; - /** - * Gets a specific self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/get-self-hosted-runner-for-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner"]; - }; - }; - }; - }; - /** - * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - "enterprise-admin/delete-self-hosted-runner-from-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * **Note:** The audit log REST API is currently in beta and is subject to change. - * - * Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. - */ - "audit-log/get-audit-log": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - query: { - /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ - phrase?: components["parameters"]["audit-log-phrase"]; - /** - * The event types to include: - * - * - `web` - returns web (non-Git) events - * - `git` - returns Git events - * - `all` - returns both web and Git events - * - * The default is `web`. - */ - include?: components["parameters"]["audit-log-include"]; - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components["parameters"]["audit-log-after"]; - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components["parameters"]["audit-log-before"]; - /** - * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. - * - * The default is `desc`. - */ - order?: components["parameters"]["audit-log-order"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - }; - }; - responses: { - /** Response */ - 200: { - content: { - "application/json": components["schemas"]["audit-log-event"][]; - }; - }; - }; - }; - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - "billing/get-github-actions-billing-ghe": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-billing-usage"]; - }; - }; - }; - }; - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - "billing/get-github-packages-billing-ghe": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["packages-billing-usage"]; - }; - }; - }; - }; - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - "billing/get-shared-storage-billing-ghe": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["combined-billing-usage"]; - }; - }; - }; - }; - /** 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. */ - "activity/list-public-events": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. - */ - "activity/get-feeds": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["feed"]; - }; - }; - }; - }; - /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ - "gists/list": { - parameters: { - query: { - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["base-gist"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * 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. - */ - "gists/create": { - parameters: {}; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["gist-simple"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Description of the gist */ - description?: string; - /** Names and content for the files that make up the gist */ - files: { - [key: string]: { - /** Content of the file */ - content: string; - }; - }; - public?: boolean | ("true" | "false"); - }; - }; - }; - }; - /** - * List public gists sorted by most recently updated to least recently updated. - * - * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. - */ - "gists/list-public": { - parameters: { - query: { - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["base-gist"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** List the authenticated user's starred gists: */ - "gists/list-starred": { - parameters: { - query: { - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["base-gist"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - "gists/get": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["gist-simple"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden_gist"]; - 404: components["responses"]["not_found"]; - }; - }; - "gists/delete": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** 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. */ - "gists/update": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["gist-simple"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": (Partial<{ - [key: string]: any; - }> & Partial<{ - [key: string]: any; - }>) | null; - }; - }; - }; - "gists/list-comments": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["gist-comment"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "gists/create-comment": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["gist-comment"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - requestBody: { - content: { - "application/json": { - /** The comment text. */ - body: string; - }; - }; - }; - }; - "gists/get-comment": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["gist-comment"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden_gist"]; - 404: components["responses"]["not_found"]; - }; - }; - "gists/delete-comment": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "gists/update-comment": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["gist-comment"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - requestBody: { - content: { - "application/json": { - /** The comment text. */ - body: string; - }; - }; - }; - }; - "gists/list-commits": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: { - Link?: string; - }; - content: { - "application/json": components["schemas"]["gist-commit"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "gists/list-forks": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["gist-simple"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** **Note**: This was previously `/gists/:gist_id/fork`. */ - "gists/fork": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["base-gist"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - "gists/check-is-starred": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - }; - responses: { - /** Response if gist is starred */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - /** Response if gist is not starred */ - 404: { - content: { - "application/json": { - [key: string]: any; - }; - }; - }; - }; - }; - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - "gists/star": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "gists/unstar": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "gists/get-revision": { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components["parameters"]["gist_id"]; - sha: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["gist-simple"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ - "gitignore/get-all-templates": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": string[]; - }; - }; - 304: components["responses"]["not_modified"]; - }; - }; - /** - * The API also allows fetching the source of a single template. - * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. - */ - "gitignore/get-template": { - parameters: { - path: { - name: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["gitignore-template"]; - }; - }; - 304: components["responses"]["not_modified"]; - }; - }; - /** - * List repositories that an app installation can access. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - "apps/list-repos-accessible-to-installation": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - repositories: components["schemas"]["repository"][]; - repository_selection?: string; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * Revokes the installation token you're using to authenticate as an installation and access this endpoint. - * - * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - "apps/revoke-installation-access-token": { - parameters: {}; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * List issues assigned to the authenticated user across all visible repositories including owned repositories, member - * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not - * necessarily assigned to you. - * - * - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - "issues/list": { - parameters: { - query: { - /** - * 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?: components["parameters"]["labels"]; - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: "created" | "updated" | "comments"; - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** 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?: components["parameters"]["since"]; - collab?: boolean; - orgs?: boolean; - owned?: boolean; - pulls?: boolean; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - "licenses/get-all-commonly-used": { - parameters: { - query: { - featured?: boolean; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["license-simple"][]; - }; - }; - 304: components["responses"]["not_modified"]; - }; - }; - "licenses/get": { - parameters: { - path: { - license: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["license"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "markdown/render": { - parameters: {}; - responses: { - /** response */ - 200: { - headers: { - "Content-Length"?: string; - }; - content: { - "text/html": string; - }; - }; - 304: components["responses"]["not_modified"]; - }; - requestBody: { - content: { - "application/json": { - /** The Markdown text to render in HTML. */ - text: string; - /** The rendering mode. */ - mode?: "markdown" | "gfm"; - /** The repository context to use when creating references in `gfm` mode. */ - context?: string; - }; - }; - }; - }; - /** 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. */ - "markdown/render-raw": { - parameters: {}; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "text/html": string; - }; - }; - 304: components["responses"]["not_modified"]; - }; - requestBody: { - content: { - "text/plain": string; - "text/x-markdown": string; - }; - }; - }; - /** - * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - "apps/get-subscription-plan-for-account": { - parameters: { - path: { - /** account_id parameter */ - account_id: components["parameters"]["account_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["marketplace-purchase"]; - }; - }; - 401: components["responses"]["requires_authentication"]; - /** Response when the account has not purchased the listing */ - 404: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - }; - }; - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - "apps/list-plans": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["marketplace-listing-plan"][]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - "apps/list-accounts-for-plan": { - parameters: { - path: { - /** plan_id parameter */ - plan_id: components["parameters"]["plan_id"]; - }; - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components["parameters"]["sort"]; - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["marketplace-purchase"][]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - "apps/get-subscription-plan-for-account-stubbed": { - parameters: { - path: { - /** account_id parameter */ - account_id: components["parameters"]["account_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["marketplace-purchase"]; - }; - }; - 401: components["responses"]["requires_authentication"]; - /** Response when the account has not purchased the listing */ - 404: unknown; - }; - }; - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - "apps/list-plans-stubbed": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["marketplace-listing-plan"][]; - }; - }; - 401: components["responses"]["requires_authentication"]; - }; - }; - /** - * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - "apps/list-accounts-for-plan-stubbed": { - parameters: { - path: { - /** plan_id parameter */ - plan_id: components["parameters"]["plan_id"]; - }; - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components["parameters"]["sort"]; - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["marketplace-purchase"][]; - }; - }; - 401: components["responses"]["requires_authentication"]; - }; - }; - /** - * Returns meta information about GitHub, including 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/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ - "meta/get": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["api-overview"]; - }; - }; - 304: components["responses"]["not_modified"]; - }; - }; - "activity/list-public-events-for-repo-network": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - 301: components["responses"]["moved_permanently"]; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** List all notifications for the current user, sorted by most recently updated. */ - "activity/list-notifications-for-authenticated-user": { - parameters: { - query: { - /** If `true`, show notifications marked as read. */ - all?: components["parameters"]["all"]; - /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ - participating?: components["parameters"]["participating"]; - /** 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?: components["parameters"]["since"]; - /** 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?: components["parameters"]["before"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["thread"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** Marks all notifications 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ - "activity/mark-notifications-as-read": { - parameters: {}; - responses: { - /** response */ - 202: { - content: { - "application/json": { - message?: string; - }; - }; - }; - /** response */ - 205: unknown; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - requestBody: { - content: { - "application/json": { - /** Describes the last point that notifications were checked. */ - last_read_at?: string; - /** Whether the notification has been read. */ - read?: boolean; - }; - }; - }; - }; - "activity/get-thread": { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components["parameters"]["thread_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["thread"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - "activity/mark-thread-as-read": { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components["parameters"]["thread_id"]; - }; - }; - responses: { - /** response */ - 205: unknown; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. - */ - "activity/get-thread-subscription-for-authenticated-user": { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components["parameters"]["thread_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["thread-subscription"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. - * - * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. - * - * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. - */ - "activity/set-thread-subscription": { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components["parameters"]["thread_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["thread-subscription"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - requestBody: { - content: { - "application/json": { - /** Whether to block all notifications from a thread. */ - ignored?: boolean; - }; - }; - }; - }; - /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ - "activity/delete-thread-subscription": { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components["parameters"]["thread_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** Get the octocat as ASCII art */ - "meta/get-octocat": { - parameters: { - query: { - /** The words to show in Octocat's speech bubble */ - s?: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/octocat-stream": string; - }; - }; - }; - }; - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. - */ - "orgs/list": { - parameters: { - query: { - /** An organization ID. Only return organizations with an ID greater than this ID. */ - since?: components["parameters"]["since-org"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: { - Link?: string; - }; - content: { - "application/json": components["schemas"]["organization-simple"][]; - }; - }; - 304: components["responses"]["not_modified"]; - }; - }; - /** - * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." - */ - "orgs/get": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["organization-full"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). - * - * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. - */ - "orgs/update": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["organization-full"]; - }; - }; - 409: components["responses"]["conflict"]; - 415: components["responses"]["preview_header_missing"]; - /** Validation Failed */ - 422: { - content: { - "application/json": components["schemas"]["validation-error"] | components["schemas"]["validation-error-simple"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** Billing email address. This address is not publicized. */ - billing_email?: string; - /** The company name. */ - company?: string; - /** The publicly visible email address. */ - email?: string; - /** The Twitter username of the company. */ - twitter_username?: string; - /** The location. */ - location?: string; - /** The shorthand name of the company. */ - name?: string; - /** The description of the company. */ - description?: string; - /** Toggles whether an organization can use organization projects. */ - has_organization_projects?: boolean; - /** Toggles whether repositories that belong to the organization can use repository projects. */ - 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 organization owners can create repositories. - * Default: `true` - * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - */ - members_can_create_repositories?: boolean; - /** - * Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of: - * \* `true` - all organization members can create internal repositories. - * \* `false` - only organization owners can create internal repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_internal_repositories?: boolean; - /** - * Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: - * \* `true` - all organization members can create private repositories. - * \* `false` - only organization owners can create private repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_private_repositories?: boolean; - /** - * Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: - * \* `true` - all organization members can create public repositories. - * \* `false` - only organization owners can create public repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_public_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 Enterprise Cloud. - * \* `none` - only admin members can create repositories. - * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. - */ - members_allowed_repository_creation_type?: "all" | "private" | "none"; - /** - * Toggles whether organization members can create GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create GitHub Pages sites. - * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted. - */ - members_can_create_pages?: boolean; - /** - * Toggles whether organization members can create public GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create public GitHub Pages sites. - * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted. - */ - members_can_create_public_pages?: boolean; - /** - * Toggles whether organization members can create private GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create private GitHub Pages sites. - * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted. - */ - members_can_create_private_pages?: boolean; - blog?: string; - }; - }; - }; - }; - /** - * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - "actions/get-github-actions-permissions-organization": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-organization-permissions"]; - }; - }; - }; - }; - /** - * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - "actions/set-github-actions-permissions-organization": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - enabled_repositories: components["schemas"]["enabled-repositories"]; - allowed_actions?: components["schemas"]["allowed-actions"]; - }; - }; - }; - }; - /** - * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - "actions/list-selected-repositories-enabled-github-actions-organization": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - repositories: components["schemas"]["repository"][]; - }; - }; - }; - }; - }; - /** - * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - "actions/set-selected-repositories-enabled-github-actions-organization": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** List of repository IDs to enable for GitHub Actions. */ - selected_repository_ids: number[]; - }; - }; - }; - }; - /** - * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - "actions/enable-selected-repository-github-actions-organization": { - parameters: { - path: { - org: components["parameters"]["org"]; - repository_id: components["parameters"]["repository_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - "actions/disable-selected-repository-github-actions-organization": { - parameters: { - path: { - org: components["parameters"]["org"]; - repository_id: components["parameters"]["repository_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - "actions/get-allowed-actions-organization": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["selected-actions"]; - }; - }; - }; - }; - /** - * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings. - * - * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - "actions/set-allowed-actions-organization": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["selected-actions"]; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/list-self-hosted-runner-groups-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - runner_groups: components["schemas"]["runner-groups-org"][]; - }; - }; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Creates a new self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/create-self-hosted-runner-group-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["runner-groups-org"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** Name of the runner group. */ - name: string; - /** Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. */ - visibility?: "selected" | "all" | "private"; - /** List of repository IDs that can access the runner group. */ - selected_repository_ids?: number[]; - /** List of runner IDs to add to the runner group. */ - runners?: number[]; - }; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Gets a specific self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/get-self-hosted-runner-group-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner-groups-org"]; - }; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Deletes a self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/delete-self-hosted-runner-group-from-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Updates the `name` and `visibility` of a self-hosted runner group in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/update-self-hosted-runner-group-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner-groups-org"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** Name of the runner group. */ - name?: string; - /** Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. */ - visibility?: "selected" | "all" | "private"; - }; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists the repositories with access to a self-hosted runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/list-repo-access-to-self-hosted-runner-group-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - repositories: components["schemas"]["repository"][]; - }; - }; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/set-repo-access-to-self-hosted-runner-group-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** List of repository IDs that can access the runner group. */ - selected_repository_ids: number[]; - }; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. - */ - "actions/add-repo-access-to-self-hosted-runner-group-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - repository_id: components["parameters"]["repository_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - repository_id: components["parameters"]["repository_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists self-hosted runners that are in a specific organization group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/list-self-hosted-runners-in-group-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - runners: components["schemas"]["runner"][]; - }; - }; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Replaces the list of self-hosted runners that are part of an organization runner group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/set-self-hosted-runners-in-group-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** List of runner IDs to add to the runner group. */ - runners: number[]; - }; - }; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Adds a self-hosted runner to a runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. - */ - "actions/add-self-hosted-runner-to-group-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/remove-self-hosted-runner-from-group-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components["parameters"]["runner_group_id"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Lists all self-hosted runners configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/list-self-hosted-runners-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - runners: components["schemas"]["runner"][]; - }; - }; - }; - }; - }; - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/list-runner-applications-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner-application"][]; - }; - }; - }; - }; - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/octo-org --token TOKEN - * ``` - */ - "actions/create-registration-token-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["authentication-token"]; - }; - }; - }; - }; - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - "actions/create-remove-token-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["authentication-token"]; - }; - }; - }; - }; - /** - * Gets a specific self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/get-self-hosted-runner-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner"]; - }; - }; - }; - }; - /** - * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - "actions/delete-self-hosted-runner-from-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - "actions/list-org-secrets": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - secrets: components["schemas"]["organization-actions-secret"][]; - }; - }; - }; - }; - }; - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - "actions/get-org-public-key": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-public-key"]; - }; - }; - }; - }; - /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - "actions/get-org-secret": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["organization-actions-secret"]; - }; - }; - }; - }; - /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - "actions/create-or-update-org-secret": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - }; - }; - responses: { - /** Response when creating a secret */ - 201: unknown; - /** Response when updating a secret */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ - encrypted_value?: string; - /** ID of the key you used to encrypt the secret. */ - key_id?: string; - /** - * Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. - */ - visibility?: "all" | "private" | "selected"; - /** An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[]; - }; - }; - }; - }; - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - "actions/delete-org-secret": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - "actions/list-selected-repos-for-org-secret": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - repositories: components["schemas"]["minimal-repository"][]; - }; - }; - }; - }; - }; - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - "actions/set-selected-repos-for-org-secret": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: number[]; - }; - }; - }; - }; - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - "actions/add-selected-repo-to-org-secret": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - repository_id: number; - }; - }; - responses: { - /** Response when repository was added to the selected list */ - 204: never; - /** Response when visibility type is not set to selected */ - 409: unknown; - }; - }; - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - "actions/remove-selected-repo-from-org-secret": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - repository_id: number; - }; - }; - responses: { - /** Response when repository was removed from the selected list */ - 204: never; - /** Response when visibility type not set to selected */ - 409: unknown; - }; - }; - /** - * **Note:** The audit log REST API is currently in beta and is subject to change. - * - * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." - * - * To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. - */ - "orgs/get-audit-log": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ - phrase?: components["parameters"]["audit-log-phrase"]; - /** - * The event types to include: - * - * - `web` - returns web (non-Git) events - * - `git` - returns Git events - * - `all` - returns both web and Git events - * - * The default is `web`. - */ - include?: components["parameters"]["audit-log-include"]; - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components["parameters"]["audit-log-after"]; - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components["parameters"]["audit-log-before"]; - /** - * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. - * - * The default is `desc`. - */ - order?: components["parameters"]["audit-log-order"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - }; - }; - responses: { - /** Response */ - 200: { - content: { - "application/json": components["schemas"]["audit-log-event"][]; - }; - }; - }; - }; - /** List the users blocked by an organization. */ - "orgs/list-blocked-users": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 415: components["responses"]["preview_header_missing"]; - }; - }; - "orgs/check-blocked-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** If the user is blocked: */ - 204: never; - /** If the user is not blocked: */ - 404: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - }; - }; - "orgs/block-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 422: components["responses"]["validation_failed"]; - }; - }; - "orgs/unblock-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://help.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - "orgs/list-saml-sso-authorizations": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["credential-authorization"][]; - }; - }; - }; - }; - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - "orgs/remove-saml-sso-authorization": { - parameters: { - path: { - org: components["parameters"]["org"]; - credential_id: number; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - "activity/list-public-org-events": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - }; - }; - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - "orgs/list-failed-invitations": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["organization-invitation"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "orgs/list-webhooks": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["org-hook"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Here's how you can create a hook that posts payloads in JSON format: */ - "orgs/create-webhook": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["org-hook"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Must be passed as "web". */ - name: string; - /** Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ - config: { - url: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - username?: string; - password?: string; - }; - /** Determines what [events](https://docs.github.com/webhooks/event-payloads) 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; - }; - }; - }; - }; - /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ - "orgs/get-webhook": { - parameters: { - path: { - org: components["parameters"]["org"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["org-hook"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "orgs/delete-webhook": { - parameters: { - path: { - org: components["parameters"]["org"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ - "orgs/update-webhook": { - parameters: { - path: { - org: components["parameters"]["org"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["org-hook"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ - config?: { - url: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - }; - /** Determines what [events](https://docs.github.com/webhooks/event-payloads) 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; - name?: string; - }; - }; - }; - }; - /** - * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." - * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. - */ - "orgs/get-webhook-config-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Default response */ - 200: { - content: { - "application/json": components["schemas"]["webhook-config"]; - }; - }; - }; - }; - /** - * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." - * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. - */ - "orgs/update-webhook-config-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Default response */ - 200: { - content: { - "application/json": components["schemas"]["webhook-config"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - url?: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - }; - }; - }; - }; - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - "orgs/ping-webhook": { - parameters: { - path: { - org: components["parameters"]["org"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/get-org-installation": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["installation"]; - }; - }; - }; - }; - /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ - "orgs/list-app-installations": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - installations: components["schemas"]["installation"][]; - }; - }; - }; - }; - }; - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - "interactions/get-restrictions-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["interaction-limit-response"]; - }; - }; - }; - }; - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - "interactions/set-restrictions-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["interaction-limit-response"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": components["schemas"]["interaction-limit"]; - }; - }; - }; - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - "interactions/remove-restrictions-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** 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`. */ - "orgs/list-pending-invitations": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["organization-invitation"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - "orgs/create-invitation": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["organization-invitation"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** **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[]; - }; - }; - }; - }; - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - "orgs/cancel-invitation": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** invitation_id parameter */ - invitation_id: components["parameters"]["invitation_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - "orgs/list-invitation-teams": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** invitation_id parameter */ - invitation_id: components["parameters"]["invitation_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * List issues in an organization assigned to the authenticated user. - * - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - "issues/list-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** - * 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?: components["parameters"]["labels"]; - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: "created" | "updated" | "comments"; - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** 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. */ - "orgs/list-members": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** - * 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - /** Response if requester is not an organization member */ - 302: never; - 422: components["responses"]["validation_failed"]; - }; - }; - /** Check if a user is, publicly or privately, a member of the organization. */ - "orgs/check-membership-for-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Response if requester is an organization member and user is a member */ - 204: never; - /** Response if requester is not an organization member */ - 302: never; - /** Response if requester is an organization member and user is not a member */ - 404: unknown; - }; - }; - /** 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. */ - "orgs/remove-member": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 403: components["responses"]["forbidden"]; - }; - }; - /** In order to get a user's membership with an organization, the authenticated user must be an organization member. */ - "orgs/get-membership-for-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["org-membership"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. - */ - "orgs/set-membership-for-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["org-membership"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** - * 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"; - }; - }; - }; - }; - /** - * 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. - */ - "orgs/remove-membership-for-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Lists the most recent migrations. */ - "migrations/list-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["migration"][]; - }; - }; - }; - }; - /** Initiates the generation of a migration archive. */ - "migrations/start-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["migration"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - exclude?: string[]; - }; - }; - }; - }; - /** - * 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. - */ - "migrations/get-status-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - }; - }; - responses: { - /** - * * `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. - */ - 200: { - content: { - "application/json": components["schemas"]["migration"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Fetches the URL to a migration archive. */ - "migrations/download-archive-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - }; - }; - responses: { - /** response */ - 302: never; - 404: components["responses"]["not_found"]; - }; - }; - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - "migrations/delete-archive-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - "migrations/unlock-repo-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - /** repo_name parameter */ - repo_name: components["parameters"]["repo_name"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** List all the repositories for this organization migration. */ - "migrations/list-repos-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** List all users who are outside collaborators of an organization. */ - "orgs/list-outside-collaborators": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** - * 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - }; - }; - /** 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/)". */ - "orgs/convert-member-to-outside-collaborator": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** User is getting converted asynchronously */ - 202: unknown; - /** User was converted */ - 204: never; - /** response */ - 403: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Removing a user from this list will remove them from all the organization's repositories. */ - "orgs/remove-outside-collaborator": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - /** Response if user is a member of the organization */ - 422: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - }; - }; - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-package-for-organization": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package"]; - }; - }; - }; - }; - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - "packages/delete-package-for-org": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - org: components["parameters"]["org"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - "packages/restore-package-for-org": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - org: components["parameters"]["org"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-all-package-versions-for-a-package-owned-by-an-org": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package-version"][]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Gets a specific package version in an organization. - * - * You must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-package-version-for-organization": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - org: components["parameters"]["org"]; - /** Unique identifier of the package version. */ - package_version_id: components["parameters"]["package_version_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package-version"]; - }; - }; - }; - }; - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - "packages/delete-package-version-for-org": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - org: components["parameters"]["org"]; - /** Unique identifier of the package version. */ - package_version_id: components["parameters"]["package_version_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - "packages/restore-package-version-for-org": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - org: components["parameters"]["org"]; - /** Unique identifier of the package version. */ - package_version_id: components["parameters"]["package_version_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** 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. */ - "projects/list-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["project"][]; - }; - }; - 422: components["responses"]["validation_failed_simple"]; - }; - }; - /** 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. */ - "projects/create-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["project"]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** The name of the project. */ - name: string; - /** The description of the project. */ - body?: string; - }; - }; - }; - }; - /** Members of an organization can choose to have their membership publicized or not. */ - "orgs/list-public-members": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - }; - }; - "orgs/check-public-membership-for-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Response if user is a public member */ - 204: never; - /** Response if user is not a public member */ - 404: unknown; - }; - }; - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - "orgs/set-public-membership-for-authenticated-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 403: components["responses"]["forbidden"]; - }; - }; - "orgs/remove-public-membership-for-authenticated-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Lists repositories for the specified organization. */ - "repos/list-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. */ - type?: "all" | "public" | "private" | "forks" | "sources" | "member" | "internal"; - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ - sort?: "created" | "updated" | "pushed" | "full_name"; - /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */ - direction?: "asc" | "desc"; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - }; - }; - /** - * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.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 - */ - "repos/create-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["repository"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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. */ - private?: boolean; - /** - * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. For more information, see "[Creating an internal repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. - * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. - */ - visibility?: "public" | "private" | "visibility" | "internal"; - /** 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; - /** Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */ - delete_branch_on_merge?: boolean; - }; - }; - }; - }; - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - "billing/get-github-actions-billing-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-billing-usage"]; - }; - }; - }; - }; - /** - * Gets the free and paid storage usued for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - "billing/get-github-packages-billing-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["packages-billing-usage"]; - }; - }; - }; - }; - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - "billing/get-shared-storage-billing-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["combined-billing-usage"]; - }; - }; - }; - }; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - * - * The `per_page` parameter provides pagination for a list of IdP groups the authenticated user can access in an organization. For example, if the user `octocat` wants to see two groups per page in `octo-org` via cURL, it would look like this: - */ - "teams/list-idp-groups-for-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: { - Link?: string; - }; - content: { - "application/json": components["schemas"]["group-mapping"]; - }; - }; - }; - }; - /** Lists all teams in an organization that are visible to the authenticated user. */ - "teams/list": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * 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)." - * - * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". - */ - "teams/create": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["team-full"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The name of the team. */ - name: string; - /** The description of the team. */ - description?: string; - /** List GitHub IDs for organization members who will become team maintainers. */ - 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` - */ - 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. */ - parent_team_id?: number; - }; - }; - }; - }; - /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. - */ - "teams/get-by-name": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-full"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * To delete a team, the authenticated user must be an organization owner or team maintainer. - * - * If you are an organization owner, deleting a parent team will delete all of its child teams as well. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. - */ - "teams/delete-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. - */ - "teams/update-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["team-full"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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?: "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. */ - parent_team_id?: number | null; - }; - }; - }; - }; - /** - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. - */ - "teams/list-discussions-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team-discussion"][]; - }; - }; - }; - }; - /** - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. - */ - "teams/create-discussion-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["team-discussion"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - /** - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - "teams/get-discussion-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-discussion"]; - }; - }; - }; - }; - /** - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - "teams/delete-discussion-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - "teams/update-discussion-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-discussion"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The discussion post's title. */ - title?: string; - /** The discussion post's body text. */ - body?: string; - }; - }; - }; - }; - /** - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - "teams/list-discussion-comments-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team-discussion-comment"][]; - }; - }; - }; - }; - /** - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - "teams/create-discussion-comment-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["team-discussion-comment"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The discussion comment's body text. */ - body: string; - }; - }; - }; - }; - /** - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - "teams/get-discussion-comment-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-discussion-comment"]; - }; - }; - }; - }; - /** - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - "teams/delete-discussion-comment-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - "teams/update-discussion-comment-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-discussion-comment"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The discussion comment's body text. */ - body: string; - }; - }; - }; - }; - /** - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - "reactions/list-for-team-discussion-comment-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["reaction"][]; - }; - }; - }; - }; - /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.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. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - "reactions/create-for-team-discussion-comment-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - }; - }; - }; - }; - /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. - * - * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "reactions/delete-for-team-discussion-comment": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - reaction_id: components["parameters"]["reaction-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - "reactions/list-for-team-discussion-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["reaction"][]; - }; - }; - }; - }; - /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.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. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - "reactions/create-for-team-discussion-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - }; - }; - }; - }; - /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. - * - * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "reactions/delete-for-team-discussion": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - discussion_number: components["parameters"]["discussion-number"]; - reaction_id: components["parameters"]["reaction-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * 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`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. - */ - "teams/list-pending-invitations-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["organization-invitation"][]; - }; - }; - }; - }; - /** - * Team members will include the members of child teams. - * - * To list members in a team, the team must be visible to the authenticated user. - */ - "teams/list-members-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - query: { - /** - * 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - }; - }; - /** - * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. - * - * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - "teams/get-membership-for-user-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-membership"]; - }; - }; - /** Response if user has no team membership */ - 404: unknown; - }; - }; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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/)." - * - * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. - * - * 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 team maintainer. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - "teams/add-or-update-membership-for-user-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-membership"]; - }; - }; - /** Response if team synchronization is set up */ - 403: unknown; - /** Response if you attempt to add an organization to a team */ - 422: { - content: { - "application/json": { - message?: string; - errors?: { - code?: string; - field?: string; - resource?: string; - }[]; - }; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** - * 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"; - }; - }; - }; - }; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-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/)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - "teams/remove-membership-for-user-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - /** Response if team synchronization is set up */ - 403: unknown; - }; - }; - /** - * Lists the organization projects for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. - */ - "teams/list-projects-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team-project"][]; - }; - }; - }; - }; - /** - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - "teams/check-permissions-for-project-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-project"]; - }; - }; - /** Response if project is not managed by this team */ - 404: unknown; - }; - }; - /** - * 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. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - "teams/add-or-update-project-permissions-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - /** Response if the project is not owned by the organization */ - 403: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - permission?: "read" | "write" | "admin"; - } | null; - }; - }; - }; - /** - * 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. This endpoint removes the project from the team, but does not delete the project. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - "teams/remove-project-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Lists a team's repositories visible to the authenticated user. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. - */ - "teams/list-repos-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - }; - }; - /** - * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. - * - * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - */ - "teams/check-permissions-for-repo-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Alternative response with repository permissions */ - 200: { - content: { - "application/vnd.github.v3.repository+json": components["schemas"]["team-repository"]; - }; - }; - /** Response if team has permission for the repository */ - 204: never; - /** Response if team does not have permission for the repository */ - 404: unknown; - }; - }; - /** - * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - * - * For more information about the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". - */ - "teams/add-or-update-repo-permissions-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** - * 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. - * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations. - * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - */ - permission?: "pull" | "push" | "admin" | "maintain" | "triage"; - }; - }; - }; - }; - /** - * 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. This does not delete the repository, it just removes it from the team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - */ - "teams/remove-repo-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - "teams/list-idp-groups-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["group-mapping"]; - }; - }; - }; - }; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - "teams/create-or-update-idp-group-connections-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["group-mapping"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups: { - /** ID of the IdP group. */ - group_id: string; - /** Name of the IdP group. */ - group_name: string; - /** Description of the IdP group. */ - group_description: string; - }[]; - }; - }; - }; - }; - /** - * Lists the child teams of the team specified by `{team_slug}`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. - */ - "teams/list-child-in-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** team_slug parameter */ - team_slug: components["parameters"]["team_slug"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** Response if child teams exist */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - }; - }; - "projects/get-card": { - parameters: { - path: { - /** card_id parameter */ - card_id: components["parameters"]["card_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["project-card"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "projects/delete-card": { - parameters: { - path: { - /** card_id parameter */ - card_id: components["parameters"]["card_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - /** Forbidden */ - 403: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - errors?: string[]; - }; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "projects/update-card": { - parameters: { - path: { - /** card_id parameter */ - card_id: components["parameters"]["card_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["project-card"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** The project card's note */ - note?: string | null; - /** Whether or not the card is archived */ - archived?: boolean; - }; - }; - }; - }; - "projects/move-card": { - parameters: { - path: { - /** card_id parameter */ - card_id: components["parameters"]["card_id"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": { - [key: string]: any; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - /** Forbidden */ - 403: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - errors?: { - code?: string; - message?: string; - resource?: string; - field?: string; - }[]; - }; - }; - }; - 422: components["responses"]["validation_failed"]; - /** Service Unavailable */ - 503: { - content: { - "application/json": { - code?: string; - message?: string; - documentation_url?: string; - errors?: { - code?: string; - message?: string; - }[]; - }; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The position of the card in a column */ - position: string; - /** The unique identifier of the column the card should be moved to */ - column_id?: number; - }; - }; - }; - }; - "projects/get-column": { - parameters: { - path: { - /** column_id parameter */ - column_id: components["parameters"]["column_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["project-column"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "projects/delete-column": { - parameters: { - path: { - /** column_id parameter */ - column_id: components["parameters"]["column_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - "projects/update-column": { - parameters: { - path: { - /** column_id parameter */ - column_id: components["parameters"]["column_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["project-column"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - requestBody: { - content: { - "application/json": { - /** Name of the project column */ - name: string; - }; - }; - }; - }; - "projects/list-cards": { - parameters: { - path: { - /** column_id parameter */ - column_id: components["parameters"]["column_id"]; - }; - query: { - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["project-card"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - "projects/create-card": { - parameters: { - path: { - /** column_id parameter */ - column_id: components["parameters"]["column_id"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["project-card"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - /** Validation Failed */ - 422: { - content: { - "application/json": components["schemas"]["validation-error"] | components["schemas"]["validation-error-simple"]; - }; - }; - /** Service Unavailable */ - 503: { - content: { - "application/json": { - code?: string; - message?: string; - documentation_url?: string; - errors?: { - code?: string; - message?: string; - }[]; - }; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The project card's note */ - note: string | null; - } | { - /** The unique identifier of the content associated with the card */ - content_id: number; - /** The piece of content associated with the card */ - content_type: string; - }; - }; - }; - }; - "projects/move-column": { - parameters: { - path: { - /** column_id parameter */ - column_id: components["parameters"]["column_id"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": { - [key: string]: any; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** The position of the column in a project */ - position: string; - }; - }; - }; - }; - /** 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. */ - "projects/get": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["project"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ - "projects/delete": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** Delete Success */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - /** Forbidden */ - 403: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - errors?: string[]; - }; - }; - }; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - }; - }; - /** 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. */ - "projects/update": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["project"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - /** Forbidden */ - 403: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - errors?: string[]; - }; - }; - }; - /** Response if the authenticated user does not have access to the project */ - 404: unknown; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** Name of the project */ - name?: string; - /** Body of the project */ - body?: string | null; - /** State of the project; either 'open' or 'closed' */ - state?: string; - /** The baseline permission that all organization members have on this project */ - organization_permission?: "read" | "write" | "admin" | "none"; - /** Whether or not this project can be seen by everyone. */ - private?: boolean; - }; - }; - }; - }; - /** 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. */ - "projects/list-collaborators": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - }; - query: { - /** - * 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ - "projects/add-collaborator": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The permission to grant the collaborator. */ - permission?: "read" | "write" | "admin"; - }; - }; - }; - }; - /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ - "projects/remove-collaborator": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** 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. */ - "projects/get-permission-for-user": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["repository-collaborator-permission"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - }; - "projects/list-columns": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["project-column"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - "projects/create-column": { - parameters: { - path: { - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["project-column"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** Name of the project column */ - name: string; - }; - }; - }; - }; - /** - * **Note:** Accessing this endpoint does not count against your REST API rate limit. - * - * **Note:** The `rate` object 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. - */ - "rate-limit/get": { - parameters: {}; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["rate-limit-overview"]; - }; - }; - 304: components["responses"]["not_modified"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - "reactions/delete-legacy": { - parameters: { - path: { - reaction_id: components["parameters"]["reaction-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 410: components["responses"]["gone"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file. - * - * 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. - */ - "repos/get": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["full-repository"]; - }; - }; - 301: components["responses"]["moved_permanently"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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, you will get a `403 Forbidden` response. - */ - "repos/delete": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ - 403: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ - "repos/update": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["full-repository"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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. 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; - /** Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. The `visibility` parameter overrides the `private` parameter when you use both along with the `nebula-preview` preview header. */ - visibility?: "public" | "private" | "visibility" | "internal"; - /** 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; - /** Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */ - delete_branch_on_merge?: boolean; - /** `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. */ - archived?: boolean; - }; - }; - }; - }; - /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - "actions/list-artifacts-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - artifacts: components["schemas"]["artifact"][]; - }; - }; - }; - }; - }; - /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - "actions/get-artifact": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** artifact_id parameter */ - artifact_id: components["parameters"]["artifact_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["artifact"]; - }; - }; - }; - }; - /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - "actions/delete-artifact": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** artifact_id parameter */ - artifact_id: components["parameters"]["artifact_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in - * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to - * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - * GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - "actions/download-artifact": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** artifact_id parameter */ - artifact_id: components["parameters"]["artifact_id"]; - archive_format: string; - }; - }; - responses: { - /** response */ - 302: never; - }; - }; - /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - "actions/get-job-for-workflow-run": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** job_id parameter */ - job_id: components["parameters"]["job_id"]; - }; - }; - responses: { - /** response */ - 202: { - content: { - "application/json": components["schemas"]["job"]; - }; - }; - }; - }; - /** - * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look - * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can - * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must - * have the `actions:read` permission to use this endpoint. - */ - "actions/download-job-logs-for-workflow-run": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** job_id parameter */ - job_id: components["parameters"]["job_id"]; - }; - }; - responses: { - /** response */ - 302: never; - }; - }; - /** - * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - "actions/get-github-actions-permissions-repository": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-repository-permissions"]; - }; - }; - }; - }; - /** - * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. - * - * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - "actions/set-github-actions-permissions-repository": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - enabled: components["schemas"]["actions-enabled"]; - allowed_actions?: components["schemas"]["allowed-actions"]; - }; - }; - }; - }; - /** - * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - "actions/get-allowed-actions-repository": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["selected-actions"]; - }; - }; - }; - }; - /** - * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." - * - * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings. - * - * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - "actions/set-allowed-actions-repository": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["selected-actions"]; - }; - }; - }; - /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ - "actions/list-self-hosted-runners-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - runners: components["schemas"]["runner"][]; - }; - }; - }; - }; - }; - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. - */ - "actions/list-runner-applications-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner-application"][]; - }; - }; - }; - }; - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate - * using an access token with the `repo` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN - * ``` - */ - "actions/create-registration-token-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["authentication-token"]; - }; - }; - }; - }; - /** - * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. - * You must authenticate using an access token with the `repo` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - "actions/create-remove-token-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["authentication-token"]; - }; - }; - }; - }; - /** - * Gets a specific self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - "actions/get-self-hosted-runner-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["runner"]; - }; - }; - }; - }; - /** - * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `repo` - * scope to use this endpoint. - */ - "actions/delete-self-hosted-runner-from-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** Unique identifier of the self-hosted runner. */ - runner_id: components["parameters"]["runner_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - "actions/list-workflow-runs-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ - actor?: components["parameters"]["actor"]; - /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ - branch?: components["parameters"]["workflow-run-branch"]; - /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ - event?: components["parameters"]["event"]; - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ - status?: components["parameters"]["workflow-run-status"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - workflow_runs: components["schemas"]["workflow-run"][]; - }; - }; - }; - }; - }; - /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - "actions/get-workflow-run": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["workflow-run"]; - }; - }; - }; - }; - /** - * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is - * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use - * this endpoint. - */ - "actions/delete-workflow-run": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - "actions/list-workflow-run-artifacts": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - artifacts: components["schemas"]["artifact"][]; - }; - }; - }; - }; - }; - /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - "actions/cancel-workflow-run": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - }; - responses: { - /** response */ - 202: unknown; - }; - }; - /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ - "actions/list-jobs-for-workflow-run": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - query: { - /** - * Filters jobs by their `completed_at` timestamp. Can be one of: - * \* `latest`: Returns jobs from the most recent execution of the workflow run. - * \* `all`: Returns all jobs for a workflow run, including from old executions of the workflow run. - */ - filter?: "latest" | "all"; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - jobs: components["schemas"]["job"][]; - }; - }; - }; - }; - }; - /** - * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for - * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use - * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have - * the `actions:read` permission to use this endpoint. - */ - "actions/download-workflow-run-logs": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - }; - responses: { - /** response */ - 302: never; - }; - }; - /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - "actions/delete-workflow-run-logs": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - "actions/re-run-workflow": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - }; - responses: { - /** response */ - 201: unknown; - }; - }; - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - "actions/get-workflow-run-usage": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - run_id: components["parameters"]["run-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["workflow-run-usage"]; - }; - }; - }; - }; - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - "actions/list-repo-secrets": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - secrets: components["schemas"]["actions-secret"][]; - }; - }; - }; - }; - }; - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - "actions/get-repo-public-key": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-public-key"]; - }; - }; - }; - }; - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - "actions/get-repo-secret": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-secret"]; - }; - }; - }; - }; - /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - "actions/create-or-update-repo-secret": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - }; - }; - responses: { - /** Response when creating a secret */ - 201: unknown; - /** Response when updating a secret */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ - encrypted_value?: string; - /** ID of the key you used to encrypt the secret. */ - key_id?: string; - }; - }; - }; - }; - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - "actions/delete-repo-secret": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** secret_name parameter */ - secret_name: components["parameters"]["secret_name"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - "actions/list-repo-workflows": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - workflows: components["schemas"]["workflow"][]; - }; - }; - }; - }; - }; - /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - "actions/get-workflow": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components["parameters"]["workflow-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["workflow"]; - }; - }; - }; - }; - /** - * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - "actions/disable-workflow": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components["parameters"]["workflow-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)." - */ - "actions/create-workflow-dispatch": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components["parameters"]["workflow-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - requestBody: { - content: { - "application/json": { - /** The git reference for the workflow. The reference can be a branch or tag name. */ - ref: string; - /** Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ - inputs?: { - [key: string]: string; - }; - }; - }; - }; - }; - /** - * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - "actions/enable-workflow": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components["parameters"]["workflow-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - */ - "actions/list-workflow-runs": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components["parameters"]["workflow-id"]; - }; - query: { - /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ - actor?: components["parameters"]["actor"]; - /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ - branch?: components["parameters"]["workflow-run-branch"]; - /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ - event?: components["parameters"]["event"]; - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ - status?: components["parameters"]["workflow-run-status"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - workflow_runs: components["schemas"]["workflow-run"][]; - }; - }; - }; - }; - }; - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - "actions/get-workflow-usage": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components["parameters"]["workflow-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["workflow-usage"]; - }; - }; - }; - }; - /** Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ - "issues/list-assignees": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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. - */ - "issues/check-user-can-be-assigned": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - assignee: string; - }; - }; - responses: { - /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ - 204: never; - /** Otherwise a `404` status code is returned. */ - 404: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - }; - }; - /** 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)". */ - "repos/enable-automated-security-fixes": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** 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)". */ - "repos/disable-automated-security-fixes": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - "repos/list-branches": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["short-branch"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "repos/get-branch": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["branch-with-protection"]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/get-branch-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["branch-protection"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. - */ - "repos/update-branch-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["protected-branch"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** Require status checks to pass before merging. Set to `null` to disable. */ - required_status_checks: { - /** 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[]; - } | 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: { - /** 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?: { - /** The list of user `login`s with dismissal access */ - users?: string[]; - /** The list of team `slug`s with dismissal access */ - teams?: string[]; - }; - /** 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/) review them. */ - require_code_owner_reviews?: boolean; - /** Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ - required_approving_review_count?: number; - } | null; - /** Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ - restrictions: { - /** The list of user `login`s with push access */ - users: string[]; - /** The list of team `slug`s with push access */ - teams: string[]; - /** The list of app `slug`s with push access */ - apps?: string[]; - } | null; - /** Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ - required_linear_history?: boolean; - /** Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ - allow_force_pushes?: boolean | null; - /** Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ - allow_deletions?: boolean; - }; - }; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/delete-branch-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 403: components["responses"]["forbidden"]; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/get-admin-branch-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["protected-branch-admin-enforced"]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - "repos/set-admin-branch-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["protected-branch-admin-enforced"]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - "repos/delete-admin-branch-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** No Content */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/get-pull-request-review-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/vnd.github.luke-cage-preview+json": components["schemas"]["protected-branch-pull-request-review"]; - }; - }; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/delete-pull-request-review-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** No Content */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - "repos/update-pull-request-review-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["protected-branch-pull-request-review"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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?: { - /** The list of user `login`s with dismissal access */ - users?: string[]; - /** The list of team `slug`s with dismissal access */ - teams?: string[]; - }; - /** 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; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - "repos/get-commit-signature-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["protected-branch-admin-enforced"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - "repos/create-commit-signature-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["protected-branch-admin-enforced"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - "repos/delete-commit-signature-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** No Content */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/get-status-checks-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["status-check-policy"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/remove-status-check-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** No Content */ - 204: never; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. - */ - "repos/update-status-check-protection": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["status-check-policy"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - }; - }; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/get-all-status-check-contexts": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": string[]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/set-status-check-contexts": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": string[]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** contexts parameter */ - contexts: string[]; - }; - }; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/add-status-check-contexts": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": string[]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** contexts parameter */ - contexts: string[]; - }; - }; - }; - }; - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "repos/remove-status-check-contexts": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": string[]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** contexts parameter */ - contexts: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists who has access to this protected branch. - * - * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. - */ - "repos/get-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["branch-restriction-policy"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Disables the ability to restrict who can push to this branch. - */ - "repos/delete-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** No Content */ - 204: never; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - */ - "repos/get-apps-with-access-to-protected-branch": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["integration"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - "repos/set-app-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["integration"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** apps parameter */ - apps: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - "repos/add-app-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["integration"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** apps parameter */ - apps: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - "repos/remove-app-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["integration"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** apps parameter */ - apps: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the teams who have push access to this branch. The list includes child teams. - */ - "repos/get-teams-with-access-to-protected-branch": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. - * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - "repos/set-team-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** teams parameter */ - teams: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | - */ - "repos/add-team-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** teams parameter */ - teams: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of a team to push to this branch. You can also remove push access for child teams. - * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - "repos/remove-team-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** teams parameter */ - teams: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the people who have push access to this branch. - */ - "repos/get-users-with-access-to-protected-branch": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | - */ - "repos/set-user-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** users parameter */ - users: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | - */ - "repos/add-user-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** users parameter */ - users: string[]; - }; - }; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of a user to push to this branch. - * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - "repos/remove-user-access-restrictions": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** users parameter */ - users: string[]; - }; - }; - }; - }; - /** - * Renames a branch in a repository. - * - * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". - * - * The permissions required to use this endpoint depends on whether you are renaming the default branch. - * - * To rename a non-default branch: - * - * * Users must have push access. - * * GitHub Apps must have the `contents:write` repository permission. - * - * To rename the default branch: - * - * * Users must have admin or owner permissions. - * * GitHub Apps must have the `administration:write` repository permission. - */ - "repos/rename-branch": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The name of the branch. */ - branch: components["parameters"]["branch"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["branch-with-protection"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The new name of the branch. */ - new_name: string; - }; - }; - }; - }; - /** - * **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. - * - * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. - */ - "checks/create": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["check-run"]; - }; - }; - }; - requestBody: { - content: { - "application/json": Partial<{ - status?: "completed"; - } & { - [key: string]: any; - }> & Partial<{ - status?: "queued" | "in_progress"; - } & { - [key: string]: any; - }>; - }; - }; - }; - /** - * **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. - */ - "checks/get": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** check_run_id parameter */ - check_run_id: components["parameters"]["check_run_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["check-run"]; - }; - }; - }; - }; - /** - * **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. - */ - "checks/update": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** check_run_id parameter */ - check_run_id: components["parameters"]["check_run_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["check-run"]; - }; - }; - }; - requestBody: { - content: { - "application/json": Partial<{ - status?: "completed"; - } & { - [key: string]: any; - }> & Partial<{ - status?: "queued" | "in_progress"; - } & { - [key: string]: any; - }>; - }; - }; - }; - /** 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. */ - "checks/list-annotations": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** check_run_id parameter */ - check_run_id: components["parameters"]["check_run_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["check-annotation"][]; - }; - }; - }; - }; - /** - * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - "checks/create-suite": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["check-suite"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The sha of the head commit. */ - head_sha: string; - }; - }; - }; - }; - /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ - "checks/set-suites-preferences": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["check-suite-preference"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ - auto_trigger_checks?: { - /** The `id` of the GitHub App. */ - app_id: number; - /** Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. */ - setting: boolean; - }[]; - }; - }; - }; - }; - /** - * **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. - */ - "checks/get-suite": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** check_suite_id parameter */ - check_suite_id: components["parameters"]["check_suite_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["check-suite"]; - }; - }; - }; - }; - /** - * **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. - */ - "checks/list-for-suite": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** check_suite_id parameter */ - check_suite_id: components["parameters"]["check_suite_id"]; - }; - query: { - /** Returns check runs with the specified `name`. */ - check_name?: components["parameters"]["check_name"]; - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status?: components["parameters"]["status"]; - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - check_runs: components["schemas"]["check-run"][]; - }; - }; - }; - }; - }; - /** - * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. - */ - "checks/rerequest-suite": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** check_suite_id parameter */ - check_suite_id: components["parameters"]["check_suite_id"]; - }; - }; - responses: { - /** response */ - 201: unknown; - }; - }; - /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint. GitHub Apps must have the `security_events` read permission to use - * this endpoint. - * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the the default branch or for the specified Git reference - * (if you used `ref` in the request). - */ - "code-scanning/list-alerts-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components["parameters"]["tool_name"]; - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components["parameters"]["tool_guid"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components["parameters"]["git_ref"]; - /** Set to `open`, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components["schemas"]["code-scanning-alert-state"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-scanning-alert-items"][]; - }; - }; - 403: components["responses"]["code_scanning_forbidden_read"]; - 404: components["responses"]["not_found"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. - */ - "code-scanning/get-alert": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components["parameters"]["alert_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-scanning-alert"]; - }; - }; - 403: components["responses"]["code_scanning_forbidden_read"]; - 404: components["responses"]["not_found"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. */ - "code-scanning/update-alert": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components["parameters"]["alert_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-scanning-alert"]; - }; - }; - 403: components["responses"]["code_scanning_forbidden_write"]; - 404: components["responses"]["not_found"]; - 503: components["responses"]["service_unavailable"]; - }; - requestBody: { - content: { - "application/json": { - state: components["schemas"]["code-scanning-alert-set-state"]; - dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; - }; - }; - }; - }; - /** Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - "code-scanning/list-alerts-instances": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components["parameters"]["alert_number"]; - }; - query: { - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components["parameters"]["git_ref"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-scanning-alert-instance"][]; - }; - }; - 403: components["responses"]["code_scanning_forbidden_read"]; - 404: components["responses"]["not_found"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Lists the details of all code scanning analyses for a repository, - * starting with the most recent. - * The response is paginated and you can use the `page` and `per_page` parameters - * to list the analyses you're interested in. - * By default 30 analyses are listed per page. - * - * The `rules_count` field in the response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * You must use an access token with the `security_events` scope to use this endpoint. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - "code-scanning/list-recent-analyses": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components["parameters"]["tool_name"]; - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components["parameters"]["tool_guid"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components["schemas"]["code-scanning-ref"]; - /** Filter analyses belonging to the same SARIF upload. */ - sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-scanning-analysis"][]; - }; - }; - 403: components["responses"]["code_scanning_forbidden_read"]; - 404: components["responses"]["not_found"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. - * - * The `rules_count` field in the default response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * If you use the Accept header `application/sarif+json`, - * the response contains the analysis data that was uploaded. - * This is formatted as - * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). - * For an example response, see "[Custom media type for code scanning](#custom-media-type-for-code-scanning)." - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - "code-scanning/get-analysis": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-scanning-analysis"]; - }; - }; - 403: components["responses"]["code_scanning_forbidden_read"]; - 404: components["responses"]["not_found"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` and `repo:security_events` scopes. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set - * (see the example default response below). - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in the set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find the deletable analysis for one of the sets, - * step through deleting the analyses in that set, - * and then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `next_analysis_url` and, if found, use this in the next iteration. - * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `next_analysis_url` value. Alternatively, you could use the `confirm_delete_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. - */ - "code-scanning/delete-analysis": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number; - }; - query: { - /** Allow deletion if the specified analysis is the last in a set. The parameter can be used without a value as the parameter value is not considered. If you attempt to delete the final analysis in a set without using this parameter you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ - confirm_delete?: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-scanning-analysis-deletion"]; - }; - }; - 400: components["responses"]["bad_request"]; - 403: components["responses"]["code_scanning_forbidden_write"]; - 404: components["responses"]["not_found"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 - * ``` - * - * SARIF upload supports a maximum of 1000 results per analysis run. Any results over this limit are ignored. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. - * - * The `202 Accepted`, response includes an `id` value. - * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. - * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." - */ - "code-scanning/upload-sarif": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 202: { - content: { - "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; - }; - }; - /** Response if the sarif field is invalid */ - 400: unknown; - 403: components["responses"]["code_scanning_forbidden_write"]; - 404: components["responses"]["not_found"]; - /** Response if the sarif field is too large */ - 413: unknown; - 503: components["responses"]["service_unavailable"]; - }; - requestBody: { - content: { - "application/json": { - commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; - ref: components["schemas"]["code-scanning-ref"]; - sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; - /** - * The base directory used in the analysis, as it appears in the SARIF file. - * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - */ - checkout_uri?: string; - /** The time that the analysis 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; - /** The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ - tool_name?: string; - }; - }; - }; - }; - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - "code-scanning/get-sarif": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The SARIF ID obtained after uploading. */ - sarif_id: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-scanning-sarifs-status"]; - }; - }; - 403: components["responses"]["code_scanning_forbidden_read"]; - /** Response if the sarif id does not match any upload */ - 404: unknown; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * 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. - * - * Team members will include the members of child teams. - */ - "repos/list-collaborators": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** - * 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["collaborator"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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. - * - * Team members will include the members of child teams. - */ - "repos/check-collaborator": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Response if user is a collaborator */ - 204: never; - /** Response if user is not a collaborator */ - 404: unknown; - }; - }; - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - * - * For more information the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". - * - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/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. - */ - "repos/add-collaborator": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Response when a new invitation is created */ - 201: { - content: { - "application/json": components["schemas"]["repository-invitation"]; - }; - }; - /** Response when person is already a collaborator */ - 204: never; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** - * 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. - * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. - * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. - */ - permission?: "pull" | "push" | "admin" | "maintain" | "triage"; - permissions?: string; - }; - }; - }; - }; - "repos/remove-collaborator": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - "repos/get-collaborator-permission-level": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Response if user has admin permissions */ - 200: { - content: { - "application/json": components["schemas"]["repository-collaborator-permission"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). - * - * Comments are ordered by ascending ID. - */ - "repos/list-commit-comments-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["commit-comment"][]; - }; - }; - }; - }; - "repos/get-commit-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["commit-comment"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "repos/delete-commit-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - "repos/update-commit-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["commit-comment"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - requestBody: { - content: { - "application/json": { - /** The contents of the comment */ - body: string; - }; - }; - }; - }; - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - "reactions/list-for-commit-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["reaction"][]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. */ - "reactions/create-for-commit-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** Reaction exists */ - 200: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - /** Reaction created */ - 201: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - }; - }; - }; - }; - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - */ - "reactions/delete-for-commit-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - reaction_id: components["parameters"]["reaction-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * **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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - "repos/list-commits": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ - 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 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?: components["parameters"]["since"]; - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["commit"][]; - }; - }; - 400: components["responses"]["bad_request"]; - 404: components["responses"]["not_found"]; - 409: components["responses"]["conflict"]; - 500: components["responses"]["internal_error"]; - }; - }; - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - "repos/list-branches-for-head-commit": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** commit_sha parameter */ - commit_sha: components["parameters"]["commit_sha"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["branch-short"][]; - }; - }; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - "repos/list-comments-for-commit": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** commit_sha parameter */ - commit_sha: components["parameters"]["commit_sha"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["commit-comment"][]; - }; - }; - }; - }; - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - "repos/create-commit-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** commit_sha parameter */ - commit_sha: components["parameters"]["commit_sha"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["commit-comment"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - /** 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://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - "repos/list-pull-requests-associated-with-commit": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** commit_sha parameter */ - commit_sha: components["parameters"]["commit_sha"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["pull-request-simple"][]; - }; - }; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. - * - * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - "repos/get-commit": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["commit"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - 500: components["responses"]["internal_error"]; - }; - }; - /** - * **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. - */ - "checks/list-for-ref": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - query: { - /** Returns check runs with the specified `name`. */ - check_name?: components["parameters"]["check_name"]; - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status?: components["parameters"]["status"]; - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - check_runs: components["schemas"]["check-run"][]; - }; - }; - }; - }; - }; - /** - * **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. - */ - "checks/list-suites-for-ref": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - query: { - /** Filters check suites by GitHub App `id`. */ - app_id?: number; - /** Returns check runs with the specified `name`. */ - check_name?: components["parameters"]["check_name"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - check_suites: components["schemas"]["check-suite"][]; - }; - }; - }; - }; - }; - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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` - */ - "repos/get-combined-status-for-ref": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["combined-commit-status"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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`. - */ - "repos/list-commit-statuses-for-ref": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["status"][]; - }; - }; - 301: components["responses"]["moved_permanently"]; - }; - }; - /** - * Returns the contents of the repository's code of conduct file, if one is detected. - * - * A code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching. - */ - "codes-of-conduct/get-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["code-of-conduct"]; - }; - }; - }; - }; - /** - * 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. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - "repos/get-community-profile-metrics": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["community-profile"]; - }; - }; - }; - }; - /** - * 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://docs.github.com/rest/overview/media-types/#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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) 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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - "repos/compare-commits": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - base: string; - head: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["commit-comparison"]; - }; - }; - 404: components["responses"]["not_found"]; - 500: components["responses"]["internal_error"]; - }; - }; - /** - * 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 the repository's root directory. See the description below regarding what the API response includes for directories. - * - * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for - * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media - * type](https://docs.github.com/rest/reference/repos#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://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * #### If the content is a directory - * 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 content is a symlink - * 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 in the example. Otherwise, the API responds with an object - * describing the symlink itself. - * - * #### If the content is a submodule - * 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. - */ - "repos/get-content": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** path+ parameter */ - path: string; - }; - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/vnd.github.v3.object": components["schemas"]["content-tree"]; - "application/json": components["schemas"]["content-directory"] | components["schemas"]["content-file"] | components["schemas"]["content-symlink"] | components["schemas"]["content-submodule"]; - }; - }; - 302: components["responses"]["found"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Creates a new file or replaces an existing file in a repository. */ - "repos/create-or-update-file-contents": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** path+ parameter */ - path: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["file-commit"]; - }; - }; - /** response */ - 201: { - content: { - "application/json": components["schemas"]["file-commit"]; - }; - }; - 404: components["responses"]["not_found"]; - 409: components["responses"]["conflict"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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. Default: the repository’s default branch (usually `master`) */ - branch?: string; - /** The person that committed the file. Default: the authenticated user. */ - committer?: { - /** The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string; - /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string; - date?: string; - }; - /** The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - author?: { - /** The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string; - /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string; - date?: string; - }; - }; - }; - }; - }; - /** - * 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. - */ - "repos/delete-file": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** path+ parameter */ - path: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["file-commit"]; - }; - }; - 404: components["responses"]["not_found"]; - 409: components["responses"]["conflict"]; - 422: components["responses"]["validation_failed"]; - 503: components["responses"]["service_unavailable"]; - }; - requestBody: { - content: { - "application/json": { - /** The commit message. */ - message: string; - /** The blob SHA of the file being replaced. */ - sha: string; - /** The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string; - /** object containing information about the committer. */ - committer?: { - /** The name of the author (or committer) of the commit */ - name?: string; - /** The email of the author (or committer) of the commit */ - email?: string; - }; - /** object containing information about the author. */ - author?: { - /** The name of the author (or committer) of the commit */ - name?: string; - /** The email of the author (or committer) of the commit */ - email?: string; - }; - }; - }; - }; - }; - /** - * 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. - */ - "repos/list-contributors": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Set to `1` or `true` to include anonymous contributors in results. */ - anon?: string; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** Response if repository contains content */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["contributor"][]; - }; - }; - /** Response if repository is empty */ - 204: never; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Simple filtering of deployments is available via query parameters: */ - "repos/list-deployments": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["deployment"][]; - }; - }; - }; - }; - /** - * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/reference/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. - * - * #### Merged branch response - * 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. - * - * #### Merge conflict 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. - * - * #### Failed commit status checks - * 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`. - */ - "repos/create-deployment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["deployment"]; - }; - }; - /** Merged branch response */ - 202: { - content: { - "application/json": { - message?: string; - }; - }; - }; - /** response */ - 409: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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://docs.github.com/rest/reference/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[]; - payload?: { - [key: string]: any; - } | string; - /** Name for the target deployment environment (e.g., `production`, `staging`, `qa`). */ - environment?: string; - /** Short description of the deployment. */ - description?: string | null; - /** - * 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://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-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://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. - */ - production_environment?: boolean; - created_at?: string; - }; - }; - }; - }; - "repos/get-deployment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** deployment_id parameter */ - deployment_id: components["parameters"]["deployment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["deployment"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive deployment. - * - * To set a deployment as inactive, you must: - * - * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. - * * Mark the active deployment as inactive by adding any non-successful deployment status. - * - * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." - */ - "repos/delete-deployment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** deployment_id parameter */ - deployment_id: components["parameters"]["deployment_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed_simple"]; - }; - }; - /** Users with pull access can view deployment statuses for a deployment: */ - "repos/list-deployment-statuses": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** deployment_id parameter */ - deployment_id: components["parameters"]["deployment_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["deployment-status"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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. - */ - "repos/create-deployment-status": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** deployment_id parameter */ - deployment_id: components["parameters"]["deployment_id"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["deployment-status"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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://docs.github.com/rest/overview/api-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://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. */ - 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://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-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://docs.github.com/rest/overview/api-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://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-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://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type. - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. - */ - auto_inactive?: boolean; - }; - }; - }; - }; - /** Users with pull access can view a deployment status for a deployment: */ - "repos/get-deployment-status": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** deployment_id parameter */ - deployment_id: components["parameters"]["deployment_id"]; - status_id: number; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["deployment-status"]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." - * - * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. - * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. - * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. - */ - "repos/create-dispatch-event": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** A custom webhook event name. */ - event_type: string; - /** JSON payload with extra information about the webhook event that your action or worklow may use. */ - client_payload?: { - [key: string]: any; - }; - }; - }; - }; - }; - "activity/list-repo-events": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - }; - }; - "repos/list-forks": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ - sort?: "newest" | "oldest" | "stargazers"; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - 400: components["responses"]["bad_request"]; - }; - }; - /** - * 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://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com). - */ - "repos/create-fork": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 202: { - content: { - "application/json": components["schemas"]["repository"]; - }; - }; - 400: components["responses"]["bad_request"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Optional parameter to specify the organization name if forking into an organization. */ - organization?: string; - }; - }; - }; - }; - "git/create-blob": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["short-blob"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 409: components["responses"]["conflict"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The new blob's content. */ - content: string; - /** The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. */ - encoding?: string; - }; - }; - }; - }; - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - "git/get-blob": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - file_sha: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["blob"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * Creates a new 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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - "git/create-commit": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["git-commit"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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?: { - /** The name of the author (or committer) of the commit */ - name?: string; - /** The email of the author (or committer) of the commit */ - email?: string; - /** Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - date?: string; - }; - /** 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?: { - /** The name of the author (or committer) of the commit */ - name?: string; - /** The email of the author (or committer) of the commit */ - email?: string; - /** Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - date?: string; - }; - /** 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; - }; - }; - }; - }; - /** - * 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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - "git/get-commit": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** commit_sha parameter */ - commit_sha: components["parameters"]["commit_sha"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["git-commit"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. - * - * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. - * - * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. - */ - "git/list-matching-refs": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["git-ref"][]; - }; - }; - }; - }; - /** - * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. - * - * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - */ - "git/get-ref": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["git-ref"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** 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. */ - "git/create-ref": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["git-ref"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - key?: string; - }; - }; - }; - }; - "git/delete-ref": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - }; - responses: { - /** Empty response */ - 204: never; - 422: components["responses"]["validation_failed"]; - }; - }; - "git/update-ref": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** ref+ parameter */ - ref: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["git-ref"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - /** - * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - "git/create-tag": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["git-tag"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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?: { - /** The name of the author of the tag */ - name?: string; - /** The email of the author of the tag */ - email?: string; - /** When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - date?: string; - }; - }; - }; - }; - }; - /** - * **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: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * 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. | - */ - "git/get-tag": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - tag_sha: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["git-tag"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. - * - * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." - */ - "git/create-tree": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["git-tree"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - tree: { - /** The file referenced in the tree. */ - path?: string; - /** The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. */ - mode?: "100644" | "100755" | "040000" | "160000" | "120000"; - /** Either `blob`, `tree`, or `commit`. */ - type?: "blob" | "tree" | "commit"; - /** - * The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - sha?: string | null; - /** - * The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - content?: string; - }[]; - /** - * The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. - * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. - */ - base_tree?: string; - }; - }; - }; - }; - /** - * Returns a single tree using the SHA1 value for that tree. - * - * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. - */ - "git/get-tree": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - tree_sha: string; - }; - query: { - /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ - recursive?: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["git-tree"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - "repos/list-webhooks": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["hook"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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. - */ - "repos/create-webhook": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["hook"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - name?: string; - /** Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config: { - url: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - token?: string; - digest?: string; - }; - /** Determines what [events](https://docs.github.com/webhooks/event-payloads) 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; - }; - }; - }; - }; - /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ - "repos/get-webhook": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["hook"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "repos/delete-webhook": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ - "repos/update-webhook": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["hook"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - url: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - address?: string; - room?: string; - }; - /** Determines what [events](https://docs.github.com/webhooks/event-payloads) 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; - }; - }; - }; - }; - /** - * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." - * - * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. - */ - "repos/get-webhook-config-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Default response */ - 200: { - content: { - "application/json": components["schemas"]["webhook-config"]; - }; - }; - }; - }; - /** - * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." - * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. - */ - "repos/update-webhook-config-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Default response */ - 200: { - content: { - "application/json": components["schemas"]["webhook-config"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - url?: components["schemas"]["webhook-config-url"]; - content_type?: components["schemas"]["webhook-config-content-type"]; - secret?: components["schemas"]["webhook-config-secret"]; - insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - }; - }; - }; - }; - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - "repos/ping-webhook": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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` - */ - "repos/test-push-webhook": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - hook_id: components["parameters"]["hook-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. - */ - "migrations/get-import-status": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["import"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Start a source import to a GitHub repository using GitHub Importer. */ - "migrations/start-import": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["import"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - /** Stop an import for a repository. */ - "migrations/cancel-import": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * 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. - */ - "migrations/update-import": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["import"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The username to provide to the originating repository. */ - vcs_username?: string; - /** The password to provide to the originating repository. */ - vcs_password?: string; - vcs?: string; - tfvc_project?: string; - }; - }; - }; - }; - /** - * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - "migrations/get-commit-authors": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** A user ID. Only return users with an ID greater than this ID. */ - since?: components["parameters"]["since-user"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["porter-author"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ - "migrations/map-commit-author": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - author_id: number; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["porter-author"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The new Git author email. */ - email?: string; - /** The new Git author name. */ - name?: string; - remote_id?: string; - }; - }; - }; - }; - /** List files larger than 100MB found during the import */ - "migrations/get-large-files": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["porter-large-file"][]; - }; - }; - }; - }; - /** 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/). */ - "migrations/set-lfs-preference": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["import"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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"; - }; - }; - }; - }; - /** - * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/get-repo-installation": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["installation"]; - }; - }; - 301: components["responses"]["moved_permanently"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ - "interactions/get-restrictions-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["interaction-limit-response"]; - }; - }; - }; - }; - /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - "interactions/set-restrictions-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["interaction-limit-response"]; - }; - }; - /** Conflict */ - 409: unknown; - }; - requestBody: { - content: { - "application/json": components["schemas"]["interaction-limit"]; - }; - }; - }; - /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - "interactions/remove-restrictions-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - /** Conflict */ - 409: unknown; - }; - }; - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - "repos/list-invitations": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["repository-invitation"][]; - }; - }; - }; - }; - "repos/delete-invitation": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** invitation_id parameter */ - invitation_id: components["parameters"]["invitation_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - "repos/update-invitation": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** invitation_id parameter */ - invitation_id: components["parameters"]["invitation_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["repository-invitation"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. */ - permissions?: "read" | "write" | "maintain" | "triage" | "admin"; - }; - }; - }; - }; - /** - * List issues in a repository. - * - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - "issues/list-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** 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?: components["parameters"]["labels"]; - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: "created" | "updated" | "comments"; - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue-simple"][]; - }; - }; - 301: components["responses"]["moved_permanently"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. - */ - "issues/create": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["issue"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed"]; - 503: components["responses"]["service_unavailable"]; - }; - requestBody: { - content: { - "application/json": { - /** The title of the issue. */ - title: string | number; - /** 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 | null; - milestone?: (string | number) | null; - /** 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 | { - id?: number; - name?: string; - description?: string | null; - color?: string | null; - })[]; - /** 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[]; - }; - }; - }; - }; - /** By default, Issue Comments are ordered by ascending ID. */ - "issues/list-comments-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components["parameters"]["sort"]; - /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ - direction?: "asc" | "desc"; - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue-comment"][]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - "issues/get-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["issue-comment"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "issues/delete-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - "issues/update-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["issue-comment"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The contents of the comment. */ - body: string; - }; - }; - }; - }; - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - "reactions/list-for-issue-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["reaction"][]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. */ - "reactions/create-for-issue-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** Reaction exists */ - 200: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - /** Reaction created */ - 201: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - }; - }; - }; - }; - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). - */ - "reactions/delete-for-issue-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - reaction_id: components["parameters"]["reaction-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - "issues/list-events-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue-event"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - }; - "issues/get-event": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - event_id: number; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["issue-event"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - }; - }; - /** - * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-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://docs.github.com/webhooks/event-payloads/#issues) 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - "issues/get": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["issue"]; - }; - }; - 301: components["responses"]["moved_permanently"]; - 304: components["responses"]["not_modified"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - }; - }; - /** Issue owners and users with push access can edit an issue. */ - "issues/update": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["issue"]; - }; - }; - 301: components["responses"]["moved_permanently"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed"]; - 503: components["responses"]["service_unavailable"]; - }; - requestBody: { - content: { - "application/json": { - /** The title of the issue. */ - title?: (string | number) | null; - /** The contents of the issue. */ - body?: string | null; - /** Login for the user that this issue should be assigned to. **This field is deprecated.** */ - assignee?: string | null; - /** State of the issue. Either `open` or `closed`. */ - state?: "open" | "closed"; - milestone?: (string | 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 | { - id?: number; - name?: string; - description?: string | null; - color?: string | null; - })[]; - /** 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[]; - }; - }; - }; - }; - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - "issues/add-assignees": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["issue-simple"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - }; - }; - }; - }; - /** Removes one or more assignees from an issue. */ - "issues/remove-assignees": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["issue-simple"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - }; - }; - }; - }; - /** Issue Comments are ordered by ascending ID. */ - "issues/list-comments": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - query: { - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue-comment"][]; - }; - }; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - }; - }; - /** This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ - "issues/create-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["issue-comment"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The contents of the comment. */ - body: string; - }; - }; - }; - }; - "issues/list-events": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue-event-for-issue"][]; - }; - }; - 410: components["responses"]["gone"]; - }; - }; - "issues/list-labels-on-issue": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["label"][]; - }; - }; - 410: components["responses"]["gone"]; - }; - }; - /** Removes any previous labels and sets the new labels for an issue. */ - "issues/set-labels": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["label"][]; - }; - }; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - }; - }; - }; - }; - "issues/add-labels": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["label"][]; - }; - }; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - }; - }; - }; - }; - "issues/remove-all-labels": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 410: components["responses"]["gone"]; - }; - }; - /** 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. */ - "issues/remove-label": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - name: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["label"][]; - }; - }; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - }; - }; - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - "issues/lock": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** - * 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"; - } | null; - }; - }; - }; - /** Users with push access can unlock an issue's conversation. */ - "issues/unlock": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - "reactions/list-for-issue": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["reaction"][]; - }; - }; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. */ - "reactions/create-for-issue": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - }; - }; - }; - }; - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. - * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). - */ - "reactions/delete-for-issue": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - reaction_id: components["parameters"]["reaction-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - "issues/list-events-for-timeline": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** issue_number parameter */ - issue_number: components["parameters"]["issue_number"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue-event-for-issue"][]; - }; - }; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - "repos/list-deploy-keys": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["deploy-key"][]; - }; - }; - }; - }; - /** You can create a read-only deploy key. */ - "repos/create-deploy-key": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["deploy-key"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - "repos/get-deploy-key": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** key_id parameter */ - key_id: components["parameters"]["key_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["deploy-key"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ - "repos/delete-deploy-key": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** key_id parameter */ - key_id: components["parameters"]["key_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - "issues/list-labels-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["label"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "issues/create-label": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["label"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - "issues/get-label": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - name: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["label"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "issues/delete-label": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - name: string; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - "issues/update-label": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - name: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["label"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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/). */ - new_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; - }; - }; - }; - }; - /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ - "repos/list-languages": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["language"]; - }; - }; - }; - }; - /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. - */ - "licenses/get-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["license-content"]; - }; - }; - }; - }; - "repos/merge": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Successful Response (The resulting merge commit) */ - 201: { - content: { - "application/json": components["schemas"]["commit"]; - }; - }; - 403: components["responses"]["forbidden"]; - /** response */ - 404: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - /** Merge conflict response */ - 409: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - "issues/list-milestones": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["milestone"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "issues/create-milestone": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["milestone"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - "issues/get-milestone": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** milestone_number parameter */ - milestone_number: components["parameters"]["milestone_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["milestone"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - "issues/delete-milestone": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** milestone_number parameter */ - milestone_number: components["parameters"]["milestone_number"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - "issues/update-milestone": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** milestone_number parameter */ - milestone_number: components["parameters"]["milestone_number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["milestone"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - "issues/list-labels-for-milestone": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** milestone_number parameter */ - milestone_number: components["parameters"]["milestone_number"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["label"][]; - }; - }; - }; - }; - /** List all notifications for the current user. */ - "activity/list-repo-notifications-for-authenticated-user": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** If `true`, show notifications marked as read. */ - all?: components["parameters"]["all"]; - /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ - participating?: components["parameters"]["participating"]; - /** 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?: components["parameters"]["since"]; - /** 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?: components["parameters"]["before"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["thread"][]; - }; - }; - }; - }; - /** Marks 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ - "activity/mark-repo-notifications-as-read": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 202: unknown; - }; - requestBody: { - content: { - "application/json": { - /** Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. */ - last_read_at?: string; - }; - }; - }; - }; - "repos/get-pages": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["page"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ - "repos/update-information-about-pages-site": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 400: components["responses"]["bad_request"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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 | null; - /** Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ - public?: boolean; - source: Partial<"gh-pages" | "master" | "master /docs"> & Partial<{ - /** The repository branch used to publish your site's source files. */ - branch: string; - /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. */ - path: "/" | "/docs"; - }>; - }; - }; - }; - }; - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - "repos/create-pages-site": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["page"]; - }; - }; - 409: components["responses"]["conflict"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The source branch and directory used to publish your Pages site. */ - source: { - /** The repository branch used to publish your site's source files. */ - branch: string; - /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` */ - path?: "/" | "/docs"; - }; - }; - }; - }; - }; - "repos/delete-pages-site": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - }; - "repos/list-pages-builds": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["page-build"][]; - }; - }; - }; - }; - /** - * 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. - */ - "repos/request-pages-build": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["page-build-status"]; - }; - }; - }; - }; - "repos/get-latest-pages-build": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["page-build"]; - }; - }; - }; - }; - "repos/get-pages-build": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - build_id: number; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["page-build"]; - }; - }; - }; - }; - /** 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. */ - "projects/list-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["project"][]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed_simple"]; - }; - }; - /** 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. */ - "projects/create-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["project"]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 410: components["responses"]["gone"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** The name of the project. */ - name: string; - /** The description of the project. */ - body?: string; - }; - }; - }; - }; - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - "pulls/list": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** 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`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ - direction?: "asc" | "desc"; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["pull-request-simple"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - "pulls/create": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["pull-request"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The title of the new 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; - issue?: number; - }; - }; - }; - }; - /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ - "pulls/list-review-comments-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components["parameters"]["sort"]; - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - direction?: "asc" | "desc"; - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["pull-request-review-comment"][]; - }; - }; - }; - }; - /** Provides details for a review comment. */ - "pulls/get-review-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-review-comment"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Deletes a review comment. */ - "pulls/delete-review-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - }; - }; - /** Enables you to edit a review comment. */ - "pulls/update-review-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-review-comment"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The text of the reply to the review comment. */ - body: string; - }; - }; - }; - }; - /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ - "reactions/list-for-pull-request-review-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["reaction"][]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. */ - "reactions/create-for-pull-request-review-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** Reaction exists */ - 200: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - /** Reaction created */ - 201: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - }; - }; - }; - }; - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` - * - * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). - */ - "reactions/delete-for-pull-request-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - reaction_id: components["parameters"]["reaction-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - */ - "pulls/get": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ - 200: { - content: { - "application/json": components["schemas"]["pull-request"]; - }; - }; - 304: components["responses"]["not_modified"]; - 404: components["responses"]["not_found"]; - 500: components["responses"]["internal_error"]; - }; - }; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) 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. - */ - "pulls/update": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - "pulls/list-review-comments": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components["parameters"]["sort"]; - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - direction?: "asc" | "desc"; - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["pull-request-review-comment"][]; - }; - }; - }; - }; - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see the [`comfort-fade` preview notice](https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request-preview-notices). - * - * **Note:** 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. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - "pulls/create-review-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["pull-request-review-comment"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The text of the review 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; - /** **Required without `comfort-fade` preview**. 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 above. */ - position?: number; - /** **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ - side?: "LEFT" | "RIGHT"; - /** **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - line?: number; - /** **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - start_line?: number; - /** **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. */ - start_side?: "LEFT" | "RIGHT" | "side"; - in_reply_to?: number; - }; - }; - }; - }; - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - "pulls/create-reply-for-review-comment": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - /** comment_id parameter */ - comment_id: components["parameters"]["comment_id"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["pull-request-review-comment"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - requestBody: { - content: { - "application/json": { - /** The text of the review comment. */ - body: string; - }; - }; - }; - }; - /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ - "pulls/list-commits": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["commit"][]; - }; - }; - }; - }; - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - "pulls/list-files": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["diff-entry"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - 500: components["responses"]["internal_error"]; - }; - }; - "pulls/check-if-merged": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** Response if pull request has been merged */ - 204: never; - /** Response if pull request has not been merged */ - 404: unknown; - }; - }; - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ - "pulls/merge": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** Response if merge was successful */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-merge-result"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - /** Response if merge cannot be performed */ - 405: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - /** Response if sha was provided and pull request head did not match */ - 409: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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"; - } | null; - }; - }; - }; - "pulls/list-requested-reviewers": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["pull-request-review-request"]; - }; - }; - }; - }; - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ - "pulls/request-reviewers": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["pull-request-simple"]; - }; - }; - 403: components["responses"]["forbidden"]; - /** Response if user is not a collaborator */ - 422: unknown; - }; - requestBody: { - content: { - "application/json": Partial<{ - [key: string]: any; - }> & Partial<{ - [key: string]: any; - }>; - }; - }; - }; - "pulls/remove-requested-reviewers": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** response */ - 200: unknown; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - }; - }; - }; - }; - /** The list of reviews returns in chronological order. */ - "pulls/list-reviews": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** The list of reviews returns in chronological order. */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["pull-request-review"][]; - }; - }; - }; - }; - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. - */ - "pulls/create-review": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-review"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** 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://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) 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?: { - /** The relative path to the file that necessitates a review 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; - /** Text of the review comment. */ - body: string; - line?: number; - side?: string; - start_line?: number; - start_side?: string; - }[]; - }; - }; - }; - }; - "pulls/get-review": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - /** review_id parameter */ - review_id: components["parameters"]["review_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-review"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Update the review summary comment with new text. */ - "pulls/update-review": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - /** review_id parameter */ - review_id: components["parameters"]["review_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-review"]; - }; - }; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** The body text of the pull request review. */ - body: string; - }; - }; - }; - }; - "pulls/delete-pending-review": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - /** review_id parameter */ - review_id: components["parameters"]["review_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-review"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed_simple"]; - }; - }; - /** List comments for a specific pull request review. */ - "pulls/list-comments-for-review": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - /** review_id parameter */ - review_id: components["parameters"]["review_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["review-comment"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ - "pulls/dismiss-review": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - /** review_id parameter */ - review_id: components["parameters"]["review_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-review"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** The message for the pull request review dismissal */ - message: string; - event?: string; - }; - }; - }; - }; - "pulls/submit-review": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - /** review_id parameter */ - review_id: components["parameters"]["review_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["pull-request-review"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** 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"; - }; - }; - }; - }; - /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ - "pulls/update-branch": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - pull_number: components["parameters"]["pull-number"]; - }; - }; - responses: { - /** response */ - 202: { - content: { - "application/json": { - message?: string; - url?: string; - }; - }; - }; - 403: components["responses"]["forbidden"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ - expected_head_sha?: string; - } | null; - }; - }; - }; - /** - * Gets the preferred README for a repository. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - "repos/get-readme": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["content-file"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * 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://docs.github.com/rest/reference/repos#list-repository-tags). - * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. - */ - "repos/list-releases": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["release"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - "repos/create-release": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["release"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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. Default: the repository's default branch (usually `master`). */ - 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; - }; - }; - }; - }; - /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ - "repos/get-release-asset": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** asset_id parameter */ - asset_id: components["parameters"]["asset_id"]; - }; - }; - responses: { - /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ - 200: { - content: { - "application/json": components["schemas"]["release-asset"]; - }; - }; - 302: components["responses"]["found"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - "repos/delete-release-asset": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** asset_id parameter */ - asset_id: components["parameters"]["asset_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Users with push access to the repository can edit a release asset. */ - "repos/update-release-asset": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** asset_id parameter */ - asset_id: components["parameters"]["asset_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["release-asset"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The file name of the asset. */ - name?: string; - /** An alternate short description of the asset. Used in place of the filename. */ - label?: string; - state?: string; - }; - }; - }; - }; - /** - * 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. - */ - "repos/get-latest-release": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["release"]; - }; - }; - }; - }; - /** Get a published release with the specified tag. */ - "repos/get-release-by-tag": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** tag+ parameter */ - tag: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["release"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ - "repos/get-release": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** release_id parameter */ - release_id: components["parameters"]["release_id"]; - }; - }; - responses: { - /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ - 200: { - content: { - "application/json": components["schemas"]["release"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** Users with push access to the repository can delete a release. */ - "repos/delete-release": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** release_id parameter */ - release_id: components["parameters"]["release_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Users with push access to the repository can edit a release. */ - "repos/update-release": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** release_id parameter */ - release_id: components["parameters"]["release_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["release"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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. Default: the repository's default branch (usually `master`). */ - 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; - }; - }; - }; - }; - "repos/list-release-assets": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** release_id parameter */ - release_id: components["parameters"]["release_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["release-asset"][]; - }; - }; - }; - }; - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - "repos/upload-release-asset": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** release_id parameter */ - release_id: components["parameters"]["release_id"]; - }; - query: { - name?: string; - label?: string; - }; - }; - responses: { - /** Response for successful upload */ - 201: { - content: { - "application/json": components["schemas"]["release-asset"]; - }; - }; - }; - requestBody: { - content: { - "*/*": string; - }; - }; - }; - /** - * Lists all secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - "secret-scanning/list-alerts-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: "open" | "resolved"; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - }; - }; - responses: { - /** Response */ - 200: { - content: { - "application/json": components["schemas"]["secret-scanning-alert"][]; - }; - }; - /** Repository is public or secret scanning is disabled for the repository */ - 404: unknown; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - "secret-scanning/get-alert": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components["parameters"]["alert_number"]; - }; - }; - responses: { - /** Default response */ - 200: { - content: { - "application/json": components["schemas"]["secret-scanning-alert"]; - }; - }; - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. - */ - "secret-scanning/update-alert": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components["parameters"]["alert_number"]; - }; - }; - responses: { - /** Default response */ - 200: { - content: { - "application/json": components["schemas"]["secret-scanning-alert"]; - }; - }; - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown; - /** State does not match the resolution */ - 422: unknown; - 503: components["responses"]["service_unavailable"]; - }; - requestBody: { - content: { - "application/json": { - state: components["schemas"]["secret-scanning-alert-state"]; - resolution?: components["schemas"]["secret-scanning-alert-resolution"]; - }; - }; - }; - }; - /** - * Lists the people that have starred the repository. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - "activity/list-stargazers-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - "application/vnd.github.v3.star+json": components["schemas"]["stargazer"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - }; - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - "repos/get-code-frequency-stats": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 200: { - content: { - "application/json": components["schemas"]["code-frequency-stat"][]; - }; - }; - }; - }; - /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - "repos/get-commit-activity-stats": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["commit-activity"][]; - }; - }; - }; - }; - /** - * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: - * - * * `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 - */ - "repos/get-contributors-stats": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** - * * `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 - */ - 200: { - content: { - "application/json": components["schemas"]["contributor-activity"][]; - }; - }; - }; - }; - /** - * 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. - */ - "repos/get-participation-stats": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** The array order is oldest week (index 0) to most recent week. */ - 200: { - content: { - "application/json": components["schemas"]["participation-stats"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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. - */ - "repos/get-punch-card-stats": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** 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. */ - 200: { - content: { - "application/json": components["schemas"]["code-frequency-stat"][]; - }; - }; - }; - }; - /** - * 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. - */ - "repos/create-commit-status": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - sha: string; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["status"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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. This field is case-insensitive. */ - context?: string; - }; - }; - }; - }; - /** Lists the people watching the specified repository. */ - "activity/list-watchers-for-repo": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - }; - }; - "activity/get-repo-subscription": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Response if you subscribe to the repository */ - 200: { - content: { - "application/json": components["schemas"]["repository-subscription"]; - }; - }; - 403: components["responses"]["forbidden"]; - /** Response if you don't subscribe to the repository */ - 404: unknown; - }; - }; - /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ - "activity/set-repo-subscription": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["repository-subscription"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** Determines if notifications should be received from this repository. */ - subscribed?: boolean; - /** Determines if all notifications should be blocked from this repository. */ - ignored?: boolean; - }; - }; - }; - }; - /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ - "activity/delete-repo-subscription": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - "repos/list-tags": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["tag"][]; - }; - }; - }; - }; - /** - * Gets a redirect URL to download a tar archive for a repository. 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. - */ - "repos/download-tarball-archive": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - ref: string; - }; - }; - responses: { - /** response */ - 302: never; - }; - }; - "repos/list-teams": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - }; - }; - "repos/get-all-topics": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["topic"]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - "repos/replace-all-topics": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["topic"]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - }; - }; - }; - }; - /** 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. */ - "repos/get-clones": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Must be one of: `day`, `week`. */ - per?: components["parameters"]["per"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["clone-traffic"]; - }; - }; - 403: components["responses"]["forbidden"]; - }; - }; - /** Get the top 10 popular contents over the last 14 days. */ - "repos/get-top-paths": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["content-traffic"][]; - }; - }; - 403: components["responses"]["forbidden"]; - }; - }; - /** Get the top 10 referrers over the last 14 days. */ - "repos/get-top-referrers": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["referrer-traffic"][]; - }; - }; - 403: components["responses"]["forbidden"]; - }; - }; - /** 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. */ - "repos/get-views": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - query: { - /** Must be one of: `day`, `week`. */ - per?: components["parameters"]["per"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["view-traffic"]; - }; - }; - 403: components["responses"]["forbidden"]; - }; - }; - /** 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/). */ - "repos/transfer": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** response */ - 202: { - content: { - "application/json": components["schemas"]["repository"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - }; - }; - }; - }; - /** Shows whether dependency 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)". */ - "repos/check-vulnerability-alerts": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Response if repository is enabled with vulnerability alerts */ - 204: never; - /** Response if repository is not enabled with vulnerability alerts */ - 404: unknown; - }; - }; - /** Enables dependency 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)". */ - "repos/enable-vulnerability-alerts": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** Disables dependency 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)". */ - "repos/disable-vulnerability-alerts": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * Gets a redirect URL to download a zip archive for a repository. 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. - */ - "repos/download-zipball-archive": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - ref: string; - }; - }; - responses: { - /** response */ - 302: never; - }; - }; - /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.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 - */ - "repos/create-using-template": { - parameters: { - path: { - template_owner: string; - template_repo: string; - }; - }; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["repository"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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; - /** Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. */ - include_all_branches?: boolean; - /** Either `true` to create a new private repository or `false` to create a new public one. */ - private?: boolean; - }; - }; - }; - }; - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. - */ - "repos/list-public": { - parameters: { - query: { - /** A repository ID. Only return repositories with an ID greater than this ID. */ - since?: components["parameters"]["since-repo"]; - }; - }; - responses: { - /** response */ - 200: { - headers: { - Link?: string; - }; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - "enterprise-admin/list-provisioned-groups-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components["parameters"]["start_index"]; - /** Used for pagination: the number of results to return. */ - count?: components["parameters"]["count"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["scim-group-list-enterprise"]; - }; - }; - }; - }; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. - */ - "enterprise-admin/provision-and-invite-enterprise-group": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["scim-enterprise-group"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The SCIM schema URIs. */ - schemas: string[]; - /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string; - members?: { - /** The SCIM user ID for a user. */ - value: string; - }[]; - }; - }; - }; - }; - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - "enterprise-admin/get-provisioning-information-for-enterprise-group": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: components["parameters"]["scim_group_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["scim-enterprise-group"]; - }; - }; - }; - }; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. - */ - "enterprise-admin/set-information-for-provisioned-enterprise-group": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: components["parameters"]["scim_group_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["scim-enterprise-group"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The SCIM schema URIs. */ - schemas: string[]; - /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string; - members?: { - /** The SCIM user ID for a user. */ - value: string; - }[]; - }; - }; - }; - }; - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - "enterprise-admin/delete-scim-group-from-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: components["parameters"]["scim_group_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - */ - "enterprise-admin/update-attribute-for-enterprise-group": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: components["parameters"]["scim_group_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["scim-enterprise-group"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The SCIM schema URIs. */ - schemas: string[]; - /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { - [key: string]: any; - }[]; - }; - }; - }; - }; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. - * - * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. - * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. - * - * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: - * - * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. - * - * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. - * - * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: - * - If the user signs in, their GitHub account is linked to this entry. - * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. - */ - "enterprise-admin/list-provisioned-identities-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components["parameters"]["start_index"]; - /** Used for pagination: the number of results to return. */ - count?: components["parameters"]["count"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["scim-user-list-enterprise"]; - }; - }; - }; - }; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Provision enterprise membership for a user, and send organization invitation emails to the email address. - * - * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. - */ - "enterprise-admin/provision-and-invite-enterprise-user": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["scim-enterprise-user"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The SCIM schema URIs. */ - schemas: string[]; - /** The username for the user. */ - userName: string; - name: { - /** The first name of the user. */ - givenName: string; - /** The last name of the user. */ - familyName: string; - }; - /** List of user emails. */ - emails: { - /** The email address. */ - value: string; - /** The type of email address. */ - type: string; - /** Whether this email address is the primary address. */ - primary: boolean; - }[]; - /** List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string; - }[]; - }; - }; - }; - }; - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - "enterprise-admin/get-provisioning-information-for-enterprise-user": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** scim_user_id parameter */ - scim_user_id: components["parameters"]["scim_user_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["scim-enterprise-user"]; - }; - }; - }; - }; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. - * - * You must at least provide the required values for the user: `userName`, `name`, and `emails`. - * - * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. - */ - "enterprise-admin/set-information-for-provisioned-enterprise-user": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** scim_user_id parameter */ - scim_user_id: components["parameters"]["scim_user_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["scim-enterprise-user"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The SCIM schema URIs. */ - schemas: string[]; - /** The username for the user. */ - userName: string; - name: { - /** The first name of the user. */ - givenName: string; - /** The last name of the user. */ - familyName: string; - }; - /** List of user emails. */ - emails: { - /** The email address. */ - value: string; - /** The type of email address. */ - type: string; - /** Whether this email address is the primary address. */ - primary: boolean; - }[]; - /** List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string; - }[]; - }; - }; - }; - }; - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - "enterprise-admin/delete-user-from-enterprise": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** scim_user_id parameter */ - scim_user_id: components["parameters"]["scim_user_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - * - * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. - * - * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. - * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` - */ - "enterprise-admin/update-attribute-for-enterprise-user": { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components["parameters"]["enterprise"]; - /** scim_user_id parameter */ - scim_user_id: components["parameters"]["scim_user_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["scim-enterprise-user"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The SCIM schema URIs. */ - schemas: string[]; - /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { - [key: string]: any; - }[]; - }; - }; - }; - }; - /** - * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. - * - * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. - * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. - * - * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: - * - * 1. The user is granted access by the IdP and is not a member of the GitHub organization. - * - * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. - * - * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: - * - If the user signs in, their GitHub account is linked to this entry. - * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. - */ - "scim/list-provisioned-identities": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: number; - /** Used for pagination: the number of results to return. */ - count?: number; - /** - * Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query: - * - * `?filter=userName%20eq%20\"Octocat\"`. - * - * To filter results for the identity with the email `octocat@github.com`, you would use this query: - * - * `?filter=emails%20eq%20\"octocat@github.com\"`. - */ - filter?: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/scim+json": components["schemas"]["scim-user-list"]; - }; - }; - 304: components["responses"]["not_modified"]; - 400: components["responses"]["scim_bad_request"]; - 403: components["responses"]["scim_forbidden"]; - 404: components["responses"]["scim_not_found"]; - }; - }; - /** Provision organization membership for a user, and send an activation email to the email address. */ - "scim/provision-and-invite-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/scim+json": components["schemas"]["scim-user"]; - }; - }; - 304: components["responses"]["not_modified"]; - 400: components["responses"]["scim_bad_request"]; - 403: components["responses"]["scim_forbidden"]; - 404: components["responses"]["scim_not_found"]; - 409: components["responses"]["scim_conflict"]; - 500: components["responses"]["scim_internal_error"]; - }; - requestBody: { - content: { - "application/json": { - /** Configured by the admin. Could be an email, login, or username */ - userName: string; - /** The name of the user, suitable for display to end-users */ - displayName?: string; - name: { - givenName: string; - familyName: string; - formatted?: string; - }; - /** user emails */ - emails: { - value: string; - primary?: boolean; - type?: string; - }[]; - schemas?: string[]; - externalId?: string; - groups?: string[]; - active?: boolean; - }; - }; - }; - }; - "scim/get-provisioning-information-for-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** scim_user_id parameter */ - scim_user_id: components["parameters"]["scim_user_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/scim+json": components["schemas"]["scim-user"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["scim_forbidden"]; - 404: components["responses"]["scim_not_found"]; - }; - }; - /** - * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. - * - * You must at least provide the required values for the user: `userName`, `name`, and `emails`. - * - * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. - */ - "scim/set-information-for-provisioned-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** scim_user_id parameter */ - scim_user_id: components["parameters"]["scim_user_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/scim+json": components["schemas"]["scim-user"]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["scim_forbidden"]; - 404: components["responses"]["scim_not_found"]; - }; - requestBody: { - content: { - "application/json": { - schemas?: string[]; - /** The name of the user, suitable for display to end-users */ - displayName?: string; - externalId?: string; - groups?: string[]; - active?: boolean; - /** Configured by the admin. Could be an email, login, or username */ - userName: string; - name: { - givenName: string; - familyName: string; - formatted?: string; - }; - /** user emails */ - emails: { - type?: string; - value: string; - primary?: boolean; - }[]; - }; - }; - }; - }; - "scim/delete-user-from-org": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** scim_user_id parameter */ - scim_user_id: components["parameters"]["scim_user_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["scim_forbidden"]; - 404: components["responses"]["scim_not_found"]; - }; - }; - /** - * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - * - * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. - * - * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. - * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` - */ - "scim/update-attribute-for-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - /** scim_user_id parameter */ - scim_user_id: components["parameters"]["scim_user_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/scim+json": components["schemas"]["scim-user"]; - }; - }; - 304: components["responses"]["not_modified"]; - 400: components["responses"]["scim_bad_request"]; - 403: components["responses"]["scim_forbidden"]; - 404: components["responses"]["scim_not_found"]; - /** Too many requests */ - 429: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - schemas?: string[]; - /** Set of operations to be performed */ - Operations: { - op: "add" | "remove" | "replace"; - path?: string; - value?: { - active?: boolean | null; - userName?: string | null; - externalId?: string | null; - givenName?: string | null; - familyName?: string | null; - } | { - value?: string; - primary?: boolean; - }[] | string; - }[]; - }; - }; - }; - }; - /** - * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: - * - * `q=addClass+in:file+language:js+repo:jquery/jquery` - * - * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. - * - * #### 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. - */ - "search/code": { - parameters: { - query: { - /** 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://docs.github.com/rest/reference/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - 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?: components["parameters"]["order"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - incomplete_results: boolean; - items: components["schemas"]["code-search-result-item"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if 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: - * - * `q=repo:octocat/Spoon-Knife+css` - */ - "search/commits": { - parameters: { - query: { - /** 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://docs.github.com/rest/reference/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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - 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?: components["parameters"]["order"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - incomplete_results: boolean; - items: components["schemas"]["commit-search-result-item"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. - * - * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` - * - * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. - * - * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." - */ - "search/issues-and-pull-requests": { - parameters: { - query: { - /** 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://docs.github.com/rest/reference/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - 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?: components["parameters"]["order"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - incomplete_results: boolean; - items: components["schemas"]["issue-search-result-item"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: - * - * `q=bug+defect+enhancement&repository_id=64778136` - * - * The labels that best match the query appear first in the search results. - */ - "search/labels": { - parameters: { - query: { - /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string; - /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - 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?: components["parameters"]["order"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - incomplete_results: boolean; - items: components["schemas"]["label-search-result-item"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: - * - * `q=tetris+language:assembly&sort=stars&order=desc` - * - * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. - * - * When you include the `mercy` preview header, you can also search for multiple topics by adding more `topic:` instances. For example, your query might look like this: - * - * `q=topic:ruby+topic:rails` - */ - "search/repos": { - parameters: { - query: { - /** 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://docs.github.com/rest/reference/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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - 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?: components["parameters"]["order"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - incomplete_results: boolean; - items: components["schemas"]["repo-search-result-item"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 422: components["responses"]["validation_failed"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * 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://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` - * - * This query searches for topics with the keyword `ruby` and limits 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. - */ - "search/topics": { - parameters: { - query: { - /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - incomplete_results: boolean; - items: components["schemas"]["topic-search-result-item"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you're looking for a list of popular users, you might try this query: - * - * `q=tom+repos:%3E42+followers:%3E1000` - * - * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. - */ - "search/users": { - parameters: { - query: { - /** 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://docs.github.com/rest/reference/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - 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?: components["parameters"]["order"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": { - total_count: number; - incomplete_results: boolean; - items: components["schemas"]["user-search-result-item"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 422: components["responses"]["validation_failed"]; - 503: components["responses"]["service_unavailable"]; - }; - }; - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ - "teams/get-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-full"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. - * - * To delete a team, the authenticated user must be an organization owner or team maintainer. - * - * If you are an organization owner, deleting a parent team will delete all of its child teams as well. - */ - "teams/delete-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. - * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. - * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. - */ - "teams/update-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["team-full"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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?: "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. */ - parent_team_id?: number | null; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. - * - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "teams/list-discussions-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team-discussion"][]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. - * - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - "teams/create-discussion-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["team-discussion"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** 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; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. - * - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "teams/get-discussion-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-discussion"]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. - * - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "teams/delete-discussion-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "teams/update-discussion-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-discussion"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The discussion post's title. */ - title?: string; - /** The discussion post's body text. */ - body?: string; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. - * - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "teams/list-discussion-comments-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team-discussion-comment"][]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. - * - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - "teams/create-discussion-comment-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["team-discussion-comment"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The discussion comment's body text. */ - body: string; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. - * - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "teams/get-discussion-comment-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-discussion-comment"]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. - * - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "teams/delete-discussion-comment-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. - * - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "teams/update-discussion-comment-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-discussion-comment"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The discussion comment's body text. */ - body: string; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - * - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "reactions/list-for-team-discussion-comment-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["reaction"][]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. - * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.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. - */ - "reactions/create-for-team-discussion-comment-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - comment_number: components["parameters"]["comment-number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. - * - * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - "reactions/list-for-team-discussion-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["reaction"][]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. - * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.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. - */ - "reactions/create-for-team-discussion-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - discussion_number: components["parameters"]["discussion-number"]; - }; - }; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["reaction"]; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */ - content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. - */ - "teams/list-pending-invitations-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["organization-invitation"][]; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. - * - * Team members will include the members of child teams. - */ - "teams/list-members-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - query: { - /** - * 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * The "Get team member" endpoint (described below) is deprecated. - * - * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. - */ - "teams/get-member-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Response if user is a member */ - 204: never; - /** Response if user is not a member */ - 404: unknown; - }; - }; - /** - * The "Add team member" endpoint (described below) is deprecated. - * - * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - "teams/add-member-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 403: components["responses"]["forbidden"]; - /** Response if team synchronization is set up */ - 404: unknown; - /** response */ - 422: { - content: { - "application/json": { - message?: string; - errors?: { - code?: string; - field?: string; - resource?: string; - }[]; - documentation_url?: string; - }; - }; - }; - }; - }; - /** - * The "Remove team member" endpoint (described below) is deprecated. - * - * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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/github/getting-started-with-github/githubs-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/)." - */ - "teams/remove-member-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - /** Response if team synchronization is setup */ - 404: unknown; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. - * - * 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 a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - "teams/get-membership-for-user-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-membership"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-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 team maintainer. - * - * **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 team maintainer. - */ - "teams/add-or-update-membership-for-user-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-membership"]; - }; - }; - /** Response if team synchronization is set up */ - 403: unknown; - 404: components["responses"]["not_found"]; - /** Response if you attempt to add an organization to a team */ - 422: { - content: { - "application/json": { - message?: string; - errors?: { - code?: string; - field?: string; - resource?: string; - }[]; - documentation_url?: string; - }; - }; - }; - }; - requestBody: { - content: { - "application/json": { - /** - * 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"; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-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/)." - */ - "teams/remove-membership-for-user-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - /** Response if team synchronization is set up */ - 403: unknown; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. - * - * Lists the organization projects for a team. - */ - "teams/list-projects-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team-project"][]; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. - * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - */ - "teams/check-permissions-for-project-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["team-project"]; - }; - }; - /** Response if project is not managed by this team */ - 404: unknown; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. - */ - "teams/add-or-update-project-permissions-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - /** Response if the project is not owned by the organization */ - 403: { - content: { - "application/json": { - message?: string; - documentation_url?: string; - }; - }; - }; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - permission?: "read" | "write" | "admin"; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. - */ - "teams/remove-project-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - project_id: components["parameters"]["project-id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ - "teams/list-repos-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Note**: Repositories inherited through a parent team will also be checked. - * - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. - * - * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - "teams/check-permissions-for-repo-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Alternative response with extra repository information */ - 200: { - content: { - "application/vnd.github.v3.repository+json": components["schemas"]["team-repository"]; - }; - }; - /** Response if repository is managed by this team */ - 204: never; - /** Response if repository is not managed by this team */ - 404: unknown; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. - * - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - "teams/add-or-update-repo-permissions-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** - * 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. - */ - permission?: "pull" | "push" | "admin"; - }; - }; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. - */ - "teams/remove-repo-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - "teams/list-idp-groups-for-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["group-mapping"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - "teams/create-or-update-idp-group-connections-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["group-mapping"]; - }; - }; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups: { - /** ID of the IdP group. */ - group_id: string; - /** Name of the IdP group. */ - group_name: string; - /** Description of the IdP group. */ - group_description: string; - id?: string; - name?: string; - description?: string; - }[]; - synced_at?: string; - }; - }; - }; - }; - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - "teams/list-child-legacy": { - parameters: { - path: { - team_id: components["parameters"]["team-id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** Response if child teams exist */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team"][]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. - * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. - */ - "users/get-authenticated": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["private-user"] | components["schemas"]["public-user"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** **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. */ - "users/update-authenticated": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["private-user"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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 Twitter username of the user. */ - twitter_username?: string | null; - /** 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; - }; - }; - }; - }; - /** List the users you've blocked on your personal account. */ - "users/list-blocked-by-authenticated": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - "users/check-blocked": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** If the user is blocked: */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - /** If the user is not blocked: */ - 404: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - }; - }; - "users/block": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - "users/unblock": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Sets the visibility for your primary email addresses. */ - "users/set-primary-email-visibility-for-authenticated": { - parameters: {}; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["email"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** An email address associated with the GitHub user account to manage. */ - email: string; - /** Denotes whether an email is publically visible. */ - visibility: "public" | "private"; - }; - }; - }; - }; - /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ - "users/list-emails-for-authenticated": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["email"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** This endpoint is accessible with the `user` scope. */ - "users/add-email-for-authenticated": { - parameters: {}; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["email"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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[]; - } | string[] | string; - }; - }; - }; - /** This endpoint is accessible with the `user` scope. */ - "users/delete-email-for-authenticated": { - parameters: {}; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Email addresses associated with the GitHub user account. */ - emails: string[]; - } | string[] | string; - }; - }; - }; - /** Lists the people following the authenticated user. */ - "users/list-followers-for-authenticated-user": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** Lists the people who the authenticated user follows. */ - "users/list-followed-by-authenticated": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - "users/check-person-is-followed-by-authenticated": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Response if the person is followed by the authenticated user */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - /** Response if the person is not followed by the authenticated user */ - 404: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - }; - }; - /** - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. - */ - "users/follow": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ - "users/unfollow": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - "users/list-gpg-keys-for-authenticated": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["gpg-key"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - "users/create-gpg-key-for-authenticated": { - parameters: {}; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["gpg-key"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** A GPG key in ASCII-armored format. */ - armored_public_key: string; - }; - }; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - "users/get-gpg-key-for-authenticated": { - parameters: { - path: { - /** gpg_key_id parameter */ - gpg_key_id: components["parameters"]["gpg_key_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["gpg-key"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - "users/delete-gpg-key-for-authenticated": { - parameters: { - path: { - /** gpg_key_id parameter */ - gpg_key_id: components["parameters"]["gpg_key_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * 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://docs.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. - */ - "apps/list-installations-for-authenticated-user": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** You can find the permissions for the installation under the `permissions` key. */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - installations: components["schemas"]["installation"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 415: components["responses"]["preview_header_missing"]; - }; - }; - /** - * 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://docs.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. - */ - "apps/list-installation-repos-for-authenticated-user": { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components["parameters"]["installation_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** The access the user has to each repository is included in the hash under the `permissions` key. */ - 200: { - headers: {}; - content: { - "application/json": { - total_count: number; - repository_selection?: string; - repositories: components["schemas"]["repository"][]; - }; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. - */ - "apps/add-repo-to-installation": { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components["parameters"]["installation_id"]; - repository_id: components["parameters"]["repository_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. - */ - "apps/remove-repo-from-installation": { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components["parameters"]["installation_id"]; - repository_id: components["parameters"]["repository_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. If there are no restrictions, you will see an empty response. */ - "interactions/get-restrictions-for-authenticated-user": { - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["interaction-limit-response"]; - }; - }; - }; - }; - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - "interactions/set-restrictions-for-authenticated-user": { - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["interaction-limit-response"]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": components["schemas"]["interaction-limit"]; - }; - }; - }; - /** Removes any interaction restrictions from your public repositories. */ - "interactions/remove-restrictions-for-authenticated-user": { - responses: { - /** Empty response */ - 204: never; - }; - }; - /** - * List issues across owned and member repositories assigned to the authenticated user. - * - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - "issues/list-for-authenticated-user": { - parameters: { - query: { - /** - * 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?: components["parameters"]["labels"]; - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: "created" | "updated" | "comments"; - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["issue"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 404: components["responses"]["not_found"]; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - "users/list-public-ssh-keys-for-authenticated": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["key"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - "users/create-public-ssh-key-for-authenticated": { - parameters: {}; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["key"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** A descriptive name for the new key. */ - title?: string; - /** The public SSH key to add to your GitHub account. */ - key: string; - }; - }; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - "users/get-public-ssh-key-for-authenticated": { - parameters: { - path: { - /** key_id parameter */ - key_id: components["parameters"]["key_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["key"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - "users/delete-public-ssh-key-for-authenticated": { - parameters: { - path: { - /** key_id parameter */ - key_id: components["parameters"]["key_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - "apps/list-subscriptions-for-authenticated-user": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["user-marketplace-purchase"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - "apps/list-subscriptions-for-authenticated-user-stubbed": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["user-marketplace-purchase"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - }; - }; - "orgs/list-memberships-for-authenticated-user": { - parameters: { - query: { - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["org-membership"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - }; - "orgs/get-membership-for-authenticated-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["org-membership"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "orgs/update-membership-for-authenticated-user": { - parameters: { - path: { - org: components["parameters"]["org"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["org-membership"]; - }; - }; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** The state that the membership should be in. Only `"active"` will be accepted. */ - state: "active"; - }; - }; - }; - }; - /** Lists all migrations a user has started. */ - "migrations/list-for-authenticated-user": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["migration"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** Initiates the generation of a user migration archive. */ - "migrations/start-for-authenticated-user": { - parameters: {}; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["migration"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** Lock the repositories being migrated at the start of the migration */ - lock_repositories?: boolean; - /** Do not include attachments in the migration */ - exclude_attachments?: boolean; - /** Exclude attributes from the API response to improve performance */ - exclude?: "repositories"[]; - repositories: string[]; - }; - }; - }; - }; - /** - * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). - */ - "migrations/get-status-for-authenticated-user": { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - }; - query: { - exclude?: string[]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["migration"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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. - */ - "migrations/get-archive-for-authenticated-user": { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - }; - }; - responses: { - /** response */ - 302: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ - "migrations/delete-archive-for-authenticated-user": { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ - "migrations/unlock-repo-for-authenticated-user": { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - /** repo_name parameter */ - repo_name: components["parameters"]["repo_name"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Lists all the repositories for this user migration. */ - "migrations/list-repos-for-user": { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components["parameters"]["migration_id"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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. - */ - "orgs/list-for-authenticated-user": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["organization-simple"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-package-for-authenticated-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package"]; - }; - }; - }; - }; - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/delete-package-for-authenticated-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/restore-package-for-authenticated-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-all-package-versions-for-a-package-owned-by-the-authenticated-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package-version"][]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-package-version-for-authenticated-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - /** Unique identifier of the package version. */ - package_version_id: components["parameters"]["package_version_id"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package-version"]; - }; - }; - }; - }; - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/delete-package-version-for-authenticated-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - /** Unique identifier of the package version. */ - package_version_id: components["parameters"]["package_version_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/restore-package-version-for-authenticated-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - /** Unique identifier of the package version. */ - package_version_id: components["parameters"]["package_version_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "projects/create-for-authenticated-user": { - parameters: {}; - responses: { - /** response */ - 201: { - content: { - "application/json": components["schemas"]["project"]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed_simple"]; - }; - requestBody: { - content: { - "application/json": { - /** Name of the project */ - name: string; - /** Body of the project */ - body?: string | null; - }; - }; - }; - }; - /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ - "users/list-public-emails-for-authenticated": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["email"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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. - */ - "repos/list-for-authenticated-user": { - parameters: { - query: { - /** 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`. Default: `asc` when using `full_name`, otherwise `desc` */ - direction?: "asc" | "desc"; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - /** 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?: components["parameters"]["since"]; - /** 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?: components["parameters"]["before"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["repository"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * Creates a new repository for the authenticated user. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.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 - */ - "repos/create-for-authenticated-user": { - parameters: {}; - responses: { - /** response */ - 201: { - headers: { - Location?: string; - }; - content: { - "application/json": components["schemas"]["repository"]; - }; - }; - 304: components["responses"]["not_modified"]; - 400: components["responses"]["bad_request"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - requestBody: { - content: { - "application/json": { - /** 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; - /** Whether the repository is private or public. */ - private?: boolean; - /** Whether issues are enabled. */ - has_issues?: boolean; - /** Whether projects are enabled. */ - has_projects?: boolean; - /** Whether the wiki is enabled. */ - has_wiki?: 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; - /** Whether the repository is initialized with a minimal README. */ - auto_init?: boolean; - /** The desired language or platform to apply to the .gitignore. */ - gitignore_template?: string; - /** The license keyword of the open source license for this repository. */ - license_template?: string; - /** Whether to allow squash merges for pull requests. */ - allow_squash_merge?: boolean; - /** Whether to allow merge commits for pull requests. */ - allow_merge_commit?: boolean; - /** Whether to allow rebase merges for pull requests. */ - allow_rebase_merge?: boolean; - /** Whether to delete head branches when pull requests are merged */ - delete_branch_on_merge?: boolean; - /** Whether downloads are enabled. */ - has_downloads?: boolean; - /** Whether this repository acts as a template that can be used to generate new repositories. */ - is_template?: boolean; - }; - }; - }; - }; - /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ - "repos/list-invitations-for-authenticated-user": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["repository-invitation"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "repos/decline-invitation": { - parameters: { - path: { - /** invitation_id parameter */ - invitation_id: components["parameters"]["invitation_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 409: components["responses"]["conflict"]; - }; - }; - "repos/accept-invitation": { - parameters: { - path: { - /** invitation_id parameter */ - invitation_id: components["parameters"]["invitation_id"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - 409: components["responses"]["conflict"]; - }; - }; - /** - * Lists repositories the authenticated user has starred. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - "activity/list-repos-starred-by-authenticated-user": { - parameters: { - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components["parameters"]["sort"]; - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["repository"][]; - "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - "activity/check-repo-is-starred-by-authenticated-user": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Response if this repository is starred by you */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - /** Response if this repository is not starred by you */ - 404: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; - }; - }; - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - "activity/star-repo-for-authenticated-user": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - "activity/unstar-repo-for-authenticated-user": { - parameters: { - path: { - owner: components["parameters"]["owner"]; - repo: components["parameters"]["repo"]; - }; - }; - responses: { - /** Empty response */ - 204: never; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** Lists repositories the authenticated user is watching. */ - "activity/list-watched-repos-for-authenticated-user": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - }; - }; - /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ - "teams/list-for-authenticated-user": { - parameters: { - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["team-full"][]; - }; - }; - 304: components["responses"]["not_modified"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. - */ - "users/list": { - parameters: { - query: { - /** A user ID. Only return users with an ID greater than this ID. */ - since?: components["parameters"]["since-user"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: { - Link?: string; - }; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - 304: components["responses"]["not_modified"]; - }; - }; - /** - * 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://docs.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' below" - * - * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". - */ - "users/get-by-username": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["private-user"] | components["schemas"]["public-user"]; - }; - }; - 404: components["responses"]["not_found"]; - }; - }; - /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ - "activity/list-events-for-authenticated-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - }; - }; - /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ - "activity/list-org-events-for-authenticated-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - org: components["parameters"]["org"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - }; - }; - "activity/list-public-events-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - }; - }; - /** Lists the people following the specified user. */ - "users/list-followers-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - }; - }; - /** Lists the people who the specified user follows. */ - "users/list-following-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["simple-user"][]; - }; - }; - }; - }; - "users/check-following-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - target_user: string; - }; - }; - responses: { - /** Response if the user follows the target user */ - 204: never; - /** Response if the user does not follow the target user */ - 404: unknown; - }; - }; - /** Lists public gists for the specified user: */ - "gists/list-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** 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?: components["parameters"]["since"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["base-gist"][]; - }; - }; - 422: components["responses"]["validation_failed"]; - }; - }; - /** Lists the GPG keys for a user. This information is accessible by anyone. */ - "users/list-gpg-keys-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["gpg-key"][]; - }; - }; - }; - }; - /** - * 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: - * - * ```shell - * curl -u username:token - * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 - * ``` - */ - "users/get-context-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** 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; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["hovercard"]; - }; - }; - 404: components["responses"]["not_found"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** - * Enables an authenticated GitHub App to find the user’s installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - "apps/get-user-installation": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["installation"]; - }; - }; - }; - }; - /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ - "users/list-public-keys-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["key-simple"][]; - }; - }; - }; - }; - /** - * 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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. - */ - "orgs/list-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["organization-simple"][]; - }; - }; - }; - }; - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-package-for-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package"]; - }; - }; - }; - }; - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-all-package-versions-for-package-owned-by-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package-version"][]; - }; - }; - 401: components["responses"]["requires_authentication"]; - 403: components["responses"]["forbidden"]; - 404: components["responses"]["not_found"]; - }; - }; - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - "packages/get-package-version-for-user": { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ - package_type: components["parameters"]["package_type"]; - /** The name of the package. */ - package_name: components["parameters"]["package_name"]; - /** Unique identifier of the package version. */ - package_version_id: components["parameters"]["package_version_id"]; - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["package-version"]; - }; - }; - }; - }; - "projects/list-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** 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?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["project"][]; - }; - }; - 415: components["responses"]["preview_header_missing"]; - 422: components["responses"]["validation_failed"]; - }; - }; - /** 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. */ - "activity/list-received-events-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - }; - }; - "activity/list-received-public-events-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["event"][]; - }; - }; - }; - }; - /** Lists public repositories for the specified user. */ - "repos/list-for-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** 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`. Default: `asc` when using `full_name`, otherwise `desc` */ - direction?: "asc" | "desc"; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - }; - }; - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - "billing/get-github-actions-billing-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["actions-billing-usage"]; - }; - }; - }; - }; - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - "billing/get-github-packages-billing-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["packages-billing-usage"]; - }; - }; - }; - }; - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - "billing/get-shared-storage-billing-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - }; - responses: { - /** response */ - 200: { - content: { - "application/json": components["schemas"]["combined-billing-usage"]; - }; - }; - }; - }; - /** - * Lists repositories a user has starred. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - "activity/list-repos-starred-by-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components["parameters"]["sort"]; - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components["parameters"]["direction"]; - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["repository"][]; - "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; - }; - }; - }; - }; - /** Lists repositories a user is watching. */ - "activity/list-repos-watched-by-user": { - parameters: { - path: { - username: components["parameters"]["username"]; - }; - query: { - /** Results per page (max 100). */ - per_page?: components["parameters"]["per_page"]; - /** Page number of the results to fetch. */ - page?: components["parameters"]["page"]; - }; - }; - responses: { - /** response */ - 200: { - headers: {}; - content: { - "application/json": components["schemas"]["minimal-repository"][]; - }; - }; - }; - }; - /** Get a random sentence from the Zen of GitHub */ - "meta/get-zen": { - responses: { - /** response */ - 200: { - content: { - "text/plain": string; - }; - }; - }; - }; -} diff --git a/node_modules/@octokit/openapi-types/dist-types/index.d.ts b/node_modules/@octokit/openapi-types/dist-types/index.d.ts deleted file mode 100644 index 5d08066..0000000 --- a/node_modules/@octokit/openapi-types/dist-types/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./generated/types"; -export * from "./version"; diff --git a/node_modules/@octokit/openapi-types/dist-types/version.d.ts b/node_modules/@octokit/openapi-types/dist-types/version.d.ts deleted file mode 100644 index 8da971f..0000000 --- a/node_modules/@octokit/openapi-types/dist-types/version.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const VERSION = "5.1.0"; diff --git a/node_modules/@octokit/openapi-types/dist-web/index.js.map b/node_modules/@octokit/openapi-types/dist-web/index.js.map deleted file mode 100644 index 367c494..0000000 --- a/node_modules/@octokit/openapi-types/dist-web/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js"],"sourcesContent":["export const VERSION = \"5.1.0\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/openapi-types/package.json index ca5b376..24484a5 100644 --- a/node_modules/@octokit/openapi-types/package.json +++ b/node_modules/@octokit/openapi-types/package.json @@ -1,69 +1,20 @@ { - "_from": "@octokit/openapi-types@^5.1.0", - "_id": "@octokit/openapi-types@5.1.0", - "_inBundle": false, - "_integrity": "sha512-bodZvSYgycbUuuKrC/anCBUExvaSSWzMMFz0xl7pcJujxnmGxvqvcFHktjx1ZOSyeNKLfYF0QCgibaHUGsZTng==", - "_location": "/@octokit/openapi-types", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/openapi-types@^5.1.0", - "name": "@octokit/openapi-types", - "escapedName": "@octokit%2fopenapi-types", - "scope": "@octokit", - "rawSpec": "^5.1.0", - "saveSpec": null, - "fetchSpec": "^5.1.0" - }, - "_requiredBy": [ - "/@octokit/types" - ], - "_resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-5.1.0.tgz", - "_shasum": "661fd03c7d55fbcb0a0937d3353d87dea012f52c", - "_spec": "@octokit/openapi-types@^5.1.0", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\types", - "bugs": { - "url": "https://github.com/octokit/openapi-types.ts/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec", - "devDependencies": { - "@octokit/tsconfig": "^1.0.2", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.9.2", - "@pika/plugin-build-web": "^0.9.2", - "@pika/plugin-ts-standard-pkg": "^0.9.2", - "openapi-typescript": "^3.0.0", - "pika-plugin-merge-properties": "^1.0.6", - "semantic-release-plugin-update-version-in-files": "^1.1.0", - "typescript": "^4.1.5" - }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/openapi-types.ts#readme", - "keywords": [], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", "name": "@octokit/openapi-types", - "octokit": { - "openapi-version": "2.11.0" + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" }, - "pika": true, "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/openapi-types.ts.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "5.1.0" + "version": "12.11.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "6.8.0" + } } diff --git a/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..88dc62d --- /dev/null +++ b/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,47095 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installations": { + /** + * You must use a [JWT](https://docs.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. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/grants": { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * 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://docs.github.com/rest/reference/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"]`. + */ + get: operations["oauth-authorizations/list-grants"]; + }; + "/applications/grants/{grant_id}": { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations["oauth-authorizations/get-grant"]; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-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). + */ + delete: operations["oauth-authorizations/delete-grant"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/get-by-slug"]; + }; + "/authorizations": { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations["oauth-authorizations/list-authorizations"]; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * 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://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + */ + post: operations["oauth-authorizations/create-authorization"]; + }; + "/authorizations/clients/{client_id}": { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + */ + put: operations["oauth-authorizations/get-or-create-authorization-for-app"]; + }; + "/authorizations/clients/{client_id}/{fingerprint}": { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + */ + put: operations["oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint"]; + }; + "/authorizations/{authorization_id}": { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations["oauth-authorizations/get-authorization"]; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + delete: operations["oauth-authorizations/delete-authorization"]; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + */ + patch: operations["oauth-authorizations/update-authorization"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprise-installation/{enterprise_or_org}/server-statistics": { + /** + * Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + get: operations["enterprise-admin/get-server-statistics"]; + }; + "/enterprises/{enterprise}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/oidc/customization/issuer": { + /** + * Sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations["actions/set-actions-oidc-custom-issuer-policy-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-github-actions-permissions-enterprise"]; + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-github-actions-permissions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations": { + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise"]; + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/disable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-allowed-actions-enterprise"]; + /** + * Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-allowed-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-enterprise"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups": { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"]; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"]; + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-group-from-enterprise"]; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + patch: operations["enterprise-admin/update-self-hosted-runner-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise"]; + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"]; + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": { + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-in-group-for-enterprise"]; + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-self-hosted-runners-in-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + put: operations["enterprise-admin/add-self-hosted-runner-to-group-for-enterprise"]; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners": { + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-runner-applications-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + post: operations["enterprise-admin/create-registration-token-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["enterprise-admin/create-remove-token-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/get-self-hosted-runner-for-enterprise"]; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise"]; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise"]; + }; + "/enterprises/{enterprise}/audit-log": { + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + get: operations["enterprise-admin/get-audit-log"]; + }; + "/enterprises/{enterprise}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be a member of the enterprise, + * and you must use an access token with the `repo` scope or `security_events` scope. + */ + get: operations["code-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * The authenticated user must be an enterprise admin. + */ + get: operations["billing/get-github-actions-billing-ghe"]; + }; + "/enterprises/{enterprise}/settings/billing/advanced-security": { + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-billing-ghe"]; + }; + "/enterprises/{enterprise}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + get: operations["billing/get-github-packages-billing-ghe"]; + }; + "/enterprises/{enterprise}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + get: operations["billing/get-shared-storage-billing-ghe"]; + }; + "/events": { + /** 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. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * 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. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** 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. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + /** **Note**: This was previously `/gists/:gist_id/fork`. */ + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** 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. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + get: operations["activity/get-thread"]; + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/organizations/{organization_id}/custom_roles": { + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + get: operations["orgs/list-custom-roles"]; + }; + "/orgs/{org}": { + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + get: operations["oidc/get-oidc-custom-sub-template-for-org"]; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + put: operations["oidc/update-oidc-custom-sub-template-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/runner-groups": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/audit-log": { + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." + * + * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination)." + */ + get: operations["orgs/get-audit-log"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/credential-authorizations": { + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + */ + get: operations["orgs/list-saml-sso-authorizations"]; + }; + "/orgs/{org}/credential-authorizations/{credential_id}": { + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. + */ + delete: operations["orgs/remove-saml-sso-authorization"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/external-group/{group_id}": { + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations["teams/external-idp-group-info-for-org"]; + }; + "/orgs/{org}/external-groups": { + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations["teams/list-external-idp-groups-for-org"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** 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`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** 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. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** 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. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/memberships/{username}": { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations["orgs/get-membership-for-user"]; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * 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. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * 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. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** 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. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/public_members": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** Lists repositories for the specified organization. */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/advanced-security": { + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/team-sync/groups": { + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + */ + get: operations["teams/list-idp-groups-for-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * 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://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/external-groups": { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations["teams/list-linked-external-idp-groups-to-team-for-org"]; + /** + * Deletes a connection between a team and an external group. + * + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + delete: operations["teams/unlink-external-idp-group-from-team-for-org"]; + /** + * Creates a connection between a team and an external group. Only one external group can be linked to a team. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + patch: operations["teams/link-external-idp-group-to-team-for-org"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/team-sync/group-mappings": { + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + get: operations["teams/list-idp-groups-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + patch: operations["teams/create-or-update-idp-group-connections-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** 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: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** 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. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** 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. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** 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. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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: operations["rate-limit/get"]; + }; + "/repos/{owner}/{repo}": { + /** 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: operations["repos/get"]; + /** + * 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, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + /** + * Gets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + get: operations["actions/get-custom-oidc-sub-claim-for-repo"]; + /** + * Sets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/set-custom-oidc-sub-claim-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * 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. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-pull-request-review-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-status-checks-protection"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-all-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations["repos/set-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations["repos/add-status-check-contexts"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **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: operations["checks/get"]; + /** + * **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. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** 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. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **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. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + get: operations["code-scanning/get-alert"]; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations["code-scanning/get-analysis"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `analysis_key` + * * `environment` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + get: operations["codespaces/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations["repos/check-collaborator"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + put: operations["repos/add-collaborator"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * 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. + * + * + * 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` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * 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`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * 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. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#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://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + get: operations["repos/get-content"]; + /** Creates a new file or replaces an existing file in a repository. */ + put: operations["repos/create-or-update-file-contents"]; + /** + * 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. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * 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. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + get: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * 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. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * Get all environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** 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. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + get: operations["repos/list-webhooks"]; + /** + * 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. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * 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` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * 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. + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** 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://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** 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. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + put: operations["repos/enable-lfs-for-repo"]; + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** List all notifications for the current user. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + put: operations["repos/update-information-about-pages-site"]; + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + post: operations["repos/create-pages-site"]; + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * 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. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/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. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["pulls/list"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations["pulls/get"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** Lists the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + get: operations["pulls/list-requested-reviewers"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations["pulls/request-reviewers"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * + * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * 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. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * 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. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * 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. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * 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. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. 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. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** 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. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** 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. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** 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://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. 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. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-environment-secret"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/scim/v2/enterprises/{enterprise}/Groups": { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations["enterprise-admin/list-provisioned-groups-enterprise"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. + */ + post: operations["enterprise-admin/provision-and-invite-enterprise-group"]; + }; + "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations["enterprise-admin/get-provisioning-information-for-enterprise-group"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. + */ + put: operations["enterprise-admin/set-information-for-provisioned-enterprise-group"]; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + delete: operations["enterprise-admin/delete-scim-group-from-enterprise"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + */ + patch: operations["enterprise-admin/update-attribute-for-enterprise-group"]; + }; + "/scim/v2/enterprises/{enterprise}/Users": { + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. + * + * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. + */ + get: operations["enterprise-admin/list-provisioned-identities-enterprise"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * + * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. + */ + post: operations["enterprise-admin/provision-and-invite-enterprise-user"]; + }; + "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations["enterprise-admin/get-provisioning-information-for-enterprise-user"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + put: operations["enterprise-admin/set-information-for-provisioned-enterprise-user"]; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + delete: operations["enterprise-admin/delete-user-from-enterprise"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + patch: operations["enterprise-admin/update-attribute-for-enterprise-user"]; + }; + "/scim/v2/organizations/{org}/Users": { + /** + * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub organization. + * + * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. + */ + get: operations["scim/list-provisioned-identities"]; + /** Provision organization membership for a user, and send an activation email to the email address. */ + post: operations["scim/provision-and-invite-user"]; + }; + "/scim/v2/organizations/{org}/Users/{scim_user_id}": { + get: operations["scim/get-provisioning-information-for-user"]; + /** + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + put: operations["scim/set-information-for-provisioned-user"]; + delete: operations["scim/delete-user-from-org"]; + /** + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + patch: operations["scim/update-attribute-for-user"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-member-legacy"]; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/team-sync/group-mappings": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + */ + get: operations["teams/list-idp-groups-for-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + */ + patch: operations["teams/create-or-update-idp-group-connections-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **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. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * 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://docs.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. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * 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. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/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. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** 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. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** Format: uri-template */ + hub_url: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * Simple User + * @description Simple User + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description Simple User + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise account + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** + * Application Grant + * @description The authorization associated with an OAuth Access. + */ + "application-grant": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/applications/grants/1 + */ + url: string; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * @example [ + * "public_repo" + * ] + */ + scopes: string[]; + user?: components["schemas"]["nullable-simple-user"]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # 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 [EMAIL]. 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/ + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + /** + * Server Statistics Proxy Endpoint + * @description Response of S4 Proxy endpoint that provides GHES statistics + */ + "server-statistics": { + server_id?: string; + collection_date?: string; + schema_version?: string; + ghes_version?: string; + host_name?: string; + github_connect?: { + features_enabled?: string[]; + }; + ghe_stats?: { + comments?: { + total_commit_comments?: number; + total_gist_comments?: number; + total_issue_comments?: number; + total_pull_request_comments?: number; + }; + gists?: { + total_gists?: number; + private_gists?: number; + public_gists?: number; + }; + hooks?: { + total_hooks?: number; + active_hooks?: number; + inactive_hooks?: number; + }; + issues?: { + total_issues?: number; + open_issues?: number; + closed_issues?: number; + }; + milestones?: { + total_milestones?: number; + open_milestones?: number; + closed_milestones?: number; + }; + orgs?: { + total_orgs?: number; + disabled_orgs?: number; + total_teams?: number; + total_team_members?: number; + }; + pages?: { + total_pages?: number; + }; + pulls?: { + total_pulls?: number; + merged_pulls?: number; + mergeable_pulls?: number; + unmergeable_pulls?: number; + }; + repos?: { + total_repos?: number; + root_repos?: number; + fork_repos?: number; + org_repos?: number; + total_pushes?: number; + total_wikis?: number; + }; + users?: { + total_users?: number; + admin_users?: number; + suspended_users?: number; + }; + }; + dormant_users?: { + total_dormant_users?: number; + dormancy_threshold?: string; + }; + }; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + "actions-oidc-custom-issuer-policy-for-enterprise": { + /** + * @description Whether the enterprise customer requested a custom issuer URL. + * @example true + */ + include_enterprise_slug?: boolean; + }; + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-organizations": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-enterprise-permissions": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + /** @description The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. */ + selected_organizations_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + /** + * Organization Simple + * @description Organization Simple + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + "audit-log-event": { + /** @description The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ + "@timestamp"?: number; + /** @description The name of the action that was performed, for example `user.login` or `repo.create`. */ + action?: string; + active?: boolean; + active_was?: boolean; + /** @description The actor who performed the action. */ + actor?: string; + /** @description The id of the actor who performed the action. */ + actor_id?: number; + actor_location?: { + country_name?: string; + }; + data?: { [key: string]: unknown }; + org_id?: number; + /** @description The username of the account being blocked. */ + blocked_user?: string; + business?: string; + config?: { [key: string]: unknown }[]; + config_was?: { [key: string]: unknown }[]; + content_type?: string; + /** @description The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ + created_at?: number; + deploy_key_fingerprint?: string; + /** @description A unique identifier for an audit event. */ + _document_id?: string; + emoji?: string; + events?: { [key: string]: unknown }[]; + events_were?: { [key: string]: unknown }[]; + explanation?: string; + fingerprint?: string; + hook_id?: number; + limited_availability?: boolean; + message?: string; + name?: string; + old_user?: string; + openssh_public_key?: string; + org?: string; + previous_visibility?: string; + read_only?: boolean; + /** @description The name of the repository. */ + repo?: string; + /** @description The name of the repository. */ + repository?: string; + repository_public?: boolean; + target_login?: string; + team?: string; + /** @description The type of protocol (for example, HTTP or SSH) used to transfer Git data. */ + transport_protocol?: number; + /** @description A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. */ + transport_protocol_name?: string; + /** @description The user that was affected by the action performed (if available). */ + user?: string; + /** @description The repository visibility, for example `public` or `private`. */ + visibility?: string; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** @description The security alert number. */ + "alert-number": number; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "alert-instances-url": string; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-alert-fixed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-alert-dismissed-at": string | null; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | ("source" | "generated" | "test" | "library") + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + /** + * Simple Repository + * @description Simple Repository + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "advanced-security-active-committers-user": { + user_login: string; + /** @example 2021-11-03 */ + last_pushed_date: string; + }; + "advanced-security-active-committers-repository": { + /** @example octocat/Hello-World */ + name: string; + /** @example 25 */ + advanced_security_committers: number; + advanced_security_committers_breakdown: components["schemas"]["advanced-security-active-committers-user"][]; + }; + "advanced-security-active-committers": { + /** @example 25 */ + total_advanced_security_committers?: number; + /** @example 2 */ + total_count?: number; + repositories: components["schemas"]["advanced-security-active-committers-repository"][]; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + */ + state_reason?: string | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + 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?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * 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. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** @example flat-rate */ + price_model: string; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + /** + * Repository + * @description A git repository + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Custom Repository Role + * @description Custom repository roles created by organization administrators + */ + "organization-custom-repository-role": { + id: number; + name: string; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** Format: date-time */ + updated_at: string; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * Actions OIDC Subject customization + * @description Actions OIDC Subject customization + */ + "oidc-custom-sub": { + include_claim_keys: string[]; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + }; + /** + * Credential Authorization + * @description Credential Authorization + */ + "credential-authorization": { + /** + * @description User login that owns the underlying credential. + * @example monalisa + */ + login: string; + /** + * @description Unique identifier for the credential. + * @example 1 + */ + credential_id: number; + /** + * @description Human-readable description of the credential type. + * @example SSH Key + */ + credential_type: string; + /** + * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. + * @example 12345678 + */ + token_last_eight?: string; + /** + * Format: date-time + * @description Date when the credential was authorized for use. + * @example 2011-01-26T19:06:43Z + */ + credential_authorized_at: string; + /** + * @description List of oauth scopes the token has been granted. + * @example [ + * "user", + * "repo" + * ] + */ + scopes?: string[]; + /** + * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. + * @example jklmnop12345678 + */ + fingerprint?: string; + /** + * Format: date-time + * @description Date when the credential was last accessed. May be null if it was never accessed + * @example 2011-01-26T19:06:43Z + */ + credential_accessed_at: string | null; + /** @example 12345678 */ + authorized_credential_id: number | null; + /** + * @description The title given to the ssh key. This will only be present when the credential is an ssh key. + * @example my ssh key + */ + authorized_credential_title?: string | null; + /** + * @description The note given to the token. This will only be present when the credential is a token. + * @example my token + */ + authorized_credential_note?: string | null; + /** + * Format: date-time + * @description The expiry for the token. This will only be present when the credential is a token. + */ + authorized_credential_expires_at?: string | null; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * ExternalGroup + * @description Information about an external group's usage and its members + */ + "external-group": { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number; + /** + * @description The display name for the group + * @example group-azuread-test + */ + group_name: string; + /** + * @description The date when the group was last updated_at + * @example 2021-01-03 22:27:15:000 -700 + */ + updated_at?: string; + /** + * @description An array of teams linked to this group + * @example [ + * { + * "team_id": 1, + * "team_name": "team-test" + * }, + * { + * "team_id": 2, + * "team_name": "team-test2" + * } + * ] + */ + teams: { + /** + * @description The id for a team + * @example 1 + */ + team_id: number; + /** + * @description The name of the team + * @example team-test + */ + team_name: string; + }[]; + /** + * @description An array of external members linked to this group + * @example [ + * { + * "member_id": 1, + * "member_login": "mona-lisa_eocsaxrs", + * "member_name": "Mona Lisa", + * "member_email": "mona_lisa@github.com" + * }, + * { + * "member_id": 2, + * "member_login": "octo-lisa_eocsaxrs", + * "member_name": "Octo Lisa", + * "member_email": "octo_lisa@github.com" + * } + * ] + */ + members: { + /** + * @description The internal user ID of the identity + * @example 1 + */ + member_id: number; + /** + * @description The handle/login for the user + * @example mona-lisa_eocsaxrs + */ + member_login: string; + /** + * @description The user display name/profile name + * @example Mona Lisa + */ + member_name: string; + /** + * @description An email attached to a user + * @example mona_lisa@github.com + */ + member_email: string; + }[]; + }; + /** + * ExternalGroups + * @description A list of external groups available to be connected to a team + */ + "external-groups": { + /** + * @description An array of external groups available to be mapped to a team + * @example [ + * { + * "group_id": 1, + * "group_name": "group-azuread-test", + * "updated_at": "2021-01-03 22:27:15:000 -700" + * }, + * { + * "group_id": 2, + * "group_name": "group-azuread-test2", + * "updated_at": "2021-06-03 22:27:15:000 -700" + * } + * ] + */ + groups?: { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number; + /** + * @description The display name of the group + * @example group-azuread-test + */ + group_name: string; + /** + * @description The time of the last update for this group + * @example 2019-06-03 22:27:15:000 -700 + */ + updated_at: string; + }[]; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * GroupMapping + * @description External Groups to be mapped to a team for membership + */ + "group-mapping": { + /** + * @description Array of groups to be mapped to this team + * @example [ + * { + * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", + * "group_name": "saml-azuread-test", + * "group_description": "A group of Developers working on AzureAD SAML SSO" + * }, + * { + * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", + * "group_name": "saml-azuread-test2", + * "group_description": "Another group of Developers working on AzureAD SAML SSO" + * } + * ] + */ + groups?: { + /** + * @description The ID of the group + * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa + */ + group_id: string; + /** + * @description The name of the group + * @example saml-azuread-test + */ + group_name: string; + /** + * @description a description of the group + * @example A group of Developers working on AzureAD SAML SSO + */ + group_description: string; + /** + * @description synchronization status for this group mapping + * @example unsynced + */ + status?: string; + /** + * @description the time of the last sync for this group-mapping + * @example 2019-06-03 22:27:15:000 -700 + */ + synced_at?: string | null; + }[]; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["organization-full"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** @example true */ + allow_forking?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + }; + /** + * The json payload enables/disables the use of sub claim customization + * @description OIDC Customer Subject + */ + "opt-out-oidc-custom-sub": { + use_default: boolean; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. `none` means access is only possible from workflows in this repository. + * @enum {string} + */ + access_level: "none" | "organization" | "enterprise"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description Simple Commit + */ + "nullable-simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: { [key: string]: unknown } | string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference is a legacy autolink that only matches numeric characters. */ + is_alphanumeric?: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + 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; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description Simple Commit + */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + /** Format: date-time */ + timestamp: string; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @example completed + * @enum {string|null} + */ + status: ("queued" | "in_progress" | "completed") | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | ( + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + ) + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string; + target_url: string; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + } & { + content: unknown; + encoding: unknown; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + type: string; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + type: string; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-submodule": { + type: string; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + }[]; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: Partial & Partial & Partial; + }; + /** + * Dependency + * @description A single package dependency. + */ + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + /** + * manifest + * @description A collection of related dependencies declared in a file or representing a logical group of dependencies. + */ + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + resolved?: { [key: string]: components["schemas"]["dependency"] }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests */ + manifests?: { [key: string]: components["schemas"]["manifest"] }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + protection_rules?: (Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + }>)[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy"]; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: { + /** @example "foo@bar.com" */ + email?: string; + /** @example "foo" */ + password?: string; + /** @example "roomer" */ + room?: string; + /** @example "foo" */ + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + /** @example "sha256" */ + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + /** @example "abc" */ + token?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + */ + state_reason?: string | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** @example 1 */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + 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; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: "commit"; + details: components["schemas"]["secret-scanning-location-commit"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + "scim-group-list-enterprise": { + schemas: string[]; + totalResults: number; + itemsPerPage: number; + startIndex: number; + Resources: { + schemas: string[]; + id: string; + externalId?: string | null; + displayName?: string; + members?: { + value?: string; + $ref?: string; + display?: string; + }[]; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + }; + }[]; + }; + "scim-enterprise-group": { + schemas: string[]; + id: string; + externalId?: string | null; + displayName?: string; + members?: { + value?: string; + $ref?: string; + display?: string; + }[]; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + }; + }; + "scim-user-list-enterprise": { + schemas: string[]; + totalResults: number; + itemsPerPage: number; + startIndex: number; + Resources: { + schemas: string[]; + id: string; + externalId?: string; + userName?: string; + name?: { + givenName?: string; + familyName?: string; + }; + emails?: { + value?: string; + primary?: boolean; + type?: string; + }[]; + groups?: { + value?: string; + }[]; + active?: boolean; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + }; + }[]; + }; + "scim-enterprise-user": { + schemas: string[]; + id: string; + externalId?: string; + userName?: string; + name?: { + givenName?: string; + familyName?: string; + }; + emails?: { + value?: string; + type?: string; + primary?: boolean; + }[]; + groups?: { + value?: string; + }[]; + active?: boolean; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + }; + }; + /** + * SCIM /Users + * @description SCIM /Users provisioning endpoints + */ + "scim-user": { + /** @description SCIM schema used. */ + schemas: string[]; + /** + * @description Unique identifier of an external identity + * @example 1b78eada-9baa-11e6-9eb6-a431576d590e + */ + id: string; + /** + * @description The ID of the User. + * @example a7b0f98395 + */ + externalId: string | null; + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string | null; + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string | null; + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + givenName: string | null; + familyName: string | null; + formatted?: string | null; + }; + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + value: string; + primary?: boolean; + }[]; + /** + * @description The active status of the User. + * @example true + */ + active: boolean; + meta: { + /** @example User */ + resourceType?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + lastModified?: string; + /** + * Format: uri + * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d + */ + location?: string; + }; + /** @description The ID of the organization. */ + organization_id?: number; + /** + * @description Set of operations to be performed + * @example [ + * { + * "op": "replace", + * "value": { + * "active": false + * } + * } + * ] + */ + operations?: { + /** @enum {string} */ + op: "add" | "remove" | "replace"; + path?: string; + value?: string | { [key: string]: unknown } | unknown[]; + }[]; + /** @description associated groups */ + groups?: { + value?: string; + display?: string; + }[]; + }; + /** + * SCIM User List + * @description SCIM User List + */ + "scim-user-list": { + /** @description SCIM schema used. */ + schemas: string[]; + /** @example 3 */ + totalResults: number; + /** @example 10 */ + itemsPerPage: number; + /** @example 1 */ + startIndex: number; + Resources: components["schemas"]["scim-user"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description Secret created at + */ + created_at: string; + /** + * Format: date-time + * @description Secret last updated at + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description API URL at which the list of repositories this secret is vicible can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if github advanced security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** A header with no content is returned. */ + no_content: unknown; + /** Resource not found */ + scim_not_found: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Forbidden */ + scim_forbidden: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Bad Request */ + scim_bad_request: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Too Many Requests */ + scim_too_many_requests: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Internal Error */ + scim_internal_error: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Conflict */ + scim_conflict: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + }; + parameters: { + /** @description The number of results per page (max 100). */ + "per-page": number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string; + "delivery-id": number; + /** @description Page number of the results to fetch. */ + page: number; + /** @description 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; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The unique identifier of the grant. */ + "grant-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The client ID of the OAuth app. */ + "oauth-client-id": string; + /** @description The unique identifier of the authorization. */ + "authorization-id": number; + /** @description The slug version of the enterprise name or the login of an organization. */ + "enterprise-or-org": string; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** @description The unique identifier of the organization. */ + "org-id": number; + /** @description Only return runner groups that are allowed to be used by this organization. */ + "visible-to-organization": string; + /** @description Unique identifier of the self-hosted runner group. */ + "runner-group-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + "audit-log-phrase": string; + /** + * @description The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + "audit-log-include": "web" | "git" | "all"; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + "audit-log-after": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + "audit-log-before": string; + /** + * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + "audit-log-order": "desc" | "asc"; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name": components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid": components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + "pagination-after": string; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type": string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution": string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort": "created" | "updated"; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** @description 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; + /** @description The unique identifier of the pull request thread. */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description Only return runner groups that are allowed to be used by this repository. */ + "visible-to-repository": string; + /** @description The name of the secret. */ + "secret-name": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The unique identifier of the group. */ + "group-id": number; + /** @description The unique identifier of the hook. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** @description The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + "package-visibility": "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref": components["schemas"]["code-scanning-ref"]; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key": string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort": + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + "workflow-run-status": + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests": boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id": number; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name": string; + /** @description Returns check runs with the specified `status`. */ + status: "queued" | "in_progress" | "completed"; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path": string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment */ + "environment-name": string; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per: "" | "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** @description Used for pagination: the index of the first result to return. */ + "start-index": number; + /** @description Used for pagination: the number of results to return. */ + count: number; + /** @description Identifier generated by the GitHub SCIM endpoint. */ + "scim-group-id": string; + /** @description The unique identifier of the SCIM user. */ + "scim-user-id": string; + /** @description 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"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query": number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * 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 for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.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`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.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. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * 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://docs.github.com/rest/reference/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"]`. + */ + "oauth-authorizations/list-grants": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The client ID of your GitHub app. */ + client_id?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["application-grant"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + "oauth-authorizations/get-grant": { + parameters: { + path: { + /** The unique identifier of the grant. */ + grant_id: components["parameters"]["grant-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["application-grant"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-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). + */ + "oauth-authorizations/delete-grant": { + parameters: { + path: { + /** The unique identifier of the grant. */ + grant_id: components["parameters"]["grant-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter 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). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + "oauth-authorizations/list-authorizations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The client ID of your GitHub app. */ + client_id?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["authorization"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * 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://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + */ + "oauth-authorizations/create-authorization": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null; + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string; + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** @description The OAuth app client key for which to create the token. */ + client_id?: string; + /** @description The OAuth app client secret for which to create the token. */ + client_secret?: string; + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + */ + "oauth-authorizations/get-or-create-authorization-for-app": { + parameters: { + path: { + /** The client ID of the OAuth app. */ + client_id: components["parameters"]["oauth-client-id"]; + }; + }; + responses: { + /** if returning an existing token */ + 200: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string; + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null; + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string; + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + */ + "oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint": { + parameters: { + path: { + /** The client ID of the OAuth app. */ + client_id: components["parameters"]["oauth-client-id"]; + fingerprint: string; + }; + }; + responses: { + /** if returning an existing token */ + 200: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + /** Response if returning a new token */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string; + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null; + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string; + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string; + }; + }; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + "oauth-authorizations/get-authorization": { + parameters: { + path: { + /** The unique identifier of the authorization. */ + authorization_id: components["parameters"]["authorization-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + "oauth-authorizations/delete-authorization": { + parameters: { + path: { + /** The unique identifier of the authorization. */ + authorization_id: components["parameters"]["authorization-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-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 "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + */ + "oauth-authorizations/update-authorization": { + parameters: { + path: { + /** The unique identifier of the authorization. */ + authorization_id: components["parameters"]["authorization-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null; + /** @description A list of scopes to add to this authorization. */ + add_scopes?: string[]; + /** @description A list of scopes to remove from this authorization. */ + remove_scopes?: string[]; + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string; + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + }; + }; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + "enterprise-admin/get-server-statistics": { + parameters: { + path: { + /** The slug version of the enterprise name or the login of an organization. */ + enterprise_or_org: components["parameters"]["enterprise-or-org"]; + }; + query: { + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + date_start?: string; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + date_end?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["server-statistics"]; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "actions/get-actions-cache-usage-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + "actions/set-actions-oidc-custom-issuer-policy-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-oidc-custom-issuer-policy-for-enterprise"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-github-actions-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-enterprise-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-github-actions-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/disable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-allowed-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-allowed-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + "actions/get-github-actions-default-workflow-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Success response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + "actions/set-github-actions-default-workflow-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Success response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: "selected" | "all"; + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-group-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/update-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name?: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runners-in-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-self-hosted-runners-in-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + "enterprise-admin/add-self-hosted-runner-to-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runners-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count?: number; + runners?: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-runner-applications-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + "enterprise-admin/create-registration-token-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "enterprise-admin/create-remove-token-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + "enterprise-admin/get-audit-log": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + phrase?: components["parameters"]["audit-log-phrase"]; + /** + * The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + include?: components["parameters"]["audit-log-include"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["audit-log-after"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["audit-log-before"]; + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components["parameters"]["audit-log-order"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["audit-log-event"][]; + }; + }; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be a member of the enterprise, + * and you must use an access token with the `repo` scope or `security_events` scope. + */ + "code-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * The authenticated user must be an enterprise admin. + */ + "billing/get-github-actions-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + "billing/get-github-advanced-security-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + "billing/get-github-packages-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + "billing/get-shared-storage-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** 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. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#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. + */ + "gists/list-public": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names of files to be updated + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: This was previously `/gists/:gist_id/fork`. */ + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "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?: components["parameters"]["labels"]; + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. Can be either `markdown` or `gfm`. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** 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. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified 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://docs.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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications 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 notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#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. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + "orgs/list-custom-roles": { + parameters: { + path: { + organization_id: string; + }; + }; + responses: { + /** Response - list of custom role names */ + 200: { + content: { + "application/json": { + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number; + custom_roles?: components["schemas"]["organization-custom-repository-role"][]; + }; + }; + }; + }; + }; + /** + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** @example "http://github.blog" */ + blog?: string; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + "oidc/get-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** A JSON serialized template for OIDC subject claim customization */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + }; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + "oidc/update-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." + * + * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination)." + */ + "orgs/get-audit-log": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + phrase?: components["parameters"]["audit-log-phrase"]; + /** + * The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + include?: components["parameters"]["audit-log-include"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["audit-log-after"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["audit-log-before"]; + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components["parameters"]["audit-log-order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["audit-log-event"][]; + }; + }; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked: */ + 204: never; + /** If the user is not blocked: */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + */ + "orgs/list-saml-sso-authorizations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page token */ + page?: number; + /** Limits the list of credentials authorizations for an organization to a specific login */ + login?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["credential-authorization"][]; + }; + }; + }; + }; + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. + */ + "orgs/remove-saml-sso-authorization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + credential_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + "teams/external-idp-group-info-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the group. */ + group_id: components["parameters"]["group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["external-group"]; + }; + }; + }; + }; + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + "teams/list-external-idp-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page token */ + page?: number; + /** Limits the list to groups containing the text in the group name */ + display_name?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["external-groups"]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * \* `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "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?: components["parameters"]["labels"]; + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + /** Response if requester is not an organization member */ + 302: never; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** 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. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) 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. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * 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. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `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. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/en/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists repositories for the specified organization. */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + type?: + | "all" + | "public" + | "private" + | "forks" + | "sources" + | "member" + | "internal"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description 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; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description 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; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.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; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + "billing/get-github-advanced-security-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + */ + "teams/list-idp-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page token */ + page?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description 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` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + "teams/list-linked-external-idp-groups-to-team-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["external-groups"]; + }; + }; + }; + }; + /** + * Deletes a connection between a team and an external group. + * + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "teams/unlink-external-idp-group-from-team-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Creates a connection between a team and an external group. Only one external group can be linked to a team. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + "teams/link-external-idp-group-to-team-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["external-group"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description External Group Id + * @example 1 + */ + group_id: number; + }; + }; + }; + }; + /** + * 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`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * 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:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. + * + * 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 team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * 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. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** + * 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. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also 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://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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. 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. In addition to the enumerated values, you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + * @enum {string} + */ + permission?: "pull" | "push" | "admin" | "maintain" | "triage"; + }; + }; + }; + }; + /** + * 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. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + "teams/list-idp-groups-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + "teams/create-or-update-idp-group-connections-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ + groups?: { + /** @description ID of the IdP group. */ + group_id: string; + /** @description Name of the IdP group. */ + group_name: string; + /** @description Description of the IdP group. */ + group_description: string; + }[]; + }; + }; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** 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. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** 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. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "projects/list-columns": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object 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. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.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://docs.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. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description 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. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + "actions/get-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Status response */ + 200: { + content: { + "application/json": components["schemas"]["opt-out-oidc-custom-sub"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Sets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/set-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["opt-out-oidc-custom-sub"]; + }; + }; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The prefix appended by alphanumeric characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. */ + url_template: string; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description 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; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps 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?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description contexts parameter */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description contexts parameter */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description contexts parameter */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description teams parameter */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description teams parameter */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description teams parameter */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description users parameter */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description users parameter */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description users parameter */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **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. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description 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; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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://docs.github.com/rest/reference/checks#output-object) description. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description 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; + /** @description 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://docs.github.com/rest/reference/checks#output-object-1) description. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description 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://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** 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. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **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://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) 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. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `analysis_key` + * * `environment` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis 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; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * 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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** In addition to the enumerated values, you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + * @enum {string} + */ + permission?: "pull" | "push" | "admin" | "maintain" | "triage"; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ + 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 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?: components["parameters"]["since"]; + /** 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; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#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://docs.github.com/rest/overview/media-types/#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * **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. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **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. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * + * 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` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * 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. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#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://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). + * + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### If the content is a directory + * 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 content is a symlink + * 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 in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.v3.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a new file or replaces an existing file in a repository. */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * 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. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being replaced. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * 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. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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 | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain 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://docs.github.com/rest/commits/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. + * + * #### Merged branch response + * 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. + * + * #### Merge conflict 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. + * + * #### Failed commit status checks + * 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`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/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[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description 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`. + * @default + */ + target_url?: string; + /** + * @description 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: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: "production" | "staging" | "qa"; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description 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` */ + auto_inactive?: boolean; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Get all environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * 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://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description 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[]; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description 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; + }; + }; + }; + }; + /** + * 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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description 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. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + }; + /** + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. 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. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * 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 endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + }; + }; + /** 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://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + }; + /** + * 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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + }; + /** + * List issues in a repository. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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?: components["parameters"]["labels"]; + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description 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 | null; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.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://docs.github.com/webhooks/event-payloads/#issues) 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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + milestone?: (string | number) | null; + /** @description 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 + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description 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[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. 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. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. 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. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 410: components["responses"]["gone"]; + }; + }; + /** 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. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description 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://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description 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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** List all notifications for the current user. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks 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 repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * 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. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** 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. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** 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`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. */ + title?: string; + /** @description 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; + /** @description 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; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** @example 1 */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/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://docs.github.com/rest/guides/getting-started-with-the-git-database-api#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://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description 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; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description 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; + /** @description The relative path to the file that necessitates a comment. */ + path?: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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 above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line?: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** 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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Lists the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * + * **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://docs.github.com/rest/overview/media-types#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://docs.github.com/rest/reference/pulls#get-a-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. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description 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://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description 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; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** @example "APPROVE" */ + event?: string; + }; + }; + }; + }; + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description 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. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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. */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * 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. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description 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. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. 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. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `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 + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** + * * `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 + */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * 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. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description 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; + /** @description A short description of the status. */ + description?: string; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** 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://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + }; + /** 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://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. 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. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** 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. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. 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. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/list-provisioned-groups-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components["parameters"]["start-index"]; + /** Used for pagination: the number of results to return. */ + count?: components["parameters"]["count"]; + /** filter results */ + filter?: string; + /** attributes to exclude */ + excludedAttributes?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-group-list-enterprise"]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. + */ + "enterprise-admin/provision-and-invite-enterprise-group": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["scim-enterprise-group"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string; + members?: { + /** @description The SCIM user ID for a user. */ + value: string; + }[]; + }; + }; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/get-provisioning-information-for-enterprise-group": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components["parameters"]["scim-group-id"]; + }; + query: { + /** Attributes to exclude. */ + excludedAttributes?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-group"]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. + */ + "enterprise-admin/set-information-for-provisioned-enterprise-group": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components["parameters"]["scim-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-group"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string; + members?: { + /** @description The SCIM user ID for a user. */ + value: string; + }[]; + }; + }; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/delete-scim-group-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components["parameters"]["scim-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + */ + "enterprise-admin/update-attribute-for-enterprise-group": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components["parameters"]["scim-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-group"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { + /** @enum {string} */ + op: "add" | "Add" | "remove" | "Remove" | "replace" | "Replace"; + path?: string; + /** @description Can be any value - string, number, array or object. */ + value?: unknown; + }[]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. + * + * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. + */ + "enterprise-admin/list-provisioned-identities-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components["parameters"]["start-index"]; + /** Used for pagination: the number of results to return. */ + count?: components["parameters"]["count"]; + /** filter results */ + filter?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-user-list-enterprise"]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * + * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. + */ + "enterprise-admin/provision-and-invite-enterprise-user": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["scim-enterprise-user"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description The username for the user. */ + userName: string; + name: { + /** @description The first name of the user. */ + givenName: string; + /** @description The last name of the user. */ + familyName: string; + }; + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string; + /** @description The type of email address. */ + type: string; + /** @description Whether this email address is the primary address. */ + primary: boolean; + }[]; + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string; + }[]; + }; + }; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/get-provisioning-information-for-enterprise-user": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-user"]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + "enterprise-admin/set-information-for-provisioned-enterprise-user": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-user"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description The username for the user. */ + userName: string; + name: { + /** @description The first name of the user. */ + givenName: string; + /** @description The last name of the user. */ + familyName: string; + }; + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string; + /** @description The type of email address. */ + type: string; + /** @description Whether this email address is the primary address. */ + primary: boolean; + }[]; + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string; + }[]; + }; + }; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/delete-user-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + "enterprise-admin/update-attribute-for-enterprise-user": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-user"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: unknown }[]; + }; + }; + }; + }; + /** + * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub organization. + * + * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. + */ + "scim/list-provisioned-identities": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: number; + /** Used for pagination: the number of results to return. */ + count?: number; + /** + * Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query: + * + * `?filter=userName%20eq%20\"Octocat\"`. + * + * To filter results for the identity with the email `octocat@github.com`, you would use this query: + * + * `?filter=emails%20eq%20\"octocat@github.com\"`. + */ + filter?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/scim+json": components["schemas"]["scim-user-list"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["scim_bad_request"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + 429: components["responses"]["scim_too_many_requests"]; + }; + }; + /** Provision organization membership for a user, and send an activation email to the email address. */ + "scim/provision-and-invite-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/scim+json": components["schemas"]["scim-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["scim_bad_request"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + 409: components["responses"]["scim_conflict"]; + 500: components["responses"]["scim_internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string; + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string; + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + givenName: string; + familyName: string; + formatted?: string; + }; + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + value: string; + primary?: boolean; + type?: string; + }[]; + schemas?: string[]; + externalId?: string; + groups?: string[]; + active?: boolean; + }; + }; + }; + }; + "scim/get-provisioning-information-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/scim+json": components["schemas"]["scim-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + }; + }; + /** + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + "scim/set-information-for-provisioned-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/scim+json": components["schemas"]["scim-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + }; + requestBody: { + content: { + "application/json": { + schemas?: string[]; + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string; + externalId?: string; + groups?: string[]; + active?: boolean; + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string; + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + givenName: string; + familyName: string; + formatted?: string; + }; + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + type?: string; + value: string; + primary?: boolean; + }[]; + }; + }; + }; + }; + "scim/delete-user-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + }; + }; + /** + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + "scim/update-attribute-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/scim+json": components["schemas"]["scim-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["scim_bad_request"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + /** Response */ + 429: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + schemas?: string[]; + /** + * @description Set of operations to be performed + * @example [ + * { + * "op": "replace", + * "value": { + * "active": false + * } + * } + * ] + */ + Operations: { + /** @enum {string} */ + op: "add" | "remove" | "replace"; + path?: string; + value?: + | { + active?: boolean | null; + userName?: string | null; + externalId?: string | null; + givenName?: string | null; + familyName?: string | null; + } + | { + value?: string; + primary?: boolean; + }[] + | string; + }[]; + }; + }; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### 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. + */ + "search/code": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if 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: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/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`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** 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://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.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`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * 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://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits 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. + */ + "search/topics": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** 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 the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/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. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + 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?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description 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. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description 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. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) 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`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint 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. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. 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://docs.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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint 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://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * 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 response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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 team maintainer. + * + * **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://docs.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 team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) 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. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) 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. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * 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://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" 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. + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on 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. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) 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. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + */ + "teams/list-idp-groups-for-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + */ + "teams/create-or-update-idp-group-connections-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ + groups: { + /** @description ID of the IdP group. */ + group_id: string; + /** @description Name of the IdP group. */ + group_name: string; + /** @description Description of the IdP group. */ + group_description: string; + /** @example "caceab43fc9ffa20081c" */ + id?: string; + /** @example "external-team-6c13e7288ef7" */ + name?: string; + /** @example "moar cheese pleese" */ + description?: string; + }[]; + /** @example "I am not a timestamp" */ + synced_at?: string; + }; + }; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **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. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked: */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked: */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } + | { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description Location for this codespace. Assigned by IP if not provided */ + location?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }; + }; + }; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creaing a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** No Content when repositories were added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was removed from the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description 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. + * @example [] + */ + emails: string[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if the person is followed by the authenticated user */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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://docs.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. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "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?: components["parameters"]["labels"]; + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** 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"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + }; + /** + * 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://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/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. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + 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; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** 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?: components["parameters"]["since"]; + /** 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?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.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. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** @description 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; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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://docs.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' below" + * + * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * 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: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** 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; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** 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. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/plugin-paginate-rest/README.md b/node_modules/@octokit/plugin-paginate-rest/README.md index f73580a..1e3c0ba 100644 --- a/node_modules/@octokit/plugin-paginate-rest/README.md +++ b/node_modules/@octokit/plugin-paginate-rest/README.md @@ -106,7 +106,7 @@ const issues = await octokit.paginate( per_page: 100, }, (response, done) => { - if (response.data.find((issues) => issue.title.includes("something"))) { + if (response.data.find((issue) => issue.title.includes("something"))) { done(); } return response.data; @@ -117,7 +117,7 @@ const issues = await octokit.paginate( Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/): ```js -const issues = await octokit.paginate(octokit.issues.listForRepo, { +const issues = await octokit.paginate(octokit.rest.issues.listForRepo, { owner: "octocat", repo: "hello-world", since: "2010-10-01", @@ -141,7 +141,8 @@ for await (const response of octokit.paginate.iterator( parameters )) { // do whatever you want with each response, break out of the loop, etc. - console.log(response.data.title); + const issues = response.data; + console.log("%d issues found", issues.length); } ``` @@ -155,11 +156,12 @@ const parameters = { per_page: 100, }; for await (const response of octokit.paginate.iterator( - octokit.issues.listForRepo, + octokit.rest.issues.listForRepo, parameters )) { // do whatever you want with each response, break out of the loop, etc. - console.log(response.data.title); + const issues = response.data; + console.log("%d issues found", issues.length); } ``` @@ -183,6 +185,81 @@ Most of GitHub's paginating REST API endpoints return an array, but there are a If a response is lacking the `Link` header, `octokit.paginate()` still resolves with an array, even if the response returns a single object. +## Types + +The plugin also exposes some types and runtime type guards for TypeScript projects. + + + + + + +
+Types + + +```typescript +import { + PaginateInterface, + PaginatingEndpoints, +} from "@octokit/plugin-paginate-rest"; +``` + +
+Guards + + +```typescript +import { isPaginatingEndpoint } from "@octokit/plugin-paginate-rest"; +``` + +
+ +### PaginateInterface + +An `interface` that declares all the overloads of the `.paginate` method. + +### PaginatingEndpoints + +An `interface` which describes all API endpoints supported by the plugin. Some overloads of `.paginate()` method and `composePaginateRest()` function depend on `PaginatingEndpoints`, using the `keyof PaginatingEndpoints` as a type for one of its arguments. + +```typescript +import { Octokit } from "@octokit/core"; +import { + PaginatingEndpoints, + composePaginateRest, +} from "@octokit/plugin-paginate-rest"; + +type DataType = "data" extends keyof T ? T["data"] : unknown; + +async function myPaginatePlugin( + octokit: Octokit, + endpoint: E, + parameters?: PaginatingEndpoints[E]["parameters"] +): Promise> { + return await composePaginateRest(octokit, endpoint, parameters); +} +``` + +### isPaginatingEndpoint + +A type guard, `isPaginatingEndpoint(arg)` returns `true` if `arg` is one of the keys in `PaginatingEndpoints` (is `keyof PaginatingEndpoints`). + +```typescript +import { Octokit } from "@octokit/core"; +import { + isPaginatingEndpoint, + composePaginateRest, +} from "@octokit/plugin-paginate-rest"; + +async function myPlugin(octokit: Octokit, arg: unknown) { + if (isPaginatingEndpoint(arg)) { + return await composePaginateRest(octokit, arg); + } + // ... +} +``` + ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js b/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js index 1369771..d5fc599 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js +++ b/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js @@ -2,7 +2,48 @@ Object.defineProperty(exports, '__esModule', { value: true }); -const VERSION = "2.10.0"; +const VERSION = "2.21.3"; + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} /** * Some “list” response that can be paginated have a different response structure @@ -21,6 +62,13 @@ const VERSION = "2.10.0"; * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref */ function normalizePaginatedListResponse(response) { + // endpoints can respond with 204 if repository is empty + if (!response.data) { + return _objectSpread2(_objectSpread2({}, response), {}, { + data: [] + }); + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way // to retrieve the same information. @@ -59,19 +107,32 @@ function iterator(octokit, route, parameters) { if (!url) return { done: true }; - const response = await requestMethod({ - method, - url, - headers - }); - const normalizedResponse = normalizePaginatedListResponse(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 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; - return { - value: normalizedResponse - }; + + try { + const response = await requestMethod({ + method, + url, + headers + }); + const normalizedResponse = normalizePaginatedListResponse(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 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { + value: normalizedResponse + }; + } catch (error) { + if (error.status !== 409) throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } } }) @@ -113,6 +174,16 @@ const composePaginateRest = Object.assign(paginate, { iterator }); +const paginatingEndpoints = ["GET /app/hook/deliveries", "GET /app/installations", "GET /applications/grants", "GET /authorizations", "GET /enterprises/{enterprise}/actions/permissions/organizations", "GET /enterprises/{enterprise}/actions/runner-groups", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "GET /enterprises/{enterprise}/actions/runners", "GET /enterprises/{enterprise}/audit-log", "GET /enterprises/{enterprise}/secret-scanning/alerts", "GET /enterprises/{enterprise}/settings/billing/advanced-security", "GET /events", "GET /gists", "GET /gists/public", "GET /gists/starred", "GET /gists/{gist_id}/comments", "GET /gists/{gist_id}/commits", "GET /gists/{gist_id}/forks", "GET /installation/repositories", "GET /issues", "GET /licenses", "GET /marketplace_listing/plans", "GET /marketplace_listing/plans/{plan_id}/accounts", "GET /marketplace_listing/stubbed/plans", "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", "GET /networks/{owner}/{repo}/events", "GET /notifications", "GET /organizations", "GET /orgs/{org}/actions/cache/usage-by-repository", "GET /orgs/{org}/actions/permissions/repositories", "GET /orgs/{org}/actions/runner-groups", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "GET /orgs/{org}/actions/runners", "GET /orgs/{org}/actions/secrets", "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", "GET /orgs/{org}/audit-log", "GET /orgs/{org}/blocks", "GET /orgs/{org}/code-scanning/alerts", "GET /orgs/{org}/codespaces", "GET /orgs/{org}/credential-authorizations", "GET /orgs/{org}/dependabot/secrets", "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", "GET /orgs/{org}/events", "GET /orgs/{org}/external-groups", "GET /orgs/{org}/failed_invitations", "GET /orgs/{org}/hooks", "GET /orgs/{org}/hooks/{hook_id}/deliveries", "GET /orgs/{org}/installations", "GET /orgs/{org}/invitations", "GET /orgs/{org}/invitations/{invitation_id}/teams", "GET /orgs/{org}/issues", "GET /orgs/{org}/members", "GET /orgs/{org}/migrations", "GET /orgs/{org}/migrations/{migration_id}/repositories", "GET /orgs/{org}/outside_collaborators", "GET /orgs/{org}/packages", "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", "GET /orgs/{org}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", "GET /orgs/{org}/secret-scanning/alerts", "GET /orgs/{org}/settings/billing/advanced-security", "GET /orgs/{org}/team-sync/groups", "GET /orgs/{org}/teams", "GET /orgs/{org}/teams/{team_slug}/discussions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/invitations", "GET /orgs/{org}/teams/{team_slug}/members", "GET /orgs/{org}/teams/{team_slug}/projects", "GET /orgs/{org}/teams/{team_slug}/repos", "GET /orgs/{org}/teams/{team_slug}/teams", "GET /projects/columns/{column_id}/cards", "GET /projects/{project_id}/collaborators", "GET /projects/{project_id}/columns", "GET /repos/{owner}/{repo}/actions/artifacts", "GET /repos/{owner}/{repo}/actions/caches", "GET /repos/{owner}/{repo}/actions/runners", "GET /repos/{owner}/{repo}/actions/runs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "GET /repos/{owner}/{repo}/actions/secrets", "GET /repos/{owner}/{repo}/actions/workflows", "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "GET /repos/{owner}/{repo}/assignees", "GET /repos/{owner}/{repo}/branches", "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "GET /repos/{owner}/{repo}/code-scanning/alerts", "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "GET /repos/{owner}/{repo}/code-scanning/analyses", "GET /repos/{owner}/{repo}/codespaces", "GET /repos/{owner}/{repo}/codespaces/devcontainers", "GET /repos/{owner}/{repo}/codespaces/secrets", "GET /repos/{owner}/{repo}/collaborators", "GET /repos/{owner}/{repo}/comments", "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/commits", "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", "GET /repos/{owner}/{repo}/commits/{ref}/status", "GET /repos/{owner}/{repo}/commits/{ref}/statuses", "GET /repos/{owner}/{repo}/contributors", "GET /repos/{owner}/{repo}/dependabot/secrets", "GET /repos/{owner}/{repo}/deployments", "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "GET /repos/{owner}/{repo}/environments", "GET /repos/{owner}/{repo}/events", "GET /repos/{owner}/{repo}/forks", "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", "GET /repos/{owner}/{repo}/hooks", "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "GET /repos/{owner}/{repo}/invitations", "GET /repos/{owner}/{repo}/issues", "GET /repos/{owner}/{repo}/issues/comments", "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/issues/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", "GET /repos/{owner}/{repo}/issues/{issue_number}/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", "GET /repos/{owner}/{repo}/keys", "GET /repos/{owner}/{repo}/labels", "GET /repos/{owner}/{repo}/milestones", "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", "GET /repos/{owner}/{repo}/notifications", "GET /repos/{owner}/{repo}/pages/builds", "GET /repos/{owner}/{repo}/projects", "GET /repos/{owner}/{repo}/pulls", "GET /repos/{owner}/{repo}/pulls/comments", "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "GET /repos/{owner}/{repo}/releases", "GET /repos/{owner}/{repo}/releases/{release_id}/assets", "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", "GET /repos/{owner}/{repo}/secret-scanning/alerts", "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "GET /repos/{owner}/{repo}/stargazers", "GET /repos/{owner}/{repo}/subscribers", "GET /repos/{owner}/{repo}/tags", "GET /repos/{owner}/{repo}/teams", "GET /repos/{owner}/{repo}/topics", "GET /repositories", "GET /repositories/{repository_id}/environments/{environment_name}/secrets", "GET /search/code", "GET /search/commits", "GET /search/issues", "GET /search/labels", "GET /search/repositories", "GET /search/topics", "GET /search/users", "GET /teams/{team_id}/discussions", "GET /teams/{team_id}/discussions/{discussion_number}/comments", "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /teams/{team_id}/discussions/{discussion_number}/reactions", "GET /teams/{team_id}/invitations", "GET /teams/{team_id}/members", "GET /teams/{team_id}/projects", "GET /teams/{team_id}/repos", "GET /teams/{team_id}/teams", "GET /user/blocks", "GET /user/codespaces", "GET /user/codespaces/secrets", "GET /user/emails", "GET /user/followers", "GET /user/following", "GET /user/gpg_keys", "GET /user/installations", "GET /user/installations/{installation_id}/repositories", "GET /user/issues", "GET /user/keys", "GET /user/marketplace_purchases", "GET /user/marketplace_purchases/stubbed", "GET /user/memberships/orgs", "GET /user/migrations", "GET /user/migrations/{migration_id}/repositories", "GET /user/orgs", "GET /user/packages", "GET /user/packages/{package_type}/{package_name}/versions", "GET /user/public_emails", "GET /user/repos", "GET /user/repository_invitations", "GET /user/starred", "GET /user/subscriptions", "GET /user/teams", "GET /users", "GET /users/{username}/events", "GET /users/{username}/events/orgs/{org}", "GET /users/{username}/events/public", "GET /users/{username}/followers", "GET /users/{username}/following", "GET /users/{username}/gists", "GET /users/{username}/gpg_keys", "GET /users/{username}/keys", "GET /users/{username}/orgs", "GET /users/{username}/packages", "GET /users/{username}/projects", "GET /users/{username}/received_events", "GET /users/{username}/received_events/public", "GET /users/{username}/repos", "GET /users/{username}/starred", "GET /users/{username}/subscriptions"]; + +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } +} + /** * @param octokit Octokit instance * @param options Options passed to Octokit constructor @@ -128,5 +199,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION; exports.composePaginateRest = composePaginateRest; +exports.isPaginatingEndpoint = isPaginatingEndpoint; exports.paginateRest = paginateRest; +exports.paginatingEndpoints = paginatingEndpoints; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map b/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map index 4037d80..fb04fff 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map +++ b/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/normalize-paginated-list-response.js","../dist-src/iterator.js","../dist-src/paginate.js","../dist-src/compose-paginate.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.10.0\";\n","/**\n * Some “list” response that can be paginated have a different response structure\n *\n * They have a `total_count` key in the response (search also has `incomplete_results`,\n * /installation/repositories also has `repository_selection`), as well as a key with\n * the list of the items which name varies from endpoint to endpoint.\n *\n * Octokit normalizes these responses so that paginated results are always returned following\n * the same structure. One challenge is that if the list response has only one page, no Link\n * header is provided, so this header alone is not sufficient to check wether a response is\n * paginated or not.\n *\n * We check if a \"total_count\" key is present in the response data, but also make sure that\n * a \"url\" property is not, as the \"Get the combined status for a specific ref\" endpoint would\n * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref\n */\nexport function normalizePaginatedListResponse(response) {\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n // keep the additional properties intact as there is currently no other way\n // to retrieve the same information.\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n","import { normalizePaginatedListResponse } from \"./normalize-paginated-list-response\";\nexport function iterator(octokit, route, parameters) {\n const options = typeof route === \"function\"\n ? route.endpoint(parameters)\n : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n // `response.headers.link` format:\n // '; rel=\"next\", ; rel=\"last\"'\n // sets `url` to undefined if \"next\" URL is not present or `link` header is not set\n url = ((normalizedResponse.headers.link || \"\").match(/<([^>]+)>;\\s*rel=\"next\"/) || [])[1];\n return { value: normalizedResponse };\n },\n }),\n };\n}\n","import { iterator } from \"./iterator\";\nexport function paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = undefined;\n }\n return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);\n}\nfunction gather(octokit, results, iterator, mapFn) {\n return iterator.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator, mapFn);\n });\n}\n","import { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport const composePaginateRest = Object.assign(paginate, {\n iterator,\n});\n","import { VERSION } from \"./version\";\nimport { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport { composePaginateRest } from \"./compose-paginate\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit),\n }),\n };\n}\npaginateRest.VERSION = VERSION;\n"],"names":["VERSION","normalizePaginatedListResponse","response","responseNeedsNormalization","data","incompleteResults","incomplete_results","repositorySelection","repository_selection","totalCount","total_count","namespaceKey","Object","keys","iterator","octokit","route","parameters","options","endpoint","request","requestMethod","method","headers","url","Symbol","asyncIterator","next","done","normalizedResponse","link","match","value","paginate","mapFn","undefined","gather","results","then","result","earlyExit","concat","composePaginateRest","assign","paginateRest","bind"],"mappings":";;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AAAO,SAASC,8BAAT,CAAwCC,QAAxC,EAAkD;AACrD,QAAMC,0BAA0B,GAAG,iBAAiBD,QAAQ,CAACE,IAA1B,IAAkC,EAAE,SAASF,QAAQ,CAACE,IAApB,CAArE;AACA,MAAI,CAACD,0BAAL,EACI,OAAOD,QAAP,CAHiD;AAKrD;;AACA,QAAMG,iBAAiB,GAAGH,QAAQ,CAACE,IAAT,CAAcE,kBAAxC;AACA,QAAMC,mBAAmB,GAAGL,QAAQ,CAACE,IAAT,CAAcI,oBAA1C;AACA,QAAMC,UAAU,GAAGP,QAAQ,CAACE,IAAT,CAAcM,WAAjC;AACA,SAAOR,QAAQ,CAACE,IAAT,CAAcE,kBAArB;AACA,SAAOJ,QAAQ,CAACE,IAAT,CAAcI,oBAArB;AACA,SAAON,QAAQ,CAACE,IAAT,CAAcM,WAArB;AACA,QAAMC,YAAY,GAAGC,MAAM,CAACC,IAAP,CAAYX,QAAQ,CAACE,IAArB,EAA2B,CAA3B,CAArB;AACA,QAAMA,IAAI,GAAGF,QAAQ,CAACE,IAAT,CAAcO,YAAd,CAAb;AACAT,EAAAA,QAAQ,CAACE,IAAT,GAAgBA,IAAhB;;AACA,MAAI,OAAOC,iBAAP,KAA6B,WAAjC,EAA8C;AAC1CH,IAAAA,QAAQ,CAACE,IAAT,CAAcE,kBAAd,GAAmCD,iBAAnC;AACH;;AACD,MAAI,OAAOE,mBAAP,KAA+B,WAAnC,EAAgD;AAC5CL,IAAAA,QAAQ,CAACE,IAAT,CAAcI,oBAAd,GAAqCD,mBAArC;AACH;;AACDL,EAAAA,QAAQ,CAACE,IAAT,CAAcM,WAAd,GAA4BD,UAA5B;AACA,SAAOP,QAAP;AACH;;ACtCM,SAASY,QAAT,CAAkBC,OAAlB,EAA2BC,KAA3B,EAAkCC,UAAlC,EAA8C;AACjD,QAAMC,OAAO,GAAG,OAAOF,KAAP,KAAiB,UAAjB,GACVA,KAAK,CAACG,QAAN,CAAeF,UAAf,CADU,GAEVF,OAAO,CAACK,OAAR,CAAgBD,QAAhB,CAAyBH,KAAzB,EAAgCC,UAAhC,CAFN;AAGA,QAAMI,aAAa,GAAG,OAAOL,KAAP,KAAiB,UAAjB,GAA8BA,KAA9B,GAAsCD,OAAO,CAACK,OAApE;AACA,QAAME,MAAM,GAAGJ,OAAO,CAACI,MAAvB;AACA,QAAMC,OAAO,GAAGL,OAAO,CAACK,OAAxB;AACA,MAAIC,GAAG,GAAGN,OAAO,CAACM,GAAlB;AACA,SAAO;AACH,KAACC,MAAM,CAACC,aAAR,GAAwB,OAAO;AAC3B,YAAMC,IAAN,GAAa;AACT,YAAI,CAACH,GAAL,EACI,OAAO;AAAEI,UAAAA,IAAI,EAAE;AAAR,SAAP;AACJ,cAAM1B,QAAQ,GAAG,MAAMmB,aAAa,CAAC;AAAEC,UAAAA,MAAF;AAAUE,UAAAA,GAAV;AAAeD,UAAAA;AAAf,SAAD,CAApC;AACA,cAAMM,kBAAkB,GAAG5B,8BAA8B,CAACC,QAAD,CAAzD,CAJS;AAMT;AACA;;AACAsB,QAAAA,GAAG,GAAG,CAAC,CAACK,kBAAkB,CAACN,OAAnB,CAA2BO,IAA3B,IAAmC,EAApC,EAAwCC,KAAxC,CAA8C,yBAA9C,KAA4E,EAA7E,EAAiF,CAAjF,CAAN;AACA,eAAO;AAAEC,UAAAA,KAAK,EAAEH;AAAT,SAAP;AACH;;AAX0B,KAAP;AADrB,GAAP;AAeH;;ACvBM,SAASI,QAAT,CAAkBlB,OAAlB,EAA2BC,KAA3B,EAAkCC,UAAlC,EAA8CiB,KAA9C,EAAqD;AACxD,MAAI,OAAOjB,UAAP,KAAsB,UAA1B,EAAsC;AAClCiB,IAAAA,KAAK,GAAGjB,UAAR;AACAA,IAAAA,UAAU,GAAGkB,SAAb;AACH;;AACD,SAAOC,MAAM,CAACrB,OAAD,EAAU,EAAV,EAAcD,QAAQ,CAACC,OAAD,EAAUC,KAAV,EAAiBC,UAAjB,CAAR,CAAqCQ,MAAM,CAACC,aAA5C,GAAd,EAA4EQ,KAA5E,CAAb;AACH;;AACD,SAASE,MAAT,CAAgBrB,OAAhB,EAAyBsB,OAAzB,EAAkCvB,QAAlC,EAA4CoB,KAA5C,EAAmD;AAC/C,SAAOpB,QAAQ,CAACa,IAAT,GAAgBW,IAAhB,CAAsBC,MAAD,IAAY;AACpC,QAAIA,MAAM,CAACX,IAAX,EAAiB;AACb,aAAOS,OAAP;AACH;;AACD,QAAIG,SAAS,GAAG,KAAhB;;AACA,aAASZ,IAAT,GAAgB;AACZY,MAAAA,SAAS,GAAG,IAAZ;AACH;;AACDH,IAAAA,OAAO,GAAGA,OAAO,CAACI,MAAR,CAAeP,KAAK,GAAGA,KAAK,CAACK,MAAM,CAACP,KAAR,EAAeJ,IAAf,CAAR,GAA+BW,MAAM,CAACP,KAAP,CAAa5B,IAAhE,CAAV;;AACA,QAAIoC,SAAJ,EAAe;AACX,aAAOH,OAAP;AACH;;AACD,WAAOD,MAAM,CAACrB,OAAD,EAAUsB,OAAV,EAAmBvB,QAAnB,EAA6BoB,KAA7B,CAAb;AACH,GAbM,CAAP;AAcH;;MCrBYQ,mBAAmB,GAAG9B,MAAM,CAAC+B,MAAP,CAAcV,QAAd,EAAwB;AACvDnB,EAAAA;AADuD,CAAxB,CAA5B;;ACEP;AACA;AACA;AACA;;AACA,AAAO,SAAS8B,YAAT,CAAsB7B,OAAtB,EAA+B;AAClC,SAAO;AACHkB,IAAAA,QAAQ,EAAErB,MAAM,CAAC+B,MAAP,CAAcV,QAAQ,CAACY,IAAT,CAAc,IAAd,EAAoB9B,OAApB,CAAd,EAA4C;AAClDD,MAAAA,QAAQ,EAAEA,QAAQ,CAAC+B,IAAT,CAAc,IAAd,EAAoB9B,OAApB;AADwC,KAA5C;AADP,GAAP;AAKH;AACD6B,YAAY,CAAC5C,OAAb,GAAuBA,OAAvB;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/normalize-paginated-list-response.js","../dist-src/iterator.js","../dist-src/paginate.js","../dist-src/compose-paginate.js","../dist-src/generated/paginating-endpoints.js","../dist-src/paginating-endpoints.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.21.3\";\n","/**\n * Some “list” response that can be paginated have a different response structure\n *\n * They have a `total_count` key in the response (search also has `incomplete_results`,\n * /installation/repositories also has `repository_selection`), as well as a key with\n * the list of the items which name varies from endpoint to endpoint.\n *\n * Octokit normalizes these responses so that paginated results are always returned following\n * the same structure. One challenge is that if the list response has only one page, no Link\n * header is provided, so this header alone is not sufficient to check wether a response is\n * paginated or not.\n *\n * We check if a \"total_count\" key is present in the response data, but also make sure that\n * a \"url\" property is not, as the \"Get the combined status for a specific ref\" endpoint would\n * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref\n */\nexport function normalizePaginatedListResponse(response) {\n // endpoints can respond with 204 if repository is empty\n if (!response.data) {\n return {\n ...response,\n data: [],\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n // keep the additional properties intact as there is currently no other way\n // to retrieve the same information.\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n","import { normalizePaginatedListResponse } from \"./normalize-paginated-list-response\";\nexport function iterator(octokit, route, parameters) {\n const options = typeof route === \"function\"\n ? route.endpoint(parameters)\n : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n // `response.headers.link` format:\n // '; rel=\"next\", ; rel=\"last\"'\n // sets `url` to undefined if \"next\" URL is not present or `link` header is not set\n url = ((normalizedResponse.headers.link || \"\").match(/<([^>]+)>;\\s*rel=\"next\"/) || [])[1];\n return { value: normalizedResponse };\n }\n catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: [],\n },\n };\n }\n },\n }),\n };\n}\n","import { iterator } from \"./iterator\";\nexport function paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = undefined;\n }\n return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);\n}\nfunction gather(octokit, results, iterator, mapFn) {\n return iterator.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator, mapFn);\n });\n}\n","import { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport const composePaginateRest = Object.assign(paginate, {\n iterator,\n});\n","export const paginatingEndpoints = [\n \"GET /app/hook/deliveries\",\n \"GET /app/installations\",\n \"GET /applications/grants\",\n \"GET /authorizations\",\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n \"GET /enterprises/{enterprise}/actions/runner-groups\",\n \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations\",\n \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners\",\n \"GET /enterprises/{enterprise}/actions/runners\",\n \"GET /enterprises/{enterprise}/audit-log\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /enterprises/{enterprise}/settings/billing/advanced-security\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runner-groups\",\n \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories\",\n \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/audit-log\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/credential-authorizations\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/external-groups\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/settings/billing/advanced-security\",\n \"GET /orgs/{org}/team-sync/groups\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\",\n];\n","import { paginatingEndpoints, } from \"./generated/paginating-endpoints\";\nexport { paginatingEndpoints } from \"./generated/paginating-endpoints\";\nexport function isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n }\n else {\n return false;\n }\n}\n","import { VERSION } from \"./version\";\nimport { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport { composePaginateRest } from \"./compose-paginate\";\nexport { isPaginatingEndpoint, paginatingEndpoints, } from \"./paginating-endpoints\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit),\n }),\n };\n}\npaginateRest.VERSION = VERSION;\n"],"names":["VERSION","normalizePaginatedListResponse","response","data","responseNeedsNormalization","incompleteResults","incomplete_results","repositorySelection","repository_selection","totalCount","total_count","namespaceKey","Object","keys","iterator","octokit","route","parameters","options","endpoint","request","requestMethod","method","headers","url","Symbol","asyncIterator","next","done","normalizedResponse","link","match","value","error","status","paginate","mapFn","undefined","gather","results","then","result","earlyExit","concat","composePaginateRest","assign","paginatingEndpoints","isPaginatingEndpoint","arg","includes","paginateRest","bind"],"mappings":";;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AAAO,SAASC,8BAAT,CAAwCC,QAAxC,EAAkD;;EAErD,IAAI,CAACA,QAAQ,CAACC,IAAd,EAAoB;IAChB,yCACOD,QADP;MAEIC,IAAI,EAAE;;;;EAGd,MAAMC,0BAA0B,GAAG,iBAAiBF,QAAQ,CAACC,IAA1B,IAAkC,EAAE,SAASD,QAAQ,CAACC,IAApB,CAArE;EACA,IAAI,CAACC,0BAAL,EACI,OAAOF,QAAP,CAViD;;;EAarD,MAAMG,iBAAiB,GAAGH,QAAQ,CAACC,IAAT,CAAcG,kBAAxC;EACA,MAAMC,mBAAmB,GAAGL,QAAQ,CAACC,IAAT,CAAcK,oBAA1C;EACA,MAAMC,UAAU,GAAGP,QAAQ,CAACC,IAAT,CAAcO,WAAjC;EACA,OAAOR,QAAQ,CAACC,IAAT,CAAcG,kBAArB;EACA,OAAOJ,QAAQ,CAACC,IAAT,CAAcK,oBAArB;EACA,OAAON,QAAQ,CAACC,IAAT,CAAcO,WAArB;EACA,MAAMC,YAAY,GAAGC,MAAM,CAACC,IAAP,CAAYX,QAAQ,CAACC,IAArB,EAA2B,CAA3B,CAArB;EACA,MAAMA,IAAI,GAAGD,QAAQ,CAACC,IAAT,CAAcQ,YAAd,CAAb;EACAT,QAAQ,CAACC,IAAT,GAAgBA,IAAhB;;EACA,IAAI,OAAOE,iBAAP,KAA6B,WAAjC,EAA8C;IAC1CH,QAAQ,CAACC,IAAT,CAAcG,kBAAd,GAAmCD,iBAAnC;;;EAEJ,IAAI,OAAOE,mBAAP,KAA+B,WAAnC,EAAgD;IAC5CL,QAAQ,CAACC,IAAT,CAAcK,oBAAd,GAAqCD,mBAArC;;;EAEJL,QAAQ,CAACC,IAAT,CAAcO,WAAd,GAA4BD,UAA5B;EACA,OAAOP,QAAP;AACH;;AC7CM,SAASY,QAAT,CAAkBC,OAAlB,EAA2BC,KAA3B,EAAkCC,UAAlC,EAA8C;EACjD,MAAMC,OAAO,GAAG,OAAOF,KAAP,KAAiB,UAAjB,GACVA,KAAK,CAACG,QAAN,CAAeF,UAAf,CADU,GAEVF,OAAO,CAACK,OAAR,CAAgBD,QAAhB,CAAyBH,KAAzB,EAAgCC,UAAhC,CAFN;EAGA,MAAMI,aAAa,GAAG,OAAOL,KAAP,KAAiB,UAAjB,GAA8BA,KAA9B,GAAsCD,OAAO,CAACK,OAApE;EACA,MAAME,MAAM,GAAGJ,OAAO,CAACI,MAAvB;EACA,MAAMC,OAAO,GAAGL,OAAO,CAACK,OAAxB;EACA,IAAIC,GAAG,GAAGN,OAAO,CAACM,GAAlB;EACA,OAAO;IACH,CAACC,MAAM,CAACC,aAAR,GAAwB,OAAO;MAC3B,MAAMC,IAAN,GAAa;QACT,IAAI,CAACH,GAAL,EACI,OAAO;UAAEI,IAAI,EAAE;SAAf;;QACJ,IAAI;UACA,MAAM1B,QAAQ,GAAG,MAAMmB,aAAa,CAAC;YAAEC,MAAF;YAAUE,GAAV;YAAeD;WAAhB,CAApC;UACA,MAAMM,kBAAkB,GAAG5B,8BAA8B,CAACC,QAAD,CAAzD,CAFA;;;;UAMAsB,GAAG,GAAG,CAAC,CAACK,kBAAkB,CAACN,OAAnB,CAA2BO,IAA3B,IAAmC,EAApC,EAAwCC,KAAxC,CAA8C,yBAA9C,KAA4E,EAA7E,EAAiF,CAAjF,CAAN;UACA,OAAO;YAAEC,KAAK,EAAEH;WAAhB;SAPJ,CASA,OAAOI,KAAP,EAAc;UACV,IAAIA,KAAK,CAACC,MAAN,KAAiB,GAArB,EACI,MAAMD,KAAN;UACJT,GAAG,GAAG,EAAN;UACA,OAAO;YACHQ,KAAK,EAAE;cACHE,MAAM,EAAE,GADL;cAEHX,OAAO,EAAE,EAFN;cAGHpB,IAAI,EAAE;;WAJd;;;;KAjBY;GAD5B;AA6BH;;ACrCM,SAASgC,QAAT,CAAkBpB,OAAlB,EAA2BC,KAA3B,EAAkCC,UAAlC,EAA8CmB,KAA9C,EAAqD;EACxD,IAAI,OAAOnB,UAAP,KAAsB,UAA1B,EAAsC;IAClCmB,KAAK,GAAGnB,UAAR;IACAA,UAAU,GAAGoB,SAAb;;;EAEJ,OAAOC,MAAM,CAACvB,OAAD,EAAU,EAAV,EAAcD,QAAQ,CAACC,OAAD,EAAUC,KAAV,EAAiBC,UAAjB,CAAR,CAAqCQ,MAAM,CAACC,aAA5C,GAAd,EAA4EU,KAA5E,CAAb;AACH;;AACD,SAASE,MAAT,CAAgBvB,OAAhB,EAAyBwB,OAAzB,EAAkCzB,QAAlC,EAA4CsB,KAA5C,EAAmD;EAC/C,OAAOtB,QAAQ,CAACa,IAAT,GAAgBa,IAAhB,CAAsBC,MAAD,IAAY;IACpC,IAAIA,MAAM,CAACb,IAAX,EAAiB;MACb,OAAOW,OAAP;;;IAEJ,IAAIG,SAAS,GAAG,KAAhB;;IACA,SAASd,IAAT,GAAgB;MACZc,SAAS,GAAG,IAAZ;;;IAEJH,OAAO,GAAGA,OAAO,CAACI,MAAR,CAAeP,KAAK,GAAGA,KAAK,CAACK,MAAM,CAACT,KAAR,EAAeJ,IAAf,CAAR,GAA+Ba,MAAM,CAACT,KAAP,CAAa7B,IAAhE,CAAV;;IACA,IAAIuC,SAAJ,EAAe;MACX,OAAOH,OAAP;;;IAEJ,OAAOD,MAAM,CAACvB,OAAD,EAAUwB,OAAV,EAAmBzB,QAAnB,EAA6BsB,KAA7B,CAAb;GAZG,CAAP;AAcH;;MCrBYQ,mBAAmB,GAAGhC,MAAM,CAACiC,MAAP,CAAcV,QAAd,EAAwB;EACvDrB;AADuD,CAAxB,CAA5B;;MCFMgC,mBAAmB,GAAG,CAC/B,0BAD+B,EAE/B,wBAF+B,EAG/B,0BAH+B,EAI/B,qBAJ+B,EAK/B,iEAL+B,EAM/B,qDAN+B,EAO/B,qFAP+B,EAQ/B,+EAR+B,EAS/B,+CAT+B,EAU/B,yCAV+B,EAW/B,sDAX+B,EAY/B,kEAZ+B,EAa/B,aAb+B,EAc/B,YAd+B,EAe/B,mBAf+B,EAgB/B,oBAhB+B,EAiB/B,+BAjB+B,EAkB/B,8BAlB+B,EAmB/B,4BAnB+B,EAoB/B,gCApB+B,EAqB/B,aArB+B,EAsB/B,eAtB+B,EAuB/B,gCAvB+B,EAwB/B,mDAxB+B,EAyB/B,wCAzB+B,EA0B/B,2DA1B+B,EA2B/B,qCA3B+B,EA4B/B,oBA5B+B,EA6B/B,oBA7B+B,EA8B/B,mDA9B+B,EA+B/B,kDA/B+B,EAgC/B,uCAhC+B,EAiC/B,sEAjC+B,EAkC/B,iEAlC+B,EAmC/B,iCAnC+B,EAoC/B,iCApC+B,EAqC/B,4DArC+B,EAsC/B,2BAtC+B,EAuC/B,wBAvC+B,EAwC/B,sCAxC+B,EAyC/B,4BAzC+B,EA0C/B,2CA1C+B,EA2C/B,oCA3C+B,EA4C/B,+DA5C+B,EA6C/B,wBA7C+B,EA8C/B,iCA9C+B,EA+C/B,oCA/C+B,EAgD/B,uBAhD+B,EAiD/B,4CAjD+B,EAkD/B,+BAlD+B,EAmD/B,6BAnD+B,EAoD/B,mDApD+B,EAqD/B,wBArD+B,EAsD/B,yBAtD+B,EAuD/B,4BAvD+B,EAwD/B,wDAxD+B,EAyD/B,uCAzD+B,EA0D/B,0BA1D+B,EA2D/B,iEA3D+B,EA4D/B,0BA5D+B,EA6D/B,gCA7D+B,EA8D/B,uBA9D+B,EA+D/B,wCA/D+B,EAgE/B,oDAhE+B,EAiE/B,kCAjE+B,EAkE/B,uBAlE+B,EAmE/B,+CAnE+B,EAoE/B,4EApE+B,EAqE/B,uGArE+B,EAsE/B,6EAtE+B,EAuE/B,+CAvE+B,EAwE/B,2CAxE+B,EAyE/B,4CAzE+B,EA0E/B,yCA1E+B,EA2E/B,yCA3E+B,EA4E/B,yCA5E+B,EA6E/B,0CA7E+B,EA8E/B,oCA9E+B,EA+E/B,6CA/E+B,EAgF/B,0CAhF+B,EAiF/B,2CAjF+B,EAkF/B,wCAlF+B,EAmF/B,2DAnF+B,EAoF/B,gFApF+B,EAqF/B,sDArF+B,EAsF/B,2CAtF+B,EAuF/B,6CAvF+B,EAwF/B,gEAxF+B,EAyF/B,qCAzF+B,EA0F/B,oCA1F+B,EA2F/B,iEA3F+B,EA4F/B,oEA5F+B,EA6F/B,gDA7F+B,EA8F/B,yEA9F+B,EA+F/B,kDA/F+B,EAgG/B,sCAhG+B,EAiG/B,oDAjG+B,EAkG/B,8CAlG+B,EAmG/B,yCAnG+B,EAoG/B,oCApG+B,EAqG/B,2DArG+B,EAsG/B,mCAtG+B,EAuG/B,yDAvG+B,EAwG/B,sDAxG+B,EAyG/B,oDAzG+B,EA0G/B,sDA1G+B,EA2G/B,gDA3G+B,EA4G/B,kDA5G+B,EA6G/B,wCA7G+B,EA8G/B,8CA9G+B,EA+G/B,uCA/G+B,EAgH/B,gEAhH+B,EAiH/B,wCAjH+B,EAkH/B,kCAlH+B,EAmH/B,iCAnH+B,EAoH/B,mDApH+B,EAqH/B,iCArH+B,EAsH/B,sDAtH+B,EAuH/B,uCAvH+B,EAwH/B,kCAxH+B,EAyH/B,2CAzH+B,EA0H/B,kEA1H+B,EA2H/B,yCA3H+B,EA4H/B,0DA5H+B,EA6H/B,wDA7H+B,EA8H/B,wDA9H+B,EA+H/B,2DA/H+B,EAgI/B,0DAhI+B,EAiI/B,gCAjI+B,EAkI/B,kCAlI+B,EAmI/B,sCAnI+B,EAoI/B,gEApI+B,EAqI/B,yCArI+B,EAsI/B,wCAtI+B,EAuI/B,oCAvI+B,EAwI/B,iCAxI+B,EAyI/B,0CAzI+B,EA0I/B,iEA1I+B,EA2I/B,wDA3I+B,EA4I/B,uDA5I+B,EA6I/B,qDA7I+B,EA8I/B,mEA9I+B,EA+I/B,uDA/I+B,EAgJ/B,4EAhJ+B,EAiJ/B,oCAjJ+B,EAkJ/B,wDAlJ+B,EAmJ/B,2DAnJ+B,EAoJ/B,kDApJ+B,EAqJ/B,2EArJ+B,EAsJ/B,sCAtJ+B,EAuJ/B,uCAvJ+B,EAwJ/B,gCAxJ+B,EAyJ/B,iCAzJ+B,EA0J/B,kCA1J+B,EA2J/B,mBA3J+B,EA4J/B,2EA5J+B,EA6J/B,kBA7J+B,EA8J/B,qBA9J+B,EA+J/B,oBA/J+B,EAgK/B,oBAhK+B,EAiK/B,0BAjK+B,EAkK/B,oBAlK+B,EAmK/B,mBAnK+B,EAoK/B,kCApK+B,EAqK/B,+DArK+B,EAsK/B,0FAtK+B,EAuK/B,gEAvK+B,EAwK/B,kCAxK+B,EAyK/B,8BAzK+B,EA0K/B,+BA1K+B,EA2K/B,4BA3K+B,EA4K/B,4BA5K+B,EA6K/B,kBA7K+B,EA8K/B,sBA9K+B,EA+K/B,8BA/K+B,EAgL/B,kBAhL+B,EAiL/B,qBAjL+B,EAkL/B,qBAlL+B,EAmL/B,oBAnL+B,EAoL/B,yBApL+B,EAqL/B,wDArL+B,EAsL/B,kBAtL+B,EAuL/B,gBAvL+B,EAwL/B,iCAxL+B,EAyL/B,yCAzL+B,EA0L/B,4BA1L+B,EA2L/B,sBA3L+B,EA4L/B,kDA5L+B,EA6L/B,gBA7L+B,EA8L/B,oBA9L+B,EA+L/B,2DA/L+B,EAgM/B,yBAhM+B,EAiM/B,iBAjM+B,EAkM/B,kCAlM+B,EAmM/B,mBAnM+B,EAoM/B,yBApM+B,EAqM/B,iBArM+B,EAsM/B,YAtM+B,EAuM/B,8BAvM+B,EAwM/B,yCAxM+B,EAyM/B,qCAzM+B,EA0M/B,iCA1M+B,EA2M/B,iCA3M+B,EA4M/B,6BA5M+B,EA6M/B,gCA7M+B,EA8M/B,4BA9M+B,EA+M/B,4BA/M+B,EAgN/B,gCAhN+B,EAiN/B,gCAjN+B,EAkN/B,uCAlN+B,EAmN/B,8CAnN+B,EAoN/B,6BApN+B,EAqN/B,+BArN+B,EAsN/B,qCAtN+B,CAA5B;;ACEA,SAASC,oBAAT,CAA8BC,GAA9B,EAAmC;EACtC,IAAI,OAAOA,GAAP,KAAe,QAAnB,EAA6B;IACzB,OAAOF,mBAAmB,CAACG,QAApB,CAA6BD,GAA7B,CAAP;GADJ,MAGK;IACD,OAAO,KAAP;;AAEP;;ACJD;AACA;AACA;AACA;;AACA,AAAO,SAASE,YAAT,CAAsBnC,OAAtB,EAA+B;EAClC,OAAO;IACHoB,QAAQ,EAAEvB,MAAM,CAACiC,MAAP,CAAcV,QAAQ,CAACgB,IAAT,CAAc,IAAd,EAAoBpC,OAApB,CAAd,EAA4C;MAClDD,QAAQ,EAAEA,QAAQ,CAACqC,IAAT,CAAc,IAAd,EAAoBpC,OAApB;KADJ;GADd;AAKH;AACDmC,YAAY,CAAClD,OAAb,GAAuBA,OAAvB;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js index cb0ff5c..863af10 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js @@ -1 +1,216 @@ -export {}; +export const paginatingEndpoints = [ + "GET /app/hook/deliveries", + "GET /app/installations", + "GET /applications/grants", + "GET /authorizations", + "GET /enterprises/{enterprise}/actions/permissions/organizations", + "GET /enterprises/{enterprise}/actions/runner-groups", + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", + "GET /enterprises/{enterprise}/actions/runners", + "GET /enterprises/{enterprise}/audit-log", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /enterprises/{enterprise}/settings/billing/advanced-security", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runner-groups", + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/audit-log", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/credential-authorizations", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/external-groups", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/settings/billing/advanced-security", + "GET /orgs/{org}/team-sync/groups", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions", +]; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js index b207803..5ba74de 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js @@ -2,6 +2,7 @@ import { VERSION } from "./version"; import { paginate } from "./paginate"; import { iterator } from "./iterator"; export { composePaginateRest } from "./compose-paginate"; +export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints"; /** * @param octokit Octokit instance * @param options Options passed to Octokit constructor diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js index 14684db..7f9ee64 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js @@ -12,13 +12,27 @@ export function iterator(octokit, route, parameters) { async next() { if (!url) return { done: true }; - const response = await requestMethod({ method, url, headers }); - const normalizedResponse = normalizePaginatedListResponse(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 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; - return { value: normalizedResponse }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(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 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { value: normalizedResponse }; + } + catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [], + }, + }; + } }, }), }; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js index d29c677..a87028b 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js @@ -15,6 +15,13 @@ * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref */ export function normalizePaginatedListResponse(response) { + // endpoints can respond with 204 if repository is empty + if (!response.data) { + return { + ...response, + data: [], + }; + } const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); if (!responseNeedsNormalization) return response; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js new file mode 100644 index 0000000..1e52899 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js @@ -0,0 +1,10 @@ +import { paginatingEndpoints, } from "./generated/paginating-endpoints"; +export { paginatingEndpoints } from "./generated/paginating-endpoints"; +export function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } + else { + return false; + } +} diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js index b822967..af4553e 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js @@ -1 +1 @@ -export const VERSION = "2.10.0"; +export const VERSION = "2.21.3"; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts index 9d0474b..4882d94 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts @@ -1,7 +1,14 @@ import { Endpoints } from "@octokit/types"; export interface PaginatingEndpoints { /** - * @see https://docs.github.com/v3/apps/#list-installations-for-the-authenticated-app + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": { + parameters: Endpoints["GET /app/hook/deliveries"]["parameters"]; + response: Endpoints["GET /app/hook/deliveries"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app */ "GET /app/installations": { parameters: Endpoints["GET /app/installations"]["parameters"]; @@ -22,7 +29,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /authorizations"]["response"]; }; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-selected-organizations-enabled-for-github-actions-in-an-enterprise + * @see https://docs.github.com/rest/reference/actions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise */ "GET /enterprises/{enterprise}/actions/permissions/organizations": { parameters: Endpoints["GET /enterprises/{enterprise}/actions/permissions/organizations"]["parameters"]; @@ -31,7 +38,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runner-groups-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runner-groups": { parameters: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups"]["parameters"]; @@ -40,7 +47,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise + * @see https://docs.github.com/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise */ "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": { parameters: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations"]["parameters"]; @@ -49,7 +56,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runners-in-a-group-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": { parameters: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners"]["parameters"]; @@ -58,7 +65,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runners-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runners": { parameters: Endpoints["GET /enterprises/{enterprise}/actions/runners"]["parameters"]; @@ -67,11 +74,27 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-runner-applications-for-an-enterprise + * @see https://docs.github.com/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise + */ + "GET /enterprises/{enterprise}/audit-log": { + parameters: Endpoints["GET /enterprises/{enterprise}/audit-log"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/audit-log"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": { + parameters: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise */ - "GET /enterprises/{enterprise}/actions/runners/downloads": { - parameters: Endpoints["GET /enterprises/{enterprise}/actions/runners/downloads"]["parameters"]; - response: Endpoints["GET /enterprises/{enterprise}/actions/runners/downloads"]["response"]; + "GET /enterprises/{enterprise}/settings/billing/advanced-security": { + parameters: Endpoints["GET /enterprises/{enterprise}/settings/billing/advanced-security"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/settings/billing/advanced-security"]["response"] & { + data: Endpoints["GET /enterprises/{enterprise}/settings/billing/advanced-security"]["response"]["data"]["repositories"]; + }; }; /** * @see https://docs.github.com/rest/reference/activity#list-public-events @@ -81,21 +104,21 @@ export interface PaginatingEndpoints { response: Endpoints["GET /events"]["response"]; }; /** - * @see https://docs.github.com/v3/gists/#list-gists-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user */ "GET /gists": { parameters: Endpoints["GET /gists"]["parameters"]; response: Endpoints["GET /gists"]["response"]; }; /** - * @see https://docs.github.com/v3/gists/#list-public-gists + * @see https://docs.github.com/rest/reference/gists#list-public-gists */ "GET /gists/public": { parameters: Endpoints["GET /gists/public"]["parameters"]; response: Endpoints["GET /gists/public"]["response"]; }; /** - * @see https://docs.github.com/v3/gists/#list-starred-gists + * @see https://docs.github.com/rest/reference/gists#list-starred-gists */ "GET /gists/starred": { parameters: Endpoints["GET /gists/starred"]["parameters"]; @@ -109,14 +132,14 @@ export interface PaginatingEndpoints { response: Endpoints["GET /gists/{gist_id}/comments"]["response"]; }; /** - * @see https://docs.github.com/v3/gists/#list-gist-commits + * @see https://docs.github.com/rest/reference/gists#list-gist-commits */ "GET /gists/{gist_id}/commits": { parameters: Endpoints["GET /gists/{gist_id}/commits"]["parameters"]; response: Endpoints["GET /gists/{gist_id}/commits"]["response"]; }; /** - * @see https://docs.github.com/v3/gists/#list-gist-forks + * @see https://docs.github.com/rest/reference/gists#list-gist-forks */ "GET /gists/{gist_id}/forks": { parameters: Endpoints["GET /gists/{gist_id}/forks"]["parameters"]; @@ -132,12 +155,19 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/issues/#list-issues-assigned-to-the-authenticated-user + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user */ "GET /issues": { parameters: Endpoints["GET /issues"]["parameters"]; response: Endpoints["GET /issues"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": { + parameters: Endpoints["GET /licenses"]["parameters"]; + response: Endpoints["GET /licenses"]["response"]; + }; /** * @see https://docs.github.com/rest/reference/apps#list-plans */ @@ -181,12 +211,21 @@ export interface PaginatingEndpoints { response: Endpoints["GET /notifications"]["response"]; }; /** - * @see https://docs.github.com/v3/orgs/#list-organizations + * @see https://docs.github.com/rest/reference/orgs#list-organizations */ "GET /organizations": { parameters: Endpoints["GET /organizations"]["parameters"]; response: Endpoints["GET /organizations"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": { + parameters: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"]["data"]["repository_cache_usages"]; + }; + }; /** * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization */ @@ -232,13 +271,6 @@ export interface PaginatingEndpoints { data: Endpoints["GET /orgs/{org}/actions/runners"]["response"]["data"]["runners"]; }; }; - /** - * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization - */ - "GET /orgs/{org}/actions/runners/downloads": { - parameters: Endpoints["GET /orgs/{org}/actions/runners/downloads"]["parameters"]; - response: Endpoints["GET /orgs/{org}/actions/runners/downloads"]["response"]; - }; /** * @see https://docs.github.com/rest/reference/actions#list-organization-secrets */ @@ -257,6 +289,13 @@ export interface PaginatingEndpoints { data: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"]["data"]["repositories"]; }; }; + /** + * @see https://docs.github.com/rest/reference/orgs#get-audit-log + */ + "GET /orgs/{org}/audit-log": { + parameters: Endpoints["GET /orgs/{org}/audit-log"]["parameters"]; + response: Endpoints["GET /orgs/{org}/audit-log"]["response"]; + }; /** * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization */ @@ -265,12 +304,46 @@ export interface PaginatingEndpoints { response: Endpoints["GET /orgs/{org}/blocks"]["response"]; }; /** - * @see https://docs.github.com/v3/orgs/#list-saml-sso-authorizations-for-an-organization + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": { + parameters: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": { + parameters: Endpoints["GET /orgs/{org}/codespaces"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces"]["response"] & { + data: Endpoints["GET /orgs/{org}/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-saml-sso-authorizations-for-an-organization */ "GET /orgs/{org}/credential-authorizations": { parameters: Endpoints["GET /orgs/{org}/credential-authorizations"]["parameters"]; response: Endpoints["GET /orgs/{org}/credential-authorizations"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": { + parameters: Endpoints["GET /orgs/{org}/dependabot/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"] & { + data: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + parameters: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]["data"]["repositories"]; + }; + }; /** * @see https://docs.github.com/rest/reference/activity#list-public-organization-events */ @@ -278,6 +351,15 @@ export interface PaginatingEndpoints { parameters: Endpoints["GET /orgs/{org}/events"]["parameters"]; response: Endpoints["GET /orgs/{org}/events"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/teams#list-external-idp-groups-for-an-organization + */ + "GET /orgs/{org}/external-groups": { + parameters: Endpoints["GET /orgs/{org}/external-groups"]["parameters"]; + response: Endpoints["GET /orgs/{org}/external-groups"]["response"] & { + data: Endpoints["GET /orgs/{org}/external-groups"]["response"]["data"]["groups"]; + }; + }; /** * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations */ @@ -293,7 +375,14 @@ export interface PaginatingEndpoints { response: Endpoints["GET /orgs/{org}/hooks"]["response"]; }; /** - * @see https://docs.github.com/v3/orgs/#list-app-installations-for-an-organization + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": { + parameters: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization */ "GET /orgs/{org}/installations": { parameters: Endpoints["GET /orgs/{org}/installations"]["parameters"]; @@ -316,7 +405,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["response"]; }; /** - * @see https://docs.github.com/v3/issues/#list-organization-issues-assigned-to-the-authenticated-user + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user */ "GET /orgs/{org}/issues": { parameters: Endpoints["GET /orgs/{org}/issues"]["parameters"]; @@ -351,7 +440,21 @@ export interface PaginatingEndpoints { response: Endpoints["GET /orgs/{org}/outside_collaborators"]["response"]; }; /** - * @see https://docs.github.com/v3/projects/#list-organization-projects + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": { + parameters: Endpoints["GET /orgs/{org}/packages"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": { + parameters: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects */ "GET /orgs/{org}/projects": { parameters: Endpoints["GET /orgs/{org}/projects"]["parameters"]; @@ -365,12 +468,28 @@ export interface PaginatingEndpoints { response: Endpoints["GET /orgs/{org}/public_members"]["response"]; }; /** - * @see https://docs.github.com/v3/repos/#list-organization-repositories + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories */ "GET /orgs/{org}/repos": { parameters: Endpoints["GET /orgs/{org}/repos"]["parameters"]; response: Endpoints["GET /orgs/{org}/repos"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": { + parameters: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization + */ + "GET /orgs/{org}/settings/billing/advanced-security": { + parameters: Endpoints["GET /orgs/{org}/settings/billing/advanced-security"]["parameters"]; + response: Endpoints["GET /orgs/{org}/settings/billing/advanced-security"]["response"] & { + data: Endpoints["GET /orgs/{org}/settings/billing/advanced-security"]["response"]["data"]["repositories"]; + }; + }; /** * @see https://docs.github.com/rest/reference/teams#list-idp-groups-for-an-organization */ @@ -381,7 +500,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/teams/#list-teams + * @see https://docs.github.com/rest/reference/teams#list-teams */ "GET /orgs/{org}/teams": { parameters: Endpoints["GET /orgs/{org}/teams"]["parameters"]; @@ -402,14 +521,14 @@ export interface PaginatingEndpoints { response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["response"]; }; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment */ "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["parameters"]; response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; }; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-team-discussion + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion */ "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["parameters"]; @@ -430,30 +549,21 @@ export interface PaginatingEndpoints { response: Endpoints["GET /orgs/{org}/teams/{team_slug}/members"]["response"]; }; /** - * @see https://docs.github.com/v3/teams/#list-team-projects + * @see https://docs.github.com/rest/reference/teams#list-team-projects */ "GET /orgs/{org}/teams/{team_slug}/projects": { parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["parameters"]; response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["response"]; }; /** - * @see https://docs.github.com/v3/teams/#list-team-repositories + * @see https://docs.github.com/rest/reference/teams#list-team-repositories */ "GET /orgs/{org}/teams/{team_slug}/repos": { parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["parameters"]; response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["response"]; }; /** - * @see https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team - */ - "GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings": { - parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings"]["parameters"]; - response: Endpoints["GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings"]["response"] & { - data: Endpoints["GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings"]["response"]["data"]["groups"]; - }; - }; - /** - * @see https://docs.github.com/v3/teams/#list-child-teams + * @see https://docs.github.com/rest/reference/teams#list-child-teams */ "GET /orgs/{org}/teams/{team_slug}/teams": { parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/teams"]["parameters"]; @@ -489,6 +599,15 @@ export interface PaginatingEndpoints { data: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["response"]["data"]["artifacts"]; }; }; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"]["data"]["actions_caches"]; + }; + }; /** * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository */ @@ -498,13 +617,6 @@ export interface PaginatingEndpoints { data: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["response"]["data"]["runners"]; }; }; - /** - * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository - */ - "GET /repos/{owner}/{repo}/actions/runners/downloads": { - parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runners/downloads"]["parameters"]; - response: Endpoints["GET /repos/{owner}/{repo}/actions/runners/downloads"]["response"]; - }; /** * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository */ @@ -523,6 +635,15 @@ export interface PaginatingEndpoints { data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["response"]["data"]["artifacts"]; }; }; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"]["data"]["jobs"]; + }; + }; /** * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run */ @@ -610,6 +731,33 @@ export interface PaginatingEndpoints { parameters: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"]["data"]["devcontainers"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"]["data"]["secrets"]; + }; + }; /** * @see https://docs.github.com/rest/reference/repos#list-repository-collaborators */ @@ -625,7 +773,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/comments"]["response"]; }; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-commit-comment + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment */ "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": { parameters: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["parameters"]; @@ -638,13 +786,6 @@ export interface PaginatingEndpoints { parameters: Endpoints["GET /repos/{owner}/{repo}/commits"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/commits"]["response"]; }; - /** - * @see https://docs.github.com/rest/reference/repos#list-branches-for-head-commit - */ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { - parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"]["parameters"]; - response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"]["response"]; - }; /** * @see https://docs.github.com/rest/reference/repos#list-commit-comments */ @@ -677,6 +818,15 @@ export interface PaginatingEndpoints { data: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["response"]["data"]["check_suites"]; }; }; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["response"]["data"]["statuses"]; + }; + }; /** * @see https://docs.github.com/rest/reference/repos#list-commit-statuses-for-a-reference */ @@ -685,12 +835,21 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/statuses"]["response"]; }; /** - * @see https://docs.github.com/v3/repos/#list-repository-contributors + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors */ "GET /repos/{owner}/{repo}/contributors": { parameters: Endpoints["GET /repos/{owner}/{repo}/contributors"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/contributors"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"]["data"]["secrets"]; + }; + }; /** * @see https://docs.github.com/rest/reference/repos#list-deployments */ @@ -705,6 +864,15 @@ export interface PaginatingEndpoints { parameters: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-environments + */ + "GET /repos/{owner}/{repo}/environments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/environments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"]["data"]["environments"]; + }; + }; /** * @see https://docs.github.com/rest/reference/activity#list-repository-events */ @@ -733,6 +901,13 @@ export interface PaginatingEndpoints { parameters: Endpoints["GET /repos/{owner}/{repo}/hooks"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/hooks"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/repos#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + parameters: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["response"]; + }; /** * @see https://docs.github.com/rest/reference/repos#list-repository-invitations */ @@ -741,7 +916,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/invitations"]["response"]; }; /** - * @see https://docs.github.com/v3/issues/#list-repository-issues + * @see https://docs.github.com/rest/reference/issues#list-repository-issues */ "GET /repos/{owner}/{repo}/issues": { parameters: Endpoints["GET /repos/{owner}/{repo}/issues"]["parameters"]; @@ -755,7 +930,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/issues/comments"]["response"]; }; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-an-issue-comment + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment */ "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { parameters: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["parameters"]; @@ -790,7 +965,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; }; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-an-issue + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue */ "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": { parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["parameters"]; @@ -846,14 +1021,14 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/pages/builds"]["response"]; }; /** - * @see https://docs.github.com/v3/projects/#list-repository-projects + * @see https://docs.github.com/rest/reference/projects#list-repository-projects */ "GET /repos/{owner}/{repo}/projects": { parameters: Endpoints["GET /repos/{owner}/{repo}/projects"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/projects"]["response"]; }; /** - * @see https://docs.github.com/v3/pulls/#list-pull-requests + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests */ "GET /repos/{owner}/{repo}/pulls": { parameters: Endpoints["GET /repos/{owner}/{repo}/pulls"]["parameters"]; @@ -867,7 +1042,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments"]["response"]; }; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment */ "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["parameters"]; @@ -881,14 +1056,14 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["response"]; }; /** - * @see https://docs.github.com/v3/pulls/#list-commits-on-a-pull-request + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request */ "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": { parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["response"]; }; /** - * @see https://docs.github.com/v3/pulls/#list-pull-requests-files + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files */ "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": { parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"]["parameters"]; @@ -931,6 +1106,13 @@ export interface PaginatingEndpoints { parameters: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; /** * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository */ @@ -938,6 +1120,13 @@ export interface PaginatingEndpoints { parameters: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + parameters: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["response"]; + }; /** * @see https://docs.github.com/rest/reference/activity#list-stargazers */ @@ -953,55 +1142,46 @@ export interface PaginatingEndpoints { response: Endpoints["GET /repos/{owner}/{repo}/subscribers"]["response"]; }; /** - * @see https://docs.github.com/v3/repos/#list-repository-tags + * @see https://docs.github.com/rest/reference/repos#list-repository-tags */ "GET /repos/{owner}/{repo}/tags": { parameters: Endpoints["GET /repos/{owner}/{repo}/tags"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/tags"]["response"]; }; /** - * @see https://docs.github.com/v3/repos/#list-repository-teams + * @see https://docs.github.com/rest/reference/repos#list-repository-teams */ "GET /repos/{owner}/{repo}/teams": { parameters: Endpoints["GET /repos/{owner}/{repo}/teams"]["parameters"]; response: Endpoints["GET /repos/{owner}/{repo}/teams"]["response"]; }; /** - * @see https://docs.github.com/v3/repos/#list-public-repositories - */ - "GET /repositories": { - parameters: Endpoints["GET /repositories"]["parameters"]; - response: Endpoints["GET /repositories"]["response"]; - }; - /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-provisioned-scim-groups-for-an-enterprise + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics */ - "GET /scim/v2/enterprises/{enterprise}/Groups": { - parameters: Endpoints["GET /scim/v2/enterprises/{enterprise}/Groups"]["parameters"]; - response: Endpoints["GET /scim/v2/enterprises/{enterprise}/Groups"]["response"] & { - data: Endpoints["GET /scim/v2/enterprises/{enterprise}/Groups"]["response"]["data"]["Resources"]; + "GET /repos/{owner}/{repo}/topics": { + parameters: Endpoints["GET /repos/{owner}/{repo}/topics"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/topics"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/topics"]["response"]["data"]["names"]; }; }; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-scim-provisioned-identities-for-an-enterprise + * @see https://docs.github.com/rest/reference/repos#list-public-repositories */ - "GET /scim/v2/enterprises/{enterprise}/Users": { - parameters: Endpoints["GET /scim/v2/enterprises/{enterprise}/Users"]["parameters"]; - response: Endpoints["GET /scim/v2/enterprises/{enterprise}/Users"]["response"] & { - data: Endpoints["GET /scim/v2/enterprises/{enterprise}/Users"]["response"]["data"]["Resources"]; - }; + "GET /repositories": { + parameters: Endpoints["GET /repositories"]["parameters"]; + response: Endpoints["GET /repositories"]["response"]; }; /** - * @see https://docs.github.com/v3/scim/#list-scim-provisioned-identities + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets */ - "GET /scim/v2/organizations/{org}/Users": { - parameters: Endpoints["GET /scim/v2/organizations/{org}/Users"]["parameters"]; - response: Endpoints["GET /scim/v2/organizations/{org}/Users"]["response"] & { - data: Endpoints["GET /scim/v2/organizations/{org}/Users"]["response"]["data"]["Resources"]; + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": { + parameters: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets"]["parameters"]; + response: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets"]["response"] & { + data: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets"]["response"]["data"]["secrets"]; }; }; /** - * @see https://docs.github.com/v3/search/#search-code + * @see https://docs.github.com/rest/reference/search#search-code */ "GET /search/code": { parameters: Endpoints["GET /search/code"]["parameters"]; @@ -1010,7 +1190,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/search/#search-commits + * @see https://docs.github.com/rest/reference/search#search-commits */ "GET /search/commits": { parameters: Endpoints["GET /search/commits"]["parameters"]; @@ -1019,7 +1199,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/search/#search-issues-and-pull-requests + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests */ "GET /search/issues": { parameters: Endpoints["GET /search/issues"]["parameters"]; @@ -1028,7 +1208,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/search/#search-labels + * @see https://docs.github.com/rest/reference/search#search-labels */ "GET /search/labels": { parameters: Endpoints["GET /search/labels"]["parameters"]; @@ -1037,7 +1217,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/search/#search-repositories + * @see https://docs.github.com/rest/reference/search#search-repositories */ "GET /search/repositories": { parameters: Endpoints["GET /search/repositories"]["parameters"]; @@ -1046,7 +1226,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/search/#search-topics + * @see https://docs.github.com/rest/reference/search#search-topics */ "GET /search/topics": { parameters: Endpoints["GET /search/topics"]["parameters"]; @@ -1055,7 +1235,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/search/#search-users + * @see https://docs.github.com/rest/reference/search#search-users */ "GET /search/users": { parameters: Endpoints["GET /search/users"]["parameters"]; @@ -1078,14 +1258,14 @@ export interface PaginatingEndpoints { response: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments"]["response"]; }; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy */ "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { parameters: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["parameters"]; response: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; }; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy */ "GET /teams/{team_id}/discussions/{discussion_number}/reactions": { parameters: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/reactions"]["parameters"]; @@ -1106,30 +1286,21 @@ export interface PaginatingEndpoints { response: Endpoints["GET /teams/{team_id}/members"]["response"]; }; /** - * @see https://docs.github.com/v3/teams/#list-team-projects-legacy + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy */ "GET /teams/{team_id}/projects": { parameters: Endpoints["GET /teams/{team_id}/projects"]["parameters"]; response: Endpoints["GET /teams/{team_id}/projects"]["response"]; }; /** - * @see https://docs.github.com/v3/teams/#list-team-repositories-legacy + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy */ "GET /teams/{team_id}/repos": { parameters: Endpoints["GET /teams/{team_id}/repos"]["parameters"]; response: Endpoints["GET /teams/{team_id}/repos"]["response"]; }; /** - * @see https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team-legacy - */ - "GET /teams/{team_id}/team-sync/group-mappings": { - parameters: Endpoints["GET /teams/{team_id}/team-sync/group-mappings"]["parameters"]; - response: Endpoints["GET /teams/{team_id}/team-sync/group-mappings"]["response"] & { - data: Endpoints["GET /teams/{team_id}/team-sync/group-mappings"]["response"]["data"]["groups"]; - }; - }; - /** - * @see https://docs.github.com/v3/teams/#list-child-teams-legacy + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy */ "GET /teams/{team_id}/teams": { parameters: Endpoints["GET /teams/{team_id}/teams"]["parameters"]; @@ -1142,6 +1313,24 @@ export interface PaginatingEndpoints { parameters: Endpoints["GET /user/blocks"]["parameters"]; response: Endpoints["GET /user/blocks"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": { + parameters: Endpoints["GET /user/codespaces"]["parameters"]; + response: Endpoints["GET /user/codespaces"]["response"] & { + data: Endpoints["GET /user/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": { + parameters: Endpoints["GET /user/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /user/codespaces/secrets"]["response"] & { + data: Endpoints["GET /user/codespaces/secrets"]["response"]["data"]["secrets"]; + }; + }; /** * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user */ @@ -1189,7 +1378,7 @@ export interface PaginatingEndpoints { }; }; /** - * @see https://docs.github.com/v3/issues/#list-user-account-issues-assigned-to-the-authenticated-user + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user */ "GET /user/issues": { parameters: Endpoints["GET /user/issues"]["parameters"]; @@ -1238,12 +1427,26 @@ export interface PaginatingEndpoints { response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; }; /** - * @see https://docs.github.com/v3/orgs/#list-organizations-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user */ "GET /user/orgs": { parameters: Endpoints["GET /user/orgs"]["parameters"]; response: Endpoints["GET /user/orgs"]["response"]; }; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": { + parameters: Endpoints["GET /user/packages"]["parameters"]; + response: Endpoints["GET /user/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": { + parameters: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; + }; /** * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user */ @@ -1252,7 +1455,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /user/public_emails"]["response"]; }; /** - * @see https://docs.github.com/v3/repos/#list-repositories-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user */ "GET /user/repos": { parameters: Endpoints["GET /user/repos"]["parameters"]; @@ -1280,14 +1483,14 @@ export interface PaginatingEndpoints { response: Endpoints["GET /user/subscriptions"]["response"]; }; /** - * @see https://docs.github.com/v3/teams/#list-teams-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user */ "GET /user/teams": { parameters: Endpoints["GET /user/teams"]["parameters"]; response: Endpoints["GET /user/teams"]["response"]; }; /** - * @see https://docs.github.com/v3/users/#list-users + * @see https://docs.github.com/rest/reference/users#list-users */ "GET /users": { parameters: Endpoints["GET /users"]["parameters"]; @@ -1329,7 +1532,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /users/{username}/following"]["response"]; }; /** - * @see https://docs.github.com/v3/gists/#list-gists-for-a-user + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user */ "GET /users/{username}/gists": { parameters: Endpoints["GET /users/{username}/gists"]["parameters"]; @@ -1350,14 +1553,21 @@ export interface PaginatingEndpoints { response: Endpoints["GET /users/{username}/keys"]["response"]; }; /** - * @see https://docs.github.com/v3/orgs/#list-organizations-for-a-user + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user */ "GET /users/{username}/orgs": { parameters: Endpoints["GET /users/{username}/orgs"]["parameters"]; response: Endpoints["GET /users/{username}/orgs"]["response"]; }; /** - * @see https://docs.github.com/v3/projects/#list-user-projects + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": { + parameters: Endpoints["GET /users/{username}/packages"]["parameters"]; + response: Endpoints["GET /users/{username}/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects */ "GET /users/{username}/projects": { parameters: Endpoints["GET /users/{username}/projects"]["parameters"]; @@ -1378,7 +1588,7 @@ export interface PaginatingEndpoints { response: Endpoints["GET /users/{username}/received_events/public"]["response"]; }; /** - * @see https://docs.github.com/v3/repos/#list-repositories-for-a-user + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user */ "GET /users/{username}/repos": { parameters: Endpoints["GET /users/{username}/repos"]["parameters"]; @@ -1399,3 +1609,4 @@ export interface PaginatingEndpoints { response: Endpoints["GET /users/{username}/subscriptions"]["response"]; }; } +export declare const paginatingEndpoints: (keyof PaginatingEndpoints)[]; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts index 44fd234..4d84aae 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts @@ -1,7 +1,9 @@ import { Octokit } from "@octokit/core"; import { PaginateInterface } from "./types"; export { PaginateInterface } from "./types"; +export { PaginatingEndpoints } from "./types"; export { composePaginateRest } from "./compose-paginate"; +export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints"; /** * @param octokit Octokit instance * @param options Options passed to Octokit constructor diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts index 276f6d9..931d530 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts @@ -8,6 +8,13 @@ export declare function iterator(octokit: Octokit, route: Route | RequestInterfa } | { value: import("@octokit/types/dist-types/OctokitResponse").OctokitResponse; done?: undefined; + } | { + value: { + status: number; + headers: {}; + data: never[]; + }; + done?: undefined; }>; }; }; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts new file mode 100644 index 0000000..f6a4d7b --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts @@ -0,0 +1,3 @@ +import { PaginatingEndpoints } from "./generated/paginating-endpoints"; +export { paginatingEndpoints } from "./generated/paginating-endpoints"; +export declare function isPaginatingEndpoint(arg: unknown): arg is keyof PaginatingEndpoints; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts index fff019d..0634907 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts @@ -1,6 +1,7 @@ import { Octokit } from "@octokit/core"; import * as OctokitTypes from "@octokit/types"; export { EndpointOptions, RequestInterface, OctokitResponse, RequestParameters, Route, } from "@octokit/types"; +export { PaginatingEndpoints } from "./generated/paginating-endpoints"; import { PaginatingEndpoints } from "./generated/paginating-endpoints"; declare type KnownKeys = Extract<{ [K in keyof T]: string extends K ? never : number extends K ? never : K; @@ -20,22 +21,22 @@ declare type NormalizeResponse = T & { data: GetResultsType; }; declare type DataType = "data" extends keyof T ? T["data"] : unknown; -export interface MapFunction { - (response: OctokitTypes.OctokitResponse>, done: () => void): R[]; +export interface MapFunction>, M = unknown[]> { + (response: T, done: () => void): M; } export declare type PaginationResults = T[]; export interface PaginateInterface { /** * Paginate a request using endpoint options and map each response to a custom array * - * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. * @param {function} mapFn Optional method to map each response to a custom array */ - (options: OctokitTypes.EndpointOptions, mapFn: MapFunction): Promise>; + (options: OctokitTypes.EndpointOptions, mapFn: MapFunction>, M[]>): Promise>; /** * Paginate a request using 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`. + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. */ (options: OctokitTypes.EndpointOptions): Promise>; /** @@ -44,7 +45,7 @@ export interface PaginateInterface { * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` * @param {function} mapFn Optional method to map each response to a custom array */ - (route: R, mapFn: (response: PaginatingEndpoints[R]["response"], done: () => void) => MR): Promise; + (route: R, mapFn: MapFunction): Promise; /** * Paginate a request using a known endpoint route string and parameters, and map each response to a custom array * @@ -52,7 +53,7 @@ export interface PaginateInterface { * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. * @param {function} mapFn Optional method to map each response to a custom array */ - (route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: (response: PaginatingEndpoints[R]["response"], done: () => void) => MR): Promise; + (route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction): Promise; /** * Paginate a request using an known endpoint route string * @@ -73,7 +74,7 @@ export interface PaginateInterface { * @param {string} request Request method (`octokit.request` or `@octokit/request`) * @param {function} mapFn? Optional method to map each response to a custom array */ - (request: R, mapFn: (response: NormalizeResponse>, done: () => void) => MR): Promise; + (request: R, mapFn: MapFunction>, M>): Promise; /** * Paginate a request using an endpoint method, parameters, and a map function * @@ -81,7 +82,7 @@ export interface PaginateInterface { * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. * @param {function} mapFn? Optional method to map each response to a custom array */ - (request: R, parameters: Parameters[0], mapFn: (response: NormalizeResponse>, done: () => void) => MR): Promise; + (request: R, parameters: Parameters[0], mapFn: MapFunction>, M>): Promise; /** * Paginate a request using an endpoint method and parameters * @@ -94,9 +95,9 @@ export interface PaginateInterface { * Get an async iterator to paginate a request using endpoint options * * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of - * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. */ - (EndpointOptions: OctokitTypes.EndpointOptions): AsyncIterableIterator>>; + (options: OctokitTypes.EndpointOptions): AsyncIterableIterator>>; /** * Get an async iterator to paginate a request using a known endpoint route string and optional parameters * @@ -128,15 +129,15 @@ export interface ComposePaginateInterface { * Paginate a request using endpoint options and map each response to a custom array * * @param {object} octokit Octokit instance - * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. * @param {function} mapFn Optional method to map each response to a custom array */ - (octokit: Octokit, options: OctokitTypes.EndpointOptions, mapFn: MapFunction): Promise>; + (octokit: Octokit, options: OctokitTypes.EndpointOptions, mapFn: MapFunction>, M[]>): Promise>; /** * Paginate a request using endpoint options * * @param {object} octokit Octokit instance - * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. */ (octokit: Octokit, options: OctokitTypes.EndpointOptions): Promise>; /** @@ -146,7 +147,7 @@ export interface ComposePaginateInterface { * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` * @param {function} mapFn Optional method to map each response to a custom array */ - (octokit: Octokit, route: R, mapFn: (response: PaginatingEndpoints[R]["response"], done: () => void) => MR): Promise; + (octokit: Octokit, route: R, mapFn: MapFunction): Promise; /** * Paginate a request using a known endpoint route string and parameters, and map each response to a custom array * @@ -155,7 +156,7 @@ export interface ComposePaginateInterface { * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. * @param {function} mapFn Optional method to map each response to a custom array */ - (octokit: Octokit, route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: (response: PaginatingEndpoints[R]["response"], done: () => void) => MR): Promise; + (octokit: Octokit, route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction): Promise; /** * Paginate a request using an known endpoint route string * @@ -179,7 +180,7 @@ export interface ComposePaginateInterface { * @param {string} request Request method (`octokit.request` or `@octokit/request`) * @param {function} mapFn? Optional method to map each response to a custom array */ - (octokit: Octokit, request: R, mapFn: (response: NormalizeResponse>, done: () => void) => MR): Promise; + (octokit: Octokit, request: R, mapFn: MapFunction>, M>): Promise; /** * Paginate a request using an endpoint method, parameters, and a map function * @@ -188,7 +189,7 @@ export interface ComposePaginateInterface { * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. * @param {function} mapFn? Optional method to map each response to a custom array */ - (octokit: Octokit, request: R, parameters: Parameters[0], mapFn: (response: NormalizeResponse>, done: () => void) => MR): Promise; + (octokit: Octokit, request: R, parameters: Parameters[0], mapFn: MapFunction>, M>): Promise; /** * Paginate a request using an endpoint method and parameters * @@ -204,9 +205,9 @@ export interface ComposePaginateInterface { * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of * * @param {object} octokit Octokit instance - * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. */ - (octokit: Octokit, EndpointOptions: OctokitTypes.EndpointOptions): AsyncIterableIterator>>; + (octokit: Octokit, options: OctokitTypes.EndpointOptions): AsyncIterableIterator>>; /** * Get an async iterator to paginate a request using a known endpoint route string and optional parameters * diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts index aa64fdd..77e3d51 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "2.10.0"; +export declare const VERSION = "2.21.3"; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js b/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js index e2fe2fe..e76659f 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js +++ b/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js @@ -1,4 +1,4 @@ -const VERSION = "2.10.0"; +const VERSION = "2.21.3"; /** * Some “list” response that can be paginated have a different response structure @@ -17,6 +17,13 @@ const VERSION = "2.10.0"; * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref */ function normalizePaginatedListResponse(response) { + // endpoints can respond with 204 if repository is empty + if (!response.data) { + return { + ...response, + data: [], + }; + } const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); if (!responseNeedsNormalization) return response; @@ -54,13 +61,27 @@ function iterator(octokit, route, parameters) { async next() { if (!url) return { done: true }; - const response = await requestMethod({ method, url, headers }); - const normalizedResponse = normalizePaginatedListResponse(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 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; - return { value: normalizedResponse }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(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 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { value: normalizedResponse }; + } + catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [], + }, + }; + } }, }), }; @@ -94,6 +115,232 @@ const composePaginateRest = Object.assign(paginate, { iterator, }); +const paginatingEndpoints = [ + "GET /app/hook/deliveries", + "GET /app/installations", + "GET /applications/grants", + "GET /authorizations", + "GET /enterprises/{enterprise}/actions/permissions/organizations", + "GET /enterprises/{enterprise}/actions/runner-groups", + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", + "GET /enterprises/{enterprise}/actions/runners", + "GET /enterprises/{enterprise}/audit-log", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /enterprises/{enterprise}/settings/billing/advanced-security", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runner-groups", + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/audit-log", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/credential-authorizations", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/external-groups", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/settings/billing/advanced-security", + "GET /orgs/{org}/team-sync/groups", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions", +]; + +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } + else { + return false; + } +} + /** * @param octokit Octokit instance * @param options Options passed to Octokit constructor @@ -107,5 +354,5 @@ function paginateRest(octokit) { } paginateRest.VERSION = VERSION; -export { composePaginateRest, paginateRest }; +export { composePaginateRest, isPaginatingEndpoint, paginateRest, paginatingEndpoints }; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map b/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map index e936c3b..878b8e4 100644 --- a/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map +++ b/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/normalize-paginated-list-response.js","../dist-src/iterator.js","../dist-src/paginate.js","../dist-src/compose-paginate.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.10.0\";\n","/**\n * Some “list” response that can be paginated have a different response structure\n *\n * They have a `total_count` key in the response (search also has `incomplete_results`,\n * /installation/repositories also has `repository_selection`), as well as a key with\n * the list of the items which name varies from endpoint to endpoint.\n *\n * Octokit normalizes these responses so that paginated results are always returned following\n * the same structure. One challenge is that if the list response has only one page, no Link\n * header is provided, so this header alone is not sufficient to check wether a response is\n * paginated or not.\n *\n * We check if a \"total_count\" key is present in the response data, but also make sure that\n * a \"url\" property is not, as the \"Get the combined status for a specific ref\" endpoint would\n * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref\n */\nexport function normalizePaginatedListResponse(response) {\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n // keep the additional properties intact as there is currently no other way\n // to retrieve the same information.\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n","import { normalizePaginatedListResponse } from \"./normalize-paginated-list-response\";\nexport function iterator(octokit, route, parameters) {\n const options = typeof route === \"function\"\n ? route.endpoint(parameters)\n : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n // `response.headers.link` format:\n // '; rel=\"next\", ; rel=\"last\"'\n // sets `url` to undefined if \"next\" URL is not present or `link` header is not set\n url = ((normalizedResponse.headers.link || \"\").match(/<([^>]+)>;\\s*rel=\"next\"/) || [])[1];\n return { value: normalizedResponse };\n },\n }),\n };\n}\n","import { iterator } from \"./iterator\";\nexport function paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = undefined;\n }\n return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);\n}\nfunction gather(octokit, results, iterator, mapFn) {\n return iterator.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator, mapFn);\n });\n}\n","import { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport const composePaginateRest = Object.assign(paginate, {\n iterator,\n});\n","import { VERSION } from \"./version\";\nimport { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport { composePaginateRest } from \"./compose-paginate\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit),\n }),\n };\n}\npaginateRest.VERSION = VERSION;\n"],"names":[],"mappings":"AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,8BAA8B,CAAC,QAAQ,EAAE;AACzD,IAAI,MAAM,0BAA0B,GAAG,aAAa,IAAI,QAAQ,CAAC,IAAI,IAAI,EAAE,KAAK,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnG,IAAI,IAAI,CAAC,0BAA0B;AACnC,QAAQ,OAAO,QAAQ,CAAC;AACxB;AACA;AACA,IAAI,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;AAC/D,IAAI,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC;AACnE,IAAI,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;AACjD,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;AAC5C,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC;AAC9C,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;AACrC,IAAI,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,IAAI,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC7C,IAAI,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB,IAAI,IAAI,OAAO,iBAAiB,KAAK,WAAW,EAAE;AAClD,QAAQ,QAAQ,CAAC,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;AAC7D,KAAK;AACL,IAAI,IAAI,OAAO,mBAAmB,KAAK,WAAW,EAAE;AACpD,QAAQ,QAAQ,CAAC,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;AACjE,KAAK;AACL,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;AAC3C,IAAI,OAAO,QAAQ,CAAC;AACpB,CAAC;;ACtCM,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AACrD,IAAI,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,UAAU;AAC/C,UAAU,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;AACpC,UAAU,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtD,IAAI,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;AAChF,IAAI,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AAClC,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACpC,IAAI,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;AAC1B,IAAI,OAAO;AACX,QAAQ,CAAC,MAAM,CAAC,aAAa,GAAG,OAAO;AACvC,YAAY,MAAM,IAAI,GAAG;AACzB,gBAAgB,IAAI,CAAC,GAAG;AACxB,oBAAoB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC1C,gBAAgB,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/E,gBAAgB,MAAM,kBAAkB,GAAG,8BAA8B,CAAC,QAAQ,CAAC,CAAC;AACpF;AACA;AACA;AACA,gBAAgB,GAAG,GAAG,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,yBAAyB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1G,gBAAgB,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;AACrD,aAAa;AACb,SAAS,CAAC;AACV,KAAK,CAAC;AACN,CAAC;;ACvBM,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;AAC5D,IAAI,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;AAC1C,QAAQ,KAAK,GAAG,UAAU,CAAC;AAC3B,QAAQ,UAAU,GAAG,SAAS,CAAC;AAC/B,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACpG,CAAC;AACD,SAAS,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;AACnD,IAAI,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK;AAC5C,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE;AACzB,YAAY,OAAO,OAAO,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,SAAS,GAAG,KAAK,CAAC;AAC9B,QAAQ,SAAS,IAAI,GAAG;AACxB,YAAY,SAAS,GAAG,IAAI,CAAC;AAC7B,SAAS;AACT,QAAQ,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACxF,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,OAAO,OAAO,CAAC;AAC3B,SAAS;AACT,QAAQ,OAAO,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACzD,KAAK,CAAC,CAAC;AACP,CAAC;;ACrBW,MAAC,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AAC3D,IAAI,QAAQ;AACZ,CAAC,CAAC;;ACAF;AACA;AACA;AACA;AACA,AAAO,SAAS,YAAY,CAAC,OAAO,EAAE;AACtC,IAAI,OAAO;AACX,QAAQ,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;AAC9D,YAAY,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC;AAClD,SAAS,CAAC;AACV,KAAK,CAAC;AACN,CAAC;AACD,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/normalize-paginated-list-response.js","../dist-src/iterator.js","../dist-src/paginate.js","../dist-src/compose-paginate.js","../dist-src/generated/paginating-endpoints.js","../dist-src/paginating-endpoints.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.21.3\";\n","/**\n * Some “list” response that can be paginated have a different response structure\n *\n * They have a `total_count` key in the response (search also has `incomplete_results`,\n * /installation/repositories also has `repository_selection`), as well as a key with\n * the list of the items which name varies from endpoint to endpoint.\n *\n * Octokit normalizes these responses so that paginated results are always returned following\n * the same structure. One challenge is that if the list response has only one page, no Link\n * header is provided, so this header alone is not sufficient to check wether a response is\n * paginated or not.\n *\n * We check if a \"total_count\" key is present in the response data, but also make sure that\n * a \"url\" property is not, as the \"Get the combined status for a specific ref\" endpoint would\n * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref\n */\nexport function normalizePaginatedListResponse(response) {\n // endpoints can respond with 204 if repository is empty\n if (!response.data) {\n return {\n ...response,\n data: [],\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n // keep the additional properties intact as there is currently no other way\n // to retrieve the same information.\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n","import { normalizePaginatedListResponse } from \"./normalize-paginated-list-response\";\nexport function iterator(octokit, route, parameters) {\n const options = typeof route === \"function\"\n ? route.endpoint(parameters)\n : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n // `response.headers.link` format:\n // '; rel=\"next\", ; rel=\"last\"'\n // sets `url` to undefined if \"next\" URL is not present or `link` header is not set\n url = ((normalizedResponse.headers.link || \"\").match(/<([^>]+)>;\\s*rel=\"next\"/) || [])[1];\n return { value: normalizedResponse };\n }\n catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: [],\n },\n };\n }\n },\n }),\n };\n}\n","import { iterator } from \"./iterator\";\nexport function paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = undefined;\n }\n return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);\n}\nfunction gather(octokit, results, iterator, mapFn) {\n return iterator.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator, mapFn);\n });\n}\n","import { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport const composePaginateRest = Object.assign(paginate, {\n iterator,\n});\n","export const paginatingEndpoints = [\n \"GET /app/hook/deliveries\",\n \"GET /app/installations\",\n \"GET /applications/grants\",\n \"GET /authorizations\",\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n \"GET /enterprises/{enterprise}/actions/runner-groups\",\n \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations\",\n \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners\",\n \"GET /enterprises/{enterprise}/actions/runners\",\n \"GET /enterprises/{enterprise}/audit-log\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /enterprises/{enterprise}/settings/billing/advanced-security\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runner-groups\",\n \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories\",\n \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/audit-log\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/credential-authorizations\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/external-groups\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/settings/billing/advanced-security\",\n \"GET /orgs/{org}/team-sync/groups\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\",\n];\n","import { paginatingEndpoints, } from \"./generated/paginating-endpoints\";\nexport { paginatingEndpoints } from \"./generated/paginating-endpoints\";\nexport function isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n }\n else {\n return false;\n }\n}\n","import { VERSION } from \"./version\";\nimport { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport { composePaginateRest } from \"./compose-paginate\";\nexport { isPaginatingEndpoint, paginatingEndpoints, } from \"./paginating-endpoints\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit),\n }),\n };\n}\npaginateRest.VERSION = VERSION;\n"],"names":[],"mappings":"AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,8BAA8B,CAAC,QAAQ,EAAE;AACzD;AACA,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;AACxB,QAAQ,OAAO;AACf,YAAY,GAAG,QAAQ;AACvB,YAAY,IAAI,EAAE,EAAE;AACpB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,0BAA0B,GAAG,aAAa,IAAI,QAAQ,CAAC,IAAI,IAAI,EAAE,KAAK,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnG,IAAI,IAAI,CAAC,0BAA0B;AACnC,QAAQ,OAAO,QAAQ,CAAC;AACxB;AACA;AACA,IAAI,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;AAC/D,IAAI,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC;AACnE,IAAI,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;AACjD,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;AAC5C,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC;AAC9C,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;AACrC,IAAI,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,IAAI,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC7C,IAAI,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB,IAAI,IAAI,OAAO,iBAAiB,KAAK,WAAW,EAAE;AAClD,QAAQ,QAAQ,CAAC,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;AAC7D,KAAK;AACL,IAAI,IAAI,OAAO,mBAAmB,KAAK,WAAW,EAAE;AACpD,QAAQ,QAAQ,CAAC,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;AACjE,KAAK;AACL,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;AAC3C,IAAI,OAAO,QAAQ,CAAC;AACpB,CAAC;;AC7CM,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AACrD,IAAI,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,UAAU;AAC/C,UAAU,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;AACpC,UAAU,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtD,IAAI,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;AAChF,IAAI,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AAClC,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACpC,IAAI,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;AAC1B,IAAI,OAAO;AACX,QAAQ,CAAC,MAAM,CAAC,aAAa,GAAG,OAAO;AACvC,YAAY,MAAM,IAAI,GAAG;AACzB,gBAAgB,IAAI,CAAC,GAAG;AACxB,oBAAoB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC1C,gBAAgB,IAAI;AACpB,oBAAoB,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AACnF,oBAAoB,MAAM,kBAAkB,GAAG,8BAA8B,CAAC,QAAQ,CAAC,CAAC;AACxF;AACA;AACA;AACA,oBAAoB,GAAG,GAAG,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,yBAAyB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9G,oBAAoB,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,KAAK,EAAE;AAC9B,oBAAoB,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG;AAC5C,wBAAwB,MAAM,KAAK,CAAC;AACpC,oBAAoB,GAAG,GAAG,EAAE,CAAC;AAC7B,oBAAoB,OAAO;AAC3B,wBAAwB,KAAK,EAAE;AAC/B,4BAA4B,MAAM,EAAE,GAAG;AACvC,4BAA4B,OAAO,EAAE,EAAE;AACvC,4BAA4B,IAAI,EAAE,EAAE;AACpC,yBAAyB;AACzB,qBAAqB,CAAC;AACtB,iBAAiB;AACjB,aAAa;AACb,SAAS,CAAC;AACV,KAAK,CAAC;AACN,CAAC;;ACrCM,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;AAC5D,IAAI,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;AAC1C,QAAQ,KAAK,GAAG,UAAU,CAAC;AAC3B,QAAQ,UAAU,GAAG,SAAS,CAAC;AAC/B,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACpG,CAAC;AACD,SAAS,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;AACnD,IAAI,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK;AAC5C,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE;AACzB,YAAY,OAAO,OAAO,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,SAAS,GAAG,KAAK,CAAC;AAC9B,QAAQ,SAAS,IAAI,GAAG;AACxB,YAAY,SAAS,GAAG,IAAI,CAAC;AAC7B,SAAS;AACT,QAAQ,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACxF,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,OAAO,OAAO,CAAC;AAC3B,SAAS;AACT,QAAQ,OAAO,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACzD,KAAK,CAAC,CAAC;AACP,CAAC;;ACrBW,MAAC,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AAC3D,IAAI,QAAQ;AACZ,CAAC,CAAC;;ACJU,MAAC,mBAAmB,GAAG;AACnC,IAAI,0BAA0B;AAC9B,IAAI,wBAAwB;AAC5B,IAAI,0BAA0B;AAC9B,IAAI,qBAAqB;AACzB,IAAI,iEAAiE;AACrE,IAAI,qDAAqD;AACzD,IAAI,qFAAqF;AACzF,IAAI,+EAA+E;AACnF,IAAI,+CAA+C;AACnD,IAAI,yCAAyC;AAC7C,IAAI,sDAAsD;AAC1D,IAAI,kEAAkE;AACtE,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,oBAAoB;AACxB,IAAI,+BAA+B;AACnC,IAAI,8BAA8B;AAClC,IAAI,4BAA4B;AAChC,IAAI,gCAAgC;AACpC,IAAI,aAAa;AACjB,IAAI,eAAe;AACnB,IAAI,gCAAgC;AACpC,IAAI,mDAAmD;AACvD,IAAI,wCAAwC;AAC5C,IAAI,2DAA2D;AAC/D,IAAI,qCAAqC;AACzC,IAAI,oBAAoB;AACxB,IAAI,oBAAoB;AACxB,IAAI,mDAAmD;AACvD,IAAI,kDAAkD;AACtD,IAAI,uCAAuC;AAC3C,IAAI,sEAAsE;AAC1E,IAAI,iEAAiE;AACrE,IAAI,iCAAiC;AACrC,IAAI,iCAAiC;AACrC,IAAI,4DAA4D;AAChE,IAAI,2BAA2B;AAC/B,IAAI,wBAAwB;AAC5B,IAAI,sCAAsC;AAC1C,IAAI,4BAA4B;AAChC,IAAI,2CAA2C;AAC/C,IAAI,oCAAoC;AACxC,IAAI,+DAA+D;AACnE,IAAI,wBAAwB;AAC5B,IAAI,iCAAiC;AACrC,IAAI,oCAAoC;AACxC,IAAI,uBAAuB;AAC3B,IAAI,4CAA4C;AAChD,IAAI,+BAA+B;AACnC,IAAI,6BAA6B;AACjC,IAAI,mDAAmD;AACvD,IAAI,wBAAwB;AAC5B,IAAI,yBAAyB;AAC7B,IAAI,4BAA4B;AAChC,IAAI,wDAAwD;AAC5D,IAAI,uCAAuC;AAC3C,IAAI,0BAA0B;AAC9B,IAAI,iEAAiE;AACrE,IAAI,0BAA0B;AAC9B,IAAI,gCAAgC;AACpC,IAAI,uBAAuB;AAC3B,IAAI,wCAAwC;AAC5C,IAAI,oDAAoD;AACxD,IAAI,kCAAkC;AACtC,IAAI,uBAAuB;AAC3B,IAAI,+CAA+C;AACnD,IAAI,4EAA4E;AAChF,IAAI,uGAAuG;AAC3G,IAAI,6EAA6E;AACjF,IAAI,+CAA+C;AACnD,IAAI,2CAA2C;AAC/C,IAAI,4CAA4C;AAChD,IAAI,yCAAyC;AAC7C,IAAI,yCAAyC;AAC7C,IAAI,yCAAyC;AAC7C,IAAI,0CAA0C;AAC9C,IAAI,oCAAoC;AACxC,IAAI,6CAA6C;AACjD,IAAI,0CAA0C;AAC9C,IAAI,2CAA2C;AAC/C,IAAI,wCAAwC;AAC5C,IAAI,2DAA2D;AAC/D,IAAI,gFAAgF;AACpF,IAAI,sDAAsD;AAC1D,IAAI,2CAA2C;AAC/C,IAAI,6CAA6C;AACjD,IAAI,gEAAgE;AACpE,IAAI,qCAAqC;AACzC,IAAI,oCAAoC;AACxC,IAAI,iEAAiE;AACrE,IAAI,oEAAoE;AACxE,IAAI,gDAAgD;AACpD,IAAI,yEAAyE;AAC7E,IAAI,kDAAkD;AACtD,IAAI,sCAAsC;AAC1C,IAAI,oDAAoD;AACxD,IAAI,8CAA8C;AAClD,IAAI,yCAAyC;AAC7C,IAAI,oCAAoC;AACxC,IAAI,2DAA2D;AAC/D,IAAI,mCAAmC;AACvC,IAAI,yDAAyD;AAC7D,IAAI,sDAAsD;AAC1D,IAAI,oDAAoD;AACxD,IAAI,sDAAsD;AAC1D,IAAI,gDAAgD;AACpD,IAAI,kDAAkD;AACtD,IAAI,wCAAwC;AAC5C,IAAI,8CAA8C;AAClD,IAAI,uCAAuC;AAC3C,IAAI,gEAAgE;AACpE,IAAI,wCAAwC;AAC5C,IAAI,kCAAkC;AACtC,IAAI,iCAAiC;AACrC,IAAI,mDAAmD;AACvD,IAAI,iCAAiC;AACrC,IAAI,sDAAsD;AAC1D,IAAI,uCAAuC;AAC3C,IAAI,kCAAkC;AACtC,IAAI,2CAA2C;AAC/C,IAAI,kEAAkE;AACtE,IAAI,yCAAyC;AAC7C,IAAI,0DAA0D;AAC9D,IAAI,wDAAwD;AAC5D,IAAI,wDAAwD;AAC5D,IAAI,2DAA2D;AAC/D,IAAI,0DAA0D;AAC9D,IAAI,gCAAgC;AACpC,IAAI,kCAAkC;AACtC,IAAI,sCAAsC;AAC1C,IAAI,gEAAgE;AACpE,IAAI,yCAAyC;AAC7C,IAAI,wCAAwC;AAC5C,IAAI,oCAAoC;AACxC,IAAI,iCAAiC;AACrC,IAAI,0CAA0C;AAC9C,IAAI,iEAAiE;AACrE,IAAI,wDAAwD;AAC5D,IAAI,uDAAuD;AAC3D,IAAI,qDAAqD;AACzD,IAAI,mEAAmE;AACvE,IAAI,uDAAuD;AAC3D,IAAI,4EAA4E;AAChF,IAAI,oCAAoC;AACxC,IAAI,wDAAwD;AAC5D,IAAI,2DAA2D;AAC/D,IAAI,kDAAkD;AACtD,IAAI,2EAA2E;AAC/E,IAAI,sCAAsC;AAC1C,IAAI,uCAAuC;AAC3C,IAAI,gCAAgC;AACpC,IAAI,iCAAiC;AACrC,IAAI,kCAAkC;AACtC,IAAI,mBAAmB;AACvB,IAAI,2EAA2E;AAC/E,IAAI,kBAAkB;AACtB,IAAI,qBAAqB;AACzB,IAAI,oBAAoB;AACxB,IAAI,oBAAoB;AACxB,IAAI,0BAA0B;AAC9B,IAAI,oBAAoB;AACxB,IAAI,mBAAmB;AACvB,IAAI,kCAAkC;AACtC,IAAI,+DAA+D;AACnE,IAAI,0FAA0F;AAC9F,IAAI,gEAAgE;AACpE,IAAI,kCAAkC;AACtC,IAAI,8BAA8B;AAClC,IAAI,+BAA+B;AACnC,IAAI,4BAA4B;AAChC,IAAI,4BAA4B;AAChC,IAAI,kBAAkB;AACtB,IAAI,sBAAsB;AAC1B,IAAI,8BAA8B;AAClC,IAAI,kBAAkB;AACtB,IAAI,qBAAqB;AACzB,IAAI,qBAAqB;AACzB,IAAI,oBAAoB;AACxB,IAAI,yBAAyB;AAC7B,IAAI,wDAAwD;AAC5D,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,iCAAiC;AACrC,IAAI,yCAAyC;AAC7C,IAAI,4BAA4B;AAChC,IAAI,sBAAsB;AAC1B,IAAI,kDAAkD;AACtD,IAAI,gBAAgB;AACpB,IAAI,oBAAoB;AACxB,IAAI,2DAA2D;AAC/D,IAAI,yBAAyB;AAC7B,IAAI,iBAAiB;AACrB,IAAI,kCAAkC;AACtC,IAAI,mBAAmB;AACvB,IAAI,yBAAyB;AAC7B,IAAI,iBAAiB;AACrB,IAAI,YAAY;AAChB,IAAI,8BAA8B;AAClC,IAAI,yCAAyC;AAC7C,IAAI,qCAAqC;AACzC,IAAI,iCAAiC;AACrC,IAAI,iCAAiC;AACrC,IAAI,6BAA6B;AACjC,IAAI,gCAAgC;AACpC,IAAI,4BAA4B;AAChC,IAAI,4BAA4B;AAChC,IAAI,gCAAgC;AACpC,IAAI,gCAAgC;AACpC,IAAI,uCAAuC;AAC3C,IAAI,8CAA8C;AAClD,IAAI,6BAA6B;AACjC,IAAI,+BAA+B;AACnC,IAAI,qCAAqC;AACzC,CAAC;;ACrNM,SAAS,oBAAoB,CAAC,GAAG,EAAE;AAC1C,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AACjC,QAAQ,OAAO,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;;ACJD;AACA;AACA;AACA;AACA,AAAO,SAAS,YAAY,CAAC,OAAO,EAAE;AACtC,IAAI,OAAO;AACX,QAAQ,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;AAC9D,YAAY,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC;AAClD,SAAS,CAAC;AACV,KAAK,CAAC;AACN,CAAC;AACD,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/plugin-paginate-rest/package.json b/node_modules/@octokit/plugin-paginate-rest/package.json index f84d5b9..db9a6dc 100644 --- a/node_modules/@octokit/plugin-paginate-rest/package.json +++ b/node_modules/@octokit/plugin-paginate-rest/package.json @@ -1,84 +1,51 @@ { - "_from": "@octokit/plugin-paginate-rest@^2.2.3", - "_id": "@octokit/plugin-paginate-rest@2.10.0", - "_inBundle": false, - "_integrity": "sha512-71OsKBSMcQEu/6lfVbhv5C5ikU1rn10rKot/WiV7do7fyfElQ2eCUQFogHPbj0ci5lnKAjvahOiMAr6lcvL8Qw==", - "_location": "/@octokit/plugin-paginate-rest", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/plugin-paginate-rest@^2.2.3", - "name": "@octokit/plugin-paginate-rest", - "escapedName": "@octokit%2fplugin-paginate-rest", - "scope": "@octokit", - "rawSpec": "^2.2.3", - "saveSpec": null, - "fetchSpec": "^2.2.3" - }, - "_requiredBy": [ - "/@actions/github" - ], - "_resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.10.0.tgz", - "_shasum": "5925156d809c94b7bfc47b28e17488415548fa67", - "_spec": "@octokit/plugin-paginate-rest@^2.2.3", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@actions\\github", - "bugs": { - "url": "https://github.com/octokit/plugin-paginate-rest.js/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@octokit/types": "^6.10.0" - }, - "deprecated": false, + "name": "@octokit/plugin-paginate-rest", "description": "Octokit plugin to paginate REST API endpoint responses", - "devDependencies": { - "@octokit/core": "^3.0.0", - "@octokit/plugin-rest-endpoint-methods": "^4.0.0", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.9.0", - "@pika/plugin-build-web": "^0.9.0", - "@pika/plugin-ts-standard-pkg": "^0.9.0", - "@types/fetch-mock": "^7.3.1", - "@types/jest": "^26.0.0", - "@types/node": "^14.0.4", - "fetch-mock": "^9.0.0", - "jest": "^26.0.1", - "npm-run-all": "^4.1.5", - "prettier": "^2.0.4", - "semantic-release": "^17.0.0", - "semantic-release-plugin-update-version-in-files": "^1.0.0", - "ts-jest": "^26.0.0", - "typescript": "^4.0.2" - }, + "version": "2.21.3", + "license": "MIT", "files": [ "dist-*/", "bin/" ], - "homepage": "https://github.com/octokit/plugin-paginate-rest.js#readme", + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, "keywords": [ "github", "api", "sdk", "toolkit" ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/plugin-paginate-rest", + "repository": "github:octokit/plugin-paginate-rest.js", + "dependencies": { + "@octokit/types": "^6.40.0" + }, "peerDependencies": { "@octokit/core": ">=2" }, - "pika": true, + "devDependencies": { + "@octokit/core": "^4.0.0", + "@octokit/plugin-rest-endpoint-methods": "^6.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^28.0.0", + "@types/node": "^16.0.0", + "fetch-mock": "^9.0.0", + "github-openapi-graphql-query": "^2.0.0", + "jest": "^28.0.0", + "npm-run-all": "^4.1.5", + "prettier": "2.7.1", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^28.0.0", + "typescript": "^4.0.2" + }, "publishConfig": { "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/plugin-paginate-rest.js.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "2.10.0" + } } diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/README.md b/node_modules/@octokit/plugin-rest-endpoint-methods/README.md index 0658dee..b23ff58 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/README.md +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/README.md @@ -45,7 +45,7 @@ const MyOctokit = Octokit.plugin(restEndpointMethods); const octokit = new MyOctokit({ auth: "secret123" }); // https://developer.github.com/v3/users/#get-the-authenticated-user -octokit.users.getAuthenticated(); +octokit.rest.users.getAuthenticated(); ``` There is one method for each REST API endpoint documented at [https://developer.github.com/v3](https://developer.github.com/v3). All endpoint methods are documented in the [docs/](docs/) folder, e.g. [docs/users/getAuthenticated.md](docs/users/getAuthenticated.md) @@ -59,10 +59,14 @@ Example ```ts import { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"; -type UpdateLabelParameters = RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"]; -type UpdateLabelResponse = RestEndpointMethodTypes["issues"]["updateLabel"]["response"]; +type UpdateLabelParameters = + RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"]; +type UpdateLabelResponse = + RestEndpointMethodTypes["issues"]["updateLabel"]["response"]; ``` +In order to get types beyond parameters and responses, check out [`@octokit/openapi-types`](https://github.com/octokit/openapi-types.ts/#readme), which is a direct transpilation from GitHub's official OpenAPI specification. + ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js index 9de950f..a7c5c16 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js @@ -2,10 +2,67 @@ Object.defineProperty(exports, '__esModule', { value: true }); +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + const Endpoints = { actions: { + addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"], + addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], + approveWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"], cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"], + createOrUpdateEnvironmentSecret: ["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"], createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"], @@ -13,7 +70,10 @@ const Endpoints = { createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"], createWorkflowDispatch: ["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"], + deleteActionsCacheById: ["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"], + deleteActionsCacheByKey: ["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"], deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + deleteEnvironmentSecret: ["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"], deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"], @@ -24,30 +84,49 @@ const Endpoints = { disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"], downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"], downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"], + downloadWorkflowRunAttemptLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"], downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"], enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: ["GET /orgs/{org}/actions/cache/usage-by-repository"], + getActionsCacheUsageForEnterprise: ["GET /enterprises/{enterprise}/actions/cache/usage"], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], getAllowedActionsOrganization: ["GET /orgs/{org}/actions/permissions/selected-actions"], getAllowedActionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"], getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getEnvironmentPublicKey: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"], + getEnvironmentSecret: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], + getGithubActionsDefaultWorkflowPermissionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/workflow"], + getGithubActionsDefaultWorkflowPermissionsOrganization: ["GET /orgs/{org}/actions/permissions/workflow"], + getGithubActionsDefaultWorkflowPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/workflow"], getGithubActionsPermissionsOrganization: ["GET /orgs/{org}/actions/permissions"], getGithubActionsPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions"], getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getPendingDeploymentsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], getRepoPermissions: ["GET /repos/{owner}/{repo}/actions/permissions", {}, { renamed: ["actions", "getGithubActionsPermissionsRepository"] }], getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getReviewsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"], getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"], getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: ["GET /repos/{owner}/{repo}/actions/permissions/access"], getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"], getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"], getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"], listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets"], listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"], + listJobsForWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"], + listLabelsForSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}/labels"], + listLabelsForSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], @@ -60,14 +139,27 @@ const Endpoints = { listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"], listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"], listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: ["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"], reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + removeCustomLabelFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"], + removeCustomLabelFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"], removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], + reviewPendingDeploymentsForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"], setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"], + setCustomLabelsForSelfHostedRunnerForOrg: ["PUT /orgs/{org}/actions/runners/{runner_id}/labels"], + setCustomLabelsForSelfHostedRunnerForRepo: ["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + setGithubActionsDefaultWorkflowPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/workflow"], + setGithubActionsDefaultWorkflowPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions/workflow"], + setGithubActionsDefaultWorkflowPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/workflow"], setGithubActionsPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions"], setGithubActionsPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions"], setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"], - setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"] + setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"], + setWorkflowAccessToRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/access"] }, activity: { checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], @@ -103,13 +195,11 @@ const Endpoints = { unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] }, apps: { - addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"], - checkToken: ["POST /applications/{client_id}/token"], - createContentAttachment: ["POST /content_references/{content_reference_id}/attachments", { - mediaType: { - previews: ["corsair"] - } + addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}", {}, { + renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }], + addRepoToInstallationForAuthenticatedUser: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"], + checkToken: ["POST /applications/{client_id}/token"], createFromManifest: ["POST /app-manifests/{code}/conversions"], createInstallationAccessToken: ["POST /app/installations/{installation_id}/access_tokens"], deleteAuthorization: ["DELETE /applications/{client_id}/grant"], @@ -124,6 +214,7 @@ const Endpoints = { getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"], getUserInstallation: ["GET /users/{username}/installation"], getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"], listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"], @@ -134,7 +225,12 @@ const Endpoints = { listReposAccessibleToInstallation: ["GET /installation/repositories"], listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"], - removeRepoFromInstallation: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"], + removeRepoFromInstallation: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}", {}, { + renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] + }], + removeRepoFromInstallationForAuthenticatedUser: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"], resetToken: ["PATCH /applications/{client_id}/token"], revokeInstallationAccessToken: ["DELETE /installation/token"], scopeToken: ["POST /applications/{client_id}/token/scoped"], @@ -145,6 +241,8 @@ const Endpoints = { billing: { getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], getGithubActionsBillingUser: ["GET /users/{username}/settings/billing/actions"], + getGithubAdvancedSecurityBillingGhe: ["GET /enterprises/{enterprise}/settings/billing/advanced-security"], + getGithubAdvancedSecurityBillingOrg: ["GET /orgs/{org}/settings/billing/advanced-security"], getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], getGithubPackagesBillingUser: ["GET /users/{username}/settings/billing/packages"], getSharedStorageBillingOrg: ["GET /orgs/{org}/settings/billing/shared-storage"], @@ -159,6 +257,7 @@ const Endpoints = { listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"], listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: ["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"], rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"], setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"], update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] @@ -172,39 +271,94 @@ const Endpoints = { }], getAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"], getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], - listAlertsInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"], + listAlertsInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", {}, { + renamed: ["codeScanning", "listAlertInstances"] + }], listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"], uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] }, codesOfConduct: { - getAllCodesOfConduct: ["GET /codes_of_conduct", { - mediaType: { - previews: ["scarlet-witch"] - } - }], - getConductCode: ["GET /codes_of_conduct/{key}", { - mediaType: { - previews: ["scarlet-witch"] - } - }], - getForRepo: ["GET /repos/{owner}/{repo}/community/code_of_conduct", { - mediaType: { - previews: ["scarlet-witch"] - } - }] + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"] + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], + codespaceMachinesForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/machines"], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + createOrUpdateSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}"], + createWithPrForAuthenticatedUser: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"], + createWithRepoForAuthenticatedUser: ["POST /repos/{owner}/{repo}/codespaces"], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: ["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"], + deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + deleteSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}"], + exportForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/exports"], + getExportDetailsForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/exports/{export_id}"], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getPublicKeyForAuthenticatedUser: ["GET /user/codespaces/secrets/public-key"], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + getSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}"], + listDevcontainersInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/devcontainers"], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: ["GET /orgs/{org}/codespaces", {}, { + renamedParameters: { + org_id: "org" + } + }], + listInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}/repositories"], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + removeRepositoryForSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], + repoMachinesForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/machines"], + setRepositoriesForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories"], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: ["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] + }, + dependabot: { + addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}"], + createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"], + removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"], + setSelectedReposForOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"] + }, + dependencyGraph: { + createRepositorySnapshot: ["POST /repos/{owner}/{repo}/dependency-graph/snapshots"], + diffRange: ["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"] }, emojis: { get: ["GET /emojis"] }, enterpriseAdmin: { + addCustomLabelsToSelfHostedRunnerForEnterprise: ["POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], disableSelectedOrganizationGithubActionsEnterprise: ["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"], enableSelectedOrganizationGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"], getAllowedActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/selected-actions"], getGithubActionsPermissionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions"], + getServerStatistics: ["GET /enterprise-installation/{enterprise_or_org}/server-statistics"], + listLabelsForSelfHostedRunnerForEnterprise: ["GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], listSelectedOrganizationsEnabledGithubActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/organizations"], + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: ["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], + removeCustomLabelFromSelfHostedRunnerForEnterprise: ["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}"], setAllowedActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"], + setCustomLabelsForSelfHostedRunnerForEnterprise: ["PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], setGithubActionsPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions"], setSelectedOrganizationsEnabledGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations"] }, @@ -291,11 +445,7 @@ const Endpoints = { listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], - listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", { - mediaType: { - previews: ["mockingbird"] - } - }], + listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"], listForAuthenticatedUser: ["GET /user/issues"], listForOrg: ["GET /orgs/{org}/issues"], listForRepo: ["GET /repos/{owner}/{repo}/issues"], @@ -335,74 +485,29 @@ const Endpoints = { }, migrations: { cancelImport: ["DELETE /repos/{owner}/{repo}/import"], - deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive", { - mediaType: { - previews: ["wyandotte"] - } - }], - deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive", { - mediaType: { - previews: ["wyandotte"] - } - }], - downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive", { - mediaType: { - previews: ["wyandotte"] - } - }], - getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive", { - mediaType: { - previews: ["wyandotte"] - } - }], + deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive"], + deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive"], + downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive"], + getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive"], getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], getImportStatus: ["GET /repos/{owner}/{repo}/import"], getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], - getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}", { - mediaType: { - previews: ["wyandotte"] - } - }], - getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}", { - mediaType: { - previews: ["wyandotte"] - } - }], - listForAuthenticatedUser: ["GET /user/migrations", { - mediaType: { - previews: ["wyandotte"] - } - }], - listForOrg: ["GET /orgs/{org}/migrations", { - mediaType: { - previews: ["wyandotte"] - } - }], - listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories", { - mediaType: { - previews: ["wyandotte"] - } - }], - listReposForUser: ["GET /user/migrations/{migration_id}/repositories", { - mediaType: { - previews: ["wyandotte"] - } + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: ["GET /user/migrations/{migration_id}/repositories"], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: ["GET /user/migrations/{migration_id}/repositories", {}, { + renamed: ["migrations", "listReposForAuthenticatedUser"] }], mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], startForAuthenticatedUser: ["POST /user/migrations"], startForOrg: ["POST /orgs/{org}/migrations"], startImport: ["PUT /repos/{owner}/{repo}/import"], - unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", { - mediaType: { - previews: ["wyandotte"] - } - }], - unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", { - mediaType: { - previews: ["wyandotte"] - } - }], + unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"], + unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"], updateImport: ["PATCH /repos/{owner}/{repo}/import"] }, orgs: { @@ -420,9 +525,11 @@ const Endpoints = { getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: ["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"], list: ["GET /organizations"], listAppInstallations: ["GET /orgs/{org}/installations"], listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomRoles: ["GET /organizations/{organization_id}/custom_roles"], listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], listForAuthenticatedUser: ["GET /user/orgs"], listForUser: ["GET /users/{username}/orgs"], @@ -432,8 +539,10 @@ const Endpoints = { listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], listPendingInvitations: ["GET /orgs/{org}/invitations"], listPublicMembers: ["GET /orgs/{org}/public_members"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], listWebhooks: ["GET /orgs/{org}/hooks"], pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: ["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], removeMember: ["DELETE /orgs/{org}/members/{username}"], removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"], @@ -449,10 +558,18 @@ const Endpoints = { packages: { deletePackageForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}"], deletePackageForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}"], + deletePackageForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}"], deletePackageVersionForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"], deletePackageVersionForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"], - getAllPackageVersionsForAPackageOwnedByAnOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"], - getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions"], + deletePackageVersionForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + getAllPackageVersionsForAPackageOwnedByAnOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions", {}, { + renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] + }], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions", {}, { + renamed: ["packages", "getAllPackageVersionsForPackageOwnedByAuthenticatedUser"] + }], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions"], + getAllPackageVersionsForPackageOwnedByOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"], getAllPackageVersionsForPackageOwnedByUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions"], getPackageForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}"], getPackageForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}"], @@ -460,137 +577,42 @@ const Endpoints = { getPackageVersionForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"], getPackageVersionForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"], getPackageVersionForUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"], - restorePackageForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/restore"], - restorePackageForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/restore"], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/restore{?token}"], + restorePackageForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"], + restorePackageForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"], restorePackageVersionForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], - restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"] + restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], + restorePackageVersionForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"] }, projects: { - addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}", { - mediaType: { - previews: ["inertia"] - } - }], - createCard: ["POST /projects/columns/{column_id}/cards", { - mediaType: { - previews: ["inertia"] - } - }], - createColumn: ["POST /projects/{project_id}/columns", { - mediaType: { - previews: ["inertia"] - } - }], - createForAuthenticatedUser: ["POST /user/projects", { - mediaType: { - previews: ["inertia"] - } - }], - createForOrg: ["POST /orgs/{org}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - createForRepo: ["POST /repos/{owner}/{repo}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - delete: ["DELETE /projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], - deleteCard: ["DELETE /projects/columns/cards/{card_id}", { - mediaType: { - previews: ["inertia"] - } - }], - deleteColumn: ["DELETE /projects/columns/{column_id}", { - mediaType: { - previews: ["inertia"] - } - }], - get: ["GET /projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], - getCard: ["GET /projects/columns/cards/{card_id}", { - mediaType: { - previews: ["inertia"] - } - }], - getColumn: ["GET /projects/columns/{column_id}", { - mediaType: { - previews: ["inertia"] - } - }], - getPermissionForUser: ["GET /projects/{project_id}/collaborators/{username}/permission", { - mediaType: { - previews: ["inertia"] - } - }], - listCards: ["GET /projects/columns/{column_id}/cards", { - mediaType: { - previews: ["inertia"] - } - }], - listCollaborators: ["GET /projects/{project_id}/collaborators", { - mediaType: { - previews: ["inertia"] - } - }], - listColumns: ["GET /projects/{project_id}/columns", { - mediaType: { - previews: ["inertia"] - } - }], - listForOrg: ["GET /orgs/{org}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - listForRepo: ["GET /repos/{owner}/{repo}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - listForUser: ["GET /users/{username}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - moveCard: ["POST /projects/columns/cards/{card_id}/moves", { - mediaType: { - previews: ["inertia"] - } - }], - moveColumn: ["POST /projects/columns/{column_id}/moves", { - mediaType: { - previews: ["inertia"] - } - }], - removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}", { - mediaType: { - previews: ["inertia"] - } - }], - update: ["PATCH /projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], - updateCard: ["PATCH /projects/columns/cards/{card_id}", { - mediaType: { - previews: ["inertia"] - } - }], - updateColumn: ["PATCH /projects/columns/{column_id}", { - mediaType: { - previews: ["inertia"] - } - }] + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: ["GET /projects/{project_id}/collaborators/{username}/permission"], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}"], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"] }, pulls: { checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], @@ -617,11 +639,7 @@ const Endpoints = { requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"], update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], - updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch", { - mediaType: { - previews: ["lydian"] - } - }], + updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"], updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"] }, @@ -629,106 +647,33 @@ const Endpoints = { get: ["GET /rate_limit"] }, reactions: { - createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteLegacy: ["DELETE /reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }, { - deprecated: "octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy" - }], - listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }] + createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"], + createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], + createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"], + createForRelease: ["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"], + createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"], + createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"], + deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"], + deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"], + deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"], + deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"], + deleteForRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"], + deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"], + deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"], + listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], + listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"], + listForRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"], + listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"], + listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"] }, repos: { - acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}"], + acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}", {}, { + renamed: ["repos", "acceptInvitationForAuthenticatedUser"] + }], + acceptInvitationForAuthenticatedUser: ["PATCH /user/repository_invitations/{invitation_id}"], addAppAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { mapToData: "apps" }], @@ -743,18 +688,13 @@ const Endpoints = { mapToData: "users" }], checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], - checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts", { - mediaType: { - previews: ["dorian"] - } - }], + checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts"], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: ["GET /repos/{owner}/{repo}/compare/{basehead}"], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"], - createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", { - mediaType: { - previews: ["zzzax"] - } - }], + createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], createDeployKey: ["POST /repos/{owner}/{repo}/keys"], createDeployment: ["POST /repos/{owner}/{repo}/deployments"], @@ -763,78 +703,55 @@ const Endpoints = { createForAuthenticatedUser: ["POST /user/repos"], createFork: ["POST /repos/{owner}/{repo}/forks"], createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"], createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], - createPagesSite: ["POST /repos/{owner}/{repo}/pages", { - mediaType: { - previews: ["switcheroo"] - } - }], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], createRelease: ["POST /repos/{owner}/{repo}/releases"], - createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate", { - mediaType: { - previews: ["baptiste"] - } - }], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate"], createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}"], + declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}", {}, { + renamed: ["repos", "declineInvitationForAuthenticatedUser"] + }], + declineInvitationForAuthenticatedUser: ["DELETE /user/repository_invitations/{invitation_id}"], delete: ["DELETE /repos/{owner}/{repo}"], deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + deleteAnEnvironment: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}"], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"], deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], - deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", { - mediaType: { - previews: ["zzzax"] - } - }], + deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"], deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"], - deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages", { - mediaType: { - previews: ["switcheroo"] - } - }], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"], + deleteTagProtection: ["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"], deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], - disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes", { - mediaType: { - previews: ["london"] - } - }], - disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts", { - mediaType: { - previews: ["dorian"] - } - }], + disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes"], + disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"], + disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts"], downloadArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}", {}, { renamed: ["repos", "downloadZipballArchive"] }], downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], - enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes", { - mediaType: { - previews: ["london"] - } - }], - enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts", { - mediaType: { - previews: ["dorian"] - } - }], + enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes"], + enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], + enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts"], + generateReleaseNotes: ["POST /repos/{owner}/{repo}/releases/generate-notes"], get: ["GET /repos/{owner}/{repo}"], getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], getAllStatusCheckContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"], - getAllTopics: ["GET /repos/{owner}/{repo}/topics", { - mediaType: { - previews: ["mercy"] - } - }], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"], getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], @@ -844,25 +761,24 @@ const Endpoints = { getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], - getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", { - mediaType: { - previews: ["zzzax"] - } - }], + getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"], + getEnvironment: ["GET /repos/{owner}/{repo}/environments/{environment_name}"], getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], getPages: ["GET /repos/{owner}/{repo}/pages"], getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], getPullRequestReviewProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], @@ -874,12 +790,10 @@ const Endpoints = { getViews: ["GET /repos/{owner}/{repo}/traffic/views"], getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], getWebhookConfigForRepo: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"], + getWebhookDelivery: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], listBranches: ["GET /repos/{owner}/{repo}/branches"], - listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", { - mediaType: { - previews: ["groot"] - } - }], + listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"], listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"], listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], @@ -898,18 +812,18 @@ const Endpoints = { listLanguages: ["GET /repos/{owner}/{repo}/languages"], listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], listPublic: ["GET /repositories"], - listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", { - mediaType: { - previews: ["groot"] - } - }], + listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"], listReleaseAssets: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"], listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], listTags: ["GET /repos/{owner}/{repo}/tags"], listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"], listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], removeAppAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { mapToData: "apps" }], @@ -925,11 +839,7 @@ const Endpoints = { mapToData: "users" }], renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], - replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics", { - mediaType: { - previews: ["mercy"] - } - }], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], setAdminBranchProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], setAppAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { @@ -966,39 +876,26 @@ const Endpoints = { }, search: { code: ["GET /search/code"], - commits: ["GET /search/commits", { - mediaType: { - previews: ["cloak"] - } - }], + commits: ["GET /search/commits"], issuesAndPullRequests: ["GET /search/issues"], labels: ["GET /search/labels"], repos: ["GET /search/repositories"], - topics: ["GET /search/topics", { - mediaType: { - previews: ["mercy"] - } - }], + topics: ["GET /search/topics"], users: ["GET /search/users"] }, secretScanning: { getAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"], + listAlertsForEnterprise: ["GET /enterprises/{enterprise}/secret-scanning/alerts"], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"], updateAlert: ["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"] }, teams: { addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"], - addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], + addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"], addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], - checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], + checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"], checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], create: ["POST /orgs/{org}/teams"], createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], @@ -1017,11 +914,7 @@ const Endpoints = { listForAuthenticatedUser: ["GET /user/teams"], listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"], - listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects", { - mediaType: { - previews: ["inertia"] - } - }], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"], removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"], @@ -1031,42 +924,87 @@ const Endpoints = { updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] }, users: { - addEmailForAuthenticated: ["POST /user/emails"], + addEmailForAuthenticated: ["POST /user/emails", {}, { + renamed: ["users", "addEmailForAuthenticatedUser"] + }], + addEmailForAuthenticatedUser: ["POST /user/emails"], block: ["PUT /user/blocks/{username}"], checkBlocked: ["GET /user/blocks/{username}"], checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], - createGpgKeyForAuthenticated: ["POST /user/gpg_keys"], - createPublicSshKeyForAuthenticated: ["POST /user/keys"], - deleteEmailForAuthenticated: ["DELETE /user/emails"], - deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}"], - deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}"], + createGpgKeyForAuthenticated: ["POST /user/gpg_keys", {}, { + renamed: ["users", "createGpgKeyForAuthenticatedUser"] + }], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: ["POST /user/keys", {}, { + renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] + }], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + deleteEmailForAuthenticated: ["DELETE /user/emails", {}, { + renamed: ["users", "deleteEmailForAuthenticatedUser"] + }], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}", {}, { + renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] + }], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}", {}, { + renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] + }], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], follow: ["PUT /user/following/{username}"], getAuthenticated: ["GET /user"], getByUsername: ["GET /users/{username}"], getContextForUser: ["GET /users/{username}/hovercard"], - getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}"], - getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}"], + getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}", {}, { + renamed: ["users", "getGpgKeyForAuthenticatedUser"] + }], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}", {}, { + renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] + }], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], list: ["GET /users"], - listBlockedByAuthenticated: ["GET /user/blocks"], - listEmailsForAuthenticated: ["GET /user/emails"], - listFollowedByAuthenticated: ["GET /user/following"], + listBlockedByAuthenticated: ["GET /user/blocks", {}, { + renamed: ["users", "listBlockedByAuthenticatedUser"] + }], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: ["GET /user/emails", {}, { + renamed: ["users", "listEmailsForAuthenticatedUser"] + }], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: ["GET /user/following", {}, { + renamed: ["users", "listFollowedByAuthenticatedUser"] + }], + listFollowedByAuthenticatedUser: ["GET /user/following"], listFollowersForAuthenticatedUser: ["GET /user/followers"], listFollowersForUser: ["GET /users/{username}/followers"], listFollowingForUser: ["GET /users/{username}/following"], - listGpgKeysForAuthenticated: ["GET /user/gpg_keys"], + listGpgKeysForAuthenticated: ["GET /user/gpg_keys", {}, { + renamed: ["users", "listGpgKeysForAuthenticatedUser"] + }], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], - listPublicEmailsForAuthenticated: ["GET /user/public_emails"], + listPublicEmailsForAuthenticated: ["GET /user/public_emails", {}, { + renamed: ["users", "listPublicEmailsForAuthenticatedUser"] + }], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], listPublicKeysForUser: ["GET /users/{username}/keys"], - listPublicSshKeysForAuthenticated: ["GET /user/keys"], - setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility"], + listPublicSshKeysForAuthenticated: ["GET /user/keys", {}, { + renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] + }], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility", {}, { + renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] + }], + setPrimaryEmailVisibilityForAuthenticatedUser: ["PATCH /user/email/visibility"], unblock: ["DELETE /user/blocks/{username}"], unfollow: ["DELETE /user/following/{username}"], updateAuthenticated: ["PATCH /user"] } }; -const VERSION = "4.12.0"; +const VERSION = "5.16.2"; function endpointsToMethods(octokit, endpointsMap) { const newMethods = {}; @@ -1150,9 +1088,20 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } function restEndpointMethods(octokit) { - return endpointsToMethods(octokit, Endpoints); + const api = endpointsToMethods(octokit, Endpoints); + return { + rest: api + }; } restEndpointMethods.VERSION = VERSION; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, Endpoints); + return _objectSpread2(_objectSpread2({}, api), {}, { + rest: api + }); +} +legacyRestEndpointMethods.VERSION = VERSION; +exports.legacyRestEndpointMethods = legacyRestEndpointMethods; exports.restEndpointMethods = restEndpointMethods; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map index 2d6a71a..20eff5f 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/generated/endpoints.js","../dist-src/version.js","../dist-src/endpoints-to-methods.js","../dist-src/index.js"],"sourcesContent":["const Endpoints = {\n actions: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\",\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\",\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\",\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\",\n ],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\",\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\",\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\",\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\",\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\",\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\",\n ],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\",\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\",\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] },\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\",\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\",\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\",\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\",\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\",\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\",\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\",\n ],\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\",\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\",\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\",\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\",\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\",\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\",\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"],\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createContentAttachment: [\n \"POST /content_references/{content_reference_id}/attachments\",\n { mediaType: { previews: [\"corsair\"] } },\n ],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\",\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\",\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\",\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\",\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\",\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\",\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"],\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\",\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\",\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\",\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\",\n ],\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\",\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\",\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } },\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\",\n ],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"],\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\n \"GET /codes_of_conduct\",\n { mediaType: { previews: [\"scarlet-witch\"] } },\n ],\n getConductCode: [\n \"GET /codes_of_conduct/{key}\",\n { mediaType: { previews: [\"scarlet-witch\"] } },\n ],\n getForRepo: [\n \"GET /repos/{owner}/{repo}/community/code_of_conduct\",\n { mediaType: { previews: [\"scarlet-witch\"] } },\n ],\n },\n emojis: { get: [\"GET /emojis\"] },\n enterpriseAdmin: {\n disableSelectedOrganizationGithubActionsEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n enableSelectedOrganizationGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n getAllowedActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n getGithubActionsPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions\",\n ],\n listSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n setAllowedActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n setGithubActionsPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions\",\n ],\n setSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"],\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"],\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"],\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] },\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\",\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] },\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] },\n ],\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\",\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n { mediaType: { previews: [\"mockingbird\"] } },\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\",\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"],\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } },\n ],\n },\n meta: {\n get: [\"GET /meta\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"],\n },\n migrations: {\n cancelImport: [\"DELETE /repos/{owner}/{repo}/import\"],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n getCommitAuthors: [\"GET /repos/{owner}/{repo}/import/authors\"],\n getImportStatus: [\"GET /repos/{owner}/{repo}/import\"],\n getLargeFiles: [\"GET /repos/{owner}/{repo}/import/large_files\"],\n getStatusForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n getStatusForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n listForAuthenticatedUser: [\n \"GET /user/migrations\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n listForOrg: [\n \"GET /orgs/{org}/migrations\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n listReposForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n mapCommitAuthor: [\"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\"],\n setLfsPreference: [\"PATCH /repos/{owner}/{repo}/import/lfs\"],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\"PUT /repos/{owner}/{repo}/import\"],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n updateImport: [\"PATCH /repos/{owner}/{repo}/import\"],\n },\n orgs: {\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\",\n ],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n get: [\"GET /orgs/{org}\"],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\",\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\",\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\",\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\",\n ],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"],\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\",\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\",\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\",\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\",\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore\",\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore\",\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n },\n projects: {\n addCollaborator: [\n \"PUT /projects/{project_id}/collaborators/{username}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createCard: [\n \"POST /projects/columns/{column_id}/cards\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createColumn: [\n \"POST /projects/{project_id}/columns\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createForAuthenticatedUser: [\n \"POST /user/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createForOrg: [\n \"POST /orgs/{org}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createForRepo: [\n \"POST /repos/{owner}/{repo}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n delete: [\n \"DELETE /projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n deleteCard: [\n \"DELETE /projects/columns/cards/{card_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n deleteColumn: [\n \"DELETE /projects/columns/{column_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n get: [\n \"GET /projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n getCard: [\n \"GET /projects/columns/cards/{card_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n getColumn: [\n \"GET /projects/columns/{column_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listCards: [\n \"GET /projects/columns/{column_id}/cards\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listCollaborators: [\n \"GET /projects/{project_id}/collaborators\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listColumns: [\n \"GET /projects/{project_id}/columns\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listForOrg: [\n \"GET /orgs/{org}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listForRepo: [\n \"GET /repos/{owner}/{repo}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listForUser: [\n \"GET /users/{username}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n moveCard: [\n \"POST /projects/columns/cards/{card_id}/moves\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n moveColumn: [\n \"POST /projects/columns/{column_id}/moves\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n update: [\n \"PATCH /projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n updateCard: [\n \"PATCH /projects/columns/cards/{card_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n updateColumn: [\n \"PATCH /projects/columns/{column_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\",\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\",\n { mediaType: { previews: [\"lydian\"] } },\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteLegacy: [\n \"DELETE /reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n {\n deprecated: \"octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy\",\n },\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n },\n repos: {\n acceptInvitation: [\"PATCH /user/repository_invitations/{invitation_id}\"],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\",\n { mediaType: { previews: [\"dorian\"] } },\n ],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n { mediaType: { previews: [\"zzzax\"] } },\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createPagesSite: [\n \"POST /repos/{owner}/{repo}/pages\",\n { mediaType: { previews: [\"switcheroo\"] } },\n ],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\",\n { mediaType: { previews: [\"baptiste\"] } },\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\"DELETE /user/repository_invitations/{invitation_id}\"],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n { mediaType: { previews: [\"zzzax\"] } },\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\",\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n deletePagesSite: [\n \"DELETE /repos/{owner}/{repo}/pages\",\n { mediaType: { previews: [\"switcheroo\"] } },\n ],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\",\n { mediaType: { previews: [\"london\"] } },\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\",\n { mediaType: { previews: [\"dorian\"] } },\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] },\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\",\n { mediaType: { previews: [\"london\"] } },\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\",\n { mediaType: { previews: [\"dorian\"] } },\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n ],\n getAllTopics: [\n \"GET /repos/{owner}/{repo}/topics\",\n { mediaType: { previews: [\"mercy\"] } },\n ],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n ],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\",\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n { mediaType: { previews: [\"zzzax\"] } },\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\",\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\",\n { mediaType: { previews: [\"groot\"] } },\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n { mediaType: { previews: [\"groot\"] } },\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\",\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\n \"PUT /repos/{owner}/{repo}/topics\",\n { mediaType: { previews: [\"mercy\"] } },\n ],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] },\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" },\n ],\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\", { mediaType: { previews: [\"cloak\"] } }],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\", { mediaType: { previews: [\"mercy\"] } }],\n users: [\"GET /search/users\"],\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n ],\n listProjectsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"],\n },\n users: {\n addEmailForAuthenticated: [\"POST /user/emails\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\"POST /user/keys\"],\n deleteEmailForAuthenticated: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\"DELETE /user/keys/{key_id}\"],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\"GET /user/keys/{key_id}\"],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\"GET /user/keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\"PATCH /user/email/visibility\"],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"],\n },\n};\nexport default Endpoints;\n","export const VERSION = \"4.12.0\";\n","export function endpointsToMethods(octokit, endpointsMap) {\n const newMethods = {};\n for (const [scope, endpoints] of Object.entries(endpointsMap)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign({ method, url }, defaults);\n if (!newMethods[scope]) {\n newMethods[scope] = {};\n }\n const scopeMethods = newMethods[scope];\n if (decorations) {\n scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);\n continue;\n }\n scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);\n }\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n /* istanbul ignore next */\n function withDecorations(...args) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args);\n // There are currently no other decorations than `.mapToData`\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined,\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(decorations.renamedParameters)) {\n if (name in options) {\n octokit.log.warn(`\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`);\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n delete options[name];\n }\n }\n return requestWithDefaults(options);\n }\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n","import ENDPOINTS from \"./generated/endpoints\";\nimport { VERSION } from \"./version\";\nimport { endpointsToMethods } from \"./endpoints-to-methods\";\nexport function restEndpointMethods(octokit) {\n return endpointsToMethods(octokit, ENDPOINTS);\n}\nrestEndpointMethods.VERSION = VERSION;\n"],"names":["Endpoints","actions","addSelectedRepoToOrgSecret","cancelWorkflowRun","createOrUpdateOrgSecret","createOrUpdateRepoSecret","createRegistrationTokenForOrg","createRegistrationTokenForRepo","createRemoveTokenForOrg","createRemoveTokenForRepo","createWorkflowDispatch","deleteArtifact","deleteOrgSecret","deleteRepoSecret","deleteSelfHostedRunnerFromOrg","deleteSelfHostedRunnerFromRepo","deleteWorkflowRun","deleteWorkflowRunLogs","disableSelectedRepositoryGithubActionsOrganization","disableWorkflow","downloadArtifact","downloadJobLogsForWorkflowRun","downloadWorkflowRunLogs","enableSelectedRepositoryGithubActionsOrganization","enableWorkflow","getAllowedActionsOrganization","getAllowedActionsRepository","getArtifact","getGithubActionsPermissionsOrganization","getGithubActionsPermissionsRepository","getJobForWorkflowRun","getOrgPublicKey","getOrgSecret","getRepoPermissions","renamed","getRepoPublicKey","getRepoSecret","getSelfHostedRunnerForOrg","getSelfHostedRunnerForRepo","getWorkflow","getWorkflowRun","getWorkflowRunUsage","getWorkflowUsage","listArtifactsForRepo","listJobsForWorkflowRun","listOrgSecrets","listRepoSecrets","listRepoWorkflows","listRunnerApplicationsForOrg","listRunnerApplicationsForRepo","listSelectedReposForOrgSecret","listSelectedRepositoriesEnabledGithubActionsOrganization","listSelfHostedRunnersForOrg","listSelfHostedRunnersForRepo","listWorkflowRunArtifacts","listWorkflowRuns","listWorkflowRunsForRepo","reRunWorkflow","removeSelectedRepoFromOrgSecret","setAllowedActionsOrganization","setAllowedActionsRepository","setGithubActionsPermissionsOrganization","setGithubActionsPermissionsRepository","setSelectedReposForOrgSecret","setSelectedRepositoriesEnabledGithubActionsOrganization","activity","checkRepoIsStarredByAuthenticatedUser","deleteRepoSubscription","deleteThreadSubscription","getFeeds","getRepoSubscription","getThread","getThreadSubscriptionForAuthenticatedUser","listEventsForAuthenticatedUser","listNotificationsForAuthenticatedUser","listOrgEventsForAuthenticatedUser","listPublicEvents","listPublicEventsForRepoNetwork","listPublicEventsForUser","listPublicOrgEvents","listReceivedEventsForUser","listReceivedPublicEventsForUser","listRepoEvents","listRepoNotificationsForAuthenticatedUser","listReposStarredByAuthenticatedUser","listReposStarredByUser","listReposWatchedByUser","listStargazersForRepo","listWatchedReposForAuthenticatedUser","listWatchersForRepo","markNotificationsAsRead","markRepoNotificationsAsRead","markThreadAsRead","setRepoSubscription","setThreadSubscription","starRepoForAuthenticatedUser","unstarRepoForAuthenticatedUser","apps","addRepoToInstallation","checkToken","createContentAttachment","mediaType","previews","createFromManifest","createInstallationAccessToken","deleteAuthorization","deleteInstallation","deleteToken","getAuthenticated","getBySlug","getInstallation","getOrgInstallation","getRepoInstallation","getSubscriptionPlanForAccount","getSubscriptionPlanForAccountStubbed","getUserInstallation","getWebhookConfigForApp","listAccountsForPlan","listAccountsForPlanStubbed","listInstallationReposForAuthenticatedUser","listInstallations","listInstallationsForAuthenticatedUser","listPlans","listPlansStubbed","listReposAccessibleToInstallation","listSubscriptionsForAuthenticatedUser","listSubscriptionsForAuthenticatedUserStubbed","removeRepoFromInstallation","resetToken","revokeInstallationAccessToken","scopeToken","suspendInstallation","unsuspendInstallation","updateWebhookConfigForApp","billing","getGithubActionsBillingOrg","getGithubActionsBillingUser","getGithubPackagesBillingOrg","getGithubPackagesBillingUser","getSharedStorageBillingOrg","getSharedStorageBillingUser","checks","create","createSuite","get","getSuite","listAnnotations","listForRef","listForSuite","listSuitesForRef","rerequestSuite","setSuitesPreferences","update","codeScanning","deleteAnalysis","getAlert","renamedParameters","alert_id","getAnalysis","getSarif","listAlertsForRepo","listAlertsInstances","listRecentAnalyses","updateAlert","uploadSarif","codesOfConduct","getAllCodesOfConduct","getConductCode","getForRepo","emojis","enterpriseAdmin","disableSelectedOrganizationGithubActionsEnterprise","enableSelectedOrganizationGithubActionsEnterprise","getAllowedActionsEnterprise","getGithubActionsPermissionsEnterprise","listSelectedOrganizationsEnabledGithubActionsEnterprise","setAllowedActionsEnterprise","setGithubActionsPermissionsEnterprise","setSelectedOrganizationsEnabledGithubActionsEnterprise","gists","checkIsStarred","createComment","delete","deleteComment","fork","getComment","getRevision","list","listComments","listCommits","listForUser","listForks","listPublic","listStarred","star","unstar","updateComment","git","createBlob","createCommit","createRef","createTag","createTree","deleteRef","getBlob","getCommit","getRef","getTag","getTree","listMatchingRefs","updateRef","gitignore","getAllTemplates","getTemplate","interactions","getRestrictionsForAuthenticatedUser","getRestrictionsForOrg","getRestrictionsForRepo","getRestrictionsForYourPublicRepos","removeRestrictionsForAuthenticatedUser","removeRestrictionsForOrg","removeRestrictionsForRepo","removeRestrictionsForYourPublicRepos","setRestrictionsForAuthenticatedUser","setRestrictionsForOrg","setRestrictionsForRepo","setRestrictionsForYourPublicRepos","issues","addAssignees","addLabels","checkUserCanBeAssigned","createLabel","createMilestone","deleteLabel","deleteMilestone","getEvent","getLabel","getMilestone","listAssignees","listCommentsForRepo","listEvents","listEventsForRepo","listEventsForTimeline","listForAuthenticatedUser","listForOrg","listForRepo","listLabelsForMilestone","listLabelsForRepo","listLabelsOnIssue","listMilestones","lock","removeAllLabels","removeAssignees","removeLabel","setLabels","unlock","updateLabel","updateMilestone","licenses","getAllCommonlyUsed","markdown","render","renderRaw","headers","meta","getOctocat","getZen","root","migrations","cancelImport","deleteArchiveForAuthenticatedUser","deleteArchiveForOrg","downloadArchiveForOrg","getArchiveForAuthenticatedUser","getCommitAuthors","getImportStatus","getLargeFiles","getStatusForAuthenticatedUser","getStatusForOrg","listReposForOrg","listReposForUser","mapCommitAuthor","setLfsPreference","startForAuthenticatedUser","startForOrg","startImport","unlockRepoForAuthenticatedUser","unlockRepoForOrg","updateImport","orgs","blockUser","cancelInvitation","checkBlockedUser","checkMembershipForUser","checkPublicMembershipForUser","convertMemberToOutsideCollaborator","createInvitation","createWebhook","deleteWebhook","getMembershipForAuthenticatedUser","getMembershipForUser","getWebhook","getWebhookConfigForOrg","listAppInstallations","listBlockedUsers","listFailedInvitations","listInvitationTeams","listMembers","listMembershipsForAuthenticatedUser","listOutsideCollaborators","listPendingInvitations","listPublicMembers","listWebhooks","pingWebhook","removeMember","removeMembershipForUser","removeOutsideCollaborator","removePublicMembershipForAuthenticatedUser","setMembershipForUser","setPublicMembershipForAuthenticatedUser","unblockUser","updateMembershipForAuthenticatedUser","updateWebhook","updateWebhookConfigForOrg","packages","deletePackageForAuthenticatedUser","deletePackageForOrg","deletePackageVersionForAuthenticatedUser","deletePackageVersionForOrg","getAllPackageVersionsForAPackageOwnedByAnOrg","getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser","getAllPackageVersionsForPackageOwnedByUser","getPackageForAuthenticatedUser","getPackageForOrganization","getPackageForUser","getPackageVersionForAuthenticatedUser","getPackageVersionForOrganization","getPackageVersionForUser","restorePackageForAuthenticatedUser","restorePackageForOrg","restorePackageVersionForAuthenticatedUser","restorePackageVersionForOrg","projects","addCollaborator","createCard","createColumn","createForAuthenticatedUser","createForOrg","createForRepo","deleteCard","deleteColumn","getCard","getColumn","getPermissionForUser","listCards","listCollaborators","listColumns","moveCard","moveColumn","removeCollaborator","updateCard","updateColumn","pulls","checkIfMerged","createReplyForReviewComment","createReview","createReviewComment","deletePendingReview","deleteReviewComment","dismissReview","getReview","getReviewComment","listCommentsForReview","listFiles","listRequestedReviewers","listReviewComments","listReviewCommentsForRepo","listReviews","merge","removeRequestedReviewers","requestReviewers","submitReview","updateBranch","updateReview","updateReviewComment","rateLimit","reactions","createForCommitComment","createForIssue","createForIssueComment","createForPullRequestReviewComment","createForTeamDiscussionCommentInOrg","createForTeamDiscussionInOrg","deleteForCommitComment","deleteForIssue","deleteForIssueComment","deleteForPullRequestComment","deleteForTeamDiscussion","deleteForTeamDiscussionComment","deleteLegacy","deprecated","listForCommitComment","listForIssue","listForIssueComment","listForPullRequestReviewComment","listForTeamDiscussionCommentInOrg","listForTeamDiscussionInOrg","repos","acceptInvitation","addAppAccessRestrictions","mapToData","addStatusCheckContexts","addTeamAccessRestrictions","addUserAccessRestrictions","checkCollaborator","checkVulnerabilityAlerts","compareCommits","createCommitComment","createCommitSignatureProtection","createCommitStatus","createDeployKey","createDeployment","createDeploymentStatus","createDispatchEvent","createFork","createInOrg","createOrUpdateFileContents","createPagesSite","createRelease","createUsingTemplate","declineInvitation","deleteAccessRestrictions","deleteAdminBranchProtection","deleteBranchProtection","deleteCommitComment","deleteCommitSignatureProtection","deleteDeployKey","deleteDeployment","deleteFile","deleteInvitation","deletePagesSite","deletePullRequestReviewProtection","deleteRelease","deleteReleaseAsset","disableAutomatedSecurityFixes","disableVulnerabilityAlerts","downloadArchive","downloadTarballArchive","downloadZipballArchive","enableAutomatedSecurityFixes","enableVulnerabilityAlerts","getAccessRestrictions","getAdminBranchProtection","getAllStatusCheckContexts","getAllTopics","getAppsWithAccessToProtectedBranch","getBranch","getBranchProtection","getClones","getCodeFrequencyStats","getCollaboratorPermissionLevel","getCombinedStatusForRef","getCommitActivityStats","getCommitComment","getCommitSignatureProtection","getCommunityProfileMetrics","getContent","getContributorsStats","getDeployKey","getDeployment","getDeploymentStatus","getLatestPagesBuild","getLatestRelease","getPages","getPagesBuild","getParticipationStats","getPullRequestReviewProtection","getPunchCardStats","getReadme","getRelease","getReleaseAsset","getReleaseByTag","getStatusChecksProtection","getTeamsWithAccessToProtectedBranch","getTopPaths","getTopReferrers","getUsersWithAccessToProtectedBranch","getViews","getWebhookConfigForRepo","listBranches","listBranchesForHeadCommit","listCommentsForCommit","listCommitCommentsForRepo","listCommitStatusesForRef","listContributors","listDeployKeys","listDeploymentStatuses","listDeployments","listInvitations","listInvitationsForAuthenticatedUser","listLanguages","listPagesBuilds","listPullRequestsAssociatedWithCommit","listReleaseAssets","listReleases","listTags","listTeams","removeAppAccessRestrictions","removeStatusCheckContexts","removeStatusCheckProtection","removeTeamAccessRestrictions","removeUserAccessRestrictions","renameBranch","replaceAllTopics","requestPagesBuild","setAdminBranchProtection","setAppAccessRestrictions","setStatusCheckContexts","setTeamAccessRestrictions","setUserAccessRestrictions","testPushWebhook","transfer","updateBranchProtection","updateCommitComment","updateInformationAboutPagesSite","updateInvitation","updatePullRequestReviewProtection","updateRelease","updateReleaseAsset","updateStatusCheckPotection","updateStatusCheckProtection","updateWebhookConfigForRepo","uploadReleaseAsset","baseUrl","search","code","commits","issuesAndPullRequests","labels","topics","users","secretScanning","teams","addOrUpdateMembershipForUserInOrg","addOrUpdateProjectPermissionsInOrg","addOrUpdateRepoPermissionsInOrg","checkPermissionsForProjectInOrg","checkPermissionsForRepoInOrg","createDiscussionCommentInOrg","createDiscussionInOrg","deleteDiscussionCommentInOrg","deleteDiscussionInOrg","deleteInOrg","getByName","getDiscussionCommentInOrg","getDiscussionInOrg","getMembershipForUserInOrg","listChildInOrg","listDiscussionCommentsInOrg","listDiscussionsInOrg","listMembersInOrg","listPendingInvitationsInOrg","listProjectsInOrg","listReposInOrg","removeMembershipForUserInOrg","removeProjectInOrg","removeRepoInOrg","updateDiscussionCommentInOrg","updateDiscussionInOrg","updateInOrg","addEmailForAuthenticated","block","checkBlocked","checkFollowingForUser","checkPersonIsFollowedByAuthenticated","createGpgKeyForAuthenticated","createPublicSshKeyForAuthenticated","deleteEmailForAuthenticated","deleteGpgKeyForAuthenticated","deletePublicSshKeyForAuthenticated","follow","getByUsername","getContextForUser","getGpgKeyForAuthenticated","getPublicSshKeyForAuthenticated","listBlockedByAuthenticated","listEmailsForAuthenticated","listFollowedByAuthenticated","listFollowersForAuthenticatedUser","listFollowersForUser","listFollowingForUser","listGpgKeysForAuthenticated","listGpgKeysForUser","listPublicEmailsForAuthenticated","listPublicKeysForUser","listPublicSshKeysForAuthenticated","setPrimaryEmailVisibilityForAuthenticated","unblock","unfollow","updateAuthenticated","VERSION","endpointsToMethods","octokit","endpointsMap","newMethods","scope","endpoints","Object","entries","methodName","endpoint","route","defaults","decorations","method","url","split","endpointDefaults","assign","scopeMethods","decorate","request","requestWithDefaults","withDecorations","args","options","data","undefined","newScope","newMethodName","log","warn","name","alias","restEndpointMethods","ENDPOINTS"],"mappings":";;;;AAAA,MAAMA,SAAS,GAAG;AACdC,EAAAA,OAAO,EAAE;AACLC,IAAAA,0BAA0B,EAAE,CACxB,4EADwB,CADvB;AAILC,IAAAA,iBAAiB,EAAE,CACf,yDADe,CAJd;AAOLC,IAAAA,uBAAuB,EAAE,CAAC,+CAAD,CAPpB;AAQLC,IAAAA,wBAAwB,EAAE,CACtB,yDADsB,CARrB;AAWLC,IAAAA,6BAA6B,EAAE,CAC3B,qDAD2B,CAX1B;AAcLC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,CAd3B;AAiBLC,IAAAA,uBAAuB,EAAE,CAAC,+CAAD,CAjBpB;AAkBLC,IAAAA,wBAAwB,EAAE,CACtB,yDADsB,CAlBrB;AAqBLC,IAAAA,sBAAsB,EAAE,CACpB,uEADoB,CArBnB;AAwBLC,IAAAA,cAAc,EAAE,CACZ,8DADY,CAxBX;AA2BLC,IAAAA,eAAe,EAAE,CAAC,kDAAD,CA3BZ;AA4BLC,IAAAA,gBAAgB,EAAE,CACd,4DADc,CA5Bb;AA+BLC,IAAAA,6BAA6B,EAAE,CAC3B,gDAD2B,CA/B1B;AAkCLC,IAAAA,8BAA8B,EAAE,CAC5B,0DAD4B,CAlC3B;AAqCLC,IAAAA,iBAAiB,EAAE,CAAC,oDAAD,CArCd;AAsCLC,IAAAA,qBAAqB,EAAE,CACnB,yDADmB,CAtClB;AAyCLC,IAAAA,kDAAkD,EAAE,CAChD,qEADgD,CAzC/C;AA4CLC,IAAAA,eAAe,EAAE,CACb,mEADa,CA5CZ;AA+CLC,IAAAA,gBAAgB,EAAE,CACd,4EADc,CA/Cb;AAkDLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CAlD1B;AAqDLC,IAAAA,uBAAuB,EAAE,CACrB,sDADqB,CArDpB;AAwDLC,IAAAA,iDAAiD,EAAE,CAC/C,kEAD+C,CAxD9C;AA2DLC,IAAAA,cAAc,EAAE,CACZ,kEADY,CA3DX;AA8DLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CA9D1B;AAiELC,IAAAA,2BAA2B,EAAE,CACzB,gEADyB,CAjExB;AAoELC,IAAAA,WAAW,EAAE,CAAC,2DAAD,CApER;AAqELC,IAAAA,uCAAuC,EAAE,CACrC,qCADqC,CArEpC;AAwELC,IAAAA,qCAAqC,EAAE,CACnC,+CADmC,CAxElC;AA2ELC,IAAAA,oBAAoB,EAAE,CAAC,iDAAD,CA3EjB;AA4ELC,IAAAA,eAAe,EAAE,CAAC,4CAAD,CA5EZ;AA6ELC,IAAAA,YAAY,EAAE,CAAC,+CAAD,CA7ET;AA8ELC,IAAAA,kBAAkB,EAAE,CAChB,+CADgB,EAEhB,EAFgB,EAGhB;AAAEC,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,uCAAZ;AAAX,KAHgB,CA9Ef;AAmFLC,IAAAA,gBAAgB,EAAE,CAAC,sDAAD,CAnFb;AAoFLC,IAAAA,aAAa,EAAE,CAAC,yDAAD,CApFV;AAqFLC,IAAAA,yBAAyB,EAAE,CAAC,6CAAD,CArFtB;AAsFLC,IAAAA,0BAA0B,EAAE,CACxB,uDADwB,CAtFvB;AAyFLC,IAAAA,WAAW,EAAE,CAAC,2DAAD,CAzFR;AA0FLC,IAAAA,cAAc,EAAE,CAAC,iDAAD,CA1FX;AA2FLC,IAAAA,mBAAmB,EAAE,CACjB,wDADiB,CA3FhB;AA8FLC,IAAAA,gBAAgB,EAAE,CACd,kEADc,CA9Fb;AAiGLC,IAAAA,oBAAoB,EAAE,CAAC,6CAAD,CAjGjB;AAkGLC,IAAAA,sBAAsB,EAAE,CACpB,sDADoB,CAlGnB;AAqGLC,IAAAA,cAAc,EAAE,CAAC,iCAAD,CArGX;AAsGLC,IAAAA,eAAe,EAAE,CAAC,2CAAD,CAtGZ;AAuGLC,IAAAA,iBAAiB,EAAE,CAAC,6CAAD,CAvGd;AAwGLC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CAxGzB;AAyGLC,IAAAA,6BAA6B,EAAE,CAC3B,qDAD2B,CAzG1B;AA4GLC,IAAAA,6BAA6B,EAAE,CAC3B,4DAD2B,CA5G1B;AA+GLC,IAAAA,wDAAwD,EAAE,CACtD,kDADsD,CA/GrD;AAkHLC,IAAAA,2BAA2B,EAAE,CAAC,iCAAD,CAlHxB;AAmHLC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CAnHzB;AAoHLC,IAAAA,wBAAwB,EAAE,CACtB,2DADsB,CApHrB;AAuHLC,IAAAA,gBAAgB,EAAE,CACd,gEADc,CAvHb;AA0HLC,IAAAA,uBAAuB,EAAE,CAAC,wCAAD,CA1HpB;AA2HLC,IAAAA,aAAa,EAAE,CAAC,wDAAD,CA3HV;AA4HLC,IAAAA,+BAA+B,EAAE,CAC7B,+EAD6B,CA5H5B;AA+HLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CA/H1B;AAkILC,IAAAA,2BAA2B,EAAE,CACzB,gEADyB,CAlIxB;AAqILC,IAAAA,uCAAuC,EAAE,CACrC,qCADqC,CArIpC;AAwILC,IAAAA,qCAAqC,EAAE,CACnC,+CADmC,CAxIlC;AA2ILC,IAAAA,4BAA4B,EAAE,CAC1B,4DAD0B,CA3IzB;AA8ILC,IAAAA,uDAAuD,EAAE,CACrD,kDADqD;AA9IpD,GADK;AAmJdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,qCAAqC,EAAE,CAAC,kCAAD,CADjC;AAENC,IAAAA,sBAAsB,EAAE,CAAC,2CAAD,CAFlB;AAGNC,IAAAA,wBAAwB,EAAE,CACtB,wDADsB,CAHpB;AAMNC,IAAAA,QAAQ,EAAE,CAAC,YAAD,CANJ;AAONC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAPf;AAQNC,IAAAA,SAAS,EAAE,CAAC,wCAAD,CARL;AASNC,IAAAA,yCAAyC,EAAE,CACvC,qDADuC,CATrC;AAYNC,IAAAA,8BAA8B,EAAE,CAAC,8BAAD,CAZ1B;AAaNC,IAAAA,qCAAqC,EAAE,CAAC,oBAAD,CAbjC;AAcNC,IAAAA,iCAAiC,EAAE,CAC/B,yCAD+B,CAd7B;AAiBNC,IAAAA,gBAAgB,EAAE,CAAC,aAAD,CAjBZ;AAkBNC,IAAAA,8BAA8B,EAAE,CAAC,qCAAD,CAlB1B;AAmBNC,IAAAA,uBAAuB,EAAE,CAAC,qCAAD,CAnBnB;AAoBNC,IAAAA,mBAAmB,EAAE,CAAC,wBAAD,CApBf;AAqBNC,IAAAA,yBAAyB,EAAE,CAAC,uCAAD,CArBrB;AAsBNC,IAAAA,+BAA+B,EAAE,CAC7B,8CAD6B,CAtB3B;AAyBNC,IAAAA,cAAc,EAAE,CAAC,kCAAD,CAzBV;AA0BNC,IAAAA,yCAAyC,EAAE,CACvC,yCADuC,CA1BrC;AA6BNC,IAAAA,mCAAmC,EAAE,CAAC,mBAAD,CA7B/B;AA8BNC,IAAAA,sBAAsB,EAAE,CAAC,+BAAD,CA9BlB;AA+BNC,IAAAA,sBAAsB,EAAE,CAAC,qCAAD,CA/BlB;AAgCNC,IAAAA,qBAAqB,EAAE,CAAC,sCAAD,CAhCjB;AAiCNC,IAAAA,oCAAoC,EAAE,CAAC,yBAAD,CAjChC;AAkCNC,IAAAA,mBAAmB,EAAE,CAAC,uCAAD,CAlCf;AAmCNC,IAAAA,uBAAuB,EAAE,CAAC,oBAAD,CAnCnB;AAoCNC,IAAAA,2BAA2B,EAAE,CAAC,yCAAD,CApCvB;AAqCNC,IAAAA,gBAAgB,EAAE,CAAC,0CAAD,CArCZ;AAsCNC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAtCf;AAuCNC,IAAAA,qBAAqB,EAAE,CACnB,qDADmB,CAvCjB;AA0CNC,IAAAA,4BAA4B,EAAE,CAAC,kCAAD,CA1CxB;AA2CNC,IAAAA,8BAA8B,EAAE,CAAC,qCAAD;AA3C1B,GAnJI;AAgMdC,EAAAA,IAAI,EAAE;AACFC,IAAAA,qBAAqB,EAAE,CACnB,wEADmB,CADrB;AAIFC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CAJV;AAKFC,IAAAA,uBAAuB,EAAE,CACrB,6DADqB,EAErB;AAAEC,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFqB,CALvB;AASFC,IAAAA,kBAAkB,EAAE,CAAC,wCAAD,CATlB;AAUFC,IAAAA,6BAA6B,EAAE,CAC3B,yDAD2B,CAV7B;AAaFC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAbnB;AAcFC,IAAAA,kBAAkB,EAAE,CAAC,6CAAD,CAdlB;AAeFC,IAAAA,WAAW,EAAE,CAAC,wCAAD,CAfX;AAgBFC,IAAAA,gBAAgB,EAAE,CAAC,UAAD,CAhBhB;AAiBFC,IAAAA,SAAS,EAAE,CAAC,sBAAD,CAjBT;AAkBFC,IAAAA,eAAe,EAAE,CAAC,0CAAD,CAlBf;AAmBFC,IAAAA,kBAAkB,EAAE,CAAC,8BAAD,CAnBlB;AAoBFC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CApBnB;AAqBFC,IAAAA,6BAA6B,EAAE,CAC3B,gDAD2B,CArB7B;AAwBFC,IAAAA,oCAAoC,EAAE,CAClC,wDADkC,CAxBpC;AA2BFC,IAAAA,mBAAmB,EAAE,CAAC,oCAAD,CA3BnB;AA4BFC,IAAAA,sBAAsB,EAAE,CAAC,sBAAD,CA5BtB;AA6BFC,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CA7BnB;AA8BFC,IAAAA,0BAA0B,EAAE,CACxB,2DADwB,CA9B1B;AAiCFC,IAAAA,yCAAyC,EAAE,CACvC,wDADuC,CAjCzC;AAoCFC,IAAAA,iBAAiB,EAAE,CAAC,wBAAD,CApCjB;AAqCFC,IAAAA,qCAAqC,EAAE,CAAC,yBAAD,CArCrC;AAsCFC,IAAAA,SAAS,EAAE,CAAC,gCAAD,CAtCT;AAuCFC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAvChB;AAwCFC,IAAAA,iCAAiC,EAAE,CAAC,gCAAD,CAxCjC;AAyCFC,IAAAA,qCAAqC,EAAE,CAAC,iCAAD,CAzCrC;AA0CFC,IAAAA,4CAA4C,EAAE,CAC1C,yCAD0C,CA1C5C;AA6CFC,IAAAA,0BAA0B,EAAE,CACxB,2EADwB,CA7C1B;AAgDFC,IAAAA,UAAU,EAAE,CAAC,uCAAD,CAhDV;AAiDFC,IAAAA,6BAA6B,EAAE,CAAC,4BAAD,CAjD7B;AAkDFC,IAAAA,UAAU,EAAE,CAAC,6CAAD,CAlDV;AAmDFC,IAAAA,mBAAmB,EAAE,CAAC,oDAAD,CAnDnB;AAoDFC,IAAAA,qBAAqB,EAAE,CACnB,uDADmB,CApDrB;AAuDFC,IAAAA,yBAAyB,EAAE,CAAC,wBAAD;AAvDzB,GAhMQ;AAyPdC,EAAAA,OAAO,EAAE;AACLC,IAAAA,0BAA0B,EAAE,CAAC,0CAAD,CADvB;AAELC,IAAAA,2BAA2B,EAAE,CACzB,gDADyB,CAFxB;AAKLC,IAAAA,2BAA2B,EAAE,CAAC,2CAAD,CALxB;AAMLC,IAAAA,4BAA4B,EAAE,CAC1B,iDAD0B,CANzB;AASLC,IAAAA,0BAA0B,EAAE,CACxB,iDADwB,CATvB;AAYLC,IAAAA,2BAA2B,EAAE,CACzB,uDADyB;AAZxB,GAzPK;AAyQdC,EAAAA,MAAM,EAAE;AACJC,IAAAA,MAAM,EAAE,CAAC,uCAAD,CADJ;AAEJC,IAAAA,WAAW,EAAE,CAAC,yCAAD,CAFT;AAGJC,IAAAA,GAAG,EAAE,CAAC,qDAAD,CAHD;AAIJC,IAAAA,QAAQ,EAAE,CAAC,yDAAD,CAJN;AAKJC,IAAAA,eAAe,EAAE,CACb,iEADa,CALb;AAQJC,IAAAA,UAAU,EAAE,CAAC,oDAAD,CARR;AASJC,IAAAA,YAAY,EAAE,CACV,oEADU,CATV;AAYJC,IAAAA,gBAAgB,EAAE,CAAC,sDAAD,CAZd;AAaJC,IAAAA,cAAc,EAAE,CACZ,oEADY,CAbZ;AAgBJC,IAAAA,oBAAoB,EAAE,CAClB,sDADkB,CAhBlB;AAmBJC,IAAAA,MAAM,EAAE,CAAC,uDAAD;AAnBJ,GAzQM;AA8RdC,EAAAA,YAAY,EAAE;AACVC,IAAAA,cAAc,EAAE,CACZ,oFADY,CADN;AAIVC,IAAAA,QAAQ,EAAE,CACN,+DADM,EAEN,EAFM,EAGN;AAAEC,MAAAA,iBAAiB,EAAE;AAAEC,QAAAA,QAAQ,EAAE;AAAZ;AAArB,KAHM,CAJA;AASVC,IAAAA,WAAW,EAAE,CACT,gEADS,CATH;AAYVC,IAAAA,QAAQ,EAAE,CAAC,2DAAD,CAZA;AAaVC,IAAAA,iBAAiB,EAAE,CAAC,gDAAD,CAbT;AAcVC,IAAAA,mBAAmB,EAAE,CACjB,yEADiB,CAdX;AAiBVC,IAAAA,kBAAkB,EAAE,CAAC,kDAAD,CAjBV;AAkBVC,IAAAA,WAAW,EAAE,CACT,iEADS,CAlBH;AAqBVC,IAAAA,WAAW,EAAE,CAAC,iDAAD;AArBH,GA9RA;AAqTdC,EAAAA,cAAc,EAAE;AACZC,IAAAA,oBAAoB,EAAE,CAClB,uBADkB,EAElB;AAAEjE,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFkB,CADV;AAKZiE,IAAAA,cAAc,EAAE,CACZ,6BADY,EAEZ;AAAElE,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFY,CALJ;AASZkE,IAAAA,UAAU,EAAE,CACR,qDADQ,EAER;AAAEnE,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFQ;AATA,GArTF;AAmUdmE,EAAAA,MAAM,EAAE;AAAEzB,IAAAA,GAAG,EAAE,CAAC,aAAD;AAAP,GAnUM;AAoUd0B,EAAAA,eAAe,EAAE;AACbC,IAAAA,kDAAkD,EAAE,CAChD,6EADgD,CADvC;AAIbC,IAAAA,iDAAiD,EAAE,CAC/C,0EAD+C,CAJtC;AAObC,IAAAA,2BAA2B,EAAE,CACzB,oEADyB,CAPhB;AAUbC,IAAAA,qCAAqC,EAAE,CACnC,mDADmC,CAV1B;AAabC,IAAAA,uDAAuD,EAAE,CACrD,iEADqD,CAb5C;AAgBbC,IAAAA,2BAA2B,EAAE,CACzB,oEADyB,CAhBhB;AAmBbC,IAAAA,qCAAqC,EAAE,CACnC,mDADmC,CAnB1B;AAsBbC,IAAAA,sDAAsD,EAAE,CACpD,iEADoD;AAtB3C,GApUH;AA8VdC,EAAAA,KAAK,EAAE;AACHC,IAAAA,cAAc,EAAE,CAAC,2BAAD,CADb;AAEHtC,IAAAA,MAAM,EAAE,CAAC,aAAD,CAFL;AAGHuC,IAAAA,aAAa,EAAE,CAAC,gCAAD,CAHZ;AAIHC,IAAAA,MAAM,EAAE,CAAC,yBAAD,CAJL;AAKHC,IAAAA,aAAa,EAAE,CAAC,+CAAD,CALZ;AAMHC,IAAAA,IAAI,EAAE,CAAC,6BAAD,CANH;AAOHxC,IAAAA,GAAG,EAAE,CAAC,sBAAD,CAPF;AAQHyC,IAAAA,UAAU,EAAE,CAAC,4CAAD,CART;AASHC,IAAAA,WAAW,EAAE,CAAC,4BAAD,CATV;AAUHC,IAAAA,IAAI,EAAE,CAAC,YAAD,CAVH;AAWHC,IAAAA,YAAY,EAAE,CAAC,+BAAD,CAXX;AAYHC,IAAAA,WAAW,EAAE,CAAC,8BAAD,CAZV;AAaHC,IAAAA,WAAW,EAAE,CAAC,6BAAD,CAbV;AAcHC,IAAAA,SAAS,EAAE,CAAC,4BAAD,CAdR;AAeHC,IAAAA,UAAU,EAAE,CAAC,mBAAD,CAfT;AAgBHC,IAAAA,WAAW,EAAE,CAAC,oBAAD,CAhBV;AAiBHC,IAAAA,IAAI,EAAE,CAAC,2BAAD,CAjBH;AAkBHC,IAAAA,MAAM,EAAE,CAAC,8BAAD,CAlBL;AAmBH3C,IAAAA,MAAM,EAAE,CAAC,wBAAD,CAnBL;AAoBH4C,IAAAA,aAAa,EAAE,CAAC,8CAAD;AApBZ,GA9VO;AAoXdC,EAAAA,GAAG,EAAE;AACDC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CADX;AAEDC,IAAAA,YAAY,EAAE,CAAC,wCAAD,CAFb;AAGDC,IAAAA,SAAS,EAAE,CAAC,qCAAD,CAHV;AAIDC,IAAAA,SAAS,EAAE,CAAC,qCAAD,CAJV;AAKDC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CALX;AAMDC,IAAAA,SAAS,EAAE,CAAC,6CAAD,CANV;AAODC,IAAAA,OAAO,EAAE,CAAC,gDAAD,CAPR;AAQDC,IAAAA,SAAS,EAAE,CAAC,oDAAD,CARV;AASDC,IAAAA,MAAM,EAAE,CAAC,yCAAD,CATP;AAUDC,IAAAA,MAAM,EAAE,CAAC,8CAAD,CAVP;AAWDC,IAAAA,OAAO,EAAE,CAAC,gDAAD,CAXR;AAYDC,IAAAA,gBAAgB,EAAE,CAAC,mDAAD,CAZjB;AAaDC,IAAAA,SAAS,EAAE,CAAC,4CAAD;AAbV,GApXS;AAmYdC,EAAAA,SAAS,EAAE;AACPC,IAAAA,eAAe,EAAE,CAAC,0BAAD,CADV;AAEPC,IAAAA,WAAW,EAAE,CAAC,iCAAD;AAFN,GAnYG;AAuYdC,EAAAA,YAAY,EAAE;AACVC,IAAAA,mCAAmC,EAAE,CAAC,8BAAD,CAD3B;AAEVC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CAFb;AAGVC,IAAAA,sBAAsB,EAAE,CAAC,8CAAD,CAHd;AAIVC,IAAAA,iCAAiC,EAAE,CAC/B,8BAD+B,EAE/B,EAF+B,EAG/B;AAAExL,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,qCAAjB;AAAX,KAH+B,CAJzB;AASVyL,IAAAA,sCAAsC,EAAE,CAAC,iCAAD,CAT9B;AAUVC,IAAAA,wBAAwB,EAAE,CAAC,uCAAD,CAVhB;AAWVC,IAAAA,yBAAyB,EAAE,CACvB,iDADuB,CAXjB;AAcVC,IAAAA,oCAAoC,EAAE,CAClC,iCADkC,EAElC,EAFkC,EAGlC;AAAE5L,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,wCAAjB;AAAX,KAHkC,CAd5B;AAmBV6L,IAAAA,mCAAmC,EAAE,CAAC,8BAAD,CAnB3B;AAoBVC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CApBb;AAqBVC,IAAAA,sBAAsB,EAAE,CAAC,8CAAD,CArBd;AAsBVC,IAAAA,iCAAiC,EAAE,CAC/B,8BAD+B,EAE/B,EAF+B,EAG/B;AAAEhM,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,qCAAjB;AAAX,KAH+B;AAtBzB,GAvYA;AAmadiM,EAAAA,MAAM,EAAE;AACJC,IAAAA,YAAY,EAAE,CACV,4DADU,CADV;AAIJC,IAAAA,SAAS,EAAE,CAAC,yDAAD,CAJP;AAKJC,IAAAA,sBAAsB,EAAE,CAAC,gDAAD,CALpB;AAMJxF,IAAAA,MAAM,EAAE,CAAC,mCAAD,CANJ;AAOJuC,IAAAA,aAAa,EAAE,CACX,2DADW,CAPX;AAUJkD,IAAAA,WAAW,EAAE,CAAC,mCAAD,CAVT;AAWJC,IAAAA,eAAe,EAAE,CAAC,uCAAD,CAXb;AAYJjD,IAAAA,aAAa,EAAE,CACX,2DADW,CAZX;AAeJkD,IAAAA,WAAW,EAAE,CAAC,4CAAD,CAfT;AAgBJC,IAAAA,eAAe,EAAE,CACb,4DADa,CAhBb;AAmBJ1F,IAAAA,GAAG,EAAE,CAAC,iDAAD,CAnBD;AAoBJyC,IAAAA,UAAU,EAAE,CAAC,wDAAD,CApBR;AAqBJkD,IAAAA,QAAQ,EAAE,CAAC,oDAAD,CArBN;AAsBJC,IAAAA,QAAQ,EAAE,CAAC,yCAAD,CAtBN;AAuBJC,IAAAA,YAAY,EAAE,CAAC,yDAAD,CAvBV;AAwBJlD,IAAAA,IAAI,EAAE,CAAC,aAAD,CAxBF;AAyBJmD,IAAAA,aAAa,EAAE,CAAC,qCAAD,CAzBX;AA0BJlD,IAAAA,YAAY,EAAE,CAAC,0DAAD,CA1BV;AA2BJmD,IAAAA,mBAAmB,EAAE,CAAC,2CAAD,CA3BjB;AA4BJC,IAAAA,UAAU,EAAE,CAAC,wDAAD,CA5BR;AA6BJC,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CA7Bf;AA8BJC,IAAAA,qBAAqB,EAAE,CACnB,0DADmB,EAEnB;AAAE7I,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,aAAD;AAAZ;AAAb,KAFmB,CA9BnB;AAkCJ6I,IAAAA,wBAAwB,EAAE,CAAC,kBAAD,CAlCtB;AAmCJC,IAAAA,UAAU,EAAE,CAAC,wBAAD,CAnCR;AAoCJC,IAAAA,WAAW,EAAE,CAAC,kCAAD,CApCT;AAqCJC,IAAAA,sBAAsB,EAAE,CACpB,gEADoB,CArCpB;AAwCJC,IAAAA,iBAAiB,EAAE,CAAC,kCAAD,CAxCf;AAyCJC,IAAAA,iBAAiB,EAAE,CACf,wDADe,CAzCf;AA4CJC,IAAAA,cAAc,EAAE,CAAC,sCAAD,CA5CZ;AA6CJC,IAAAA,IAAI,EAAE,CAAC,sDAAD,CA7CF;AA8CJC,IAAAA,eAAe,EAAE,CACb,2DADa,CA9Cb;AAiDJC,IAAAA,eAAe,EAAE,CACb,8DADa,CAjDb;AAoDJC,IAAAA,WAAW,EAAE,CACT,kEADS,CApDT;AAuDJC,IAAAA,SAAS,EAAE,CAAC,wDAAD,CAvDP;AAwDJC,IAAAA,MAAM,EAAE,CAAC,yDAAD,CAxDJ;AAyDJvG,IAAAA,MAAM,EAAE,CAAC,mDAAD,CAzDJ;AA0DJ4C,IAAAA,aAAa,EAAE,CAAC,0DAAD,CA1DX;AA2DJ4D,IAAAA,WAAW,EAAE,CAAC,2CAAD,CA3DT;AA4DJC,IAAAA,eAAe,EAAE,CACb,2DADa;AA5Db,GAnaM;AAmedC,EAAAA,QAAQ,EAAE;AACNlH,IAAAA,GAAG,EAAE,CAAC,yBAAD,CADC;AAENmH,IAAAA,kBAAkB,EAAE,CAAC,eAAD,CAFd;AAGN3F,IAAAA,UAAU,EAAE,CAAC,mCAAD;AAHN,GAneI;AAwed4F,EAAAA,QAAQ,EAAE;AACNC,IAAAA,MAAM,EAAE,CAAC,gBAAD,CADF;AAENC,IAAAA,SAAS,EAAE,CACP,oBADO,EAEP;AAAEC,MAAAA,OAAO,EAAE;AAAE,wBAAgB;AAAlB;AAAX,KAFO;AAFL,GAxeI;AA+edC,EAAAA,IAAI,EAAE;AACFxH,IAAAA,GAAG,EAAE,CAAC,WAAD,CADH;AAEFyH,IAAAA,UAAU,EAAE,CAAC,cAAD,CAFV;AAGFC,IAAAA,MAAM,EAAE,CAAC,UAAD,CAHN;AAIFC,IAAAA,IAAI,EAAE,CAAC,OAAD;AAJJ,GA/eQ;AAqfdC,EAAAA,UAAU,EAAE;AACRC,IAAAA,YAAY,EAAE,CAAC,qCAAD,CADN;AAERC,IAAAA,iCAAiC,EAAE,CAC/B,gDAD+B,EAE/B;AAAEzK,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAF+B,CAF3B;AAMRyK,IAAAA,mBAAmB,EAAE,CACjB,sDADiB,EAEjB;AAAE1K,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAFiB,CANb;AAUR0K,IAAAA,qBAAqB,EAAE,CACnB,mDADmB,EAEnB;AAAE3K,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAFmB,CAVf;AAcR2K,IAAAA,8BAA8B,EAAE,CAC5B,6CAD4B,EAE5B;AAAE5K,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAF4B,CAdxB;AAkBR4K,IAAAA,gBAAgB,EAAE,CAAC,0CAAD,CAlBV;AAmBRC,IAAAA,eAAe,EAAE,CAAC,kCAAD,CAnBT;AAoBRC,IAAAA,aAAa,EAAE,CAAC,8CAAD,CApBP;AAqBRC,IAAAA,6BAA6B,EAAE,CAC3B,qCAD2B,EAE3B;AAAEhL,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAF2B,CArBvB;AAyBRgL,IAAAA,eAAe,EAAE,CACb,2CADa,EAEb;AAAEjL,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAFa,CAzBT;AA6BR6I,IAAAA,wBAAwB,EAAE,CACtB,sBADsB,EAEtB;AAAE9I,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAFsB,CA7BlB;AAiCR8I,IAAAA,UAAU,EAAE,CACR,4BADQ,EAER;AAAE/I,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAFQ,CAjCJ;AAqCRiL,IAAAA,eAAe,EAAE,CACb,wDADa,EAEb;AAAElL,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAFa,CArCT;AAyCRkL,IAAAA,gBAAgB,EAAE,CACd,kDADc,EAEd;AAAEnL,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAFc,CAzCV;AA6CRmL,IAAAA,eAAe,EAAE,CAAC,wDAAD,CA7CT;AA8CRC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CA9CV;AA+CRC,IAAAA,yBAAyB,EAAE,CAAC,uBAAD,CA/CnB;AAgDRC,IAAAA,WAAW,EAAE,CAAC,6BAAD,CAhDL;AAiDRC,IAAAA,WAAW,EAAE,CAAC,kCAAD,CAjDL;AAkDRC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,EAE5B;AAAEzL,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAF4B,CAlDxB;AAsDRyL,IAAAA,gBAAgB,EAAE,CACd,qEADc,EAEd;AAAE1L,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,WAAD;AAAZ;AAAb,KAFc,CAtDV;AA0DR0L,IAAAA,YAAY,EAAE,CAAC,oCAAD;AA1DN,GArfE;AAijBdC,EAAAA,IAAI,EAAE;AACFC,IAAAA,SAAS,EAAE,CAAC,mCAAD,CADT;AAEFC,IAAAA,gBAAgB,EAAE,CAAC,gDAAD,CAFhB;AAGFC,IAAAA,gBAAgB,EAAE,CAAC,mCAAD,CAHhB;AAIFC,IAAAA,sBAAsB,EAAE,CAAC,oCAAD,CAJtB;AAKFC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CAL5B;AAMFC,IAAAA,kCAAkC,EAAE,CAChC,kDADgC,CANlC;AASFC,IAAAA,gBAAgB,EAAE,CAAC,8BAAD,CAThB;AAUFC,IAAAA,aAAa,EAAE,CAAC,wBAAD,CAVb;AAWFC,IAAAA,aAAa,EAAE,CAAC,oCAAD,CAXb;AAYF1J,IAAAA,GAAG,EAAE,CAAC,iBAAD,CAZH;AAaF2J,IAAAA,iCAAiC,EAAE,CAAC,kCAAD,CAbjC;AAcFC,IAAAA,oBAAoB,EAAE,CAAC,wCAAD,CAdpB;AAeFC,IAAAA,UAAU,EAAE,CAAC,iCAAD,CAfV;AAgBFC,IAAAA,sBAAsB,EAAE,CAAC,wCAAD,CAhBtB;AAiBFnH,IAAAA,IAAI,EAAE,CAAC,oBAAD,CAjBJ;AAkBFoH,IAAAA,oBAAoB,EAAE,CAAC,+BAAD,CAlBpB;AAmBFC,IAAAA,gBAAgB,EAAE,CAAC,wBAAD,CAnBhB;AAoBFC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CApBrB;AAqBF9D,IAAAA,wBAAwB,EAAE,CAAC,gBAAD,CArBxB;AAsBFrD,IAAAA,WAAW,EAAE,CAAC,4BAAD,CAtBX;AAuBFoH,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CAvBnB;AAwBFC,IAAAA,WAAW,EAAE,CAAC,yBAAD,CAxBX;AAyBFC,IAAAA,mCAAmC,EAAE,CAAC,4BAAD,CAzBnC;AA0BFC,IAAAA,wBAAwB,EAAE,CAAC,uCAAD,CA1BxB;AA2BFC,IAAAA,sBAAsB,EAAE,CAAC,6BAAD,CA3BtB;AA4BFC,IAAAA,iBAAiB,EAAE,CAAC,gCAAD,CA5BjB;AA6BFC,IAAAA,YAAY,EAAE,CAAC,uBAAD,CA7BZ;AA8BFC,IAAAA,WAAW,EAAE,CAAC,wCAAD,CA9BX;AA+BFC,IAAAA,YAAY,EAAE,CAAC,uCAAD,CA/BZ;AAgCFC,IAAAA,uBAAuB,EAAE,CAAC,2CAAD,CAhCvB;AAiCFC,IAAAA,yBAAyB,EAAE,CACvB,qDADuB,CAjCzB;AAoCFC,IAAAA,0CAA0C,EAAE,CACxC,8CADwC,CApC1C;AAuCFC,IAAAA,oBAAoB,EAAE,CAAC,wCAAD,CAvCpB;AAwCFC,IAAAA,uCAAuC,EAAE,CACrC,2CADqC,CAxCvC;AA2CFC,IAAAA,WAAW,EAAE,CAAC,sCAAD,CA3CX;AA4CFxK,IAAAA,MAAM,EAAE,CAAC,mBAAD,CA5CN;AA6CFyK,IAAAA,oCAAoC,EAAE,CAClC,oCADkC,CA7CpC;AAgDFC,IAAAA,aAAa,EAAE,CAAC,mCAAD,CAhDb;AAiDFC,IAAAA,yBAAyB,EAAE,CAAC,0CAAD;AAjDzB,GAjjBQ;AAomBdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,iCAAiC,EAAE,CAC/B,qDAD+B,CAD7B;AAINC,IAAAA,mBAAmB,EAAE,CACjB,2DADiB,CAJf;AAONC,IAAAA,wCAAwC,EAAE,CACtC,mFADsC,CAPpC;AAUNC,IAAAA,0BAA0B,EAAE,CACxB,yFADwB,CAVtB;AAaNC,IAAAA,4CAA4C,EAAE,CAC1C,iEAD0C,CAbxC;AAgBNC,IAAAA,2DAA2D,EAAE,CACzD,2DADyD,CAhBvD;AAmBNC,IAAAA,0CAA0C,EAAE,CACxC,uEADwC,CAnBtC;AAsBNC,IAAAA,8BAA8B,EAAE,CAC5B,kDAD4B,CAtB1B;AAyBNC,IAAAA,yBAAyB,EAAE,CACvB,wDADuB,CAzBrB;AA4BNC,IAAAA,iBAAiB,EAAE,CACf,8DADe,CA5Bb;AA+BNC,IAAAA,qCAAqC,EAAE,CACnC,gFADmC,CA/BjC;AAkCNC,IAAAA,gCAAgC,EAAE,CAC9B,sFAD8B,CAlC5B;AAqCNC,IAAAA,wBAAwB,EAAE,CACtB,4FADsB,CArCpB;AAwCNC,IAAAA,kCAAkC,EAAE,CAChC,2DADgC,CAxC9B;AA2CNC,IAAAA,oBAAoB,EAAE,CAClB,iEADkB,CA3ChB;AA8CNC,IAAAA,yCAAyC,EAAE,CACvC,yFADuC,CA9CrC;AAiDNC,IAAAA,2BAA2B,EAAE,CACzB,+FADyB;AAjDvB,GApmBI;AAypBdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,eAAe,EAAE,CACb,qDADa,EAEb;AAAElP,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFa,CADX;AAKNkP,IAAAA,UAAU,EAAE,CACR,0CADQ,EAER;AAAEnP,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFQ,CALN;AASNmP,IAAAA,YAAY,EAAE,CACV,qCADU,EAEV;AAAEpP,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFU,CATR;AAaNoP,IAAAA,0BAA0B,EAAE,CACxB,qBADwB,EAExB;AAAErP,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFwB,CAbtB;AAiBNqP,IAAAA,YAAY,EAAE,CACV,2BADU,EAEV;AAAEtP,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFU,CAjBR;AAqBNsP,IAAAA,aAAa,EAAE,CACX,qCADW,EAEX;AAAEvP,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFW,CArBT;AAyBNgF,IAAAA,MAAM,EAAE,CACJ,+BADI,EAEJ;AAAEjF,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFI,CAzBF;AA6BNuP,IAAAA,UAAU,EAAE,CACR,0CADQ,EAER;AAAExP,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFQ,CA7BN;AAiCNwP,IAAAA,YAAY,EAAE,CACV,sCADU,EAEV;AAAEzP,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFU,CAjCR;AAqCN0C,IAAAA,GAAG,EAAE,CACD,4BADC,EAED;AAAE3C,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFC,CArCC;AAyCNyP,IAAAA,OAAO,EAAE,CACL,uCADK,EAEL;AAAE1P,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFK,CAzCH;AA6CN0P,IAAAA,SAAS,EAAE,CACP,mCADO,EAEP;AAAE3P,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFO,CA7CL;AAiDN2P,IAAAA,oBAAoB,EAAE,CAClB,gEADkB,EAElB;AAAE5P,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFkB,CAjDhB;AAqDN4P,IAAAA,SAAS,EAAE,CACP,yCADO,EAEP;AAAE7P,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFO,CArDL;AAyDN6P,IAAAA,iBAAiB,EAAE,CACf,0CADe,EAEf;AAAE9P,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFe,CAzDb;AA6DN8P,IAAAA,WAAW,EAAE,CACT,oCADS,EAET;AAAE/P,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFS,CA7DP;AAiEN8I,IAAAA,UAAU,EAAE,CACR,0BADQ,EAER;AAAE/I,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFQ,CAjEN;AAqEN+I,IAAAA,WAAW,EAAE,CACT,oCADS,EAET;AAAEhJ,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFS,CArEP;AAyENwF,IAAAA,WAAW,EAAE,CACT,gCADS,EAET;AAAEzF,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFS,CAzEP;AA6EN+P,IAAAA,QAAQ,EAAE,CACN,8CADM,EAEN;AAAEhQ,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFM,CA7EJ;AAiFNgQ,IAAAA,UAAU,EAAE,CACR,0CADQ,EAER;AAAEjQ,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFQ,CAjFN;AAqFNiQ,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,EAEhB;AAAElQ,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFgB,CArFd;AAyFNkD,IAAAA,MAAM,EAAE,CACJ,8BADI,EAEJ;AAAEnD,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFI,CAzFF;AA6FNkQ,IAAAA,UAAU,EAAE,CACR,yCADQ,EAER;AAAEnQ,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFQ,CA7FN;AAiGNmQ,IAAAA,YAAY,EAAE,CACV,qCADU,EAEV;AAAEpQ,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFU;AAjGR,GAzpBI;AA+vBdoQ,EAAAA,KAAK,EAAE;AACHC,IAAAA,aAAa,EAAE,CAAC,qDAAD,CADZ;AAEH7N,IAAAA,MAAM,EAAE,CAAC,kCAAD,CAFL;AAGH8N,IAAAA,2BAA2B,EAAE,CACzB,8EADyB,CAH1B;AAMHC,IAAAA,YAAY,EAAE,CAAC,wDAAD,CANX;AAOHC,IAAAA,mBAAmB,EAAE,CACjB,yDADiB,CAPlB;AAUHC,IAAAA,mBAAmB,EAAE,CACjB,sEADiB,CAVlB;AAaHC,IAAAA,mBAAmB,EAAE,CACjB,0DADiB,CAblB;AAgBHC,IAAAA,aAAa,EAAE,CACX,8EADW,CAhBZ;AAmBHjO,IAAAA,GAAG,EAAE,CAAC,+CAAD,CAnBF;AAoBHkO,IAAAA,SAAS,EAAE,CACP,mEADO,CApBR;AAuBHC,IAAAA,gBAAgB,EAAE,CAAC,uDAAD,CAvBf;AAwBHxL,IAAAA,IAAI,EAAE,CAAC,iCAAD,CAxBH;AAyBHyL,IAAAA,qBAAqB,EAAE,CACnB,4EADmB,CAzBpB;AA4BHvL,IAAAA,WAAW,EAAE,CAAC,uDAAD,CA5BV;AA6BHwL,IAAAA,SAAS,EAAE,CAAC,qDAAD,CA7BR;AA8BHC,IAAAA,sBAAsB,EAAE,CACpB,mEADoB,CA9BrB;AAiCHC,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,CAjCjB;AAoCHC,IAAAA,yBAAyB,EAAE,CAAC,0CAAD,CApCxB;AAqCHC,IAAAA,WAAW,EAAE,CAAC,uDAAD,CArCV;AAsCHC,IAAAA,KAAK,EAAE,CAAC,qDAAD,CAtCJ;AAuCHC,IAAAA,wBAAwB,EAAE,CACtB,sEADsB,CAvCvB;AA0CHC,IAAAA,gBAAgB,EAAE,CACd,oEADc,CA1Cf;AA6CHC,IAAAA,YAAY,EAAE,CACV,2EADU,CA7CX;AAgDHrO,IAAAA,MAAM,EAAE,CAAC,iDAAD,CAhDL;AAiDHsO,IAAAA,YAAY,EAAE,CACV,6DADU,EAEV;AAAEzR,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,QAAD;AAAZ;AAAb,KAFU,CAjDX;AAqDHyR,IAAAA,YAAY,EAAE,CACV,mEADU,CArDX;AAwDHC,IAAAA,mBAAmB,EAAE,CACjB,yDADiB;AAxDlB,GA/vBO;AA2zBdC,EAAAA,SAAS,EAAE;AAAEjP,IAAAA,GAAG,EAAE,CAAC,iBAAD;AAAP,GA3zBG;AA4zBdkP,EAAAA,SAAS,EAAE;AACPC,IAAAA,sBAAsB,EAAE,CACpB,4DADoB,EAEpB;AAAE9R,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFoB,CADjB;AAKP8R,IAAAA,cAAc,EAAE,CACZ,4DADY,EAEZ;AAAE/R,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFY,CALT;AASP+R,IAAAA,qBAAqB,EAAE,CACnB,mEADmB,EAEnB;AAAEhS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFmB,CAThB;AAaPgS,IAAAA,iCAAiC,EAAE,CAC/B,kEAD+B,EAE/B;AAAEjS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAF+B,CAb5B;AAiBPiS,IAAAA,mCAAmC,EAAE,CACjC,wGADiC,EAEjC;AAAElS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFiC,CAjB9B;AAqBPkS,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,EAE1B;AAAEnS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAF0B,CArBvB;AAyBPmS,IAAAA,sBAAsB,EAAE,CACpB,4EADoB,EAEpB;AAAEpS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFoB,CAzBjB;AA6BPoS,IAAAA,cAAc,EAAE,CACZ,4EADY,EAEZ;AAAErS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFY,CA7BT;AAiCPqS,IAAAA,qBAAqB,EAAE,CACnB,mFADmB,EAEnB;AAAEtS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFmB,CAjChB;AAqCPsS,IAAAA,2BAA2B,EAAE,CACzB,kFADyB,EAEzB;AAAEvS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFyB,CArCtB;AAyCPuS,IAAAA,uBAAuB,EAAE,CACrB,8FADqB,EAErB;AAAExS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFqB,CAzClB;AA6CPwS,IAAAA,8BAA8B,EAAE,CAC5B,wHAD4B,EAE5B;AAAEzS,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAF4B,CA7CzB;AAiDPyS,IAAAA,YAAY,EAAE,CACV,iCADU,EAEV;AAAE1S,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFU,EAGV;AACI0S,MAAAA,UAAU,EAAE;AADhB,KAHU,CAjDP;AAwDPC,IAAAA,oBAAoB,EAAE,CAClB,2DADkB,EAElB;AAAE5S,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFkB,CAxDf;AA4DP4S,IAAAA,YAAY,EAAE,CACV,2DADU,EAEV;AAAE7S,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFU,CA5DP;AAgEP6S,IAAAA,mBAAmB,EAAE,CACjB,kEADiB,EAEjB;AAAE9S,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFiB,CAhEd;AAoEP8S,IAAAA,+BAA+B,EAAE,CAC7B,iEAD6B,EAE7B;AAAE/S,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAF6B,CApE1B;AAwEP+S,IAAAA,iCAAiC,EAAE,CAC/B,uGAD+B,EAE/B;AAAEhT,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAF+B,CAxE5B;AA4EPgT,IAAAA,0BAA0B,EAAE,CACxB,6EADwB,EAExB;AAAEjT,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,eAAD;AAAZ;AAAb,KAFwB;AA5ErB,GA5zBG;AA64BdiT,EAAAA,KAAK,EAAE;AACHC,IAAAA,gBAAgB,EAAE,CAAC,oDAAD,CADf;AAEHC,IAAAA,wBAAwB,EAAE,CACtB,2EADsB,EAEtB,EAFsB,EAGtB;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAHsB,CAFvB;AAOHnE,IAAAA,eAAe,EAAE,CAAC,oDAAD,CAPd;AAQHoE,IAAAA,sBAAsB,EAAE,CACpB,yFADoB,EAEpB,EAFoB,EAGpB;AAAED,MAAAA,SAAS,EAAE;AAAb,KAHoB,CARrB;AAaHE,IAAAA,yBAAyB,EAAE,CACvB,4EADuB,EAEvB,EAFuB,EAGvB;AAAEF,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAbxB;AAkBHG,IAAAA,yBAAyB,EAAE,CACvB,4EADuB,EAEvB,EAFuB,EAGvB;AAAEH,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAlBxB;AAuBHI,IAAAA,iBAAiB,EAAE,CAAC,oDAAD,CAvBhB;AAwBHC,IAAAA,wBAAwB,EAAE,CACtB,gDADsB,EAEtB;AAAE1T,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,QAAD;AAAZ;AAAb,KAFsB,CAxBvB;AA4BH0T,IAAAA,cAAc,EAAE,CAAC,mDAAD,CA5Bb;AA6BHC,IAAAA,mBAAmB,EAAE,CACjB,0DADiB,CA7BlB;AAgCHC,IAAAA,+BAA+B,EAAE,CAC7B,6EAD6B,EAE7B;AAAE7T,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAF6B,CAhC9B;AAoCH6T,IAAAA,kBAAkB,EAAE,CAAC,2CAAD,CApCjB;AAqCHC,IAAAA,eAAe,EAAE,CAAC,iCAAD,CArCd;AAsCHC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAtCf;AAuCHC,IAAAA,sBAAsB,EAAE,CACpB,iEADoB,CAvCrB;AA0CHC,IAAAA,mBAAmB,EAAE,CAAC,uCAAD,CA1ClB;AA2CH7E,IAAAA,0BAA0B,EAAE,CAAC,kBAAD,CA3CzB;AA4CH8E,IAAAA,UAAU,EAAE,CAAC,kCAAD,CA5CT;AA6CHC,IAAAA,WAAW,EAAE,CAAC,wBAAD,CA7CV;AA8CHC,IAAAA,0BAA0B,EAAE,CAAC,2CAAD,CA9CzB;AA+CHC,IAAAA,eAAe,EAAE,CACb,kCADa,EAEb;AAAEtU,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,YAAD;AAAZ;AAAb,KAFa,CA/Cd;AAmDHsU,IAAAA,aAAa,EAAE,CAAC,qCAAD,CAnDZ;AAoDHC,IAAAA,mBAAmB,EAAE,CACjB,uDADiB,EAEjB;AAAExU,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,UAAD;AAAZ;AAAb,KAFiB,CApDlB;AAwDHmM,IAAAA,aAAa,EAAE,CAAC,kCAAD,CAxDZ;AAyDHqI,IAAAA,iBAAiB,EAAE,CAAC,qDAAD,CAzDhB;AA0DHxP,IAAAA,MAAM,EAAE,CAAC,8BAAD,CA1DL;AA2DHyP,IAAAA,wBAAwB,EAAE,CACtB,wEADsB,CA3DvB;AA8DHC,IAAAA,2BAA2B,EAAE,CACzB,0EADyB,CA9D1B;AAiEHC,IAAAA,sBAAsB,EAAE,CACpB,2DADoB,CAjErB;AAoEHC,IAAAA,mBAAmB,EAAE,CAAC,oDAAD,CApElB;AAqEHC,IAAAA,+BAA+B,EAAE,CAC7B,+EAD6B,EAE7B;AAAE9U,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAF6B,CArE9B;AAyEH8U,IAAAA,eAAe,EAAE,CAAC,4CAAD,CAzEd;AA0EHC,IAAAA,gBAAgB,EAAE,CACd,0DADc,CA1Ef;AA6EHC,IAAAA,UAAU,EAAE,CAAC,8CAAD,CA7ET;AA8EHC,IAAAA,gBAAgB,EAAE,CACd,0DADc,CA9Ef;AAiFHC,IAAAA,eAAe,EAAE,CACb,oCADa,EAEb;AAAEnV,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,YAAD;AAAZ;AAAb,KAFa,CAjFd;AAqFHmV,IAAAA,iCAAiC,EAAE,CAC/B,yFAD+B,CArFhC;AAwFHC,IAAAA,aAAa,EAAE,CAAC,oDAAD,CAxFZ;AAyFHC,IAAAA,kBAAkB,EAAE,CAChB,yDADgB,CAzFjB;AA4FHjJ,IAAAA,aAAa,EAAE,CAAC,8CAAD,CA5FZ;AA6FHkJ,IAAAA,6BAA6B,EAAE,CAC3B,uDAD2B,EAE3B;AAAEvV,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,QAAD;AAAZ;AAAb,KAF2B,CA7F5B;AAiGHuV,IAAAA,0BAA0B,EAAE,CACxB,mDADwB,EAExB;AAAExV,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,QAAD;AAAZ;AAAb,KAFwB,CAjGzB;AAqGHwV,IAAAA,eAAe,EAAE,CACb,yCADa,EAEb,EAFa,EAGb;AAAE5Z,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,wBAAV;AAAX,KAHa,CArGd;AA0GH6Z,IAAAA,sBAAsB,EAAE,CAAC,yCAAD,CA1GrB;AA2GHC,IAAAA,sBAAsB,EAAE,CAAC,yCAAD,CA3GrB;AA4GHC,IAAAA,4BAA4B,EAAE,CAC1B,oDAD0B,EAE1B;AAAE5V,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,QAAD;AAAZ;AAAb,KAF0B,CA5G3B;AAgHH4V,IAAAA,yBAAyB,EAAE,CACvB,gDADuB,EAEvB;AAAE7V,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,QAAD;AAAZ;AAAb,KAFuB,CAhHxB;AAoHH0C,IAAAA,GAAG,EAAE,CAAC,2BAAD,CApHF;AAqHHmT,IAAAA,qBAAqB,EAAE,CACnB,qEADmB,CArHpB;AAwHHC,IAAAA,wBAAwB,EAAE,CACtB,uEADsB,CAxHvB;AA2HHC,IAAAA,yBAAyB,EAAE,CACvB,wFADuB,CA3HxB;AA8HHC,IAAAA,YAAY,EAAE,CACV,kCADU,EAEV;AAAEjW,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAFU,CA9HX;AAkIHiW,IAAAA,kCAAkC,EAAE,CAChC,0EADgC,CAlIjC;AAqIHC,IAAAA,SAAS,EAAE,CAAC,6CAAD,CArIR;AAsIHC,IAAAA,mBAAmB,EAAE,CACjB,wDADiB,CAtIlB;AAyIHC,IAAAA,SAAS,EAAE,CAAC,0CAAD,CAzIR;AA0IHC,IAAAA,qBAAqB,EAAE,CAAC,gDAAD,CA1IpB;AA2IHC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,CA3I7B;AA8IHC,IAAAA,uBAAuB,EAAE,CAAC,gDAAD,CA9ItB;AA+IHhQ,IAAAA,SAAS,EAAE,CAAC,yCAAD,CA/IR;AAgJHiQ,IAAAA,sBAAsB,EAAE,CAAC,iDAAD,CAhJrB;AAiJHC,IAAAA,gBAAgB,EAAE,CAAC,iDAAD,CAjJf;AAkJHC,IAAAA,4BAA4B,EAAE,CAC1B,4EAD0B,EAE1B;AAAE3W,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAF0B,CAlJ3B;AAsJH2W,IAAAA,0BAA0B,EAAE,CAAC,6CAAD,CAtJzB;AAuJHC,IAAAA,UAAU,EAAE,CAAC,2CAAD,CAvJT;AAwJHC,IAAAA,oBAAoB,EAAE,CAAC,8CAAD,CAxJnB;AAyJHC,IAAAA,YAAY,EAAE,CAAC,yCAAD,CAzJX;AA0JHC,IAAAA,aAAa,EAAE,CAAC,uDAAD,CA1JZ;AA2JHC,IAAAA,mBAAmB,EAAE,CACjB,4EADiB,CA3JlB;AA8JHC,IAAAA,mBAAmB,EAAE,CAAC,+CAAD,CA9JlB;AA+JHC,IAAAA,gBAAgB,EAAE,CAAC,2CAAD,CA/Jf;AAgKHC,IAAAA,QAAQ,EAAE,CAAC,iCAAD,CAhKP;AAiKHC,IAAAA,aAAa,EAAE,CAAC,mDAAD,CAjKZ;AAkKHC,IAAAA,qBAAqB,EAAE,CAAC,+CAAD,CAlKpB;AAmKHC,IAAAA,8BAA8B,EAAE,CAC5B,sFAD4B,CAnK7B;AAsKHC,IAAAA,iBAAiB,EAAE,CAAC,4CAAD,CAtKhB;AAuKHC,IAAAA,SAAS,EAAE,CAAC,kCAAD,CAvKR;AAwKHC,IAAAA,UAAU,EAAE,CAAC,iDAAD,CAxKT;AAyKHC,IAAAA,eAAe,EAAE,CAAC,sDAAD,CAzKd;AA0KHC,IAAAA,eAAe,EAAE,CAAC,+CAAD,CA1Kd;AA2KHC,IAAAA,yBAAyB,EAAE,CACvB,+EADuB,CA3KxB;AA8KHC,IAAAA,mCAAmC,EAAE,CACjC,2EADiC,CA9KlC;AAiLHC,IAAAA,WAAW,EAAE,CAAC,iDAAD,CAjLV;AAkLHC,IAAAA,eAAe,EAAE,CAAC,qDAAD,CAlLd;AAmLHC,IAAAA,mCAAmC,EAAE,CACjC,2EADiC,CAnLlC;AAsLHC,IAAAA,QAAQ,EAAE,CAAC,yCAAD,CAtLP;AAuLH1L,IAAAA,UAAU,EAAE,CAAC,2CAAD,CAvLT;AAwLH2L,IAAAA,uBAAuB,EAAE,CACrB,kDADqB,CAxLtB;AA2LHC,IAAAA,YAAY,EAAE,CAAC,oCAAD,CA3LX;AA4LHC,IAAAA,yBAAyB,EAAE,CACvB,oEADuB,EAEvB;AAAErY,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAFuB,CA5LxB;AAgMH6P,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CAhMhB;AAiMHwI,IAAAA,qBAAqB,EAAE,CACnB,yDADmB,CAjMpB;AAoMHC,IAAAA,yBAAyB,EAAE,CAAC,oCAAD,CApMxB;AAqMHC,IAAAA,wBAAwB,EAAE,CACtB,kDADsB,CArMvB;AAwMHhT,IAAAA,WAAW,EAAE,CAAC,mCAAD,CAxMV;AAyMHiT,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAzMf;AA0MHC,IAAAA,cAAc,EAAE,CAAC,gCAAD,CA1Mb;AA2MHC,IAAAA,sBAAsB,EAAE,CACpB,gEADoB,CA3MrB;AA8MHC,IAAAA,eAAe,EAAE,CAAC,uCAAD,CA9Md;AA+MH9P,IAAAA,wBAAwB,EAAE,CAAC,iBAAD,CA/MvB;AAgNHC,IAAAA,UAAU,EAAE,CAAC,uBAAD,CAhNT;AAiNHtD,IAAAA,WAAW,EAAE,CAAC,6BAAD,CAjNV;AAkNHC,IAAAA,SAAS,EAAE,CAAC,iCAAD,CAlNR;AAmNHmT,IAAAA,eAAe,EAAE,CAAC,uCAAD,CAnNd;AAoNHC,IAAAA,mCAAmC,EAAE,CAAC,kCAAD,CApNlC;AAqNHC,IAAAA,aAAa,EAAE,CAAC,qCAAD,CArNZ;AAsNHC,IAAAA,eAAe,EAAE,CAAC,wCAAD,CAtNd;AAuNHrT,IAAAA,UAAU,EAAE,CAAC,mBAAD,CAvNT;AAwNHsT,IAAAA,oCAAoC,EAAE,CAClC,sDADkC,EAElC;AAAEjZ,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAFkC,CAxNnC;AA4NHiZ,IAAAA,iBAAiB,EAAE,CACf,wDADe,CA5NhB;AA+NHC,IAAAA,YAAY,EAAE,CAAC,oCAAD,CA/NX;AAgOHC,IAAAA,QAAQ,EAAE,CAAC,gCAAD,CAhOP;AAiOHC,IAAAA,SAAS,EAAE,CAAC,iCAAD,CAjOR;AAkOHlM,IAAAA,YAAY,EAAE,CAAC,iCAAD,CAlOX;AAmOHkE,IAAAA,KAAK,EAAE,CAAC,mCAAD,CAnOJ;AAoOHjE,IAAAA,WAAW,EAAE,CAAC,kDAAD,CApOV;AAqOHkM,IAAAA,2BAA2B,EAAE,CACzB,6EADyB,EAEzB,EAFyB,EAGzB;AAAEjG,MAAAA,SAAS,EAAE;AAAb,KAHyB,CArO1B;AA0OHnD,IAAAA,kBAAkB,EAAE,CAChB,uDADgB,CA1OjB;AA6OHqJ,IAAAA,yBAAyB,EAAE,CACvB,2FADuB,EAEvB,EAFuB,EAGvB;AAAElG,MAAAA,SAAS,EAAE;AAAb,KAHuB,CA7OxB;AAkPHmG,IAAAA,2BAA2B,EAAE,CACzB,kFADyB,CAlP1B;AAqPHC,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,EAE1B,EAF0B,EAG1B;AAAEpG,MAAAA,SAAS,EAAE;AAAb,KAH0B,CArP3B;AA0PHqG,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,EAE1B,EAF0B,EAG1B;AAAErG,MAAAA,SAAS,EAAE;AAAb,KAH0B,CA1P3B;AA+PHsG,IAAAA,YAAY,EAAE,CAAC,qDAAD,CA/PX;AAgQHC,IAAAA,gBAAgB,EAAE,CACd,kCADc,EAEd;AAAE5Z,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAFc,CAhQf;AAoQH4Z,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CApQhB;AAqQHC,IAAAA,wBAAwB,EAAE,CACtB,wEADsB,CArQvB;AAwQHC,IAAAA,wBAAwB,EAAE,CACtB,0EADsB,EAEtB,EAFsB,EAGtB;AAAE1G,MAAAA,SAAS,EAAE;AAAb,KAHsB,CAxQvB;AA6QH2G,IAAAA,sBAAsB,EAAE,CACpB,wFADoB,EAEpB,EAFoB,EAGpB;AAAE3G,MAAAA,SAAS,EAAE;AAAb,KAHoB,CA7QrB;AAkRH4G,IAAAA,yBAAyB,EAAE,CACvB,2EADuB,EAEvB,EAFuB,EAGvB;AAAE5G,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAlRxB;AAuRH6G,IAAAA,yBAAyB,EAAE,CACvB,2EADuB,EAEvB,EAFuB,EAGvB;AAAE7G,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAvRxB;AA4RH8G,IAAAA,eAAe,EAAE,CAAC,kDAAD,CA5Rd;AA6RHC,IAAAA,QAAQ,EAAE,CAAC,qCAAD,CA7RP;AA8RHjX,IAAAA,MAAM,EAAE,CAAC,6BAAD,CA9RL;AA+RHkX,IAAAA,sBAAsB,EAAE,CACpB,wDADoB,CA/RrB;AAkSHC,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CAlSlB;AAmSHC,IAAAA,+BAA+B,EAAE,CAAC,iCAAD,CAnS9B;AAoSHC,IAAAA,gBAAgB,EAAE,CACd,yDADc,CApSf;AAuSHC,IAAAA,iCAAiC,EAAE,CAC/B,wFAD+B,CAvShC;AA0SHC,IAAAA,aAAa,EAAE,CAAC,mDAAD,CA1SZ;AA2SHC,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,CA3SjB;AA8SHC,IAAAA,0BAA0B,EAAE,CACxB,iFADwB,EAExB,EAFwB,EAGxB;AAAE/e,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,6BAAV;AAAX,KAHwB,CA9SzB;AAmTHgf,IAAAA,2BAA2B,EAAE,CACzB,iFADyB,CAnT1B;AAsTHhN,IAAAA,aAAa,EAAE,CAAC,6CAAD,CAtTZ;AAuTHiN,IAAAA,0BAA0B,EAAE,CACxB,oDADwB,CAvTzB;AA0THC,IAAAA,kBAAkB,EAAE,CAChB,sEADgB,EAEhB;AAAEC,MAAAA,OAAO,EAAE;AAAX,KAFgB;AA1TjB,GA74BO;AA4sCdC,EAAAA,MAAM,EAAE;AACJC,IAAAA,IAAI,EAAE,CAAC,kBAAD,CADF;AAEJC,IAAAA,OAAO,EAAE,CAAC,qBAAD,EAAwB;AAAEnb,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAAxB,CAFL;AAGJmb,IAAAA,qBAAqB,EAAE,CAAC,oBAAD,CAHnB;AAIJC,IAAAA,MAAM,EAAE,CAAC,oBAAD,CAJJ;AAKJnI,IAAAA,KAAK,EAAE,CAAC,0BAAD,CALH;AAMJoI,IAAAA,MAAM,EAAE,CAAC,oBAAD,EAAuB;AAAEtb,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,OAAD;AAAZ;AAAb,KAAvB,CANJ;AAOJsb,IAAAA,KAAK,EAAE,CAAC,mBAAD;AAPH,GA5sCM;AAqtCdC,EAAAA,cAAc,EAAE;AACZlY,IAAAA,QAAQ,EAAE,CACN,iEADM,CADE;AAIZK,IAAAA,iBAAiB,EAAE,CAAC,kDAAD,CAJP;AAKZG,IAAAA,WAAW,EAAE,CACT,mEADS;AALD,GArtCF;AA8tCd2X,EAAAA,KAAK,EAAE;AACHC,IAAAA,iCAAiC,EAAE,CAC/B,0DAD+B,CADhC;AAIHC,IAAAA,kCAAkC,EAAE,CAChC,yDADgC,EAEhC;AAAE3b,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFgC,CAJjC;AAQH2b,IAAAA,+BAA+B,EAAE,CAC7B,wDAD6B,CAR9B;AAWHC,IAAAA,+BAA+B,EAAE,CAC7B,yDAD6B,EAE7B;AAAE7b,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAF6B,CAX9B;AAeH6b,IAAAA,4BAA4B,EAAE,CAC1B,wDAD0B,CAf3B;AAkBHrZ,IAAAA,MAAM,EAAE,CAAC,wBAAD,CAlBL;AAmBHsZ,IAAAA,4BAA4B,EAAE,CAC1B,6EAD0B,CAnB3B;AAsBHC,IAAAA,qBAAqB,EAAE,CAAC,gDAAD,CAtBpB;AAuBHC,IAAAA,4BAA4B,EAAE,CAC1B,gGAD0B,CAvB3B;AA0BHC,IAAAA,qBAAqB,EAAE,CACnB,sEADmB,CA1BpB;AA6BHC,IAAAA,WAAW,EAAE,CAAC,sCAAD,CA7BV;AA8BHC,IAAAA,SAAS,EAAE,CAAC,mCAAD,CA9BR;AA+BHC,IAAAA,yBAAyB,EAAE,CACvB,6FADuB,CA/BxB;AAkCHC,IAAAA,kBAAkB,EAAE,CAChB,mEADgB,CAlCjB;AAqCHC,IAAAA,yBAAyB,EAAE,CACvB,0DADuB,CArCxB;AAwCHjX,IAAAA,IAAI,EAAE,CAAC,uBAAD,CAxCH;AAyCHkX,IAAAA,cAAc,EAAE,CAAC,yCAAD,CAzCb;AA0CHC,IAAAA,2BAA2B,EAAE,CACzB,4EADyB,CA1C1B;AA6CHC,IAAAA,oBAAoB,EAAE,CAAC,+CAAD,CA7CnB;AA8CH5T,IAAAA,wBAAwB,EAAE,CAAC,iBAAD,CA9CvB;AA+CH6T,IAAAA,gBAAgB,EAAE,CAAC,2CAAD,CA/Cf;AAgDHC,IAAAA,2BAA2B,EAAE,CACzB,+CADyB,CAhD1B;AAmDHC,IAAAA,iBAAiB,EAAE,CACf,4CADe,EAEf;AAAE7c,MAAAA,SAAS,EAAE;AAAEC,QAAAA,QAAQ,EAAE,CAAC,SAAD;AAAZ;AAAb,KAFe,CAnDhB;AAuDH6c,IAAAA,cAAc,EAAE,CAAC,yCAAD,CAvDb;AAwDHC,IAAAA,4BAA4B,EAAE,CAC1B,6DAD0B,CAxD3B;AA2DHC,IAAAA,kBAAkB,EAAE,CAChB,4DADgB,CA3DjB;AA8DHC,IAAAA,eAAe,EAAE,CACb,2DADa,CA9Dd;AAiEHC,IAAAA,4BAA4B,EAAE,CAC1B,+FAD0B,CAjE3B;AAoEHC,IAAAA,qBAAqB,EAAE,CACnB,qEADmB,CApEpB;AAuEHC,IAAAA,WAAW,EAAE,CAAC,qCAAD;AAvEV,GA9tCO;AAuyCd7B,EAAAA,KAAK,EAAE;AACH8B,IAAAA,wBAAwB,EAAE,CAAC,mBAAD,CADvB;AAEHC,IAAAA,KAAK,EAAE,CAAC,6BAAD,CAFJ;AAGHC,IAAAA,YAAY,EAAE,CAAC,6BAAD,CAHX;AAIHC,IAAAA,qBAAqB,EAAE,CAAC,+CAAD,CAJpB;AAKHC,IAAAA,oCAAoC,EAAE,CAAC,gCAAD,CALnC;AAMHC,IAAAA,4BAA4B,EAAE,CAAC,qBAAD,CAN3B;AAOHC,IAAAA,kCAAkC,EAAE,CAAC,iBAAD,CAPjC;AAQHC,IAAAA,2BAA2B,EAAE,CAAC,qBAAD,CAR1B;AASHC,IAAAA,4BAA4B,EAAE,CAAC,oCAAD,CAT3B;AAUHC,IAAAA,kCAAkC,EAAE,CAAC,4BAAD,CAVjC;AAWHC,IAAAA,MAAM,EAAE,CAAC,gCAAD,CAXL;AAYHxd,IAAAA,gBAAgB,EAAE,CAAC,WAAD,CAZf;AAaHyd,IAAAA,aAAa,EAAE,CAAC,uBAAD,CAbZ;AAcHC,IAAAA,iBAAiB,EAAE,CAAC,iCAAD,CAdhB;AAeHC,IAAAA,yBAAyB,EAAE,CAAC,iCAAD,CAfxB;AAgBHC,IAAAA,+BAA+B,EAAE,CAAC,yBAAD,CAhB9B;AAiBH7Y,IAAAA,IAAI,EAAE,CAAC,YAAD,CAjBH;AAkBH8Y,IAAAA,0BAA0B,EAAE,CAAC,kBAAD,CAlBzB;AAmBHC,IAAAA,0BAA0B,EAAE,CAAC,kBAAD,CAnBzB;AAoBHC,IAAAA,2BAA2B,EAAE,CAAC,qBAAD,CApB1B;AAqBHC,IAAAA,iCAAiC,EAAE,CAAC,qBAAD,CArBhC;AAsBHC,IAAAA,oBAAoB,EAAE,CAAC,iCAAD,CAtBnB;AAuBHC,IAAAA,oBAAoB,EAAE,CAAC,iCAAD,CAvBnB;AAwBHC,IAAAA,2BAA2B,EAAE,CAAC,oBAAD,CAxB1B;AAyBHC,IAAAA,kBAAkB,EAAE,CAAC,gCAAD,CAzBjB;AA0BHC,IAAAA,gCAAgC,EAAE,CAAC,yBAAD,CA1B/B;AA2BHC,IAAAA,qBAAqB,EAAE,CAAC,4BAAD,CA3BpB;AA4BHC,IAAAA,iCAAiC,EAAE,CAAC,gBAAD,CA5BhC;AA6BHC,IAAAA,yCAAyC,EAAE,CAAC,8BAAD,CA7BxC;AA8BHC,IAAAA,OAAO,EAAE,CAAC,gCAAD,CA9BN;AA+BHC,IAAAA,QAAQ,EAAE,CAAC,mCAAD,CA/BP;AAgCHC,IAAAA,mBAAmB,EAAE,CAAC,aAAD;AAhClB;AAvyCO,CAAlB;;ACAO,MAAMC,OAAO,GAAG,mBAAhB;;ACAA,SAASC,kBAAT,CAA4BC,OAA5B,EAAqCC,YAArC,EAAmD;AACtD,QAAMC,UAAU,GAAG,EAAnB;;AACA,OAAK,MAAM,CAACC,KAAD,EAAQC,SAAR,CAAX,IAAiCC,MAAM,CAACC,OAAP,CAAeL,YAAf,CAAjC,EAA+D;AAC3D,SAAK,MAAM,CAACM,UAAD,EAAaC,QAAb,CAAX,IAAqCH,MAAM,CAACC,OAAP,CAAeF,SAAf,CAArC,EAAgE;AAC5D,YAAM,CAACK,KAAD,EAAQC,QAAR,EAAkBC,WAAlB,IAAiCH,QAAvC;AACA,YAAM,CAACI,MAAD,EAASC,GAAT,IAAgBJ,KAAK,CAACK,KAAN,CAAY,GAAZ,CAAtB;AACA,YAAMC,gBAAgB,GAAGV,MAAM,CAACW,MAAP,CAAc;AAAEJ,QAAAA,MAAF;AAAUC,QAAAA;AAAV,OAAd,EAA+BH,QAA/B,CAAzB;;AACA,UAAI,CAACR,UAAU,CAACC,KAAD,CAAf,EAAwB;AACpBD,QAAAA,UAAU,CAACC,KAAD,CAAV,GAAoB,EAApB;AACH;;AACD,YAAMc,YAAY,GAAGf,UAAU,CAACC,KAAD,CAA/B;;AACA,UAAIQ,WAAJ,EAAiB;AACbM,QAAAA,YAAY,CAACV,UAAD,CAAZ,GAA2BW,QAAQ,CAAClB,OAAD,EAAUG,KAAV,EAAiBI,UAAjB,EAA6BQ,gBAA7B,EAA+CJ,WAA/C,CAAnC;AACA;AACH;;AACDM,MAAAA,YAAY,CAACV,UAAD,CAAZ,GAA2BP,OAAO,CAACmB,OAAR,CAAgBT,QAAhB,CAAyBK,gBAAzB,CAA3B;AACH;AACJ;;AACD,SAAOb,UAAP;AACH;;AACD,SAASgB,QAAT,CAAkBlB,OAAlB,EAA2BG,KAA3B,EAAkCI,UAAlC,EAA8CG,QAA9C,EAAwDC,WAAxD,EAAqE;AACjE,QAAMS,mBAAmB,GAAGpB,OAAO,CAACmB,OAAR,CAAgBT,QAAhB,CAAyBA,QAAzB,CAA5B;AACA;;AACA,WAASW,eAAT,CAAyB,GAAGC,IAA5B,EAAkC;AAC9B;AACA,QAAIC,OAAO,GAAGH,mBAAmB,CAACZ,QAApB,CAA6BxO,KAA7B,CAAmC,GAAGsP,IAAtC,CAAd,CAF8B;;AAI9B,QAAIX,WAAW,CAAC3M,SAAhB,EAA2B;AACvBuN,MAAAA,OAAO,GAAGlB,MAAM,CAACW,MAAP,CAAc,EAAd,EAAkBO,OAAlB,EAA2B;AACjCC,QAAAA,IAAI,EAAED,OAAO,CAACZ,WAAW,CAAC3M,SAAb,CADoB;AAEjC,SAAC2M,WAAW,CAAC3M,SAAb,GAAyByN;AAFQ,OAA3B,CAAV;AAIA,aAAOL,mBAAmB,CAACG,OAAD,CAA1B;AACH;;AACD,QAAIZ,WAAW,CAACnkB,OAAhB,EAAyB;AACrB,YAAM,CAACklB,QAAD,EAAWC,aAAX,IAA4BhB,WAAW,CAACnkB,OAA9C;AACAwjB,MAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAkB,WAAU1B,KAAM,IAAGI,UAAW,kCAAiCmB,QAAS,IAAGC,aAAc,IAA3G;AACH;;AACD,QAAIhB,WAAW,CAACrN,UAAhB,EAA4B;AACxB0M,MAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAiBlB,WAAW,CAACrN,UAA7B;AACH;;AACD,QAAIqN,WAAW,CAACzc,iBAAhB,EAAmC;AAC/B;AACA,YAAMqd,OAAO,GAAGH,mBAAmB,CAACZ,QAApB,CAA6BxO,KAA7B,CAAmC,GAAGsP,IAAtC,CAAhB;;AACA,WAAK,MAAM,CAACQ,IAAD,EAAOC,KAAP,CAAX,IAA4B1B,MAAM,CAACC,OAAP,CAAeK,WAAW,CAACzc,iBAA3B,CAA5B,EAA2E;AACvE,YAAI4d,IAAI,IAAIP,OAAZ,EAAqB;AACjBvB,UAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAkB,IAAGC,IAAK,0CAAyC3B,KAAM,IAAGI,UAAW,aAAYwB,KAAM,WAAzG;;AACA,cAAI,EAAEA,KAAK,IAAIR,OAAX,CAAJ,EAAyB;AACrBA,YAAAA,OAAO,CAACQ,KAAD,CAAP,GAAiBR,OAAO,CAACO,IAAD,CAAxB;AACH;;AACD,iBAAOP,OAAO,CAACO,IAAD,CAAd;AACH;AACJ;;AACD,aAAOV,mBAAmB,CAACG,OAAD,CAA1B;AACH,KA/B6B;;;AAiC9B,WAAOH,mBAAmB,CAAC,GAAGE,IAAJ,CAA1B;AACH;;AACD,SAAOjB,MAAM,CAACW,MAAP,CAAcK,eAAd,EAA+BD,mBAA/B,CAAP;AACH;;ACxDM,SAASY,mBAAT,CAA6BhC,OAA7B,EAAsC;AACzC,SAAOD,kBAAkB,CAACC,OAAD,EAAUiC,SAAV,CAAzB;AACH;AACDD,mBAAmB,CAAClC,OAApB,GAA8BA,OAA9B;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/generated/endpoints.js","../dist-src/version.js","../dist-src/endpoints-to-methods.js","../dist-src/index.js"],"sourcesContent":["const Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\",\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\",\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\",\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\",\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\",\n ],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\",\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\",\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\",\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\",\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\",\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\",\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\",\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\",\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\",\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\",\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n ],\n getActionsCacheUsageForEnterprise: [\n \"GET /enterprises/{enterprise}/actions/cache/usage\",\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\",\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\",\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n getGithubActionsDefaultWorkflowPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\",\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] },\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\",\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\",\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\",\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\",\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\",\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\",\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\",\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\",\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n setGithubActionsDefaultWorkflowPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\",\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\",\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\",\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\",\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\",\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\",\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\",\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\",\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"],\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] },\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\",\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\",\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\",\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\",\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\",\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\",\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] },\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\",\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"],\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\",\n ],\n getGithubAdvancedSecurityBillingGhe: [\n \"GET /enterprises/{enterprise}/settings/billing/advanced-security\",\n ],\n getGithubAdvancedSecurityBillingOrg: [\n \"GET /orgs/{org}/settings/billing/advanced-security\",\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\",\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\",\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\",\n ],\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\",\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\",\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\",\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } },\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\",\n ],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] },\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"],\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"],\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\",\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\",\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\",\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\",\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\",\n ],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\",\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\",\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\",\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\",\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\",\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } },\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\",\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\",\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\",\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"],\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\",\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\",\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\",\n ],\n },\n emojis: { get: [\"GET /emojis\"] },\n enterpriseAdmin: {\n addCustomLabelsToSelfHostedRunnerForEnterprise: [\n \"POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n disableSelectedOrganizationGithubActionsEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n enableSelectedOrganizationGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n getAllowedActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n getGithubActionsPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions\",\n ],\n getServerStatistics: [\n \"GET /enterprise-installation/{enterprise_or_org}/server-statistics\",\n ],\n listLabelsForSelfHostedRunnerForEnterprise: [\n \"GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n listSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}\",\n ],\n setAllowedActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n setGithubActionsPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions\",\n ],\n setSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"],\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"],\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"],\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] },\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\",\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] },\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] },\n ],\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\",\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\",\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"],\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } },\n ],\n },\n meta: {\n get: [\"GET /meta\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"],\n },\n migrations: {\n cancelImport: [\"DELETE /repos/{owner}/{repo}/import\"],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\",\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\",\n ],\n getCommitAuthors: [\"GET /repos/{owner}/{repo}/import/authors\"],\n getImportStatus: [\"GET /repos/{owner}/{repo}/import\"],\n getLargeFiles: [\"GET /repos/{owner}/{repo}/import/large_files\"],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] },\n ],\n mapCommitAuthor: [\"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\"],\n setLfsPreference: [\"PATCH /repos/{owner}/{repo}/import/lfs\"],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\"PUT /repos/{owner}/{repo}/import\"],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n updateImport: [\"PATCH /repos/{owner}/{repo}/import\"],\n },\n orgs: {\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\",\n ],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n get: [\"GET /orgs/{org}\"],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomRoles: [\"GET /organizations/{organization_id}/custom_roles\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\",\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\",\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\",\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\",\n ],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"],\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\",\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\",\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] },\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\",\n ],\n },\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\",\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\",\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\",\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\",\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\",\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"],\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\",\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\",\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\",\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\",\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] },\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\",\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\",\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] },\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\",\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\",\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n disableLfsForRepo: [\"DELETE /repos/{owner}/{repo}/lfs\"],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] },\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n enableLfsForRepo: [\"PUT /repos/{owner}/{repo}/lfs\"],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\",\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\",\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\",\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\",\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\",\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] },\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" },\n ],\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"],\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"],\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] },\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] },\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] },\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] },\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] },\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] },\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] },\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] },\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] },\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] },\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] },\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] },\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] },\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] },\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] },\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\",\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"],\n },\n};\nexport default Endpoints;\n","export const VERSION = \"5.16.2\";\n","export function endpointsToMethods(octokit, endpointsMap) {\n const newMethods = {};\n for (const [scope, endpoints] of Object.entries(endpointsMap)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign({ method, url }, defaults);\n if (!newMethods[scope]) {\n newMethods[scope] = {};\n }\n const scopeMethods = newMethods[scope];\n if (decorations) {\n scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);\n continue;\n }\n scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);\n }\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n /* istanbul ignore next */\n function withDecorations(...args) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args);\n // There are currently no other decorations than `.mapToData`\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined,\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(decorations.renamedParameters)) {\n if (name in options) {\n octokit.log.warn(`\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`);\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n delete options[name];\n }\n }\n return requestWithDefaults(options);\n }\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n","import ENDPOINTS from \"./generated/endpoints\";\nimport { VERSION } from \"./version\";\nimport { endpointsToMethods } from \"./endpoints-to-methods\";\nexport function restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, ENDPOINTS);\n return {\n rest: api,\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nexport function legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, ENDPOINTS);\n return {\n ...api,\n rest: api,\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n"],"names":["Endpoints","actions","addCustomLabelsToSelfHostedRunnerForOrg","addCustomLabelsToSelfHostedRunnerForRepo","addSelectedRepoToOrgSecret","approveWorkflowRun","cancelWorkflowRun","createOrUpdateEnvironmentSecret","createOrUpdateOrgSecret","createOrUpdateRepoSecret","createRegistrationTokenForOrg","createRegistrationTokenForRepo","createRemoveTokenForOrg","createRemoveTokenForRepo","createWorkflowDispatch","deleteActionsCacheById","deleteActionsCacheByKey","deleteArtifact","deleteEnvironmentSecret","deleteOrgSecret","deleteRepoSecret","deleteSelfHostedRunnerFromOrg","deleteSelfHostedRunnerFromRepo","deleteWorkflowRun","deleteWorkflowRunLogs","disableSelectedRepositoryGithubActionsOrganization","disableWorkflow","downloadArtifact","downloadJobLogsForWorkflowRun","downloadWorkflowRunAttemptLogs","downloadWorkflowRunLogs","enableSelectedRepositoryGithubActionsOrganization","enableWorkflow","getActionsCacheList","getActionsCacheUsage","getActionsCacheUsageByRepoForOrg","getActionsCacheUsageForEnterprise","getActionsCacheUsageForOrg","getAllowedActionsOrganization","getAllowedActionsRepository","getArtifact","getEnvironmentPublicKey","getEnvironmentSecret","getGithubActionsDefaultWorkflowPermissionsEnterprise","getGithubActionsDefaultWorkflowPermissionsOrganization","getGithubActionsDefaultWorkflowPermissionsRepository","getGithubActionsPermissionsOrganization","getGithubActionsPermissionsRepository","getJobForWorkflowRun","getOrgPublicKey","getOrgSecret","getPendingDeploymentsForRun","getRepoPermissions","renamed","getRepoPublicKey","getRepoSecret","getReviewsForRun","getSelfHostedRunnerForOrg","getSelfHostedRunnerForRepo","getWorkflow","getWorkflowAccessToRepository","getWorkflowRun","getWorkflowRunAttempt","getWorkflowRunUsage","getWorkflowUsage","listArtifactsForRepo","listEnvironmentSecrets","listJobsForWorkflowRun","listJobsForWorkflowRunAttempt","listLabelsForSelfHostedRunnerForOrg","listLabelsForSelfHostedRunnerForRepo","listOrgSecrets","listRepoSecrets","listRepoWorkflows","listRunnerApplicationsForOrg","listRunnerApplicationsForRepo","listSelectedReposForOrgSecret","listSelectedRepositoriesEnabledGithubActionsOrganization","listSelfHostedRunnersForOrg","listSelfHostedRunnersForRepo","listWorkflowRunArtifacts","listWorkflowRuns","listWorkflowRunsForRepo","reRunJobForWorkflowRun","reRunWorkflow","reRunWorkflowFailedJobs","removeAllCustomLabelsFromSelfHostedRunnerForOrg","removeAllCustomLabelsFromSelfHostedRunnerForRepo","removeCustomLabelFromSelfHostedRunnerForOrg","removeCustomLabelFromSelfHostedRunnerForRepo","removeSelectedRepoFromOrgSecret","reviewPendingDeploymentsForRun","setAllowedActionsOrganization","setAllowedActionsRepository","setCustomLabelsForSelfHostedRunnerForOrg","setCustomLabelsForSelfHostedRunnerForRepo","setGithubActionsDefaultWorkflowPermissionsEnterprise","setGithubActionsDefaultWorkflowPermissionsOrganization","setGithubActionsDefaultWorkflowPermissionsRepository","setGithubActionsPermissionsOrganization","setGithubActionsPermissionsRepository","setSelectedReposForOrgSecret","setSelectedRepositoriesEnabledGithubActionsOrganization","setWorkflowAccessToRepository","activity","checkRepoIsStarredByAuthenticatedUser","deleteRepoSubscription","deleteThreadSubscription","getFeeds","getRepoSubscription","getThread","getThreadSubscriptionForAuthenticatedUser","listEventsForAuthenticatedUser","listNotificationsForAuthenticatedUser","listOrgEventsForAuthenticatedUser","listPublicEvents","listPublicEventsForRepoNetwork","listPublicEventsForUser","listPublicOrgEvents","listReceivedEventsForUser","listReceivedPublicEventsForUser","listRepoEvents","listRepoNotificationsForAuthenticatedUser","listReposStarredByAuthenticatedUser","listReposStarredByUser","listReposWatchedByUser","listStargazersForRepo","listWatchedReposForAuthenticatedUser","listWatchersForRepo","markNotificationsAsRead","markRepoNotificationsAsRead","markThreadAsRead","setRepoSubscription","setThreadSubscription","starRepoForAuthenticatedUser","unstarRepoForAuthenticatedUser","apps","addRepoToInstallation","addRepoToInstallationForAuthenticatedUser","checkToken","createFromManifest","createInstallationAccessToken","deleteAuthorization","deleteInstallation","deleteToken","getAuthenticated","getBySlug","getInstallation","getOrgInstallation","getRepoInstallation","getSubscriptionPlanForAccount","getSubscriptionPlanForAccountStubbed","getUserInstallation","getWebhookConfigForApp","getWebhookDelivery","listAccountsForPlan","listAccountsForPlanStubbed","listInstallationReposForAuthenticatedUser","listInstallations","listInstallationsForAuthenticatedUser","listPlans","listPlansStubbed","listReposAccessibleToInstallation","listSubscriptionsForAuthenticatedUser","listSubscriptionsForAuthenticatedUserStubbed","listWebhookDeliveries","redeliverWebhookDelivery","removeRepoFromInstallation","removeRepoFromInstallationForAuthenticatedUser","resetToken","revokeInstallationAccessToken","scopeToken","suspendInstallation","unsuspendInstallation","updateWebhookConfigForApp","billing","getGithubActionsBillingOrg","getGithubActionsBillingUser","getGithubAdvancedSecurityBillingGhe","getGithubAdvancedSecurityBillingOrg","getGithubPackagesBillingOrg","getGithubPackagesBillingUser","getSharedStorageBillingOrg","getSharedStorageBillingUser","checks","create","createSuite","get","getSuite","listAnnotations","listForRef","listForSuite","listSuitesForRef","rerequestRun","rerequestSuite","setSuitesPreferences","update","codeScanning","deleteAnalysis","getAlert","renamedParameters","alert_id","getAnalysis","getSarif","listAlertInstances","listAlertsForOrg","listAlertsForRepo","listAlertsInstances","listRecentAnalyses","updateAlert","uploadSarif","codesOfConduct","getAllCodesOfConduct","getConductCode","codespaces","addRepositoryForSecretForAuthenticatedUser","codespaceMachinesForAuthenticatedUser","createForAuthenticatedUser","createOrUpdateSecretForAuthenticatedUser","createWithPrForAuthenticatedUser","createWithRepoForAuthenticatedUser","deleteForAuthenticatedUser","deleteFromOrganization","deleteSecretForAuthenticatedUser","exportForAuthenticatedUser","getExportDetailsForAuthenticatedUser","getForAuthenticatedUser","getPublicKeyForAuthenticatedUser","getSecretForAuthenticatedUser","listDevcontainersInRepositoryForAuthenticatedUser","listForAuthenticatedUser","listInOrganization","org_id","listInRepositoryForAuthenticatedUser","listRepositoriesForSecretForAuthenticatedUser","listSecretsForAuthenticatedUser","removeRepositoryForSecretForAuthenticatedUser","repoMachinesForAuthenticatedUser","setRepositoriesForSecretForAuthenticatedUser","startForAuthenticatedUser","stopForAuthenticatedUser","stopInOrganization","updateForAuthenticatedUser","dependabot","dependencyGraph","createRepositorySnapshot","diffRange","emojis","enterpriseAdmin","addCustomLabelsToSelfHostedRunnerForEnterprise","disableSelectedOrganizationGithubActionsEnterprise","enableSelectedOrganizationGithubActionsEnterprise","getAllowedActionsEnterprise","getGithubActionsPermissionsEnterprise","getServerStatistics","listLabelsForSelfHostedRunnerForEnterprise","listSelectedOrganizationsEnabledGithubActionsEnterprise","removeAllCustomLabelsFromSelfHostedRunnerForEnterprise","removeCustomLabelFromSelfHostedRunnerForEnterprise","setAllowedActionsEnterprise","setCustomLabelsForSelfHostedRunnerForEnterprise","setGithubActionsPermissionsEnterprise","setSelectedOrganizationsEnabledGithubActionsEnterprise","gists","checkIsStarred","createComment","delete","deleteComment","fork","getComment","getRevision","list","listComments","listCommits","listForUser","listForks","listPublic","listStarred","star","unstar","updateComment","git","createBlob","createCommit","createRef","createTag","createTree","deleteRef","getBlob","getCommit","getRef","getTag","getTree","listMatchingRefs","updateRef","gitignore","getAllTemplates","getTemplate","interactions","getRestrictionsForAuthenticatedUser","getRestrictionsForOrg","getRestrictionsForRepo","getRestrictionsForYourPublicRepos","removeRestrictionsForAuthenticatedUser","removeRestrictionsForOrg","removeRestrictionsForRepo","removeRestrictionsForYourPublicRepos","setRestrictionsForAuthenticatedUser","setRestrictionsForOrg","setRestrictionsForRepo","setRestrictionsForYourPublicRepos","issues","addAssignees","addLabels","checkUserCanBeAssigned","createLabel","createMilestone","deleteLabel","deleteMilestone","getEvent","getLabel","getMilestone","listAssignees","listCommentsForRepo","listEvents","listEventsForRepo","listEventsForTimeline","listForOrg","listForRepo","listLabelsForMilestone","listLabelsForRepo","listLabelsOnIssue","listMilestones","lock","removeAllLabels","removeAssignees","removeLabel","setLabels","unlock","updateLabel","updateMilestone","licenses","getAllCommonlyUsed","getForRepo","markdown","render","renderRaw","headers","meta","getOctocat","getZen","root","migrations","cancelImport","deleteArchiveForAuthenticatedUser","deleteArchiveForOrg","downloadArchiveForOrg","getArchiveForAuthenticatedUser","getCommitAuthors","getImportStatus","getLargeFiles","getStatusForAuthenticatedUser","getStatusForOrg","listReposForAuthenticatedUser","listReposForOrg","listReposForUser","mapCommitAuthor","setLfsPreference","startForOrg","startImport","unlockRepoForAuthenticatedUser","unlockRepoForOrg","updateImport","orgs","blockUser","cancelInvitation","checkBlockedUser","checkMembershipForUser","checkPublicMembershipForUser","convertMemberToOutsideCollaborator","createInvitation","createWebhook","deleteWebhook","getMembershipForAuthenticatedUser","getMembershipForUser","getWebhook","getWebhookConfigForOrg","listAppInstallations","listBlockedUsers","listCustomRoles","listFailedInvitations","listInvitationTeams","listMembers","listMembershipsForAuthenticatedUser","listOutsideCollaborators","listPendingInvitations","listPublicMembers","listWebhooks","pingWebhook","removeMember","removeMembershipForUser","removeOutsideCollaborator","removePublicMembershipForAuthenticatedUser","setMembershipForUser","setPublicMembershipForAuthenticatedUser","unblockUser","updateMembershipForAuthenticatedUser","updateWebhook","updateWebhookConfigForOrg","packages","deletePackageForAuthenticatedUser","deletePackageForOrg","deletePackageForUser","deletePackageVersionForAuthenticatedUser","deletePackageVersionForOrg","deletePackageVersionForUser","getAllPackageVersionsForAPackageOwnedByAnOrg","getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser","getAllPackageVersionsForPackageOwnedByAuthenticatedUser","getAllPackageVersionsForPackageOwnedByOrg","getAllPackageVersionsForPackageOwnedByUser","getPackageForAuthenticatedUser","getPackageForOrganization","getPackageForUser","getPackageVersionForAuthenticatedUser","getPackageVersionForOrganization","getPackageVersionForUser","listPackagesForAuthenticatedUser","listPackagesForOrganization","listPackagesForUser","restorePackageForAuthenticatedUser","restorePackageForOrg","restorePackageForUser","restorePackageVersionForAuthenticatedUser","restorePackageVersionForOrg","restorePackageVersionForUser","projects","addCollaborator","createCard","createColumn","createForOrg","createForRepo","deleteCard","deleteColumn","getCard","getColumn","getPermissionForUser","listCards","listCollaborators","listColumns","moveCard","moveColumn","removeCollaborator","updateCard","updateColumn","pulls","checkIfMerged","createReplyForReviewComment","createReview","createReviewComment","deletePendingReview","deleteReviewComment","dismissReview","getReview","getReviewComment","listCommentsForReview","listFiles","listRequestedReviewers","listReviewComments","listReviewCommentsForRepo","listReviews","merge","removeRequestedReviewers","requestReviewers","submitReview","updateBranch","updateReview","updateReviewComment","rateLimit","reactions","createForCommitComment","createForIssue","createForIssueComment","createForPullRequestReviewComment","createForRelease","createForTeamDiscussionCommentInOrg","createForTeamDiscussionInOrg","deleteForCommitComment","deleteForIssue","deleteForIssueComment","deleteForPullRequestComment","deleteForRelease","deleteForTeamDiscussion","deleteForTeamDiscussionComment","listForCommitComment","listForIssue","listForIssueComment","listForPullRequestReviewComment","listForRelease","listForTeamDiscussionCommentInOrg","listForTeamDiscussionInOrg","repos","acceptInvitation","acceptInvitationForAuthenticatedUser","addAppAccessRestrictions","mapToData","addStatusCheckContexts","addTeamAccessRestrictions","addUserAccessRestrictions","checkCollaborator","checkVulnerabilityAlerts","codeownersErrors","compareCommits","compareCommitsWithBasehead","createAutolink","createCommitComment","createCommitSignatureProtection","createCommitStatus","createDeployKey","createDeployment","createDeploymentStatus","createDispatchEvent","createFork","createInOrg","createOrUpdateEnvironment","createOrUpdateFileContents","createPagesSite","createRelease","createTagProtection","createUsingTemplate","declineInvitation","declineInvitationForAuthenticatedUser","deleteAccessRestrictions","deleteAdminBranchProtection","deleteAnEnvironment","deleteAutolink","deleteBranchProtection","deleteCommitComment","deleteCommitSignatureProtection","deleteDeployKey","deleteDeployment","deleteFile","deleteInvitation","deletePagesSite","deletePullRequestReviewProtection","deleteRelease","deleteReleaseAsset","deleteTagProtection","disableAutomatedSecurityFixes","disableLfsForRepo","disableVulnerabilityAlerts","downloadArchive","downloadTarballArchive","downloadZipballArchive","enableAutomatedSecurityFixes","enableLfsForRepo","enableVulnerabilityAlerts","generateReleaseNotes","getAccessRestrictions","getAdminBranchProtection","getAllEnvironments","getAllStatusCheckContexts","getAllTopics","getAppsWithAccessToProtectedBranch","getAutolink","getBranch","getBranchProtection","getClones","getCodeFrequencyStats","getCollaboratorPermissionLevel","getCombinedStatusForRef","getCommitActivityStats","getCommitComment","getCommitSignatureProtection","getCommunityProfileMetrics","getContent","getContributorsStats","getDeployKey","getDeployment","getDeploymentStatus","getEnvironment","getLatestPagesBuild","getLatestRelease","getPages","getPagesBuild","getPagesHealthCheck","getParticipationStats","getPullRequestReviewProtection","getPunchCardStats","getReadme","getReadmeInDirectory","getRelease","getReleaseAsset","getReleaseByTag","getStatusChecksProtection","getTeamsWithAccessToProtectedBranch","getTopPaths","getTopReferrers","getUsersWithAccessToProtectedBranch","getViews","getWebhookConfigForRepo","listAutolinks","listBranches","listBranchesForHeadCommit","listCommentsForCommit","listCommitCommentsForRepo","listCommitStatusesForRef","listContributors","listDeployKeys","listDeploymentStatuses","listDeployments","listInvitations","listInvitationsForAuthenticatedUser","listLanguages","listPagesBuilds","listPullRequestsAssociatedWithCommit","listReleaseAssets","listReleases","listTagProtection","listTags","listTeams","mergeUpstream","removeAppAccessRestrictions","removeStatusCheckContexts","removeStatusCheckProtection","removeTeamAccessRestrictions","removeUserAccessRestrictions","renameBranch","replaceAllTopics","requestPagesBuild","setAdminBranchProtection","setAppAccessRestrictions","setStatusCheckContexts","setTeamAccessRestrictions","setUserAccessRestrictions","testPushWebhook","transfer","updateBranchProtection","updateCommitComment","updateInformationAboutPagesSite","updateInvitation","updatePullRequestReviewProtection","updateRelease","updateReleaseAsset","updateStatusCheckPotection","updateStatusCheckProtection","updateWebhookConfigForRepo","uploadReleaseAsset","baseUrl","search","code","commits","issuesAndPullRequests","labels","topics","users","secretScanning","listAlertsForEnterprise","listLocationsForAlert","teams","addOrUpdateMembershipForUserInOrg","addOrUpdateProjectPermissionsInOrg","addOrUpdateRepoPermissionsInOrg","checkPermissionsForProjectInOrg","checkPermissionsForRepoInOrg","createDiscussionCommentInOrg","createDiscussionInOrg","deleteDiscussionCommentInOrg","deleteDiscussionInOrg","deleteInOrg","getByName","getDiscussionCommentInOrg","getDiscussionInOrg","getMembershipForUserInOrg","listChildInOrg","listDiscussionCommentsInOrg","listDiscussionsInOrg","listMembersInOrg","listPendingInvitationsInOrg","listProjectsInOrg","listReposInOrg","removeMembershipForUserInOrg","removeProjectInOrg","removeRepoInOrg","updateDiscussionCommentInOrg","updateDiscussionInOrg","updateInOrg","addEmailForAuthenticated","addEmailForAuthenticatedUser","block","checkBlocked","checkFollowingForUser","checkPersonIsFollowedByAuthenticated","createGpgKeyForAuthenticated","createGpgKeyForAuthenticatedUser","createPublicSshKeyForAuthenticated","createPublicSshKeyForAuthenticatedUser","deleteEmailForAuthenticated","deleteEmailForAuthenticatedUser","deleteGpgKeyForAuthenticated","deleteGpgKeyForAuthenticatedUser","deletePublicSshKeyForAuthenticated","deletePublicSshKeyForAuthenticatedUser","follow","getByUsername","getContextForUser","getGpgKeyForAuthenticated","getGpgKeyForAuthenticatedUser","getPublicSshKeyForAuthenticated","getPublicSshKeyForAuthenticatedUser","listBlockedByAuthenticated","listBlockedByAuthenticatedUser","listEmailsForAuthenticated","listEmailsForAuthenticatedUser","listFollowedByAuthenticated","listFollowedByAuthenticatedUser","listFollowersForAuthenticatedUser","listFollowersForUser","listFollowingForUser","listGpgKeysForAuthenticated","listGpgKeysForAuthenticatedUser","listGpgKeysForUser","listPublicEmailsForAuthenticated","listPublicEmailsForAuthenticatedUser","listPublicKeysForUser","listPublicSshKeysForAuthenticated","listPublicSshKeysForAuthenticatedUser","setPrimaryEmailVisibilityForAuthenticated","setPrimaryEmailVisibilityForAuthenticatedUser","unblock","unfollow","updateAuthenticated","VERSION","endpointsToMethods","octokit","endpointsMap","newMethods","scope","endpoints","Object","entries","methodName","endpoint","route","defaults","decorations","method","url","split","endpointDefaults","assign","scopeMethods","decorate","request","requestWithDefaults","withDecorations","args","options","data","undefined","newScope","newMethodName","log","warn","deprecated","name","alias","restEndpointMethods","api","ENDPOINTS","rest","legacyRestEndpointMethods"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAMA,SAAS,GAAG;AACdC,EAAAA,OAAO,EAAE;AACLC,IAAAA,uCAAuC,EAAE,CACrC,qDADqC,CADpC;AAILC,IAAAA,wCAAwC,EAAE,CACtC,+DADsC,CAJrC;AAOLC,IAAAA,0BAA0B,EAAE,CACxB,4EADwB,CAPvB;AAULC,IAAAA,kBAAkB,EAAE,CAChB,0DADgB,CAVf;AAaLC,IAAAA,iBAAiB,EAAE,CACf,yDADe,CAbd;AAgBLC,IAAAA,+BAA+B,EAAE,CAC7B,yFAD6B,CAhB5B;AAmBLC,IAAAA,uBAAuB,EAAE,CAAC,+CAAD,CAnBpB;AAoBLC,IAAAA,wBAAwB,EAAE,CACtB,yDADsB,CApBrB;AAuBLC,IAAAA,6BAA6B,EAAE,CAC3B,qDAD2B,CAvB1B;AA0BLC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,CA1B3B;AA6BLC,IAAAA,uBAAuB,EAAE,CAAC,+CAAD,CA7BpB;AA8BLC,IAAAA,wBAAwB,EAAE,CACtB,yDADsB,CA9BrB;AAiCLC,IAAAA,sBAAsB,EAAE,CACpB,uEADoB,CAjCnB;AAoCLC,IAAAA,sBAAsB,EAAE,CACpB,wDADoB,CApCnB;AAuCLC,IAAAA,uBAAuB,EAAE,CACrB,uDADqB,CAvCpB;AA0CLC,IAAAA,cAAc,EAAE,CACZ,8DADY,CA1CX;AA6CLC,IAAAA,uBAAuB,EAAE,CACrB,4FADqB,CA7CpB;AAgDLC,IAAAA,eAAe,EAAE,CAAC,kDAAD,CAhDZ;AAiDLC,IAAAA,gBAAgB,EAAE,CACd,4DADc,CAjDb;AAoDLC,IAAAA,6BAA6B,EAAE,CAC3B,gDAD2B,CApD1B;AAuDLC,IAAAA,8BAA8B,EAAE,CAC5B,0DAD4B,CAvD3B;AA0DLC,IAAAA,iBAAiB,EAAE,CAAC,oDAAD,CA1Dd;AA2DLC,IAAAA,qBAAqB,EAAE,CACnB,yDADmB,CA3DlB;AA8DLC,IAAAA,kDAAkD,EAAE,CAChD,qEADgD,CA9D/C;AAiELC,IAAAA,eAAe,EAAE,CACb,mEADa,CAjEZ;AAoELC,IAAAA,gBAAgB,EAAE,CACd,4EADc,CApEb;AAuELC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CAvE1B;AA0ELC,IAAAA,8BAA8B,EAAE,CAC5B,gFAD4B,CA1E3B;AA6ELC,IAAAA,uBAAuB,EAAE,CACrB,sDADqB,CA7EpB;AAgFLC,IAAAA,iDAAiD,EAAE,CAC/C,kEAD+C,CAhF9C;AAmFLC,IAAAA,cAAc,EAAE,CACZ,kEADY,CAnFX;AAsFLC,IAAAA,mBAAmB,EAAE,CAAC,0CAAD,CAtFhB;AAuFLC,IAAAA,oBAAoB,EAAE,CAAC,+CAAD,CAvFjB;AAwFLC,IAAAA,gCAAgC,EAAE,CAC9B,mDAD8B,CAxF7B;AA2FLC,IAAAA,iCAAiC,EAAE,CAC/B,mDAD+B,CA3F9B;AA8FLC,IAAAA,0BAA0B,EAAE,CAAC,qCAAD,CA9FvB;AA+FLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CA/F1B;AAkGLC,IAAAA,2BAA2B,EAAE,CACzB,gEADyB,CAlGxB;AAqGLC,IAAAA,WAAW,EAAE,CAAC,2DAAD,CArGR;AAsGLC,IAAAA,uBAAuB,EAAE,CACrB,sFADqB,CAtGpB;AAyGLC,IAAAA,oBAAoB,EAAE,CAClB,yFADkB,CAzGjB;AA4GLC,IAAAA,oDAAoD,EAAE,CAClD,4DADkD,CA5GjD;AA+GLC,IAAAA,sDAAsD,EAAE,CACpD,8CADoD,CA/GnD;AAkHLC,IAAAA,oDAAoD,EAAE,CAClD,wDADkD,CAlHjD;AAqHLC,IAAAA,uCAAuC,EAAE,CACrC,qCADqC,CArHpC;AAwHLC,IAAAA,qCAAqC,EAAE,CACnC,+CADmC,CAxHlC;AA2HLC,IAAAA,oBAAoB,EAAE,CAAC,iDAAD,CA3HjB;AA4HLC,IAAAA,eAAe,EAAE,CAAC,4CAAD,CA5HZ;AA6HLC,IAAAA,YAAY,EAAE,CAAC,+CAAD,CA7HT;AA8HLC,IAAAA,2BAA2B,EAAE,CACzB,qEADyB,CA9HxB;AAiILC,IAAAA,kBAAkB,EAAE,CAChB,+CADgB,EAEhB,EAFgB,EAGhB;AAAEC,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,uCAAZ;AAAX,KAHgB,CAjIf;AAsILC,IAAAA,gBAAgB,EAAE,CAAC,sDAAD,CAtIb;AAuILC,IAAAA,aAAa,EAAE,CAAC,yDAAD,CAvIV;AAwILC,IAAAA,gBAAgB,EAAE,CACd,2DADc,CAxIb;AA2ILC,IAAAA,yBAAyB,EAAE,CAAC,6CAAD,CA3ItB;AA4ILC,IAAAA,0BAA0B,EAAE,CACxB,uDADwB,CA5IvB;AA+ILC,IAAAA,WAAW,EAAE,CAAC,2DAAD,CA/IR;AAgJLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CAhJ1B;AAmJLC,IAAAA,cAAc,EAAE,CAAC,iDAAD,CAnJX;AAoJLC,IAAAA,qBAAqB,EAAE,CACnB,2EADmB,CApJlB;AAuJLC,IAAAA,mBAAmB,EAAE,CACjB,wDADiB,CAvJhB;AA0JLC,IAAAA,gBAAgB,EAAE,CACd,kEADc,CA1Jb;AA6JLC,IAAAA,oBAAoB,EAAE,CAAC,6CAAD,CA7JjB;AA8JLC,IAAAA,sBAAsB,EAAE,CACpB,2EADoB,CA9JnB;AAiKLC,IAAAA,sBAAsB,EAAE,CACpB,sDADoB,CAjKnB;AAoKLC,IAAAA,6BAA6B,EAAE,CAC3B,gFAD2B,CApK1B;AAuKLC,IAAAA,mCAAmC,EAAE,CACjC,oDADiC,CAvKhC;AA0KLC,IAAAA,oCAAoC,EAAE,CAClC,8DADkC,CA1KjC;AA6KLC,IAAAA,cAAc,EAAE,CAAC,iCAAD,CA7KX;AA8KLC,IAAAA,eAAe,EAAE,CAAC,2CAAD,CA9KZ;AA+KLC,IAAAA,iBAAiB,EAAE,CAAC,6CAAD,CA/Kd;AAgLLC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CAhLzB;AAiLLC,IAAAA,6BAA6B,EAAE,CAC3B,qDAD2B,CAjL1B;AAoLLC,IAAAA,6BAA6B,EAAE,CAC3B,4DAD2B,CApL1B;AAuLLC,IAAAA,wDAAwD,EAAE,CACtD,kDADsD,CAvLrD;AA0LLC,IAAAA,2BAA2B,EAAE,CAAC,iCAAD,CA1LxB;AA2LLC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CA3LzB;AA4LLC,IAAAA,wBAAwB,EAAE,CACtB,2DADsB,CA5LrB;AA+LLC,IAAAA,gBAAgB,EAAE,CACd,gEADc,CA/Lb;AAkMLC,IAAAA,uBAAuB,EAAE,CAAC,wCAAD,CAlMpB;AAmMLC,IAAAA,sBAAsB,EAAE,CACpB,wDADoB,CAnMnB;AAsMLC,IAAAA,aAAa,EAAE,CAAC,wDAAD,CAtMV;AAuMLC,IAAAA,uBAAuB,EAAE,CACrB,oEADqB,CAvMpB;AA0MLC,IAAAA,+CAA+C,EAAE,CAC7C,uDAD6C,CA1M5C;AA6MLC,IAAAA,gDAAgD,EAAE,CAC9C,iEAD8C,CA7M7C;AAgNLC,IAAAA,2CAA2C,EAAE,CACzC,8DADyC,CAhNxC;AAmNLC,IAAAA,4CAA4C,EAAE,CAC1C,wEAD0C,CAnNzC;AAsNLC,IAAAA,+BAA+B,EAAE,CAC7B,+EAD6B,CAtN5B;AAyNLC,IAAAA,8BAA8B,EAAE,CAC5B,sEAD4B,CAzN3B;AA4NLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CA5N1B;AA+NLC,IAAAA,2BAA2B,EAAE,CACzB,gEADyB,CA/NxB;AAkOLC,IAAAA,wCAAwC,EAAE,CACtC,oDADsC,CAlOrC;AAqOLC,IAAAA,yCAAyC,EAAE,CACvC,8DADuC,CArOtC;AAwOLC,IAAAA,oDAAoD,EAAE,CAClD,4DADkD,CAxOjD;AA2OLC,IAAAA,sDAAsD,EAAE,CACpD,8CADoD,CA3OnD;AA8OLC,IAAAA,oDAAoD,EAAE,CAClD,wDADkD,CA9OjD;AAiPLC,IAAAA,uCAAuC,EAAE,CACrC,qCADqC,CAjPpC;AAoPLC,IAAAA,qCAAqC,EAAE,CACnC,+CADmC,CApPlC;AAuPLC,IAAAA,4BAA4B,EAAE,CAC1B,4DAD0B,CAvPzB;AA0PLC,IAAAA,uDAAuD,EAAE,CACrD,kDADqD,CA1PpD;AA6PLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B;AA7P1B,GADK;AAkQdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,qCAAqC,EAAE,CAAC,kCAAD,CADjC;AAENC,IAAAA,sBAAsB,EAAE,CAAC,2CAAD,CAFlB;AAGNC,IAAAA,wBAAwB,EAAE,CACtB,wDADsB,CAHpB;AAMNC,IAAAA,QAAQ,EAAE,CAAC,YAAD,CANJ;AAONC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAPf;AAQNC,IAAAA,SAAS,EAAE,CAAC,wCAAD,CARL;AASNC,IAAAA,yCAAyC,EAAE,CACvC,qDADuC,CATrC;AAYNC,IAAAA,8BAA8B,EAAE,CAAC,8BAAD,CAZ1B;AAaNC,IAAAA,qCAAqC,EAAE,CAAC,oBAAD,CAbjC;AAcNC,IAAAA,iCAAiC,EAAE,CAC/B,yCAD+B,CAd7B;AAiBNC,IAAAA,gBAAgB,EAAE,CAAC,aAAD,CAjBZ;AAkBNC,IAAAA,8BAA8B,EAAE,CAAC,qCAAD,CAlB1B;AAmBNC,IAAAA,uBAAuB,EAAE,CAAC,qCAAD,CAnBnB;AAoBNC,IAAAA,mBAAmB,EAAE,CAAC,wBAAD,CApBf;AAqBNC,IAAAA,yBAAyB,EAAE,CAAC,uCAAD,CArBrB;AAsBNC,IAAAA,+BAA+B,EAAE,CAC7B,8CAD6B,CAtB3B;AAyBNC,IAAAA,cAAc,EAAE,CAAC,kCAAD,CAzBV;AA0BNC,IAAAA,yCAAyC,EAAE,CACvC,yCADuC,CA1BrC;AA6BNC,IAAAA,mCAAmC,EAAE,CAAC,mBAAD,CA7B/B;AA8BNC,IAAAA,sBAAsB,EAAE,CAAC,+BAAD,CA9BlB;AA+BNC,IAAAA,sBAAsB,EAAE,CAAC,qCAAD,CA/BlB;AAgCNC,IAAAA,qBAAqB,EAAE,CAAC,sCAAD,CAhCjB;AAiCNC,IAAAA,oCAAoC,EAAE,CAAC,yBAAD,CAjChC;AAkCNC,IAAAA,mBAAmB,EAAE,CAAC,uCAAD,CAlCf;AAmCNC,IAAAA,uBAAuB,EAAE,CAAC,oBAAD,CAnCnB;AAoCNC,IAAAA,2BAA2B,EAAE,CAAC,yCAAD,CApCvB;AAqCNC,IAAAA,gBAAgB,EAAE,CAAC,0CAAD,CArCZ;AAsCNC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAtCf;AAuCNC,IAAAA,qBAAqB,EAAE,CACnB,qDADmB,CAvCjB;AA0CNC,IAAAA,4BAA4B,EAAE,CAAC,kCAAD,CA1CxB;AA2CNC,IAAAA,8BAA8B,EAAE,CAAC,qCAAD;AA3C1B,GAlQI;AA+SdC,EAAAA,IAAI,EAAE;AACFC,IAAAA,qBAAqB,EAAE,CACnB,wEADmB,EAEnB,EAFmB,EAGnB;AAAEpF,MAAAA,OAAO,EAAE,CAAC,MAAD,EAAS,2CAAT;AAAX,KAHmB,CADrB;AAMFqF,IAAAA,yCAAyC,EAAE,CACvC,wEADuC,CANzC;AASFC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CATV;AAUFC,IAAAA,kBAAkB,EAAE,CAAC,wCAAD,CAVlB;AAWFC,IAAAA,6BAA6B,EAAE,CAC3B,yDAD2B,CAX7B;AAcFC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAdnB;AAeFC,IAAAA,kBAAkB,EAAE,CAAC,6CAAD,CAflB;AAgBFC,IAAAA,WAAW,EAAE,CAAC,wCAAD,CAhBX;AAiBFC,IAAAA,gBAAgB,EAAE,CAAC,UAAD,CAjBhB;AAkBFC,IAAAA,SAAS,EAAE,CAAC,sBAAD,CAlBT;AAmBFC,IAAAA,eAAe,EAAE,CAAC,0CAAD,CAnBf;AAoBFC,IAAAA,kBAAkB,EAAE,CAAC,8BAAD,CApBlB;AAqBFC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CArBnB;AAsBFC,IAAAA,6BAA6B,EAAE,CAC3B,gDAD2B,CAtB7B;AAyBFC,IAAAA,oCAAoC,EAAE,CAClC,wDADkC,CAzBpC;AA4BFC,IAAAA,mBAAmB,EAAE,CAAC,oCAAD,CA5BnB;AA6BFC,IAAAA,sBAAsB,EAAE,CAAC,sBAAD,CA7BtB;AA8BFC,IAAAA,kBAAkB,EAAE,CAAC,wCAAD,CA9BlB;AA+BFC,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CA/BnB;AAgCFC,IAAAA,0BAA0B,EAAE,CACxB,2DADwB,CAhC1B;AAmCFC,IAAAA,yCAAyC,EAAE,CACvC,wDADuC,CAnCzC;AAsCFC,IAAAA,iBAAiB,EAAE,CAAC,wBAAD,CAtCjB;AAuCFC,IAAAA,qCAAqC,EAAE,CAAC,yBAAD,CAvCrC;AAwCFC,IAAAA,SAAS,EAAE,CAAC,gCAAD,CAxCT;AAyCFC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAzChB;AA0CFC,IAAAA,iCAAiC,EAAE,CAAC,gCAAD,CA1CjC;AA2CFC,IAAAA,qCAAqC,EAAE,CAAC,iCAAD,CA3CrC;AA4CFC,IAAAA,4CAA4C,EAAE,CAC1C,yCAD0C,CA5C5C;AA+CFC,IAAAA,qBAAqB,EAAE,CAAC,0BAAD,CA/CrB;AAgDFC,IAAAA,wBAAwB,EAAE,CACtB,kDADsB,CAhDxB;AAmDFC,IAAAA,0BAA0B,EAAE,CACxB,2EADwB,EAExB,EAFwB,EAGxB;AAAElH,MAAAA,OAAO,EAAE,CAAC,MAAD,EAAS,gDAAT;AAAX,KAHwB,CAnD1B;AAwDFmH,IAAAA,8CAA8C,EAAE,CAC5C,2EAD4C,CAxD9C;AA2DFC,IAAAA,UAAU,EAAE,CAAC,uCAAD,CA3DV;AA4DFC,IAAAA,6BAA6B,EAAE,CAAC,4BAAD,CA5D7B;AA6DFC,IAAAA,UAAU,EAAE,CAAC,6CAAD,CA7DV;AA8DFC,IAAAA,mBAAmB,EAAE,CAAC,oDAAD,CA9DnB;AA+DFC,IAAAA,qBAAqB,EAAE,CACnB,uDADmB,CA/DrB;AAkEFC,IAAAA,yBAAyB,EAAE,CAAC,wBAAD;AAlEzB,GA/SQ;AAmXdC,EAAAA,OAAO,EAAE;AACLC,IAAAA,0BAA0B,EAAE,CAAC,0CAAD,CADvB;AAELC,IAAAA,2BAA2B,EAAE,CACzB,gDADyB,CAFxB;AAKLC,IAAAA,mCAAmC,EAAE,CACjC,kEADiC,CALhC;AAQLC,IAAAA,mCAAmC,EAAE,CACjC,oDADiC,CARhC;AAWLC,IAAAA,2BAA2B,EAAE,CAAC,2CAAD,CAXxB;AAYLC,IAAAA,4BAA4B,EAAE,CAC1B,iDAD0B,CAZzB;AAeLC,IAAAA,0BAA0B,EAAE,CACxB,iDADwB,CAfvB;AAkBLC,IAAAA,2BAA2B,EAAE,CACzB,uDADyB;AAlBxB,GAnXK;AAyYdC,EAAAA,MAAM,EAAE;AACJC,IAAAA,MAAM,EAAE,CAAC,uCAAD,CADJ;AAEJC,IAAAA,WAAW,EAAE,CAAC,yCAAD,CAFT;AAGJC,IAAAA,GAAG,EAAE,CAAC,qDAAD,CAHD;AAIJC,IAAAA,QAAQ,EAAE,CAAC,yDAAD,CAJN;AAKJC,IAAAA,eAAe,EAAE,CACb,iEADa,CALb;AAQJC,IAAAA,UAAU,EAAE,CAAC,oDAAD,CARR;AASJC,IAAAA,YAAY,EAAE,CACV,oEADU,CATV;AAYJC,IAAAA,gBAAgB,EAAE,CAAC,sDAAD,CAZd;AAaJC,IAAAA,YAAY,EAAE,CACV,gEADU,CAbV;AAgBJC,IAAAA,cAAc,EAAE,CACZ,oEADY,CAhBZ;AAmBJC,IAAAA,oBAAoB,EAAE,CAClB,sDADkB,CAnBlB;AAsBJC,IAAAA,MAAM,EAAE,CAAC,uDAAD;AAtBJ,GAzYM;AAiadC,EAAAA,YAAY,EAAE;AACVC,IAAAA,cAAc,EAAE,CACZ,oFADY,CADN;AAIVC,IAAAA,QAAQ,EAAE,CACN,+DADM,EAEN,EAFM,EAGN;AAAEC,MAAAA,iBAAiB,EAAE;AAAEC,QAAAA,QAAQ,EAAE;AAAZ;AAArB,KAHM,CAJA;AASVC,IAAAA,WAAW,EAAE,CACT,gEADS,CATH;AAYVC,IAAAA,QAAQ,EAAE,CAAC,2DAAD,CAZA;AAaVC,IAAAA,kBAAkB,EAAE,CAChB,yEADgB,CAbV;AAgBVC,IAAAA,gBAAgB,EAAE,CAAC,sCAAD,CAhBR;AAiBVC,IAAAA,iBAAiB,EAAE,CAAC,gDAAD,CAjBT;AAkBVC,IAAAA,mBAAmB,EAAE,CACjB,yEADiB,EAEjB,EAFiB,EAGjB;AAAE1J,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,oBAAjB;AAAX,KAHiB,CAlBX;AAuBV2J,IAAAA,kBAAkB,EAAE,CAAC,kDAAD,CAvBV;AAwBVC,IAAAA,WAAW,EAAE,CACT,iEADS,CAxBH;AA2BVC,IAAAA,WAAW,EAAE,CAAC,iDAAD;AA3BH,GAjaA;AA8bdC,EAAAA,cAAc,EAAE;AACZC,IAAAA,oBAAoB,EAAE,CAAC,uBAAD,CADV;AAEZC,IAAAA,cAAc,EAAE,CAAC,6BAAD;AAFJ,GA9bF;AAkcdC,EAAAA,UAAU,EAAE;AACRC,IAAAA,0CAA0C,EAAE,CACxC,yEADwC,CADpC;AAIRC,IAAAA,qCAAqC,EAAE,CACnC,gDADmC,CAJ/B;AAORC,IAAAA,0BAA0B,EAAE,CAAC,uBAAD,CAPpB;AAQRhN,IAAAA,wBAAwB,EAAE,CACtB,4DADsB,CARlB;AAWRiN,IAAAA,wCAAwC,EAAE,CACtC,4CADsC,CAXlC;AAcRC,IAAAA,gCAAgC,EAAE,CAC9B,2DAD8B,CAd1B;AAiBRC,IAAAA,kCAAkC,EAAE,CAChC,uCADgC,CAjB5B;AAoBRC,IAAAA,0BAA0B,EAAE,CAAC,0CAAD,CApBpB;AAqBRC,IAAAA,sBAAsB,EAAE,CACpB,mEADoB,CArBhB;AAwBR1M,IAAAA,gBAAgB,EAAE,CACd,+DADc,CAxBV;AA2BR2M,IAAAA,gCAAgC,EAAE,CAC9B,+CAD8B,CA3B1B;AA8BRC,IAAAA,0BAA0B,EAAE,CACxB,gDADwB,CA9BpB;AAiCRC,IAAAA,oCAAoC,EAAE,CAClC,2DADkC,CAjC9B;AAoCRC,IAAAA,uBAAuB,EAAE,CAAC,uCAAD,CApCjB;AAqCRC,IAAAA,gCAAgC,EAAE,CAC9B,yCAD8B,CArC1B;AAwCR7K,IAAAA,gBAAgB,EAAE,CACd,yDADc,CAxCV;AA2CRC,IAAAA,aAAa,EAAE,CACX,4DADW,CA3CP;AA8CR6K,IAAAA,6BAA6B,EAAE,CAC3B,4CAD2B,CA9CvB;AAiDRC,IAAAA,iDAAiD,EAAE,CAC/C,oDAD+C,CAjD3C;AAoDRC,IAAAA,wBAAwB,EAAE,CAAC,sBAAD,CApDlB;AAqDRC,IAAAA,kBAAkB,EAAE,CAChB,4BADgB,EAEhB,EAFgB,EAGhB;AAAE/B,MAAAA,iBAAiB,EAAE;AAAEgC,QAAAA,MAAM,EAAE;AAAV;AAArB,KAHgB,CArDZ;AA0DRC,IAAAA,oCAAoC,EAAE,CAClC,sCADkC,CA1D9B;AA6DRjK,IAAAA,eAAe,EAAE,CAAC,8CAAD,CA7DT;AA8DRkK,IAAAA,6CAA6C,EAAE,CAC3C,yDAD2C,CA9DvC;AAiERC,IAAAA,+BAA+B,EAAE,CAAC,8BAAD,CAjEzB;AAkERC,IAAAA,6CAA6C,EAAE,CAC3C,4EAD2C,CAlEvC;AAqERC,IAAAA,gCAAgC,EAAE,CAC9B,+CAD8B,CArE1B;AAwERC,IAAAA,4CAA4C,EAAE,CAC1C,yDAD0C,CAxEtC;AA2ERC,IAAAA,yBAAyB,EAAE,CAAC,8CAAD,CA3EnB;AA4ERC,IAAAA,wBAAwB,EAAE,CAAC,6CAAD,CA5ElB;AA6ERC,IAAAA,kBAAkB,EAAE,CAChB,sEADgB,CA7EZ;AAgFRC,IAAAA,0BAA0B,EAAE,CAAC,yCAAD;AAhFpB,GAlcE;AAohBdC,EAAAA,UAAU,EAAE;AACR/O,IAAAA,0BAA0B,EAAE,CACxB,+EADwB,CADpB;AAIRI,IAAAA,uBAAuB,EAAE,CACrB,kDADqB,CAJjB;AAORC,IAAAA,wBAAwB,EAAE,CACtB,4DADsB,CAPlB;AAURU,IAAAA,eAAe,EAAE,CAAC,qDAAD,CAVT;AAWRC,IAAAA,gBAAgB,EAAE,CACd,+DADc,CAXV;AAcR6B,IAAAA,eAAe,EAAE,CAAC,+CAAD,CAdT;AAeRC,IAAAA,YAAY,EAAE,CAAC,kDAAD,CAfN;AAgBRI,IAAAA,gBAAgB,EAAE,CACd,yDADc,CAhBV;AAmBRC,IAAAA,aAAa,EAAE,CACX,4DADW,CAnBP;AAsBRgB,IAAAA,cAAc,EAAE,CAAC,oCAAD,CAtBR;AAuBRC,IAAAA,eAAe,EAAE,CAAC,8CAAD,CAvBT;AAwBRI,IAAAA,6BAA6B,EAAE,CAC3B,+DAD2B,CAxBvB;AA2BRc,IAAAA,+BAA+B,EAAE,CAC7B,kFAD6B,CA3BzB;AA8BRW,IAAAA,4BAA4B,EAAE,CAC1B,+DAD0B;AA9BtB,GAphBE;AAsjBd+I,EAAAA,eAAe,EAAE;AACbC,IAAAA,wBAAwB,EAAE,CACtB,uDADsB,CADb;AAIbC,IAAAA,SAAS,EAAE,CACP,+DADO;AAJE,GAtjBH;AA8jBdC,EAAAA,MAAM,EAAE;AAAE5D,IAAAA,GAAG,EAAE,CAAC,aAAD;AAAP,GA9jBM;AA+jBd6D,EAAAA,eAAe,EAAE;AACbC,IAAAA,8CAA8C,EAAE,CAC5C,mEAD4C,CADnC;AAIbC,IAAAA,kDAAkD,EAAE,CAChD,6EADgD,CAJvC;AAObC,IAAAA,iDAAiD,EAAE,CAC/C,0EAD+C,CAPtC;AAUbC,IAAAA,2BAA2B,EAAE,CACzB,oEADyB,CAVhB;AAabC,IAAAA,qCAAqC,EAAE,CACnC,mDADmC,CAb1B;AAgBbC,IAAAA,mBAAmB,EAAE,CACjB,oEADiB,CAhBR;AAmBbC,IAAAA,0CAA0C,EAAE,CACxC,kEADwC,CAnB/B;AAsBbC,IAAAA,uDAAuD,EAAE,CACrD,iEADqD,CAtB5C;AAyBbC,IAAAA,sDAAsD,EAAE,CACpD,qEADoD,CAzB3C;AA4BbC,IAAAA,kDAAkD,EAAE,CAChD,4EADgD,CA5BvC;AA+BbC,IAAAA,2BAA2B,EAAE,CACzB,oEADyB,CA/BhB;AAkCbC,IAAAA,+CAA+C,EAAE,CAC7C,kEAD6C,CAlCpC;AAqCbC,IAAAA,qCAAqC,EAAE,CACnC,mDADmC,CArC1B;AAwCbC,IAAAA,sDAAsD,EAAE,CACpD,iEADoD;AAxC3C,GA/jBH;AA2mBdC,EAAAA,KAAK,EAAE;AACHC,IAAAA,cAAc,EAAE,CAAC,2BAAD,CADb;AAEH/E,IAAAA,MAAM,EAAE,CAAC,aAAD,CAFL;AAGHgF,IAAAA,aAAa,EAAE,CAAC,gCAAD,CAHZ;AAIHC,IAAAA,MAAM,EAAE,CAAC,yBAAD,CAJL;AAKHC,IAAAA,aAAa,EAAE,CAAC,+CAAD,CALZ;AAMHC,IAAAA,IAAI,EAAE,CAAC,6BAAD,CANH;AAOHjF,IAAAA,GAAG,EAAE,CAAC,sBAAD,CAPF;AAQHkF,IAAAA,UAAU,EAAE,CAAC,4CAAD,CART;AASHC,IAAAA,WAAW,EAAE,CAAC,4BAAD,CATV;AAUHC,IAAAA,IAAI,EAAE,CAAC,YAAD,CAVH;AAWHC,IAAAA,YAAY,EAAE,CAAC,+BAAD,CAXX;AAYHC,IAAAA,WAAW,EAAE,CAAC,8BAAD,CAZV;AAaHC,IAAAA,WAAW,EAAE,CAAC,6BAAD,CAbV;AAcHC,IAAAA,SAAS,EAAE,CAAC,4BAAD,CAdR;AAeHC,IAAAA,UAAU,EAAE,CAAC,mBAAD,CAfT;AAgBHC,IAAAA,WAAW,EAAE,CAAC,oBAAD,CAhBV;AAiBHC,IAAAA,IAAI,EAAE,CAAC,2BAAD,CAjBH;AAkBHC,IAAAA,MAAM,EAAE,CAAC,8BAAD,CAlBL;AAmBHnF,IAAAA,MAAM,EAAE,CAAC,wBAAD,CAnBL;AAoBHoF,IAAAA,aAAa,EAAE,CAAC,8CAAD;AApBZ,GA3mBO;AAioBdC,EAAAA,GAAG,EAAE;AACDC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CADX;AAEDC,IAAAA,YAAY,EAAE,CAAC,wCAAD,CAFb;AAGDC,IAAAA,SAAS,EAAE,CAAC,qCAAD,CAHV;AAIDC,IAAAA,SAAS,EAAE,CAAC,qCAAD,CAJV;AAKDC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CALX;AAMDC,IAAAA,SAAS,EAAE,CAAC,6CAAD,CANV;AAODC,IAAAA,OAAO,EAAE,CAAC,gDAAD,CAPR;AAQDC,IAAAA,SAAS,EAAE,CAAC,oDAAD,CARV;AASDC,IAAAA,MAAM,EAAE,CAAC,yCAAD,CATP;AAUDC,IAAAA,MAAM,EAAE,CAAC,8CAAD,CAVP;AAWDC,IAAAA,OAAO,EAAE,CAAC,gDAAD,CAXR;AAYDC,IAAAA,gBAAgB,EAAE,CAAC,mDAAD,CAZjB;AAaDC,IAAAA,SAAS,EAAE,CAAC,4CAAD;AAbV,GAjoBS;AAgpBdC,EAAAA,SAAS,EAAE;AACPC,IAAAA,eAAe,EAAE,CAAC,0BAAD,CADV;AAEPC,IAAAA,WAAW,EAAE,CAAC,iCAAD;AAFN,GAhpBG;AAopBdC,EAAAA,YAAY,EAAE;AACVC,IAAAA,mCAAmC,EAAE,CAAC,8BAAD,CAD3B;AAEVC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CAFb;AAGVC,IAAAA,sBAAsB,EAAE,CAAC,8CAAD,CAHd;AAIVC,IAAAA,iCAAiC,EAAE,CAC/B,8BAD+B,EAE/B,EAF+B,EAG/B;AAAEzP,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,qCAAjB;AAAX,KAH+B,CAJzB;AASV0P,IAAAA,sCAAsC,EAAE,CAAC,iCAAD,CAT9B;AAUVC,IAAAA,wBAAwB,EAAE,CAAC,uCAAD,CAVhB;AAWVC,IAAAA,yBAAyB,EAAE,CACvB,iDADuB,CAXjB;AAcVC,IAAAA,oCAAoC,EAAE,CAClC,iCADkC,EAElC,EAFkC,EAGlC;AAAE7P,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,wCAAjB;AAAX,KAHkC,CAd5B;AAmBV8P,IAAAA,mCAAmC,EAAE,CAAC,8BAAD,CAnB3B;AAoBVC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CApBb;AAqBVC,IAAAA,sBAAsB,EAAE,CAAC,8CAAD,CArBd;AAsBVC,IAAAA,iCAAiC,EAAE,CAC/B,8BAD+B,EAE/B,EAF+B,EAG/B;AAAEjQ,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,qCAAjB;AAAX,KAH+B;AAtBzB,GAppBA;AAgrBdkQ,EAAAA,MAAM,EAAE;AACJC,IAAAA,YAAY,EAAE,CACV,4DADU,CADV;AAIJC,IAAAA,SAAS,EAAE,CAAC,yDAAD,CAJP;AAKJC,IAAAA,sBAAsB,EAAE,CAAC,gDAAD,CALpB;AAMJjI,IAAAA,MAAM,EAAE,CAAC,mCAAD,CANJ;AAOJgF,IAAAA,aAAa,EAAE,CACX,2DADW,CAPX;AAUJkD,IAAAA,WAAW,EAAE,CAAC,mCAAD,CAVT;AAWJC,IAAAA,eAAe,EAAE,CAAC,uCAAD,CAXb;AAYJjD,IAAAA,aAAa,EAAE,CACX,2DADW,CAZX;AAeJkD,IAAAA,WAAW,EAAE,CAAC,4CAAD,CAfT;AAgBJC,IAAAA,eAAe,EAAE,CACb,4DADa,CAhBb;AAmBJnI,IAAAA,GAAG,EAAE,CAAC,iDAAD,CAnBD;AAoBJkF,IAAAA,UAAU,EAAE,CAAC,wDAAD,CApBR;AAqBJkD,IAAAA,QAAQ,EAAE,CAAC,oDAAD,CArBN;AAsBJC,IAAAA,QAAQ,EAAE,CAAC,yCAAD,CAtBN;AAuBJC,IAAAA,YAAY,EAAE,CAAC,yDAAD,CAvBV;AAwBJlD,IAAAA,IAAI,EAAE,CAAC,aAAD,CAxBF;AAyBJmD,IAAAA,aAAa,EAAE,CAAC,qCAAD,CAzBX;AA0BJlD,IAAAA,YAAY,EAAE,CAAC,0DAAD,CA1BV;AA2BJmD,IAAAA,mBAAmB,EAAE,CAAC,2CAAD,CA3BjB;AA4BJC,IAAAA,UAAU,EAAE,CAAC,wDAAD,CA5BR;AA6BJC,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CA7Bf;AA8BJC,IAAAA,qBAAqB,EAAE,CACnB,0DADmB,CA9BnB;AAiCJhG,IAAAA,wBAAwB,EAAE,CAAC,kBAAD,CAjCtB;AAkCJiG,IAAAA,UAAU,EAAE,CAAC,wBAAD,CAlCR;AAmCJC,IAAAA,WAAW,EAAE,CAAC,kCAAD,CAnCT;AAoCJC,IAAAA,sBAAsB,EAAE,CACpB,gEADoB,CApCpB;AAuCJC,IAAAA,iBAAiB,EAAE,CAAC,kCAAD,CAvCf;AAwCJC,IAAAA,iBAAiB,EAAE,CACf,wDADe,CAxCf;AA2CJC,IAAAA,cAAc,EAAE,CAAC,sCAAD,CA3CZ;AA4CJC,IAAAA,IAAI,EAAE,CAAC,sDAAD,CA5CF;AA6CJC,IAAAA,eAAe,EAAE,CACb,2DADa,CA7Cb;AAgDJC,IAAAA,eAAe,EAAE,CACb,8DADa,CAhDb;AAmDJC,IAAAA,WAAW,EAAE,CACT,kEADS,CAnDT;AAsDJC,IAAAA,SAAS,EAAE,CAAC,wDAAD,CAtDP;AAuDJC,IAAAA,MAAM,EAAE,CAAC,yDAAD,CAvDJ;AAwDJ9I,IAAAA,MAAM,EAAE,CAAC,mDAAD,CAxDJ;AAyDJoF,IAAAA,aAAa,EAAE,CAAC,0DAAD,CAzDX;AA0DJ2D,IAAAA,WAAW,EAAE,CAAC,2CAAD,CA1DT;AA2DJC,IAAAA,eAAe,EAAE,CACb,2DADa;AA3Db,GAhrBM;AA+uBdC,EAAAA,QAAQ,EAAE;AACN1J,IAAAA,GAAG,EAAE,CAAC,yBAAD,CADC;AAEN2J,IAAAA,kBAAkB,EAAE,CAAC,eAAD,CAFd;AAGNC,IAAAA,UAAU,EAAE,CAAC,mCAAD;AAHN,GA/uBI;AAovBdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,MAAM,EAAE,CAAC,gBAAD,CADF;AAENC,IAAAA,SAAS,EAAE,CACP,oBADO,EAEP;AAAEC,MAAAA,OAAO,EAAE;AAAE,wBAAgB;AAAlB;AAAX,KAFO;AAFL,GApvBI;AA2vBdC,EAAAA,IAAI,EAAE;AACFjK,IAAAA,GAAG,EAAE,CAAC,WAAD,CADH;AAEFkK,IAAAA,UAAU,EAAE,CAAC,cAAD,CAFV;AAGFC,IAAAA,MAAM,EAAE,CAAC,UAAD,CAHN;AAIFC,IAAAA,IAAI,EAAE,CAAC,OAAD;AAJJ,GA3vBQ;AAiwBdC,EAAAA,UAAU,EAAE;AACRC,IAAAA,YAAY,EAAE,CAAC,qCAAD,CADN;AAERC,IAAAA,iCAAiC,EAAE,CAC/B,gDAD+B,CAF3B;AAKRC,IAAAA,mBAAmB,EAAE,CACjB,sDADiB,CALb;AAQRC,IAAAA,qBAAqB,EAAE,CACnB,mDADmB,CARf;AAWRC,IAAAA,8BAA8B,EAAE,CAC5B,6CAD4B,CAXxB;AAcRC,IAAAA,gBAAgB,EAAE,CAAC,0CAAD,CAdV;AAeRC,IAAAA,eAAe,EAAE,CAAC,kCAAD,CAfT;AAgBRC,IAAAA,aAAa,EAAE,CAAC,8CAAD,CAhBP;AAiBRC,IAAAA,6BAA6B,EAAE,CAAC,qCAAD,CAjBvB;AAkBRC,IAAAA,eAAe,EAAE,CAAC,2CAAD,CAlBT;AAmBRpI,IAAAA,wBAAwB,EAAE,CAAC,sBAAD,CAnBlB;AAoBRiG,IAAAA,UAAU,EAAE,CAAC,4BAAD,CApBJ;AAqBRoC,IAAAA,6BAA6B,EAAE,CAC3B,kDAD2B,CArBvB;AAwBRC,IAAAA,eAAe,EAAE,CAAC,wDAAD,CAxBT;AAyBRC,IAAAA,gBAAgB,EAAE,CACd,kDADc,EAEd,EAFc,EAGd;AAAExT,MAAAA,OAAO,EAAE,CAAC,YAAD,EAAe,+BAAf;AAAX,KAHc,CAzBV;AA8BRyT,IAAAA,eAAe,EAAE,CAAC,wDAAD,CA9BT;AA+BRC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CA/BV;AAgCRhI,IAAAA,yBAAyB,EAAE,CAAC,uBAAD,CAhCnB;AAiCRiI,IAAAA,WAAW,EAAE,CAAC,6BAAD,CAjCL;AAkCRC,IAAAA,WAAW,EAAE,CAAC,kCAAD,CAlCL;AAmCRC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,CAnCxB;AAsCRC,IAAAA,gBAAgB,EAAE,CACd,qEADc,CAtCV;AAyCRC,IAAAA,YAAY,EAAE,CAAC,oCAAD;AAzCN,GAjwBE;AA4yBdC,EAAAA,IAAI,EAAE;AACFC,IAAAA,SAAS,EAAE,CAAC,mCAAD,CADT;AAEFC,IAAAA,gBAAgB,EAAE,CAAC,gDAAD,CAFhB;AAGFC,IAAAA,gBAAgB,EAAE,CAAC,mCAAD,CAHhB;AAIFC,IAAAA,sBAAsB,EAAE,CAAC,oCAAD,CAJtB;AAKFC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CAL5B;AAMFC,IAAAA,kCAAkC,EAAE,CAChC,kDADgC,CANlC;AASFC,IAAAA,gBAAgB,EAAE,CAAC,8BAAD,CAThB;AAUFC,IAAAA,aAAa,EAAE,CAAC,wBAAD,CAVb;AAWFC,IAAAA,aAAa,EAAE,CAAC,oCAAD,CAXb;AAYFnM,IAAAA,GAAG,EAAE,CAAC,iBAAD,CAZH;AAaFoM,IAAAA,iCAAiC,EAAE,CAAC,kCAAD,CAbjC;AAcFC,IAAAA,oBAAoB,EAAE,CAAC,wCAAD,CAdpB;AAeFC,IAAAA,UAAU,EAAE,CAAC,iCAAD,CAfV;AAgBFC,IAAAA,sBAAsB,EAAE,CAAC,wCAAD,CAhBtB;AAiBFxO,IAAAA,kBAAkB,EAAE,CAChB,0DADgB,CAjBlB;AAoBFqH,IAAAA,IAAI,EAAE,CAAC,oBAAD,CApBJ;AAqBFoH,IAAAA,oBAAoB,EAAE,CAAC,+BAAD,CArBpB;AAsBFC,IAAAA,gBAAgB,EAAE,CAAC,wBAAD,CAtBhB;AAuBFC,IAAAA,eAAe,EAAE,CAAC,mDAAD,CAvBf;AAwBFC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CAxBrB;AAyBFhK,IAAAA,wBAAwB,EAAE,CAAC,gBAAD,CAzBxB;AA0BF4C,IAAAA,WAAW,EAAE,CAAC,4BAAD,CA1BX;AA2BFqH,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CA3BnB;AA4BFC,IAAAA,WAAW,EAAE,CAAC,yBAAD,CA5BX;AA6BFC,IAAAA,mCAAmC,EAAE,CAAC,4BAAD,CA7BnC;AA8BFC,IAAAA,wBAAwB,EAAE,CAAC,uCAAD,CA9BxB;AA+BFC,IAAAA,sBAAsB,EAAE,CAAC,6BAAD,CA/BtB;AAgCFC,IAAAA,iBAAiB,EAAE,CAAC,gCAAD,CAhCjB;AAiCFvO,IAAAA,qBAAqB,EAAE,CAAC,4CAAD,CAjCrB;AAkCFwO,IAAAA,YAAY,EAAE,CAAC,uBAAD,CAlCZ;AAmCFC,IAAAA,WAAW,EAAE,CAAC,wCAAD,CAnCX;AAoCFxO,IAAAA,wBAAwB,EAAE,CACtB,oEADsB,CApCxB;AAuCFyO,IAAAA,YAAY,EAAE,CAAC,uCAAD,CAvCZ;AAwCFC,IAAAA,uBAAuB,EAAE,CAAC,2CAAD,CAxCvB;AAyCFC,IAAAA,yBAAyB,EAAE,CACvB,qDADuB,CAzCzB;AA4CFC,IAAAA,0CAA0C,EAAE,CACxC,8CADwC,CA5C1C;AA+CFC,IAAAA,oBAAoB,EAAE,CAAC,wCAAD,CA/CpB;AAgDFC,IAAAA,uCAAuC,EAAE,CACrC,2CADqC,CAhDvC;AAmDFC,IAAAA,WAAW,EAAE,CAAC,sCAAD,CAnDX;AAoDFjN,IAAAA,MAAM,EAAE,CAAC,mBAAD,CApDN;AAqDFkN,IAAAA,oCAAoC,EAAE,CAClC,oCADkC,CArDpC;AAwDFC,IAAAA,aAAa,EAAE,CAAC,mCAAD,CAxDb;AAyDFC,IAAAA,yBAAyB,EAAE,CAAC,0CAAD;AAzDzB,GA5yBQ;AAu2BdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,iCAAiC,EAAE,CAC/B,qDAD+B,CAD7B;AAINC,IAAAA,mBAAmB,EAAE,CACjB,2DADiB,CAJf;AAONC,IAAAA,oBAAoB,EAAE,CAClB,iEADkB,CAPhB;AAUNC,IAAAA,wCAAwC,EAAE,CACtC,mFADsC,CAVpC;AAaNC,IAAAA,0BAA0B,EAAE,CACxB,yFADwB,CAbtB;AAgBNC,IAAAA,2BAA2B,EAAE,CACzB,+FADyB,CAhBvB;AAmBNC,IAAAA,4CAA4C,EAAE,CAC1C,iEAD0C,EAE1C,EAF0C,EAG1C;AAAE3W,MAAAA,OAAO,EAAE,CAAC,UAAD,EAAa,2CAAb;AAAX,KAH0C,CAnBxC;AAwBN4W,IAAAA,2DAA2D,EAAE,CACzD,2DADyD,EAEzD,EAFyD,EAGzD;AACI5W,MAAAA,OAAO,EAAE,CACL,UADK,EAEL,yDAFK;AADb,KAHyD,CAxBvD;AAkCN6W,IAAAA,uDAAuD,EAAE,CACrD,2DADqD,CAlCnD;AAqCNC,IAAAA,yCAAyC,EAAE,CACvC,iEADuC,CArCrC;AAwCNC,IAAAA,0CAA0C,EAAE,CACxC,uEADwC,CAxCtC;AA2CNC,IAAAA,8BAA8B,EAAE,CAC5B,kDAD4B,CA3C1B;AA8CNC,IAAAA,yBAAyB,EAAE,CACvB,wDADuB,CA9CrB;AAiDNC,IAAAA,iBAAiB,EAAE,CACf,8DADe,CAjDb;AAoDNC,IAAAA,qCAAqC,EAAE,CACnC,gFADmC,CApDjC;AAuDNC,IAAAA,gCAAgC,EAAE,CAC9B,sFAD8B,CAvD5B;AA0DNC,IAAAA,wBAAwB,EAAE,CACtB,4FADsB,CA1DpB;AA6DNC,IAAAA,gCAAgC,EAAE,CAAC,oBAAD,CA7D5B;AA8DNC,IAAAA,2BAA2B,EAAE,CAAC,0BAAD,CA9DvB;AA+DNC,IAAAA,mBAAmB,EAAE,CAAC,gCAAD,CA/Df;AAgENC,IAAAA,kCAAkC,EAAE,CAChC,mEADgC,CAhE9B;AAmENC,IAAAA,oBAAoB,EAAE,CAClB,yEADkB,CAnEhB;AAsENC,IAAAA,qBAAqB,EAAE,CACnB,+EADmB,CAtEjB;AAyENC,IAAAA,yCAAyC,EAAE,CACvC,yFADuC,CAzErC;AA4ENC,IAAAA,2BAA2B,EAAE,CACzB,+FADyB,CA5EvB;AA+ENC,IAAAA,4BAA4B,EAAE,CAC1B,qGAD0B;AA/ExB,GAv2BI;AA07BdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,eAAe,EAAE,CAAC,qDAAD,CADX;AAENC,IAAAA,UAAU,EAAE,CAAC,0CAAD,CAFN;AAGNC,IAAAA,YAAY,EAAE,CAAC,qCAAD,CAHR;AAIN9N,IAAAA,0BAA0B,EAAE,CAAC,qBAAD,CAJtB;AAKN+N,IAAAA,YAAY,EAAE,CAAC,2BAAD,CALR;AAMNC,IAAAA,aAAa,EAAE,CAAC,qCAAD,CANT;AAON/K,IAAAA,MAAM,EAAE,CAAC,+BAAD,CAPF;AAQNgL,IAAAA,UAAU,EAAE,CAAC,0CAAD,CARN;AASNC,IAAAA,YAAY,EAAE,CAAC,sCAAD,CATR;AAUNhQ,IAAAA,GAAG,EAAE,CAAC,4BAAD,CAVC;AAWNiQ,IAAAA,OAAO,EAAE,CAAC,uCAAD,CAXH;AAYNC,IAAAA,SAAS,EAAE,CAAC,mCAAD,CAZL;AAaNC,IAAAA,oBAAoB,EAAE,CAClB,gEADkB,CAbhB;AAgBNC,IAAAA,SAAS,EAAE,CAAC,yCAAD,CAhBL;AAiBNC,IAAAA,iBAAiB,EAAE,CAAC,0CAAD,CAjBb;AAkBNC,IAAAA,WAAW,EAAE,CAAC,oCAAD,CAlBP;AAmBN1H,IAAAA,UAAU,EAAE,CAAC,0BAAD,CAnBN;AAoBNC,IAAAA,WAAW,EAAE,CAAC,oCAAD,CApBP;AAqBNtD,IAAAA,WAAW,EAAE,CAAC,gCAAD,CArBP;AAsBNgL,IAAAA,QAAQ,EAAE,CAAC,8CAAD,CAtBJ;AAuBNC,IAAAA,UAAU,EAAE,CAAC,0CAAD,CAvBN;AAwBNC,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,CAxBd;AA2BNhQ,IAAAA,MAAM,EAAE,CAAC,8BAAD,CA3BF;AA4BNiQ,IAAAA,UAAU,EAAE,CAAC,yCAAD,CA5BN;AA6BNC,IAAAA,YAAY,EAAE,CAAC,qCAAD;AA7BR,GA17BI;AAy9BdC,EAAAA,KAAK,EAAE;AACHC,IAAAA,aAAa,EAAE,CAAC,qDAAD,CADZ;AAEH/Q,IAAAA,MAAM,EAAE,CAAC,kCAAD,CAFL;AAGHgR,IAAAA,2BAA2B,EAAE,CACzB,8EADyB,CAH1B;AAMHC,IAAAA,YAAY,EAAE,CAAC,wDAAD,CANX;AAOHC,IAAAA,mBAAmB,EAAE,CACjB,yDADiB,CAPlB;AAUHC,IAAAA,mBAAmB,EAAE,CACjB,sEADiB,CAVlB;AAaHC,IAAAA,mBAAmB,EAAE,CACjB,0DADiB,CAblB;AAgBHC,IAAAA,aAAa,EAAE,CACX,8EADW,CAhBZ;AAmBHnR,IAAAA,GAAG,EAAE,CAAC,+CAAD,CAnBF;AAoBHoR,IAAAA,SAAS,EAAE,CACP,mEADO,CApBR;AAuBHC,IAAAA,gBAAgB,EAAE,CAAC,uDAAD,CAvBf;AAwBHjM,IAAAA,IAAI,EAAE,CAAC,iCAAD,CAxBH;AAyBHkM,IAAAA,qBAAqB,EAAE,CACnB,4EADmB,CAzBpB;AA4BHhM,IAAAA,WAAW,EAAE,CAAC,uDAAD,CA5BV;AA6BHiM,IAAAA,SAAS,EAAE,CAAC,qDAAD,CA7BR;AA8BHC,IAAAA,sBAAsB,EAAE,CACpB,mEADoB,CA9BrB;AAiCHC,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,CAjCjB;AAoCHC,IAAAA,yBAAyB,EAAE,CAAC,0CAAD,CApCxB;AAqCHC,IAAAA,WAAW,EAAE,CAAC,uDAAD,CArCV;AAsCHC,IAAAA,KAAK,EAAE,CAAC,qDAAD,CAtCJ;AAuCHC,IAAAA,wBAAwB,EAAE,CACtB,sEADsB,CAvCvB;AA0CHC,IAAAA,gBAAgB,EAAE,CACd,oEADc,CA1Cf;AA6CHC,IAAAA,YAAY,EAAE,CACV,2EADU,CA7CX;AAgDHtR,IAAAA,MAAM,EAAE,CAAC,iDAAD,CAhDL;AAiDHuR,IAAAA,YAAY,EAAE,CACV,6DADU,CAjDX;AAoDHC,IAAAA,YAAY,EAAE,CACV,mEADU,CApDX;AAuDHC,IAAAA,mBAAmB,EAAE,CACjB,yDADiB;AAvDlB,GAz9BO;AAohCdC,EAAAA,SAAS,EAAE;AAAEnS,IAAAA,GAAG,EAAE,CAAC,iBAAD;AAAP,GAphCG;AAqhCdoS,EAAAA,SAAS,EAAE;AACPC,IAAAA,sBAAsB,EAAE,CACpB,4DADoB,CADjB;AAIPC,IAAAA,cAAc,EAAE,CACZ,4DADY,CAJT;AAOPC,IAAAA,qBAAqB,EAAE,CACnB,mEADmB,CAPhB;AAUPC,IAAAA,iCAAiC,EAAE,CAC/B,kEAD+B,CAV5B;AAaPC,IAAAA,gBAAgB,EAAE,CACd,4DADc,CAbX;AAgBPC,IAAAA,mCAAmC,EAAE,CACjC,wGADiC,CAhB9B;AAmBPC,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,CAnBvB;AAsBPC,IAAAA,sBAAsB,EAAE,CACpB,4EADoB,CAtBjB;AAyBPC,IAAAA,cAAc,EAAE,CACZ,4EADY,CAzBT;AA4BPC,IAAAA,qBAAqB,EAAE,CACnB,mFADmB,CA5BhB;AA+BPC,IAAAA,2BAA2B,EAAE,CACzB,kFADyB,CA/BtB;AAkCPC,IAAAA,gBAAgB,EAAE,CACd,4EADc,CAlCX;AAqCPC,IAAAA,uBAAuB,EAAE,CACrB,8FADqB,CArClB;AAwCPC,IAAAA,8BAA8B,EAAE,CAC5B,wHAD4B,CAxCzB;AA2CPC,IAAAA,oBAAoB,EAAE,CAClB,2DADkB,CA3Cf;AA8CPC,IAAAA,YAAY,EAAE,CAAC,2DAAD,CA9CP;AA+CPC,IAAAA,mBAAmB,EAAE,CACjB,kEADiB,CA/Cd;AAkDPC,IAAAA,+BAA+B,EAAE,CAC7B,iEAD6B,CAlD1B;AAqDPC,IAAAA,cAAc,EAAE,CACZ,2DADY,CArDT;AAwDPC,IAAAA,iCAAiC,EAAE,CAC/B,uGAD+B,CAxD5B;AA2DPC,IAAAA,0BAA0B,EAAE,CACxB,6EADwB;AA3DrB,GArhCG;AAolCdC,EAAAA,KAAK,EAAE;AACHC,IAAAA,gBAAgB,EAAE,CACd,oDADc,EAEd,EAFc,EAGd;AAAEjc,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,sCAAV;AAAX,KAHc,CADf;AAMHkc,IAAAA,oCAAoC,EAAE,CAClC,oDADkC,CANnC;AASHC,IAAAA,wBAAwB,EAAE,CACtB,2EADsB,EAEtB,EAFsB,EAGtB;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAHsB,CATvB;AAcHpE,IAAAA,eAAe,EAAE,CAAC,oDAAD,CAdd;AAeHqE,IAAAA,sBAAsB,EAAE,CACpB,yFADoB,EAEpB,EAFoB,EAGpB;AAAED,MAAAA,SAAS,EAAE;AAAb,KAHoB,CAfrB;AAoBHE,IAAAA,yBAAyB,EAAE,CACvB,4EADuB,EAEvB,EAFuB,EAGvB;AAAEF,MAAAA,SAAS,EAAE;AAAb,KAHuB,CApBxB;AAyBHG,IAAAA,yBAAyB,EAAE,CACvB,4EADuB,EAEvB,EAFuB,EAGvB;AAAEH,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAzBxB;AA8BHI,IAAAA,iBAAiB,EAAE,CAAC,oDAAD,CA9BhB;AA+BHC,IAAAA,wBAAwB,EAAE,CACtB,gDADsB,CA/BvB;AAkCHC,IAAAA,gBAAgB,EAAE,CAAC,6CAAD,CAlCf;AAmCHC,IAAAA,cAAc,EAAE,CAAC,mDAAD,CAnCb;AAoCHC,IAAAA,0BAA0B,EAAE,CACxB,8CADwB,CApCzB;AAuCHC,IAAAA,cAAc,EAAE,CAAC,sCAAD,CAvCb;AAwCHC,IAAAA,mBAAmB,EAAE,CACjB,0DADiB,CAxClB;AA2CHC,IAAAA,+BAA+B,EAAE,CAC7B,6EAD6B,CA3C9B;AA8CHC,IAAAA,kBAAkB,EAAE,CAAC,2CAAD,CA9CjB;AA+CHC,IAAAA,eAAe,EAAE,CAAC,iCAAD,CA/Cd;AAgDHC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAhDf;AAiDHC,IAAAA,sBAAsB,EAAE,CACpB,iEADoB,CAjDrB;AAoDHC,IAAAA,mBAAmB,EAAE,CAAC,uCAAD,CApDlB;AAqDHhT,IAAAA,0BAA0B,EAAE,CAAC,kBAAD,CArDzB;AAsDHiT,IAAAA,UAAU,EAAE,CAAC,kCAAD,CAtDT;AAuDHC,IAAAA,WAAW,EAAE,CAAC,wBAAD,CAvDV;AAwDHC,IAAAA,yBAAyB,EAAE,CACvB,2DADuB,CAxDxB;AA2DHC,IAAAA,0BAA0B,EAAE,CAAC,2CAAD,CA3DzB;AA4DHC,IAAAA,eAAe,EAAE,CAAC,kCAAD,CA5Dd;AA6DHC,IAAAA,aAAa,EAAE,CAAC,qCAAD,CA7DZ;AA8DHC,IAAAA,mBAAmB,EAAE,CAAC,4CAAD,CA9DlB;AA+DHC,IAAAA,mBAAmB,EAAE,CACjB,uDADiB,CA/DlB;AAkEHpJ,IAAAA,aAAa,EAAE,CAAC,kCAAD,CAlEZ;AAmEHqJ,IAAAA,iBAAiB,EAAE,CACf,qDADe,EAEf,EAFe,EAGf;AAAE7d,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,uCAAV;AAAX,KAHe,CAnEhB;AAwEH8d,IAAAA,qCAAqC,EAAE,CACnC,qDADmC,CAxEpC;AA2EHzQ,IAAAA,MAAM,EAAE,CAAC,8BAAD,CA3EL;AA4EH0Q,IAAAA,wBAAwB,EAAE,CACtB,wEADsB,CA5EvB;AA+EHC,IAAAA,2BAA2B,EAAE,CACzB,0EADyB,CA/E1B;AAkFHC,IAAAA,mBAAmB,EAAE,CACjB,8DADiB,CAlFlB;AAqFHC,IAAAA,cAAc,EAAE,CAAC,sDAAD,CArFb;AAsFHC,IAAAA,sBAAsB,EAAE,CACpB,2DADoB,CAtFrB;AAyFHC,IAAAA,mBAAmB,EAAE,CAAC,oDAAD,CAzFlB;AA0FHC,IAAAA,+BAA+B,EAAE,CAC7B,+EAD6B,CA1F9B;AA6FHC,IAAAA,eAAe,EAAE,CAAC,4CAAD,CA7Fd;AA8FHC,IAAAA,gBAAgB,EAAE,CACd,0DADc,CA9Ff;AAiGHC,IAAAA,UAAU,EAAE,CAAC,8CAAD,CAjGT;AAkGHC,IAAAA,gBAAgB,EAAE,CACd,0DADc,CAlGf;AAqGHC,IAAAA,eAAe,EAAE,CAAC,oCAAD,CArGd;AAsGHC,IAAAA,iCAAiC,EAAE,CAC/B,yFAD+B,CAtGhC;AAyGHC,IAAAA,aAAa,EAAE,CAAC,oDAAD,CAzGZ;AA0GHC,IAAAA,kBAAkB,EAAE,CAChB,yDADgB,CA1GjB;AA6GHC,IAAAA,mBAAmB,EAAE,CACjB,kEADiB,CA7GlB;AAgHHrK,IAAAA,aAAa,EAAE,CAAC,8CAAD,CAhHZ;AAiHHsK,IAAAA,6BAA6B,EAAE,CAC3B,uDAD2B,CAjH5B;AAoHHC,IAAAA,iBAAiB,EAAE,CAAC,kCAAD,CApHhB;AAqHHC,IAAAA,0BAA0B,EAAE,CACxB,mDADwB,CArHzB;AAwHHC,IAAAA,eAAe,EAAE,CACb,yCADa,EAEb,EAFa,EAGb;AAAElf,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,wBAAV;AAAX,KAHa,CAxHd;AA6HHmf,IAAAA,sBAAsB,EAAE,CAAC,yCAAD,CA7HrB;AA8HHC,IAAAA,sBAAsB,EAAE,CAAC,yCAAD,CA9HrB;AA+HHC,IAAAA,4BAA4B,EAAE,CAC1B,oDAD0B,CA/H3B;AAkIHC,IAAAA,gBAAgB,EAAE,CAAC,+BAAD,CAlIf;AAmIHC,IAAAA,yBAAyB,EAAE,CACvB,gDADuB,CAnIxB;AAsIHC,IAAAA,oBAAoB,EAAE,CAClB,oDADkB,CAtInB;AAyIHlX,IAAAA,GAAG,EAAE,CAAC,2BAAD,CAzIF;AA0IHmX,IAAAA,qBAAqB,EAAE,CACnB,qEADmB,CA1IpB;AA6IHC,IAAAA,wBAAwB,EAAE,CACtB,uEADsB,CA7IvB;AAgJHC,IAAAA,kBAAkB,EAAE,CAAC,wCAAD,CAhJjB;AAiJHC,IAAAA,yBAAyB,EAAE,CACvB,wFADuB,CAjJxB;AAoJHC,IAAAA,YAAY,EAAE,CAAC,kCAAD,CApJX;AAqJHC,IAAAA,kCAAkC,EAAE,CAChC,0EADgC,CArJjC;AAwJHC,IAAAA,WAAW,EAAE,CAAC,mDAAD,CAxJV;AAyJHC,IAAAA,SAAS,EAAE,CAAC,6CAAD,CAzJR;AA0JHC,IAAAA,mBAAmB,EAAE,CACjB,wDADiB,CA1JlB;AA6JHC,IAAAA,SAAS,EAAE,CAAC,0CAAD,CA7JR;AA8JHC,IAAAA,qBAAqB,EAAE,CAAC,gDAAD,CA9JpB;AA+JHC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,CA/J7B;AAkKHC,IAAAA,uBAAuB,EAAE,CAAC,gDAAD,CAlKtB;AAmKHzR,IAAAA,SAAS,EAAE,CAAC,yCAAD,CAnKR;AAoKH0R,IAAAA,sBAAsB,EAAE,CAAC,iDAAD,CApKrB;AAqKHC,IAAAA,gBAAgB,EAAE,CAAC,iDAAD,CArKf;AAsKHC,IAAAA,4BAA4B,EAAE,CAC1B,4EAD0B,CAtK3B;AAyKHC,IAAAA,0BAA0B,EAAE,CAAC,6CAAD,CAzKzB;AA0KHC,IAAAA,UAAU,EAAE,CAAC,2CAAD,CA1KT;AA2KHC,IAAAA,oBAAoB,EAAE,CAAC,8CAAD,CA3KnB;AA4KHC,IAAAA,YAAY,EAAE,CAAC,yCAAD,CA5KX;AA6KHC,IAAAA,aAAa,EAAE,CAAC,uDAAD,CA7KZ;AA8KHC,IAAAA,mBAAmB,EAAE,CACjB,4EADiB,CA9KlB;AAiLHC,IAAAA,cAAc,EAAE,CACZ,2DADY,CAjLb;AAoLHC,IAAAA,mBAAmB,EAAE,CAAC,+CAAD,CApLlB;AAqLHC,IAAAA,gBAAgB,EAAE,CAAC,2CAAD,CArLf;AAsLHC,IAAAA,QAAQ,EAAE,CAAC,iCAAD,CAtLP;AAuLHC,IAAAA,aAAa,EAAE,CAAC,mDAAD,CAvLZ;AAwLHC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAxLlB;AAyLHC,IAAAA,qBAAqB,EAAE,CAAC,+CAAD,CAzLpB;AA0LHC,IAAAA,8BAA8B,EAAE,CAC5B,sFAD4B,CA1L7B;AA6LHC,IAAAA,iBAAiB,EAAE,CAAC,4CAAD,CA7LhB;AA8LHC,IAAAA,SAAS,EAAE,CAAC,kCAAD,CA9LR;AA+LHC,IAAAA,oBAAoB,EAAE,CAAC,wCAAD,CA/LnB;AAgMHC,IAAAA,UAAU,EAAE,CAAC,iDAAD,CAhMT;AAiMHC,IAAAA,eAAe,EAAE,CAAC,sDAAD,CAjMd;AAkMHC,IAAAA,eAAe,EAAE,CAAC,+CAAD,CAlMd;AAmMHC,IAAAA,yBAAyB,EAAE,CACvB,+EADuB,CAnMxB;AAsMHC,IAAAA,mCAAmC,EAAE,CACjC,2EADiC,CAtMlC;AAyMHC,IAAAA,WAAW,EAAE,CAAC,iDAAD,CAzMV;AA0MHC,IAAAA,eAAe,EAAE,CAAC,qDAAD,CA1Md;AA2MHC,IAAAA,mCAAmC,EAAE,CACjC,2EADiC,CA3MlC;AA8MHC,IAAAA,QAAQ,EAAE,CAAC,yCAAD,CA9MP;AA+MHtN,IAAAA,UAAU,EAAE,CAAC,2CAAD,CA/MT;AAgNHuN,IAAAA,uBAAuB,EAAE,CACrB,kDADqB,CAhNtB;AAmNH9b,IAAAA,kBAAkB,EAAE,CAChB,oEADgB,CAnNjB;AAsNH+b,IAAAA,aAAa,EAAE,CAAC,qCAAD,CAtNZ;AAuNHC,IAAAA,YAAY,EAAE,CAAC,oCAAD,CAvNX;AAwNHC,IAAAA,yBAAyB,EAAE,CACvB,oEADuB,CAxNxB;AA2NH3J,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CA3NhB;AA4NH4J,IAAAA,qBAAqB,EAAE,CACnB,yDADmB,CA5NpB;AA+NHC,IAAAA,yBAAyB,EAAE,CAAC,oCAAD,CA/NxB;AAgOHC,IAAAA,wBAAwB,EAAE,CACtB,kDADsB,CAhOvB;AAmOH7U,IAAAA,WAAW,EAAE,CAAC,mCAAD,CAnOV;AAoOH8U,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CApOf;AAqOHC,IAAAA,cAAc,EAAE,CAAC,gCAAD,CArOb;AAsOHC,IAAAA,sBAAsB,EAAE,CACpB,gEADoB,CAtOrB;AAyOHC,IAAAA,eAAe,EAAE,CAAC,uCAAD,CAzOd;AA0OH5X,IAAAA,wBAAwB,EAAE,CAAC,iBAAD,CA1OvB;AA2OHiG,IAAAA,UAAU,EAAE,CAAC,uBAAD,CA3OT;AA4OHrD,IAAAA,WAAW,EAAE,CAAC,6BAAD,CA5OV;AA6OHC,IAAAA,SAAS,EAAE,CAAC,iCAAD,CA7OR;AA8OHgV,IAAAA,eAAe,EAAE,CAAC,uCAAD,CA9Od;AA+OHC,IAAAA,mCAAmC,EAAE,CAAC,kCAAD,CA/OlC;AAgPHC,IAAAA,aAAa,EAAE,CAAC,qCAAD,CAhPZ;AAiPHC,IAAAA,eAAe,EAAE,CAAC,wCAAD,CAjPd;AAkPHlV,IAAAA,UAAU,EAAE,CAAC,mBAAD,CAlPT;AAmPHmV,IAAAA,oCAAoC,EAAE,CAClC,sDADkC,CAnPnC;AAsPHC,IAAAA,iBAAiB,EAAE,CACf,wDADe,CAtPhB;AAyPHC,IAAAA,YAAY,EAAE,CAAC,oCAAD,CAzPX;AA0PHC,IAAAA,iBAAiB,EAAE,CAAC,2CAAD,CA1PhB;AA2PHC,IAAAA,QAAQ,EAAE,CAAC,gCAAD,CA3PP;AA4PHC,IAAAA,SAAS,EAAE,CAAC,iCAAD,CA5PR;AA6PHvc,IAAAA,qBAAqB,EAAE,CACnB,sDADmB,CA7PpB;AAgQHwO,IAAAA,YAAY,EAAE,CAAC,iCAAD,CAhQX;AAiQH0E,IAAAA,KAAK,EAAE,CAAC,mCAAD,CAjQJ;AAkQHsJ,IAAAA,aAAa,EAAE,CAAC,2CAAD,CAlQZ;AAmQH/N,IAAAA,WAAW,EAAE,CAAC,kDAAD,CAnQV;AAoQHxO,IAAAA,wBAAwB,EAAE,CACtB,8EADsB,CApQvB;AAuQHwc,IAAAA,2BAA2B,EAAE,CACzB,6EADyB,EAEzB,EAFyB,EAGzB;AAAErH,MAAAA,SAAS,EAAE;AAAb,KAHyB,CAvQ1B;AA4QHrD,IAAAA,kBAAkB,EAAE,CAChB,uDADgB,CA5QjB;AA+QH2K,IAAAA,yBAAyB,EAAE,CACvB,2FADuB,EAEvB,EAFuB,EAGvB;AAAEtH,MAAAA,SAAS,EAAE;AAAb,KAHuB,CA/QxB;AAoRHuH,IAAAA,2BAA2B,EAAE,CACzB,kFADyB,CApR1B;AAuRHC,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,EAE1B,EAF0B,EAG1B;AAAExH,MAAAA,SAAS,EAAE;AAAb,KAH0B,CAvR3B;AA4RHyH,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,EAE1B,EAF0B,EAG1B;AAAEzH,MAAAA,SAAS,EAAE;AAAb,KAH0B,CA5R3B;AAiSH0H,IAAAA,YAAY,EAAE,CAAC,qDAAD,CAjSX;AAkSHC,IAAAA,gBAAgB,EAAE,CAAC,kCAAD,CAlSf;AAmSHC,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CAnShB;AAoSHC,IAAAA,wBAAwB,EAAE,CACtB,wEADsB,CApSvB;AAuSHC,IAAAA,wBAAwB,EAAE,CACtB,0EADsB,EAEtB,EAFsB,EAGtB;AAAE9H,MAAAA,SAAS,EAAE;AAAb,KAHsB,CAvSvB;AA4SH+H,IAAAA,sBAAsB,EAAE,CACpB,wFADoB,EAEpB,EAFoB,EAGpB;AAAE/H,MAAAA,SAAS,EAAE;AAAb,KAHoB,CA5SrB;AAiTHgI,IAAAA,yBAAyB,EAAE,CACvB,2EADuB,EAEvB,EAFuB,EAGvB;AAAEhI,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAjTxB;AAsTHiI,IAAAA,yBAAyB,EAAE,CACvB,2EADuB,EAEvB,EAFuB,EAGvB;AAAEjI,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAtTxB;AA2THkI,IAAAA,eAAe,EAAE,CAAC,kDAAD,CA3Td;AA4THC,IAAAA,QAAQ,EAAE,CAAC,qCAAD,CA5TP;AA6THxb,IAAAA,MAAM,EAAE,CAAC,6BAAD,CA7TL;AA8THyb,IAAAA,sBAAsB,EAAE,CACpB,wDADoB,CA9TrB;AAiUHC,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CAjUlB;AAkUHC,IAAAA,+BAA+B,EAAE,CAAC,iCAAD,CAlU9B;AAmUHC,IAAAA,gBAAgB,EAAE,CACd,yDADc,CAnUf;AAsUHC,IAAAA,iCAAiC,EAAE,CAC/B,wFAD+B,CAtUhC;AAyUHC,IAAAA,aAAa,EAAE,CAAC,mDAAD,CAzUZ;AA0UHC,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,CA1UjB;AA6UHC,IAAAA,0BAA0B,EAAE,CACxB,iFADwB,EAExB,EAFwB,EAGxB;AAAE/kB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,6BAAV;AAAX,KAHwB,CA7UzB;AAkVHglB,IAAAA,2BAA2B,EAAE,CACzB,iFADyB,CAlV1B;AAqVH9O,IAAAA,aAAa,EAAE,CAAC,6CAAD,CArVZ;AAsVH+O,IAAAA,0BAA0B,EAAE,CACxB,oDADwB,CAtVzB;AAyVHC,IAAAA,kBAAkB,EAAE,CAChB,sEADgB,EAEhB;AAAEC,MAAAA,OAAO,EAAE;AAAX,KAFgB;AAzVjB,GAplCO;AAk7CdC,EAAAA,MAAM,EAAE;AACJC,IAAAA,IAAI,EAAE,CAAC,kBAAD,CADF;AAEJC,IAAAA,OAAO,EAAE,CAAC,qBAAD,CAFL;AAGJC,IAAAA,qBAAqB,EAAE,CAAC,oBAAD,CAHnB;AAIJC,IAAAA,MAAM,EAAE,CAAC,oBAAD,CAJJ;AAKJxJ,IAAAA,KAAK,EAAE,CAAC,0BAAD,CALH;AAMJyJ,IAAAA,MAAM,EAAE,CAAC,oBAAD,CANJ;AAOJC,IAAAA,KAAK,EAAE,CAAC,mBAAD;AAPH,GAl7CM;AA27CdC,EAAAA,cAAc,EAAE;AACZzc,IAAAA,QAAQ,EAAE,CACN,iEADM,CADE;AAIZ0c,IAAAA,uBAAuB,EAAE,CACrB,sDADqB,CAJb;AAOZpc,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAPN;AAQZC,IAAAA,iBAAiB,EAAE,CAAC,kDAAD,CARP;AASZoc,IAAAA,qBAAqB,EAAE,CACnB,2EADmB,CATX;AAYZjc,IAAAA,WAAW,EAAE,CACT,mEADS;AAZD,GA37CF;AA28Cdkc,EAAAA,KAAK,EAAE;AACHC,IAAAA,iCAAiC,EAAE,CAC/B,0DAD+B,CADhC;AAIHC,IAAAA,kCAAkC,EAAE,CAChC,yDADgC,CAJjC;AAOHC,IAAAA,+BAA+B,EAAE,CAC7B,wDAD6B,CAP9B;AAUHC,IAAAA,+BAA+B,EAAE,CAC7B,yDAD6B,CAV9B;AAaHC,IAAAA,4BAA4B,EAAE,CAC1B,wDAD0B,CAb3B;AAgBH/d,IAAAA,MAAM,EAAE,CAAC,wBAAD,CAhBL;AAiBHge,IAAAA,4BAA4B,EAAE,CAC1B,6EAD0B,CAjB3B;AAoBHC,IAAAA,qBAAqB,EAAE,CAAC,gDAAD,CApBpB;AAqBHC,IAAAA,4BAA4B,EAAE,CAC1B,gGAD0B,CArB3B;AAwBHC,IAAAA,qBAAqB,EAAE,CACnB,sEADmB,CAxBpB;AA2BHC,IAAAA,WAAW,EAAE,CAAC,sCAAD,CA3BV;AA4BHC,IAAAA,SAAS,EAAE,CAAC,mCAAD,CA5BR;AA6BHC,IAAAA,yBAAyB,EAAE,CACvB,6FADuB,CA7BxB;AAgCHC,IAAAA,kBAAkB,EAAE,CAChB,mEADgB,CAhCjB;AAmCHC,IAAAA,yBAAyB,EAAE,CACvB,0DADuB,CAnCxB;AAsCHlZ,IAAAA,IAAI,EAAE,CAAC,uBAAD,CAtCH;AAuCHmZ,IAAAA,cAAc,EAAE,CAAC,yCAAD,CAvCb;AAwCHC,IAAAA,2BAA2B,EAAE,CACzB,4EADyB,CAxC1B;AA2CHC,IAAAA,oBAAoB,EAAE,CAAC,+CAAD,CA3CnB;AA4CH9b,IAAAA,wBAAwB,EAAE,CAAC,iBAAD,CA5CvB;AA6CH+b,IAAAA,gBAAgB,EAAE,CAAC,2CAAD,CA7Cf;AA8CHC,IAAAA,2BAA2B,EAAE,CACzB,+CADyB,CA9C1B;AAiDHC,IAAAA,iBAAiB,EAAE,CAAC,4CAAD,CAjDhB;AAkDHC,IAAAA,cAAc,EAAE,CAAC,yCAAD,CAlDb;AAmDHC,IAAAA,4BAA4B,EAAE,CAC1B,6DAD0B,CAnD3B;AAsDHC,IAAAA,kBAAkB,EAAE,CAChB,4DADgB,CAtDjB;AAyDHC,IAAAA,eAAe,EAAE,CACb,2DADa,CAzDd;AA4DHC,IAAAA,4BAA4B,EAAE,CAC1B,+FAD0B,CA5D3B;AA+DHC,IAAAA,qBAAqB,EAAE,CACnB,qEADmB,CA/DpB;AAkEHC,IAAAA,WAAW,EAAE,CAAC,qCAAD;AAlEV,GA38CO;AA+gDd/B,EAAAA,KAAK,EAAE;AACHgC,IAAAA,wBAAwB,EAAE,CACtB,mBADsB,EAEtB,EAFsB,EAGtB;AAAE1nB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,8BAAV;AAAX,KAHsB,CADvB;AAMH2nB,IAAAA,4BAA4B,EAAE,CAAC,mBAAD,CAN3B;AAOHC,IAAAA,KAAK,EAAE,CAAC,6BAAD,CAPJ;AAQHC,IAAAA,YAAY,EAAE,CAAC,6BAAD,CARX;AASHC,IAAAA,qBAAqB,EAAE,CAAC,+CAAD,CATpB;AAUHC,IAAAA,oCAAoC,EAAE,CAAC,gCAAD,CAVnC;AAWHC,IAAAA,4BAA4B,EAAE,CAC1B,qBAD0B,EAE1B,EAF0B,EAG1B;AAAEhoB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,kCAAV;AAAX,KAH0B,CAX3B;AAgBHioB,IAAAA,gCAAgC,EAAE,CAAC,qBAAD,CAhB/B;AAiBHC,IAAAA,kCAAkC,EAAE,CAChC,iBADgC,EAEhC,EAFgC,EAGhC;AAAEloB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,wCAAV;AAAX,KAHgC,CAjBjC;AAsBHmoB,IAAAA,sCAAsC,EAAE,CAAC,iBAAD,CAtBrC;AAuBHC,IAAAA,2BAA2B,EAAE,CACzB,qBADyB,EAEzB,EAFyB,EAGzB;AAAEpoB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,iCAAV;AAAX,KAHyB,CAvB1B;AA4BHqoB,IAAAA,+BAA+B,EAAE,CAAC,qBAAD,CA5B9B;AA6BHC,IAAAA,4BAA4B,EAAE,CAC1B,oCAD0B,EAE1B,EAF0B,EAG1B;AAAEtoB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,kCAAV;AAAX,KAH0B,CA7B3B;AAkCHuoB,IAAAA,gCAAgC,EAAE,CAAC,oCAAD,CAlC/B;AAmCHC,IAAAA,kCAAkC,EAAE,CAChC,4BADgC,EAEhC,EAFgC,EAGhC;AAAExoB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,wCAAV;AAAX,KAHgC,CAnCjC;AAwCHyoB,IAAAA,sCAAsC,EAAE,CAAC,4BAAD,CAxCrC;AAyCHC,IAAAA,MAAM,EAAE,CAAC,gCAAD,CAzCL;AA0CH9iB,IAAAA,gBAAgB,EAAE,CAAC,WAAD,CA1Cf;AA2CH+iB,IAAAA,aAAa,EAAE,CAAC,uBAAD,CA3CZ;AA4CHC,IAAAA,iBAAiB,EAAE,CAAC,iCAAD,CA5ChB;AA6CHC,IAAAA,yBAAyB,EAAE,CACvB,iCADuB,EAEvB,EAFuB,EAGvB;AAAE7oB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,+BAAV;AAAX,KAHuB,CA7CxB;AAkDH8oB,IAAAA,6BAA6B,EAAE,CAAC,iCAAD,CAlD5B;AAmDHC,IAAAA,+BAA+B,EAAE,CAC7B,yBAD6B,EAE7B,EAF6B,EAG7B;AAAE/oB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,qCAAV;AAAX,KAH6B,CAnD9B;AAwDHgpB,IAAAA,mCAAmC,EAAE,CAAC,yBAAD,CAxDlC;AAyDHtb,IAAAA,IAAI,EAAE,CAAC,YAAD,CAzDH;AA0DHub,IAAAA,0BAA0B,EAAE,CACxB,kBADwB,EAExB,EAFwB,EAGxB;AAAEjpB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,gCAAV;AAAX,KAHwB,CA1DzB;AA+DHkpB,IAAAA,8BAA8B,EAAE,CAAC,kBAAD,CA/D7B;AAgEHC,IAAAA,0BAA0B,EAAE,CACxB,kBADwB,EAExB,EAFwB,EAGxB;AAAEnpB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,gCAAV;AAAX,KAHwB,CAhEzB;AAqEHopB,IAAAA,8BAA8B,EAAE,CAAC,kBAAD,CArE7B;AAsEHC,IAAAA,2BAA2B,EAAE,CACzB,qBADyB,EAEzB,EAFyB,EAGzB;AAAErpB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,iCAAV;AAAX,KAHyB,CAtE1B;AA2EHspB,IAAAA,+BAA+B,EAAE,CAAC,qBAAD,CA3E9B;AA4EHC,IAAAA,iCAAiC,EAAE,CAAC,qBAAD,CA5EhC;AA6EHC,IAAAA,oBAAoB,EAAE,CAAC,iCAAD,CA7EnB;AA8EHC,IAAAA,oBAAoB,EAAE,CAAC,iCAAD,CA9EnB;AA+EHC,IAAAA,2BAA2B,EAAE,CACzB,oBADyB,EAEzB,EAFyB,EAGzB;AAAE1pB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,iCAAV;AAAX,KAHyB,CA/E1B;AAoFH2pB,IAAAA,+BAA+B,EAAE,CAAC,oBAAD,CApF9B;AAqFHC,IAAAA,kBAAkB,EAAE,CAAC,gCAAD,CArFjB;AAsFHC,IAAAA,gCAAgC,EAAE,CAC9B,yBAD8B,EAE9B,EAF8B,EAG9B;AAAE7pB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,sCAAV;AAAX,KAH8B,CAtF/B;AA2FH8pB,IAAAA,oCAAoC,EAAE,CAAC,yBAAD,CA3FnC;AA4FHC,IAAAA,qBAAqB,EAAE,CAAC,4BAAD,CA5FpB;AA6FHC,IAAAA,iCAAiC,EAAE,CAC/B,gBAD+B,EAE/B,EAF+B,EAG/B;AAAEhqB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,uCAAV;AAAX,KAH+B,CA7FhC;AAkGHiqB,IAAAA,qCAAqC,EAAE,CAAC,gBAAD,CAlGpC;AAmGHC,IAAAA,yCAAyC,EAAE,CACvC,8BADuC,EAEvC,EAFuC,EAGvC;AAAElqB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,+CAAV;AAAX,KAHuC,CAnGxC;AAwGHmqB,IAAAA,6CAA6C,EAAE,CAC3C,8BAD2C,CAxG5C;AA2GHC,IAAAA,OAAO,EAAE,CAAC,gCAAD,CA3GN;AA4GHC,IAAAA,QAAQ,EAAE,CAAC,mCAAD,CA5GP;AA6GHC,IAAAA,mBAAmB,EAAE,CAAC,aAAD;AA7GlB;AA/gDO,CAAlB;;ACAO,MAAMC,OAAO,GAAG,mBAAhB;;ACAA,SAASC,kBAAT,CAA4BC,OAA5B,EAAqCC,YAArC,EAAmD;AACtD,QAAMC,UAAU,GAAG,EAAnB;;AACA,OAAK,MAAM,CAACC,KAAD,EAAQC,SAAR,CAAX,IAAiCC,MAAM,CAACC,OAAP,CAAeL,YAAf,CAAjC,EAA+D;AAC3D,SAAK,MAAM,CAACM,UAAD,EAAaC,QAAb,CAAX,IAAqCH,MAAM,CAACC,OAAP,CAAeF,SAAf,CAArC,EAAgE;AAC5D,YAAM,CAACK,KAAD,EAAQC,QAAR,EAAkBC,WAAlB,IAAiCH,QAAvC;AACA,YAAM,CAACI,MAAD,EAASC,GAAT,IAAgBJ,KAAK,CAACK,KAAN,CAAY,GAAZ,CAAtB;AACA,YAAMC,gBAAgB,GAAGV,MAAM,CAACW,MAAP,CAAc;AAAEJ,QAAAA,MAAF;AAAUC,QAAAA;AAAV,OAAd,EAA+BH,QAA/B,CAAzB;;AACA,UAAI,CAACR,UAAU,CAACC,KAAD,CAAf,EAAwB;AACpBD,QAAAA,UAAU,CAACC,KAAD,CAAV,GAAoB,EAApB;AACH;;AACD,YAAMc,YAAY,GAAGf,UAAU,CAACC,KAAD,CAA/B;;AACA,UAAIQ,WAAJ,EAAiB;AACbM,QAAAA,YAAY,CAACV,UAAD,CAAZ,GAA2BW,QAAQ,CAAClB,OAAD,EAAUG,KAAV,EAAiBI,UAAjB,EAA6BQ,gBAA7B,EAA+CJ,WAA/C,CAAnC;AACA;AACH;;AACDM,MAAAA,YAAY,CAACV,UAAD,CAAZ,GAA2BP,OAAO,CAACmB,OAAR,CAAgBT,QAAhB,CAAyBK,gBAAzB,CAA3B;AACH;AACJ;;AACD,SAAOb,UAAP;AACH;;AACD,SAASgB,QAAT,CAAkBlB,OAAlB,EAA2BG,KAA3B,EAAkCI,UAAlC,EAA8CG,QAA9C,EAAwDC,WAAxD,EAAqE;AACjE,QAAMS,mBAAmB,GAAGpB,OAAO,CAACmB,OAAR,CAAgBT,QAAhB,CAAyBA,QAAzB,CAA5B;AACA;;AACA,WAASW,eAAT,CAAyB,GAAGC,IAA5B,EAAkC;AAC9B;AACA,QAAIC,OAAO,GAAGH,mBAAmB,CAACZ,QAApB,CAA6B/Q,KAA7B,CAAmC,GAAG6R,IAAtC,CAAd,CAF8B;;AAI9B,QAAIX,WAAW,CAAChP,SAAhB,EAA2B;AACvB4P,MAAAA,OAAO,GAAGlB,MAAM,CAACW,MAAP,CAAc,EAAd,EAAkBO,OAAlB,EAA2B;AACjCC,QAAAA,IAAI,EAAED,OAAO,CAACZ,WAAW,CAAChP,SAAb,CADoB;AAEjC,SAACgP,WAAW,CAAChP,SAAb,GAAyB8P;AAFQ,OAA3B,CAAV;AAIA,aAAOL,mBAAmB,CAACG,OAAD,CAA1B;AACH;;AACD,QAAIZ,WAAW,CAACprB,OAAhB,EAAyB;AACrB,YAAM,CAACmsB,QAAD,EAAWC,aAAX,IAA4BhB,WAAW,CAACprB,OAA9C;AACAyqB,MAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAkB,WAAU1B,KAAM,IAAGI,UAAW,kCAAiCmB,QAAS,IAAGC,aAAc,IAA3G;AACH;;AACD,QAAIhB,WAAW,CAACmB,UAAhB,EAA4B;AACxB9B,MAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAiBlB,WAAW,CAACmB,UAA7B;AACH;;AACD,QAAInB,WAAW,CAACjiB,iBAAhB,EAAmC;AAC/B;AACA,YAAM6iB,OAAO,GAAGH,mBAAmB,CAACZ,QAApB,CAA6B/Q,KAA7B,CAAmC,GAAG6R,IAAtC,CAAhB;;AACA,WAAK,MAAM,CAACS,IAAD,EAAOC,KAAP,CAAX,IAA4B3B,MAAM,CAACC,OAAP,CAAeK,WAAW,CAACjiB,iBAA3B,CAA5B,EAA2E;AACvE,YAAIqjB,IAAI,IAAIR,OAAZ,EAAqB;AACjBvB,UAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAkB,IAAGE,IAAK,0CAAyC5B,KAAM,IAAGI,UAAW,aAAYyB,KAAM,WAAzG;;AACA,cAAI,EAAEA,KAAK,IAAIT,OAAX,CAAJ,EAAyB;AACrBA,YAAAA,OAAO,CAACS,KAAD,CAAP,GAAiBT,OAAO,CAACQ,IAAD,CAAxB;AACH;;AACD,iBAAOR,OAAO,CAACQ,IAAD,CAAd;AACH;AACJ;;AACD,aAAOX,mBAAmB,CAACG,OAAD,CAA1B;AACH,KA/B6B;;;AAiC9B,WAAOH,mBAAmB,CAAC,GAAGE,IAAJ,CAA1B;AACH;;AACD,SAAOjB,MAAM,CAACW,MAAP,CAAcK,eAAd,EAA+BD,mBAA/B,CAAP;AACH;;ACxDM,SAASa,mBAAT,CAA6BjC,OAA7B,EAAsC;AACzC,QAAMkC,GAAG,GAAGnC,kBAAkB,CAACC,OAAD,EAAUmC,SAAV,CAA9B;AACA,SAAO;AACHC,IAAAA,IAAI,EAAEF;AADH,GAAP;AAGH;AACDD,mBAAmB,CAACnC,OAApB,GAA8BA,OAA9B;AACA,AAAO,SAASuC,yBAAT,CAAmCrC,OAAnC,EAA4C;AAC/C,QAAMkC,GAAG,GAAGnC,kBAAkB,CAACC,OAAD,EAAUmC,SAAV,CAA9B;AACA,2CACOD,GADP;AAEIE,IAAAA,IAAI,EAAEF;AAFV;AAIH;AACDG,yBAAyB,CAACvC,OAA1B,GAAoCA,OAApC;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js index bcf68af..e61f6ac 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js @@ -1,11 +1,23 @@ const Endpoints = { actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels", + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], addSelectedRepoToOrgSecret: [ "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve", + ], cancelWorkflowRun: [ "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel", ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], createOrUpdateRepoSecret: [ "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}", @@ -23,9 +35,18 @@ const Endpoints = { createWorkflowDispatch: [ "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}", + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}", + ], deleteArtifact: [ "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}", ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], deleteRepoSecret: [ "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}", @@ -52,6 +73,9 @@ const Endpoints = { downloadJobLogsForWorkflowRun: [ "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs", ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", + ], downloadWorkflowRunLogs: [ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs", ], @@ -61,6 +85,15 @@ const Endpoints = { enableWorkflow: [ "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository", + ], + getActionsCacheUsageForEnterprise: [ + "GET /enterprises/{enterprise}/actions/cache/usage", + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], getAllowedActionsOrganization: [ "GET /orgs/{org}/actions/permissions/selected-actions", ], @@ -68,6 +101,21 @@ const Endpoints = { "GET /repos/{owner}/{repo}/actions/permissions/selected-actions", ], getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key", + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], + getGithubActionsDefaultWorkflowPermissionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions/workflow", + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow", + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow", + ], getGithubActionsPermissionsOrganization: [ "GET /orgs/{org}/actions/permissions", ], @@ -77,6 +125,9 @@ const Endpoints = { getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", + ], getRepoPermissions: [ "GET /repos/{owner}/{repo}/actions/permissions", {}, @@ -84,12 +135,21 @@ const Endpoints = { ], getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals", + ], getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], getSelfHostedRunnerForRepo: [ "GET /repos/{owner}/{repo}/actions/runners/{runner_id}", ], getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access", + ], getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", + ], getWorkflowRunUsage: [ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing", ], @@ -97,9 +157,21 @@ const Endpoints = { "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", ], listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + ], listJobsForWorkflowRun: [ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels", + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], @@ -122,16 +194,52 @@ const Endpoints = { "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", ], listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", + ], reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels", + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}", + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", + ], removeSelectedRepoFromOrgSecret: [ "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", + ], setAllowedActionsOrganization: [ "PUT /orgs/{org}/actions/permissions/selected-actions", ], setAllowedActionsRepository: [ "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions", ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels", + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + setGithubActionsDefaultWorkflowPermissionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/workflow", + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow", + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow", + ], setGithubActionsPermissionsOrganization: [ "PUT /orgs/{org}/actions/permissions", ], @@ -144,6 +252,9 @@ const Endpoints = { setSelectedRepositoriesEnabledGithubActionsOrganization: [ "PUT /orgs/{org}/actions/permissions/repositories", ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access", + ], }, activity: { checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], @@ -193,12 +304,13 @@ const Endpoints = { apps: { addRepoToInstallation: [ "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }, ], - checkToken: ["POST /applications/{client_id}/token"], - createContentAttachment: [ - "POST /content_references/{content_reference_id}/attachments", - { mediaType: { previews: ["corsair"] } }, + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", ], + checkToken: ["POST /applications/{client_id}/token"], createFromManifest: ["POST /app-manifests/{code}/conversions"], createInstallationAccessToken: [ "POST /app/installations/{installation_id}/access_tokens", @@ -219,6 +331,7 @@ const Endpoints = { ], getUserInstallation: ["GET /users/{username}/installation"], getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], listAccountsForPlanStubbed: [ "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", @@ -235,8 +348,17 @@ const Endpoints = { listSubscriptionsForAuthenticatedUserStubbed: [ "GET /user/marketplace_purchases/stubbed", ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts", + ], removeRepoFromInstallation: [ "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] }, + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", ], resetToken: ["PATCH /applications/{client_id}/token"], revokeInstallationAccessToken: ["DELETE /installation/token"], @@ -252,6 +374,12 @@ const Endpoints = { getGithubActionsBillingUser: [ "GET /users/{username}/settings/billing/actions", ], + getGithubAdvancedSecurityBillingGhe: [ + "GET /enterprises/{enterprise}/settings/billing/advanced-security", + ], + getGithubAdvancedSecurityBillingOrg: [ + "GET /orgs/{org}/settings/billing/advanced-security", + ], getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], getGithubPackagesBillingUser: [ "GET /users/{username}/settings/billing/packages", @@ -276,6 +404,9 @@ const Endpoints = { "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", ], listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", + ], rerequestSuite: [ "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", ], @@ -297,9 +428,15 @@ const Endpoints = { "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", ], getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], listAlertsInstances: [ "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] }, ], listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], updateAlert: [ @@ -308,21 +445,138 @@ const Endpoints = { uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"], }, codesOfConduct: { - getAllCodesOfConduct: [ - "GET /codes_of_conduct", - { mediaType: { previews: ["scarlet-witch"] } }, + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"], + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}", ], - getConductCode: [ - "GET /codes_of_conduct/{key}", - { mediaType: { previews: ["scarlet-witch"] } }, + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines", ], - getForRepo: [ - "GET /repos/{owner}/{repo}/community/code_of_conduct", - { mediaType: { previews: ["scarlet-witch"] } }, + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}", + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces", + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces", + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}", + ], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}", + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports", + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}", + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key", + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key", + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}", + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } }, + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces", + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories", + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}", + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines", + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories", + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"], + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}", + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key", + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + ], + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots", + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}", ], }, emojis: { get: ["GET /emojis"] }, enterpriseAdmin: { + addCustomLabelsToSelfHostedRunnerForEnterprise: [ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], disableSelectedOrganizationGithubActionsEnterprise: [ "DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}", ], @@ -335,12 +589,27 @@ const Endpoints = { getGithubActionsPermissionsEnterprise: [ "GET /enterprises/{enterprise}/actions/permissions", ], + getServerStatistics: [ + "GET /enterprise-installation/{enterprise_or_org}/server-statistics", + ], + listLabelsForSelfHostedRunnerForEnterprise: [ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], listSelectedOrganizationsEnabledGithubActionsEnterprise: [ "GET /enterprises/{enterprise}/actions/permissions/organizations", ], + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + removeCustomLabelFromSelfHostedRunnerForEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", + ], setAllowedActionsEnterprise: [ "PUT /enterprises/{enterprise}/actions/permissions/selected-actions", ], + setCustomLabelsForSelfHostedRunnerForEnterprise: [ + "PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], setGithubActionsPermissionsEnterprise: [ "PUT /enterprises/{enterprise}/actions/permissions", ], @@ -449,7 +718,6 @@ const Endpoints = { listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], listEventsForTimeline: [ "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", - { mediaType: { previews: ["mockingbird"] } }, ], listForAuthenticatedUser: ["GET /user/issues"], listForOrg: ["GET /orgs/{org}/issues"], @@ -503,46 +771,31 @@ const Endpoints = { cancelImport: ["DELETE /repos/{owner}/{repo}/import"], deleteArchiveForAuthenticatedUser: [ "DELETE /user/migrations/{migration_id}/archive", - { mediaType: { previews: ["wyandotte"] } }, ], deleteArchiveForOrg: [ "DELETE /orgs/{org}/migrations/{migration_id}/archive", - { mediaType: { previews: ["wyandotte"] } }, ], downloadArchiveForOrg: [ "GET /orgs/{org}/migrations/{migration_id}/archive", - { mediaType: { previews: ["wyandotte"] } }, ], getArchiveForAuthenticatedUser: [ "GET /user/migrations/{migration_id}/archive", - { mediaType: { previews: ["wyandotte"] } }, ], getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], getImportStatus: ["GET /repos/{owner}/{repo}/import"], getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], - getStatusForAuthenticatedUser: [ - "GET /user/migrations/{migration_id}", - { mediaType: { previews: ["wyandotte"] } }, - ], - getStatusForOrg: [ - "GET /orgs/{org}/migrations/{migration_id}", - { mediaType: { previews: ["wyandotte"] } }, - ], - listForAuthenticatedUser: [ - "GET /user/migrations", - { mediaType: { previews: ["wyandotte"] } }, - ], - listForOrg: [ - "GET /orgs/{org}/migrations", - { mediaType: { previews: ["wyandotte"] } }, - ], - listReposForOrg: [ - "GET /orgs/{org}/migrations/{migration_id}/repositories", - { mediaType: { previews: ["wyandotte"] } }, + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories", ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], listReposForUser: [ "GET /user/migrations/{migration_id}/repositories", - { mediaType: { previews: ["wyandotte"] } }, + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] }, ], mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], @@ -551,11 +804,9 @@ const Endpoints = { startImport: ["PUT /repos/{owner}/{repo}/import"], unlockRepoForAuthenticatedUser: [ "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", - { mediaType: { previews: ["wyandotte"] } }, ], unlockRepoForOrg: [ "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", - { mediaType: { previews: ["wyandotte"] } }, ], updateImport: ["PATCH /repos/{owner}/{repo}/import"], }, @@ -576,9 +827,13 @@ const Endpoints = { getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", + ], list: ["GET /organizations"], listAppInstallations: ["GET /orgs/{org}/installations"], listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomRoles: ["GET /organizations/{organization_id}/custom_roles"], listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], listForAuthenticatedUser: ["GET /user/orgs"], listForUser: ["GET /users/{username}/orgs"], @@ -588,8 +843,12 @@ const Endpoints = { listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], listPendingInvitations: ["GET /orgs/{org}/invitations"], listPublicMembers: ["GET /orgs/{org}/public_members"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], listWebhooks: ["GET /orgs/{org}/hooks"], pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", + ], removeMember: ["DELETE /orgs/{org}/members/{username}"], removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], removeOutsideCollaborator: [ @@ -617,17 +876,38 @@ const Endpoints = { deletePackageForOrg: [ "DELETE /orgs/{org}/packages/{package_type}/{package_name}", ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}", + ], deletePackageVersionForAuthenticatedUser: [ "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}", ], deletePackageVersionForOrg: [ "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], getAllPackageVersionsForAPackageOwnedByAnOrg: [ "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] }, ], getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser", + ], + }, + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", ], getAllPackageVersionsForPackageOwnedByUser: [ "GET /users/{username}/packages/{package_type}/{package_name}/versions", @@ -650,11 +930,17 @@ const Endpoints = { getPackageVersionForUser: [ "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], restorePackageForAuthenticatedUser: [ - "POST /user/packages/{package_type}/{package_name}/restore", + "POST /user/packages/{package_type}/{package_name}/restore{?token}", ], restorePackageForOrg: [ - "POST /orgs/{org}/packages/{package_type}/{package_name}/restore", + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}", + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}", ], restorePackageVersionForAuthenticatedUser: [ "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", @@ -662,108 +948,40 @@ const Endpoints = { restorePackageVersionForOrg: [ "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", + ], }, projects: { - addCollaborator: [ - "PUT /projects/{project_id}/collaborators/{username}", - { mediaType: { previews: ["inertia"] } }, - ], - createCard: [ - "POST /projects/columns/{column_id}/cards", - { mediaType: { previews: ["inertia"] } }, - ], - createColumn: [ - "POST /projects/{project_id}/columns", - { mediaType: { previews: ["inertia"] } }, - ], - createForAuthenticatedUser: [ - "POST /user/projects", - { mediaType: { previews: ["inertia"] } }, - ], - createForOrg: [ - "POST /orgs/{org}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - createForRepo: [ - "POST /repos/{owner}/{repo}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - delete: [ - "DELETE /projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, - ], - deleteCard: [ - "DELETE /projects/columns/cards/{card_id}", - { mediaType: { previews: ["inertia"] } }, - ], - deleteColumn: [ - "DELETE /projects/columns/{column_id}", - { mediaType: { previews: ["inertia"] } }, - ], - get: [ - "GET /projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, - ], - getCard: [ - "GET /projects/columns/cards/{card_id}", - { mediaType: { previews: ["inertia"] } }, - ], - getColumn: [ - "GET /projects/columns/{column_id}", - { mediaType: { previews: ["inertia"] } }, - ], + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], getPermissionForUser: [ "GET /projects/{project_id}/collaborators/{username}/permission", - { mediaType: { previews: ["inertia"] } }, - ], - listCards: [ - "GET /projects/columns/{column_id}/cards", - { mediaType: { previews: ["inertia"] } }, - ], - listCollaborators: [ - "GET /projects/{project_id}/collaborators", - { mediaType: { previews: ["inertia"] } }, - ], - listColumns: [ - "GET /projects/{project_id}/columns", - { mediaType: { previews: ["inertia"] } }, - ], - listForOrg: [ - "GET /orgs/{org}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - listForRepo: [ - "GET /repos/{owner}/{repo}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - listForUser: [ - "GET /users/{username}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - moveCard: [ - "POST /projects/columns/cards/{card_id}/moves", - { mediaType: { previews: ["inertia"] } }, - ], - moveColumn: [ - "POST /projects/columns/{column_id}/moves", - { mediaType: { previews: ["inertia"] } }, ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], removeCollaborator: [ "DELETE /projects/{project_id}/collaborators/{username}", - { mediaType: { previews: ["inertia"] } }, - ], - update: [ - "PATCH /projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, - ], - updateCard: [ - "PATCH /projects/columns/cards/{card_id}", - { mediaType: { previews: ["inertia"] } }, - ], - updateColumn: [ - "PATCH /projects/columns/{column_id}", - { mediaType: { previews: ["inertia"] } }, ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"], }, pulls: { checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], @@ -816,7 +1034,6 @@ const Endpoints = { update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], updateBranch: [ "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch", - { mediaType: { previews: ["lydian"] } }, ], updateReview: [ "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", @@ -829,86 +1046,75 @@ const Endpoints = { reactions: { createForCommitComment: [ "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], createForIssue: [ "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], createForIssueComment: [ "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], createForPullRequestReviewComment: [ "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions", ], createForTeamDiscussionCommentInOrg: [ "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], createForTeamDiscussionInOrg: [ "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForCommitComment: [ "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForIssue: [ "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForIssueComment: [ "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForPullRequestComment: [ "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", ], deleteForTeamDiscussion: [ "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForTeamDiscussionComment: [ "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, - ], - deleteLegacy: [ - "DELETE /reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, - { - deprecated: "octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy", - }, ], listForCommitComment: [ "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, - ], - listForIssue: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], listForIssueComment: [ "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], listForPullRequestReviewComment: [ "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", ], listForTeamDiscussionCommentInOrg: [ "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], listForTeamDiscussionInOrg: [ "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], }, repos: { - acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}"], + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] }, + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}", + ], addAppAccessRestrictions: [ "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, @@ -933,15 +1139,18 @@ const Endpoints = { checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], checkVulnerabilityAlerts: [ "GET /repos/{owner}/{repo}/vulnerability-alerts", - { mediaType: { previews: ["dorian"] } }, ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}", + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], createCommitComment: [ "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments", ], createCommitSignatureProtection: [ "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", - { mediaType: { previews: ["zzzax"] } }, ], createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], createDeployKey: ["POST /repos/{owner}/{repo}/keys"], @@ -953,18 +1162,25 @@ const Endpoints = { createForAuthenticatedUser: ["POST /user/repos"], createFork: ["POST /repos/{owner}/{repo}/forks"], createInOrg: ["POST /orgs/{org}/repos"], - createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], - createPagesSite: [ - "POST /repos/{owner}/{repo}/pages", - { mediaType: { previews: ["switcheroo"] } }, + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}", ], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], createRelease: ["POST /repos/{owner}/{repo}/releases"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], createUsingTemplate: [ "POST /repos/{template_owner}/{template_repo}/generate", - { mediaType: { previews: ["baptiste"] } }, ], createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] }, + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}", + ], delete: ["DELETE /repos/{owner}/{repo}"], deleteAccessRestrictions: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions", @@ -972,13 +1188,16 @@ const Endpoints = { deleteAdminBranchProtection: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}", + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], deleteBranchProtection: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection", ], deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], deleteCommitSignatureProtection: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", - { mediaType: { previews: ["zzzax"] } }, ], deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], deleteDeployment: [ @@ -988,10 +1207,7 @@ const Endpoints = { deleteInvitation: [ "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}", ], - deletePagesSite: [ - "DELETE /repos/{owner}/{repo}/pages", - { mediaType: { previews: ["switcheroo"] } }, - ], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], deletePullRequestReviewProtection: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", ], @@ -999,14 +1215,16 @@ const Endpoints = { deleteReleaseAsset: [ "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}", ], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}", + ], deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], disableAutomatedSecurityFixes: [ "DELETE /repos/{owner}/{repo}/automated-security-fixes", - { mediaType: { previews: ["london"] } }, ], + disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"], disableVulnerabilityAlerts: [ "DELETE /repos/{owner}/{repo}/vulnerability-alerts", - { mediaType: { previews: ["dorian"] } }, ], downloadArchive: [ "GET /repos/{owner}/{repo}/zipball/{ref}", @@ -1017,11 +1235,13 @@ const Endpoints = { downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], enableAutomatedSecurityFixes: [ "PUT /repos/{owner}/{repo}/automated-security-fixes", - { mediaType: { previews: ["london"] } }, ], + enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], enableVulnerabilityAlerts: [ "PUT /repos/{owner}/{repo}/vulnerability-alerts", - { mediaType: { previews: ["dorian"] } }, + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes", ], get: ["GET /repos/{owner}/{repo}"], getAccessRestrictions: [ @@ -1030,16 +1250,15 @@ const Endpoints = { getAdminBranchProtection: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], getAllStatusCheckContexts: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", ], - getAllTopics: [ - "GET /repos/{owner}/{repo}/topics", - { mediaType: { previews: ["mercy"] } }, - ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], getAppsWithAccessToProtectedBranch: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], getBranchProtection: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection", @@ -1055,7 +1274,6 @@ const Endpoints = { getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], getCommitSignatureProtection: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", - { mediaType: { previews: ["zzzax"] } }, ], getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], @@ -1065,16 +1283,21 @@ const Endpoints = { getDeploymentStatus: [ "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}", + ], getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], getPages: ["GET /repos/{owner}/{repo}/pages"], getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], getPullRequestReviewProtection: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", ], getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], @@ -1094,10 +1317,13 @@ const Endpoints = { getWebhookConfigForRepo: [ "GET /repos/{owner}/{repo}/hooks/{hook_id}/config", ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", + ], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], listBranches: ["GET /repos/{owner}/{repo}/branches"], listBranchesForHeadCommit: [ "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", - { mediaType: { previews: ["groot"] } }, ], listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], listCommentsForCommit: [ @@ -1125,17 +1351,24 @@ const Endpoints = { listPublic: ["GET /repositories"], listPullRequestsAssociatedWithCommit: [ "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", - { mediaType: { previews: ["groot"] } }, ], listReleaseAssets: [ "GET /repos/{owner}/{repo}/releases/{release_id}/assets", ], listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], listTags: ["GET /repos/{owner}/{repo}/tags"], listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + ], listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", + ], removeAppAccessRestrictions: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, @@ -1163,10 +1396,7 @@ const Endpoints = { { mapToData: "users" }, ], renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], - replaceAllTopics: [ - "PUT /repos/{owner}/{repo}/topics", - { mediaType: { previews: ["mercy"] } }, - ], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], setAdminBranchProtection: [ "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", @@ -1228,18 +1458,25 @@ const Endpoints = { }, search: { code: ["GET /search/code"], - commits: ["GET /search/commits", { mediaType: { previews: ["cloak"] } }], + commits: ["GET /search/commits"], issuesAndPullRequests: ["GET /search/issues"], labels: ["GET /search/labels"], repos: ["GET /search/repositories"], - topics: ["GET /search/topics", { mediaType: { previews: ["mercy"] } }], + topics: ["GET /search/topics"], users: ["GET /search/users"], }, secretScanning: { getAlert: [ "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts", + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + ], updateAlert: [ "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", ], @@ -1250,14 +1487,12 @@ const Endpoints = { ], addOrUpdateProjectPermissionsInOrg: [ "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, ], addOrUpdateRepoPermissionsInOrg: [ "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", ], checkPermissionsForProjectInOrg: [ "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, ], checkPermissionsForRepoInOrg: [ "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", @@ -1295,10 +1530,7 @@ const Endpoints = { listPendingInvitationsInOrg: [ "GET /orgs/{org}/teams/{team_slug}/invitations", ], - listProjectsInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/projects", - { mediaType: { previews: ["inertia"] } }, - ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], removeMembershipForUserInOrg: [ "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}", @@ -1318,35 +1550,112 @@ const Endpoints = { updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"], }, users: { - addEmailForAuthenticated: ["POST /user/emails"], + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] }, + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], block: ["PUT /user/blocks/{username}"], checkBlocked: ["GET /user/blocks/{username}"], checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], - createGpgKeyForAuthenticated: ["POST /user/gpg_keys"], - createPublicSshKeyForAuthenticated: ["POST /user/keys"], - deleteEmailForAuthenticated: ["DELETE /user/emails"], - deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}"], - deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] }, + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] }, + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] }, + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] }, + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] }, + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], follow: ["PUT /user/following/{username}"], getAuthenticated: ["GET /user"], getByUsername: ["GET /users/{username}"], getContextForUser: ["GET /users/{username}/hovercard"], - getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}"], - getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] }, + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] }, + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], list: ["GET /users"], - listBlockedByAuthenticated: ["GET /user/blocks"], - listEmailsForAuthenticated: ["GET /user/emails"], - listFollowedByAuthenticated: ["GET /user/following"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] }, + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] }, + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] }, + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], listFollowersForAuthenticatedUser: ["GET /user/followers"], listFollowersForUser: ["GET /users/{username}/followers"], listFollowingForUser: ["GET /users/{username}/following"], - listGpgKeysForAuthenticated: ["GET /user/gpg_keys"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] }, + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], - listPublicEmailsForAuthenticated: ["GET /user/public_emails"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] }, + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], listPublicKeysForUser: ["GET /users/{username}/keys"], - listPublicSshKeysForAuthenticated: ["GET /user/keys"], - setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] }, + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] }, + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility", + ], unblock: ["DELETE /user/blocks/{username}"], unfollow: ["DELETE /user/following/{username}"], updateAuthenticated: ["PATCH /user"], diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js index 59cbe7d..53d539d 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js @@ -2,6 +2,17 @@ import ENDPOINTS from "./generated/endpoints"; import { VERSION } from "./version"; import { endpointsToMethods } from "./endpoints-to-methods"; export function restEndpointMethods(octokit) { - return endpointsToMethods(octokit, ENDPOINTS); + const api = endpointsToMethods(octokit, ENDPOINTS); + return { + rest: api, + }; } restEndpointMethods.VERSION = VERSION; +export function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, ENDPOINTS); + return { + ...api, + rest: api, + }; +} +legacyRestEndpointMethods.VERSION = VERSION; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js index b50966d..80a383f 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js @@ -1 +1 @@ -export const VERSION = "4.12.0"; +export const VERSION = "5.16.2"; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts index 1c6d5a3..91c55f3 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts @@ -2,6 +2,31 @@ import { EndpointInterface, RequestInterface } from "@octokit/types"; import { RestEndpointMethodTypes } from "./parameters-and-response-types"; export declare type RestEndpointMethods = { actions: { + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + addCustomLabelsToSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + addCustomLabelsToSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ @@ -12,6 +37,18 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + approveWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["approveWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ @@ -22,6 +59,90 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["createOrUpdateEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Creates or updates an organization secret with an encrypted value. Encrypt your secret using * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access @@ -54,7 +175,7 @@ export declare type RestEndpointMethods = { * * #### Example encrypting a secret using Python * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3. + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. * * ``` * from base64 import b64encode @@ -138,7 +259,7 @@ export declare type RestEndpointMethods = { * * #### Example encrypting a secret using Python * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3. + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. * * ``` * from base64 import b64encode @@ -274,7 +395,7 @@ export declare type RestEndpointMethods = { * * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." */ createWorkflowDispatch: { (params?: RestEndpointMethodTypes["actions"]["createWorkflowDispatch"]["parameters"]): Promise; @@ -283,6 +404,34 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + deleteActionsCacheById: { + (params?: RestEndpointMethodTypes["actions"]["deleteActionsCacheById"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + deleteActionsCacheByKey: { + (params?: RestEndpointMethodTypes["actions"]["deleteActionsCacheByKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ @@ -293,6 +442,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + deleteEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["deleteEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ @@ -410,6 +569,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + downloadWorkflowRunAttemptLogs: { + (params?: RestEndpointMethodTypes["actions"]["downloadWorkflowRunAttemptLogs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use @@ -448,7 +620,67 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * Lists the GitHub Actions caches for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getActionsCacheList: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheList"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getActionsCacheUsage: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsage"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + getActionsCacheUsageByRepoForOrg: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageByRepoForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + getActionsCacheUsageForEnterprise: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + getActionsCacheUsageForOrg: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" * * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. */ @@ -460,7 +692,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." * * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. */ @@ -482,7 +714,70 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. + * Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + getEnvironmentPublicKey: { + (params?: RestEndpointMethodTypes["actions"]["getEnvironmentPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + getEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["getEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + getGithubActionsDefaultWorkflowPermissionsEnterprise: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + getGithubActionsDefaultWorkflowPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + getGithubActionsDefaultWorkflowPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. * * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. */ @@ -494,10 +789,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository. + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. GitHub Apps must have the `administration` repository permission to use this API. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. */ getGithubActionsPermissionsRepository: { (params?: RestEndpointMethodTypes["actions"]["getGithubActionsPermissionsRepository"]["parameters"]): Promise; @@ -537,11 +831,22 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository. + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. GitHub Apps must have the `administration` repository permission to use this API. - * @deprecated octokit.actions.getRepoPermissions() has been renamed to octokit.actions.getGithubActionsPermissionsRepository() (2020-11-10) + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getPendingDeploymentsForRun: { + (params?: RestEndpointMethodTypes["actions"]["getPendingDeploymentsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + * @deprecated octokit.rest.actions.getRepoPermissions() has been renamed to octokit.rest.actions.getGithubActionsPermissionsRepository() (2020-11-10) */ getRepoPermissions: { (params?: RestEndpointMethodTypes["actions"]["getRepoPermissions"]["parameters"]): Promise; @@ -570,6 +875,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getReviewsForRun: { + (params?: RestEndpointMethodTypes["actions"]["getReviewsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Gets a specific self-hosted runner configured in an organization. * @@ -605,6 +920,20 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + getWorkflowAccessToRepository: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowAccessToRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ @@ -616,21 +945,34 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. */ - getWorkflowRunUsage: { - (params?: RestEndpointMethodTypes["actions"]["getWorkflowRunUsage"]["parameters"]): Promise; + getWorkflowRunAttempt: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowRunAttempt"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getWorkflowRunUsage: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowRunUsage"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ getWorkflowUsage: { (params?: RestEndpointMethodTypes["actions"]["getWorkflowUsage"]["parameters"]): Promise; @@ -649,6 +991,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + listEnvironmentSecrets: { + (params?: RestEndpointMethodTypes["actions"]["listEnvironmentSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ @@ -659,6 +1011,41 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + */ + listJobsForWorkflowRunAttempt: { + (params?: RestEndpointMethodTypes["actions"]["listJobsForWorkflowRunAttempt"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + listLabelsForSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["listLabelsForSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + listLabelsForSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listLabelsForSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ @@ -791,6 +1178,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + reRunJobForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["reRunJobForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ @@ -801,6 +1198,76 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + reRunWorkflowFailedJobs: { + (params?: RestEndpointMethodTypes["actions"]["reRunWorkflowFailedJobs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + removeAllCustomLabelsFromSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["removeAllCustomLabelsFromSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + removeAllCustomLabelsFromSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["removeAllCustomLabelsFromSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + removeCustomLabelFromSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["removeCustomLabelFromSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + removeCustomLabelFromSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["removeCustomLabelFromSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ @@ -812,9 +1279,21 @@ export declare type RestEndpointMethods = { }>; }; /** - * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + reviewPendingDeploymentsForRun: { + (params?: RestEndpointMethodTypes["actions"]["reviewPendingDeploymentsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." * - * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings. + * If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings. * * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. * @@ -828,9 +1307,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." * - * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings. + * If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings. * * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. * @@ -844,9 +1323,79 @@ export declare type RestEndpointMethods = { }>; }; /** - * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + setCustomLabelsForSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["setCustomLabelsForSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + setCustomLabelsForSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["setCustomLabelsForSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + setGithubActionsDefaultWorkflowPermissionsEnterprise: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsDefaultWorkflowPermissionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + setGithubActionsDefaultWorkflowPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsDefaultWorkflowPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + setGithubActionsDefaultWorkflowPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsDefaultWorkflowPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. * - * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization. + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization. * * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. */ @@ -858,9 +1407,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. * - * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository. + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository. * * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. */ @@ -893,6 +1442,20 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + setWorkflowAccessToRepository: { + (params?: RestEndpointMethodTypes["actions"]["setWorkflowAccessToRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; }; activity: { checkRepoIsStarredByAuthenticatedUser: { @@ -1203,6 +1766,7 @@ export declare type RestEndpointMethods = { * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + * @deprecated octokit.rest.apps.addRepoToInstallation() has been renamed to octokit.rest.apps.addRepoToInstallationForAuthenticatedUser() (2021-10-05) */ addRepoToInstallation: { (params?: RestEndpointMethodTypes["apps"]["addRepoToInstallation"]["parameters"]): Promise; @@ -1212,24 +1776,22 @@ export declare type RestEndpointMethods = { }>; }; /** - * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ - checkToken: { - (params?: RestEndpointMethodTypes["apps"]["checkToken"]["parameters"]): Promise; + addRepoToInstallationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["addRepoToInstallationForAuthenticatedUser"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * 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://docs.github.com/webhooks/event-payloads/#content_reference) 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://docs.github.com/apps/using-content-attachments/)" for details about content attachments. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - createContentAttachment: { - (params?: RestEndpointMethodTypes["apps"]["createContentAttachment"]["parameters"]): Promise; + checkToken: { + (params?: RestEndpointMethodTypes["apps"]["checkToken"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; @@ -1269,7 +1831,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/v3/apps/#suspend-an-app-installation)" endpoint. + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. * * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ @@ -1305,7 +1867,7 @@ export declare type RestEndpointMethods = { /** * **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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * 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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ getBySlug: { (params?: RestEndpointMethodTypes["apps"]["getBySlug"]["parameters"]): Promise; @@ -1315,7 +1877,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (`target_type`) will be either an organization or a user account, depending which account the repository belongs to. + * Enables an authenticated GitHub App to find an installation's information using the installation id. * * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ @@ -1398,6 +1960,18 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["apps"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Returns user and organization accounts associated with the specified 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. * @@ -1522,10 +2096,35 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["apps"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["apps"]["redeliverWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + * @deprecated octokit.rest.apps.removeRepoFromInstallation() has been renamed to octokit.rest.apps.removeRepoFromInstallationForAuthenticatedUser() (2021-10-05) */ removeRepoFromInstallation: { (params?: RestEndpointMethodTypes["apps"]["removeRepoFromInstallation"]["parameters"]): Promise; @@ -1534,6 +2133,18 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + removeRepoFromInstallationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["removeRepoFromInstallationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * 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://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ @@ -1559,7 +2170,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ scopeToken: { (params?: RestEndpointMethodTypes["apps"]["scopeToken"]["parameters"]): Promise; @@ -1609,7 +2220,7 @@ export declare type RestEndpointMethods = { /** * Gets the summary of the free and paid GitHub Actions minutes used. * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". * * Access tokens must have the `repo` or `admin:org` scope. */ @@ -1623,7 +2234,7 @@ export declare type RestEndpointMethods = { /** * Gets the summary of the free and paid GitHub Actions minutes used. * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". * * Access tokens must have the `user` scope. */ @@ -1635,9 +2246,32 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the free and paid storage usued for GitHub Packages in gigabytes. + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. + */ + getGithubAdvancedSecurityBillingGhe: { + (params?: RestEndpointMethodTypes["billing"]["getGithubAdvancedSecurityBillingGhe"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. + * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + */ + getGithubAdvancedSecurityBillingOrg: { + (params?: RestEndpointMethodTypes["billing"]["getGithubAdvancedSecurityBillingOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." * * Access tokens must have the `repo` or `admin:org` scope. */ @@ -1651,7 +2285,7 @@ export declare type RestEndpointMethods = { /** * Gets the free and paid storage used for GitHub Packages in gigabytes. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." * * Access tokens must have the `user` scope. */ @@ -1663,9 +2297,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." * * Access tokens must have the `repo` or `admin:org` scope. */ @@ -1677,9 +2311,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." * * Access tokens must have the `user` scope. */ @@ -1788,6 +2422,18 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + rerequestRun: { + (params?: RestEndpointMethodTypes["checks"]["rerequestRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * @@ -1801,264 +2447,1172 @@ export declare type RestEndpointMethods = { }>; }; /** - * Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + * Changes the default automatic flow when creating check suites. By default, a check suite 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://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + */ + setSuitesPreferences: { + (params?: RestEndpointMethodTypes["checks"]["setSuitesPreferences"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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. + */ + update: { + (params?: RestEndpointMethodTypes["checks"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codeScanning: { + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `analysis_key` + * * `environment` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + deleteAnalysis: { + (params?: RestEndpointMethodTypes["codeScanning"]["deleteAnalysis"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + getAlert: { + (params?: RestEndpointMethodTypes["codeScanning"]["getAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + getAnalysis: { + (params?: RestEndpointMethodTypes["codeScanning"]["getAnalysis"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + getSarif: { + (params?: RestEndpointMethodTypes["codeScanning"]["getSarif"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + listAlertInstances: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertInstances"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all code scanning alerts for the default branch (usually `main` + * or `master`) for all eligible repositories in an organization. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + listAlertsForOrg: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + listAlertsForRepo: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * @deprecated octokit.rest.codeScanning.listAlertsInstances() has been renamed to octokit.rest.codeScanning.listAlertInstances() (2021-04-30) + */ + listAlertsInstances: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsInstances"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + listRecentAnalyses: { + (params?: RestEndpointMethodTypes["codeScanning"]["listRecentAnalyses"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + */ + updateAlert: { + (params?: RestEndpointMethodTypes["codeScanning"]["updateAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + uploadSarif: { + (params?: RestEndpointMethodTypes["codeScanning"]["uploadSarif"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codesOfConduct: { + getAllCodesOfConduct: { + (params?: RestEndpointMethodTypes["codesOfConduct"]["getAllCodesOfConduct"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getConductCode: { + (params?: RestEndpointMethodTypes["codesOfConduct"]["getConductCode"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codespaces: { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + */ + addRepositoryForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["addRepositoryForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + codespaceMachinesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["codespaceMachinesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + createForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example of encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example of encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example of encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["createOrUpdateRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createOrUpdateSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + createWithPrForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createWithPrForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + createWithRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createWithRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + deleteForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + deleteFromOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteFromOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + deleteRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + deleteSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + exportForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["exportForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + getExportDetailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getExportDetailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + getForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + getPublicKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getPublicKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + getRepoPublicKey: { + (params?: RestEndpointMethodTypes["codespaces"]["getRepoPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + getRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["getRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + getSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + */ + listDevcontainersInRepositoryForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listDevcontainersInRepositoryForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + listInOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["listInOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + listInRepositoryForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listInRepositoryForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + listRepoSecrets: { + (params?: RestEndpointMethodTypes["codespaces"]["listRepoSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + listRepositoriesForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listRepositoriesForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + listSecretsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listSecretsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + */ + removeRepositoryForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["removeRepositoryForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + */ + repoMachinesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["repoMachinesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Select the repositories that will use a user's codespace secret. + * + * You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + */ + setRepositoriesForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["setRepositoriesForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + startForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["startForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + */ + stopForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["stopForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + stopInOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["stopInOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + updateForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["updateForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + dependabot: { + /** + * Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + addSelectedRepoToOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["addSelectedRepoToOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["createOrUpdateOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["createOrUpdateRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - setSuitesPreferences: { - (params?: RestEndpointMethodTypes["checks"]["setSuitesPreferences"]["parameters"]): Promise; + deleteOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["deleteOrgSecret"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * **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. + * Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - update: { - (params?: RestEndpointMethodTypes["checks"]["update"]["parameters"]): Promise; + deleteRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["deleteRepoSecret"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; - }; - codeScanning: { /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` and `repo:security_events` scopes. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set - * (see the example default response below). - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in the set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find the deletable analysis for one of the sets, - * step through deleting the analyses in that set, - * and then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `next_analysis_url` and, if found, use this in the next iteration. - * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `next_analysis_url` value. Alternatively, you could use the `confirm_delete_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - deleteAnalysis: { - (params?: RestEndpointMethodTypes["codeScanning"]["deleteAnalysis"]["parameters"]): Promise; + getOrgPublicKey: { + (params?: RestEndpointMethodTypes["dependabot"]["getOrgPublicKey"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + * Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - getAlert: { - (params?: RestEndpointMethodTypes["codeScanning"]["getAlert"]["parameters"]): Promise; + getOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["getOrgSecret"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. - * - * The `rules_count` field in the default response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * If you use the Accept header `application/sarif+json`, - * the response contains the analysis data that was uploaded. - * This is formatted as - * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). - * For an example response, see "[Custom media type for code scanning](#custom-media-type-for-code-scanning)." - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - getAnalysis: { - (params?: RestEndpointMethodTypes["codeScanning"]["getAnalysis"]["parameters"]): Promise; + getRepoPublicKey: { + (params?: RestEndpointMethodTypes["dependabot"]["getRepoPublicKey"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. + * Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - getSarif: { - (params?: RestEndpointMethodTypes["codeScanning"]["getSarif"]["parameters"]): Promise; + getRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["getRepoSecret"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint. GitHub Apps must have the `security_events` read permission to use - * this endpoint. - * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the the default branch or for the specified Git reference - * (if you used `ref` in the request). + * Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - listAlertsForRepo: { - (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsForRepo"]["parameters"]): Promise; + listOrgSecrets: { + (params?: RestEndpointMethodTypes["dependabot"]["listOrgSecrets"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. + * Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - listAlertsInstances: { - (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsInstances"]["parameters"]): Promise; + listRepoSecrets: { + (params?: RestEndpointMethodTypes["dependabot"]["listRepoSecrets"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Lists the details of all code scanning analyses for a repository, - * starting with the most recent. - * The response is paginated and you can use the `page` and `per_page` parameters - * to list the analyses you're interested in. - * By default 30 analyses are listed per page. - * - * The `rules_count` field in the response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * You must use an access token with the `security_events` scope to use this endpoint. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + * Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - listRecentAnalyses: { - (params?: RestEndpointMethodTypes["codeScanning"]["listRecentAnalyses"]["parameters"]): Promise; + listSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["listSelectedReposForOrgSecret"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. + * Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - updateAlert: { - (params?: RestEndpointMethodTypes["codeScanning"]["updateAlert"]["parameters"]): Promise; + removeSelectedRepoFromOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["removeSelectedRepoFromOrgSecret"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 - * ``` - * - * SARIF upload supports a maximum of 1000 results per analysis run. Any results over this limit are ignored. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. - * - * The `202 Accepted`, response includes an `id` value. - * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. - * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + * Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - uploadSarif: { - (params?: RestEndpointMethodTypes["codeScanning"]["uploadSarif"]["parameters"]): Promise; + setSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["setSelectedReposForOrgSecret"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; }; - codesOfConduct: { - getAllCodesOfConduct: { - (params?: RestEndpointMethodTypes["codesOfConduct"]["getAllCodesOfConduct"]["parameters"]): Promise; - defaults: RequestInterface["defaults"]; - endpoint: EndpointInterface<{ - url: string; - }>; - }; - getConductCode: { - (params?: RestEndpointMethodTypes["codesOfConduct"]["getConductCode"]["parameters"]): Promise; + dependencyGraph: { + /** + * Create a new snapshot of a repository's dependencies. You must authenticate using an access token with the `repo` scope to use this endpoint for a repository that the requesting user has access to. + */ + createRepositorySnapshot: { + (params?: RestEndpointMethodTypes["dependencyGraph"]["createRepositorySnapshot"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * Returns the contents of the repository's code of conduct file, if one is detected. - * - * A code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching. + * Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ - getForRepo: { - (params?: RestEndpointMethodTypes["codesOfConduct"]["getForRepo"]["parameters"]): Promise; + diffRange: { + (params?: RestEndpointMethodTypes["dependencyGraph"]["diffRange"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; @@ -2078,6 +3632,18 @@ export declare type RestEndpointMethods = { }; }; enterpriseAdmin: { + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + addCustomLabelsToSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["addCustomLabelsToSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." * @@ -2103,7 +3669,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." * * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ @@ -2115,7 +3681,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. * * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ @@ -2126,6 +3692,36 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days. + * + * To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation. + * + * You'll need to use a personal access token: + * - If you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics, you'll need a personal access token with the `read:enterprise` permission. + * - If you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics, you'll need a personal access token with the `read:org` permission. + * + * For more information on creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + */ + getServerStatistics: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["getServerStatistics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + listLabelsForSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["listLabelsForSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." * @@ -2139,7 +3735,36 @@ export declare type RestEndpointMethods = { }>; }; /** - * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["removeAllCustomLabelsFromSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + removeCustomLabelFromSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["removeCustomLabelFromSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." * * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ @@ -2151,7 +3776,20 @@ export declare type RestEndpointMethods = { }>; }; /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + setCustomLabelsForSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["setCustomLabelsForSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. * * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ @@ -2363,7 +4001,7 @@ export declare type RestEndpointMethods = { * | Name | Type | Description | * | ---- | ---- | ----------- | * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -2482,7 +4120,7 @@ export declare type RestEndpointMethods = { * | Name | Type | Description | * | ---- | ---- | ----------- | * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -2621,7 +4259,7 @@ export declare type RestEndpointMethods = { }; interactions: { /** - * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. If there are no restrictions, you will see an empty response. + * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ getRestrictionsForAuthenticatedUser: { (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForAuthenticatedUser"]["parameters"]): Promise; @@ -2651,8 +4289,8 @@ export declare type RestEndpointMethods = { }>; }; /** - * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. If there are no restrictions, you will see an empty response. - * @deprecated octokit.interactions.getRestrictionsForYourPublicRepos() has been renamed to octokit.interactions.getRestrictionsForAuthenticatedUser() (2021-02-02) + * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + * @deprecated octokit.rest.interactions.getRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.getRestrictionsForAuthenticatedUser() (2021-02-02) */ getRestrictionsForYourPublicRepos: { (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForYourPublicRepos"]["parameters"]): Promise; @@ -2693,7 +4331,7 @@ export declare type RestEndpointMethods = { }; /** * Removes any interaction restrictions from your public repositories. - * @deprecated octokit.interactions.removeRestrictionsForYourPublicRepos() has been renamed to octokit.interactions.removeRestrictionsForAuthenticatedUser() (2021-02-02) + * @deprecated octokit.rest.interactions.removeRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.removeRestrictionsForAuthenticatedUser() (2021-02-02) */ removeRestrictionsForYourPublicRepos: { (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForYourPublicRepos"]["parameters"]): Promise; @@ -2734,7 +4372,7 @@ export declare type RestEndpointMethods = { }; /** * Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. - * @deprecated octokit.interactions.setRestrictionsForYourPublicRepos() has been renamed to octokit.interactions.setRestrictionsForAuthenticatedUser() (2021-02-02) + * @deprecated octokit.rest.interactions.setRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.setRestrictionsForAuthenticatedUser() (2021-02-02) */ setRestrictionsForYourPublicRepos: { (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForYourPublicRepos"]["parameters"]): Promise; @@ -2777,9 +4415,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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. + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ create: { (params?: RestEndpointMethodTypes["issues"]["create"]["parameters"]): Promise; @@ -2789,7 +4427,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ createComment: { (params?: RestEndpointMethodTypes["issues"]["createComment"]["parameters"]): Promise; @@ -2835,7 +4473,7 @@ export declare type RestEndpointMethods = { }; /** * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was - * [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * [transferred](https://docs.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 @@ -2900,7 +4538,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + * Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ listAssignees: { (params?: RestEndpointMethodTypes["issues"]["listAssignees"]["parameters"]): Promise; @@ -3163,7 +4801,7 @@ export declare type RestEndpointMethods = { }; meta: { /** - * Returns meta information about GitHub, including 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/)." + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." * * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. */ @@ -3306,7 +4944,7 @@ export declare type RestEndpointMethods = { * 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 an import](https://docs.github.com/rest/reference/migrations#update-an-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://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) for more information. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) 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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#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 an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. @@ -3395,6 +5033,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Lists all the repositories for this user migration. + */ + listReposForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["listReposForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * List all the repositories for this organization migration. */ @@ -3407,6 +5055,7 @@ export declare type RestEndpointMethods = { }; /** * Lists all the repositories for this user migration. + * @deprecated octokit.rest.migrations.listReposForUser() has been renamed to octokit.rest.migrations.listReposForAuthenticatedUser() (2021-10-05) */ listReposForUser: { (params?: RestEndpointMethodTypes["migrations"]["listReposForUser"]["parameters"]): Promise; @@ -3426,7 +5075,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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/). + * 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://docs.github.com/articles/versioning-large-files/). */ setLfsPreference: { (params?: RestEndpointMethodTypes["migrations"]["setLfsPreference"]["parameters"]): Promise; @@ -3488,6 +5137,10 @@ export declare type RestEndpointMethods = { /** * 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. */ updateImport: { (params?: RestEndpointMethodTypes["migrations"]["updateImport"]["parameters"]): Promise; @@ -3542,7 +5195,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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/)". + * 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://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ convertMemberToOutsideCollaborator: { (params?: RestEndpointMethodTypes["orgs"]["convertMemberToOutsideCollaborator"]["parameters"]): Promise; @@ -3554,7 +5207,7 @@ export declare type RestEndpointMethods = { /** * 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://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ createInvitation: { (params?: RestEndpointMethodTypes["orgs"]["createInvitation"]["parameters"]): Promise; @@ -3581,7 +5234,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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/). + * 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://docs.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://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." */ @@ -3600,7 +5253,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * In order to get a user's membership with an organization, the authenticated user must be an organization member. + * In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ getMembershipForUser: { (params?: RestEndpointMethodTypes["orgs"]["getMembershipForUser"]["parameters"]): Promise; @@ -3631,6 +5284,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Returns a delivery for a webhook configured in an organization. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["orgs"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists all organizations, in the order that they were created on GitHub. * @@ -3663,6 +5326,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + listCustomRoles: { + (params?: RestEndpointMethodTypes["orgs"]["listCustomRoles"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ @@ -3688,7 +5364,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * List [public organization memberships](https://docs.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 organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ @@ -3756,6 +5432,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Returns a list of webhook deliveries for a webhook configured in an organization. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["orgs"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; listWebhooks: { (params?: RestEndpointMethodTypes["orgs"]["listWebhooks"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -3764,10 +5450,20 @@ export declare type RestEndpointMethods = { }>; }; /** - * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["pingWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Redeliver a delivery for a webhook configured in an organization. */ - pingWebhook: { - (params?: RestEndpointMethodTypes["orgs"]["pingWebhook"]["parameters"]): Promise; + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["orgs"]["redeliverWebhookDelivery"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; @@ -3893,9 +5589,9 @@ export declare type RestEndpointMethods = { }; packages: { /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope. + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. * If `package_type` is not `container`, your token must also include the `repo` scope. */ deletePackageForAuthenticatedUser: { @@ -3906,9 +5602,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: * - If `package_type` is not `container`, your token must also include the `repo` scope. * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. */ @@ -3920,9 +5616,23 @@ export declare type RestEndpointMethods = { }>; }; /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + deletePackageForUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. * If `package_type` is not `container`, your token must also include the `repo` scope. */ deletePackageVersionForAuthenticatedUser: { @@ -3933,9 +5643,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: * - If `package_type` is not `container`, your token must also include the `repo` scope. * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. */ @@ -3946,11 +5656,26 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + deletePackageVersionForUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageVersionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Returns all package versions for a package owned by an organization. * * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. * If `package_type` is not `container`, your token must also include the `repo` scope. + * @deprecated octokit.rest.packages.getAllPackageVersionsForAPackageOwnedByAnOrg() has been renamed to octokit.rest.packages.getAllPackageVersionsForPackageOwnedByOrg() (2021-03-24) */ getAllPackageVersionsForAPackageOwnedByAnOrg: { (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForAPackageOwnedByAnOrg"]["parameters"]): Promise; @@ -3964,6 +5689,7 @@ export declare type RestEndpointMethods = { * * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. * If `package_type` is not `container`, your token must also include the `repo` scope. + * @deprecated octokit.rest.packages.getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser() has been renamed to octokit.rest.packages.getAllPackageVersionsForPackageOwnedByAuthenticatedUser() (2021-03-24) */ getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: { (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser"]["parameters"]): Promise; @@ -3972,6 +5698,32 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + getAllPackageVersionsForPackageOwnedByOrg: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForPackageOwnedByOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Returns all package versions for a public package owned by a specified user. * @@ -4063,6 +5815,45 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + listPackagesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + listPackagesForOrganization: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + listPackagesForUser: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Restores a package owned by the authenticated user. * @@ -4070,7 +5861,7 @@ export declare type RestEndpointMethods = { * - The package was deleted within the last 30 days. * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. */ restorePackageForAuthenticatedUser: { (params?: RestEndpointMethodTypes["packages"]["restorePackageForAuthenticatedUser"]["parameters"]): Promise; @@ -4086,7 +5877,7 @@ export declare type RestEndpointMethods = { * - The package was deleted within the last 30 days. * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: * - If `package_type` is not `container`, your token must also include the `repo` scope. * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. */ @@ -4097,6 +5888,24 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + restorePackageForUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Restores a package version owned by the authenticated user. * @@ -4104,7 +5913,7 @@ export declare type RestEndpointMethods = { * - The package was deleted within the last 30 days. * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. */ restorePackageVersionForAuthenticatedUser: { (params?: RestEndpointMethodTypes["packages"]["restorePackageVersionForAuthenticatedUser"]["parameters"]): Promise; @@ -4120,7 +5929,7 @@ export declare type RestEndpointMethods = { * - The package was deleted within the last 30 days. * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: * - If `package_type` is not `container`, your token must also include the `repo` scope. * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. */ @@ -4131,6 +5940,24 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + restorePackageVersionForUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageVersionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; }; projects: { /** @@ -4143,11 +5970,6 @@ export declare type RestEndpointMethods = { url: string; }>; }; - /** - * **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://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ createCard: { (params?: RestEndpointMethodTypes["projects"]["createCard"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -4356,13 +6178,13 @@ export declare type RestEndpointMethods = { }>; }; /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. * * You can create a new pull request. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ create: { (params?: RestEndpointMethodTypes["pulls"]["create"]["parameters"]): Promise; @@ -4374,7 +6196,7 @@ export declare type RestEndpointMethods = { /** * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ createReplyForReviewComment: { (params?: RestEndpointMethodTypes["pulls"]["createReplyForReviewComment"]["parameters"]): Promise; @@ -4384,7 +6206,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. * @@ -4402,11 +6224,11 @@ export declare type RestEndpointMethods = { /** * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see the [`comfort-fade` preview notice](https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request-preview-notices). + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. * * **Note:** 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. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ createReviewComment: { (params?: RestEndpointMethodTypes["pulls"]["createReviewComment"]["parameters"]): Promise; @@ -4443,7 +6265,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Lists details of a pull request by providing its number. * @@ -4453,9 +6275,9 @@ export declare type RestEndpointMethods = { * * 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. + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.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://docs.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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ @@ -4484,7 +6306,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ list: { (params?: RestEndpointMethodTypes["pulls"]["list"]["parameters"]): Promise; @@ -4561,7 +6383,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ merge: { (params?: RestEndpointMethodTypes["pulls"]["merge"]["parameters"]): Promise; @@ -4578,7 +6400,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ requestReviewers: { (params?: RestEndpointMethodTypes["pulls"]["requestReviewers"]["parameters"]): Promise; @@ -4595,7 +6417,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. */ @@ -4653,7 +6475,7 @@ export declare type RestEndpointMethods = { }; reactions: { /** - * Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. + * Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ createForCommitComment: { (params?: RestEndpointMethodTypes["reactions"]["createForCommitComment"]["parameters"]): Promise; @@ -4663,7 +6485,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. + * Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ createForIssue: { (params?: RestEndpointMethodTypes["reactions"]["createForIssue"]["parameters"]): Promise; @@ -4673,7 +6495,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. + * Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ createForIssueComment: { (params?: RestEndpointMethodTypes["reactions"]["createForIssueComment"]["parameters"]): Promise; @@ -4683,7 +6505,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. + * Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ createForPullRequestReviewComment: { (params?: RestEndpointMethodTypes["reactions"]["createForPullRequestReviewComment"]["parameters"]): Promise; @@ -4693,7 +6515,17 @@ export declare type RestEndpointMethods = { }>; }; /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.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. + * Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + */ + createForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["createForRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ @@ -4705,7 +6537,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.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. + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ @@ -4765,37 +6597,36 @@ export declare type RestEndpointMethods = { }>; }; /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. * - * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). */ - deleteForTeamDiscussion: { - (params?: RestEndpointMethodTypes["reactions"]["deleteForTeamDiscussion"]["parameters"]): Promise; + deleteForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForRelease"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. * - * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - deleteForTeamDiscussionComment: { - (params?: RestEndpointMethodTypes["reactions"]["deleteForTeamDiscussionComment"]["parameters"]): Promise; + deleteForTeamDiscussion: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForTeamDiscussion"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; }>; }; /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - * @deprecated octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - deleteLegacy: { - (params?: RestEndpointMethodTypes["reactions"]["deleteLegacy"]["parameters"]): Promise; + deleteForTeamDiscussionComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForTeamDiscussionComment"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string; @@ -4841,6 +6672,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + listForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["listForRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * @@ -4867,6 +6708,9 @@ export declare type RestEndpointMethods = { }; }; repos: { + /** + * @deprecated octokit.rest.repos.acceptInvitation() has been renamed to octokit.rest.repos.acceptInvitationForAuthenticatedUser() (2021-10-05) + */ acceptInvitation: { (params?: RestEndpointMethodTypes["repos"]["acceptInvitation"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -4874,8 +6718,15 @@ export declare type RestEndpointMethods = { url: string; }>; }; + acceptInvitationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["acceptInvitationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. * @@ -4891,17 +6742,27 @@ export declare type RestEndpointMethods = { }>; }; /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * For more information the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` * * 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://docs.github.com/rest/overview/resources-in-the-rest-api#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://docs.github.com/rest/reference/repos#invitations). * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * * **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. + * 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?: RestEndpointMethodTypes["repos"]["addCollaborator"]["parameters"]): Promise; @@ -4911,7 +6772,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ addStatusCheckContexts: { (params?: RestEndpointMethodTypes["repos"]["addStatusCheckContexts"]["parameters"]): Promise; @@ -4921,7 +6782,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Grants the specified teams push access for this branch. You can also give push access to child teams. * @@ -4937,7 +6798,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Grants the specified people push access for this branch. * @@ -4956,6 +6817,10 @@ export declare type RestEndpointMethods = { * 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. * * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. */ checkCollaborator: { (params?: RestEndpointMethodTypes["repos"]["checkCollaborator"]["parameters"]): Promise; @@ -4965,7 +6830,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Shows whether dependency 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)". + * Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ checkVulnerabilityAlerts: { (params?: RestEndpointMethodTypes["repos"]["checkVulnerabilityAlerts"]["parameters"]): Promise; @@ -4975,7 +6840,21 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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`. + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + codeownersErrors: { + (params?: RestEndpointMethodTypes["repos"]["codeownersErrors"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. 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://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. * @@ -4983,10 +6862,9 @@ export declare type RestEndpointMethods = { * * **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 [List commits](https://docs.github.com/rest/reference/repos#list-commits) to enumerate all commits in the range. + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." * - * 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. + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. * * **Signature verification object** * @@ -5024,10 +6902,69 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both 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://docs.github.com/rest/overview/media-types/#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** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **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: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * 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. | + */ + compareCommitsWithBasehead: { + (params?: RestEndpointMethodTypes["repos"]["compareCommitsWithBasehead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with admin access to the repository can create an autolink. + */ + createAutolink: { + (params?: RestEndpointMethodTypes["repos"]["createAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Create a comment for a commit using its `:commit_sha`. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ createCommitComment: { (params?: RestEndpointMethodTypes["repos"]["createCommitComment"]["parameters"]): Promise; @@ -5037,7 +6974,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. */ @@ -5085,7 +7022,7 @@ export declare type RestEndpointMethods = { * 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://docs.github.com/rest/reference/repos#statuses) for every submitted context must be in a `success` + * By default, [commit statuses](https://docs.github.com/rest/commits/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. @@ -5143,7 +7080,7 @@ export declare type RestEndpointMethods = { * * This endpoint requires write access to the repository by providing either: * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. * * This input example shows how you can use the `client_payload` as a test to debug your workflow. @@ -5162,8 +7099,8 @@ export declare type RestEndpointMethods = { * * When using [OAuth](https://docs.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 + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. */ createForAuthenticatedUser: { (params?: RestEndpointMethodTypes["repos"]["createForAuthenticatedUser"]["parameters"]): Promise; @@ -5175,7 +7112,7 @@ export declare type RestEndpointMethods = { /** * 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://support.github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com). + * **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://support.github.com/contact?tags=dotcom-rest-api). */ createFork: { (params?: RestEndpointMethodTypes["repos"]["createFork"]["parameters"]): Promise; @@ -5191,7 +7128,7 @@ export declare type RestEndpointMethods = { * * When using [OAuth](https://docs.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 + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository */ createInOrg: { @@ -5201,6 +7138,22 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + createOrUpdateEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["createOrUpdateEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Creates a new file or replaces an existing file in a repository. */ @@ -5224,7 +7177,7 @@ export declare type RestEndpointMethods = { /** * Users with push access to the repository can create a release. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ createRelease: { (params?: RestEndpointMethodTypes["repos"]["createRelease"]["parameters"]): Promise; @@ -5233,6 +7186,17 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + createTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["createTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters 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 a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. * @@ -5240,7 +7204,7 @@ export declare type RestEndpointMethods = { * * When using [OAuth](https://docs.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 + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository */ createUsingTemplate: { @@ -5261,6 +7225,9 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * @deprecated octokit.rest.repos.declineInvitation() has been renamed to octokit.rest.repos.declineInvitationForAuthenticatedUser() (2021-10-05) + */ declineInvitation: { (params?: RestEndpointMethodTypes["repos"]["declineInvitation"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -5268,6 +7235,13 @@ export declare type RestEndpointMethods = { url: string; }>; }; + declineInvitationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["declineInvitationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. * @@ -5282,7 +7256,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Disables the ability to restrict who can push to this branch. */ @@ -5294,7 +7268,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. */ @@ -5306,7 +7280,29 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + deleteAnEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["deleteAnEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + deleteAutolink: { + (params?: RestEndpointMethodTypes["repos"]["deleteAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ deleteBranchProtection: { (params?: RestEndpointMethodTypes["repos"]["deleteBranchProtection"]["parameters"]): Promise; @@ -5323,7 +7319,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. */ @@ -5345,7 +7341,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive deployment. + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. * * To set a deployment as inactive, you must: * @@ -5392,7 +7388,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ deletePullRequestReviewProtection: { (params?: RestEndpointMethodTypes["repos"]["deletePullRequestReviewProtection"]["parameters"]): Promise; @@ -5418,6 +7414,17 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + deleteTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; deleteWebhook: { (params?: RestEndpointMethodTypes["repos"]["deleteWebhook"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -5426,7 +7433,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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)". + * 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ disableAutomatedSecurityFixes: { (params?: RestEndpointMethodTypes["repos"]["disableAutomatedSecurityFixes"]["parameters"]): Promise; @@ -5435,8 +7442,15 @@ export declare type RestEndpointMethods = { url: string; }>; }; + disableLfsForRepo: { + (params?: RestEndpointMethodTypes["repos"]["disableLfsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** - * Disables dependency 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)". + * Disables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ disableVulnerabilityAlerts: { (params?: RestEndpointMethodTypes["repos"]["disableVulnerabilityAlerts"]["parameters"]): Promise; @@ -5450,7 +7464,7 @@ export declare type RestEndpointMethods = { * `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. - * @deprecated octokit.repos.downloadArchive() has been renamed to octokit.repos.downloadZipballArchive() (2020-09-17) + * @deprecated octokit.rest.repos.downloadArchive() has been renamed to octokit.rest.repos.downloadZipballArchive() (2020-09-17) */ downloadArchive: { (params?: RestEndpointMethodTypes["repos"]["downloadArchive"]["parameters"]): Promise; @@ -5486,7 +7500,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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)". + * 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://docs.github.com/en/articles/configuring-automated-security-fixes)". */ enableAutomatedSecurityFixes: { (params?: RestEndpointMethodTypes["repos"]["enableAutomatedSecurityFixes"]["parameters"]): Promise; @@ -5495,8 +7509,15 @@ export declare type RestEndpointMethods = { url: string; }>; }; + enableLfsForRepo: { + (params?: RestEndpointMethodTypes["repos"]["enableLfsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** - * Enables dependency 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)". + * Enables dependency 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://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ enableVulnerabilityAlerts: { (params?: RestEndpointMethodTypes["repos"]["enableVulnerabilityAlerts"]["parameters"]): Promise; @@ -5506,8 +7527,16 @@ export declare type RestEndpointMethods = { }>; }; /** - * When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file. - * + * Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. + */ + generateReleaseNotes: { + (params?: RestEndpointMethodTypes["repos"]["generateReleaseNotes"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** * 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: { @@ -5518,7 +7547,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Lists who has access to this protected branch. * @@ -5532,7 +7561,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ getAdminBranchProtection: { (params?: RestEndpointMethodTypes["repos"]["getAdminBranchProtection"]["parameters"]): Promise; @@ -5542,7 +7571,19 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Get all environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getAllEnvironments: { + (params?: RestEndpointMethodTypes["repos"]["getAllEnvironments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ getAllStatusCheckContexts: { (params?: RestEndpointMethodTypes["repos"]["getAllStatusCheckContexts"]["parameters"]): Promise; @@ -5559,7 +7600,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. */ @@ -5570,6 +7611,18 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + getAutolink: { + (params?: RestEndpointMethodTypes["repos"]["getAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; getBranch: { (params?: RestEndpointMethodTypes["repos"]["getBranch"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -5578,7 +7631,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ getBranchProtection: { (params?: RestEndpointMethodTypes["repos"]["getBranchProtection"]["parameters"]): Promise; @@ -5620,7 +7673,6 @@ export declare type RestEndpointMethods = { /** * 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://docs.github.com/rest/overview/resources-in-the-rest-api#pagination) if there are over 100 contexts. * * Additionally, a combined `state` is returned. The `state` is one of: * @@ -5698,9 +7750,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. + * 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://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. * * **Note**: You must enable branch protection to require signed commits. */ @@ -5745,7 +7797,12 @@ export declare type RestEndpointMethods = { * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/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://docs.github.com/rest/reference/git#get-a-tree). - * * This API supports files up to 1 megabyte in size. + * + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. * * #### If the content is a directory * The response will be an array of objects, one object for each item in the directory. @@ -5812,6 +7869,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["getEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; getLatestPagesBuild: { (params?: RestEndpointMethodTypes["repos"]["getLatestPagesBuild"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -5845,6 +7912,20 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + getPagesHealthCheck: { + (params?: RestEndpointMethodTypes["repos"]["getPagesHealthCheck"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * 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`. * @@ -5858,7 +7939,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ getPullRequestReviewProtection: { (params?: RestEndpointMethodTypes["repos"]["getPullRequestReviewProtection"]["parameters"]): Promise; @@ -5895,6 +7976,18 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + getReadmeInDirectory: { + (params?: RestEndpointMethodTypes["repos"]["getReadmeInDirectory"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ @@ -5926,7 +8019,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ getStatusChecksProtection: { (params?: RestEndpointMethodTypes["repos"]["getStatusChecksProtection"]["parameters"]): Promise; @@ -5936,7 +8029,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Lists the teams who have push access to this branch. The list includes child teams. */ @@ -5968,7 +8061,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Lists the people who have push access to this branch. */ @@ -6011,6 +8104,28 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Returns a delivery for a webhook configured in a repository. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["repos"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + listAutolinks: { + (params?: RestEndpointMethodTypes["repos"]["listAutolinks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; listBranches: { (params?: RestEndpointMethodTypes["repos"]["listBranches"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -6019,7 +8134,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. */ @@ -6032,8 +8147,13 @@ export declare type RestEndpointMethods = { }; /** * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. */ listCollaborators: { (params?: RestEndpointMethodTypes["repos"]["listCollaborators"]["parameters"]): Promise; @@ -6175,7 +8295,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Lists public repositories for the specified user. + * Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ listForUser: { (params?: RestEndpointMethodTypes["repos"]["listForUser"]["parameters"]): Promise; @@ -6231,7 +8351,9 @@ export declare type RestEndpointMethods = { /** * 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://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ listPublic: { (params?: RestEndpointMethodTypes["repos"]["listPublic"]["parameters"]): Promise; @@ -6241,7 +8363,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. + * Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ listPullRequestsAssociatedWithCommit: { (params?: RestEndpointMethodTypes["repos"]["listPullRequestsAssociatedWithCommit"]["parameters"]): Promise; @@ -6269,6 +8391,18 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + listTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["listTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; listTags: { (params?: RestEndpointMethodTypes["repos"]["listTags"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -6283,6 +8417,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Returns a list of webhook deliveries for a webhook configured in a repository. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["repos"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; listWebhooks: { (params?: RestEndpointMethodTypes["repos"]["listWebhooks"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -6297,6 +8441,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Sync a branch of a forked repository to keep it up-to-date with the upstream repository. + */ + mergeUpstream: { + (params?: RestEndpointMethodTypes["repos"]["mergeUpstream"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ @@ -6308,7 +8462,17 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Redeliver a webhook delivery for a webhook configured in a repository. + */ + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["repos"]["redeliverWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. * @@ -6331,7 +8495,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ removeStatusCheckContexts: { (params?: RestEndpointMethodTypes["repos"]["removeStatusCheckContexts"]["parameters"]): Promise; @@ -6341,7 +8505,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ removeStatusCheckProtection: { (params?: RestEndpointMethodTypes["repos"]["removeStatusCheckProtection"]["parameters"]): Promise; @@ -6351,7 +8515,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Removes the ability of a team to push to this branch. You can also remove push access for child teams. * @@ -6367,7 +8531,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Removes the ability of a user to push to this branch. * @@ -6426,7 +8590,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. */ @@ -6438,7 +8602,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. * @@ -6454,7 +8618,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ setStatusCheckContexts: { (params?: RestEndpointMethodTypes["repos"]["setStatusCheckContexts"]["parameters"]): Promise; @@ -6464,7 +8628,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. Team restrictions include child teams. * @@ -6480,7 +8644,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) 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. * @@ -6508,7 +8672,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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/). + * 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://docs.github.com/articles/about-repository-transfers/). */ transfer: { (params?: RestEndpointMethodTypes["repos"]["transfer"]["parameters"]): Promise; @@ -6528,7 +8692,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Protecting a branch requires admin or owner permissions to the repository. * @@ -6568,7 +8732,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. * @@ -6602,10 +8766,10 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. - * @deprecated octokit.repos.updateStatusCheckPotection() has been renamed to octokit.repos.updateStatusCheckProtection() (2020-09-17) + * @deprecated octokit.rest.repos.updateStatusCheckPotection() has been renamed to octokit.rest.repos.updateStatusCheckProtection() (2020-09-17) */ updateStatusCheckPotection: { (params?: RestEndpointMethodTypes["repos"]["updateStatusCheckPotection"]["parameters"]): Promise; @@ -6615,7 +8779,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. */ @@ -6665,7 +8829,7 @@ export declare type RestEndpointMethods = { * * **Notes:** * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact). + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ uploadReleaseAsset: { @@ -6770,10 +8934,6 @@ export declare type RestEndpointMethods = { * `q=tetris+language:assembly&sort=stars&order=desc` * * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. - * - * When you include the `mercy` preview header, you can also search for multiple topics by adding more `topic:` instances. For example, your query might look like this: - * - * `q=topic:ruby+topic:rails` */ repos: { (params?: RestEndpointMethodTypes["search"]["repos"]["parameters"]): Promise; @@ -6783,7 +8943,7 @@ export declare type RestEndpointMethods = { }>; }; /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * * 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://docs.github.com/rest/reference/search#text-match-metadata). * @@ -6821,7 +8981,9 @@ export declare type RestEndpointMethods = { }; secretScanning: { /** - * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -6833,7 +8995,34 @@ export declare type RestEndpointMethods = { }>; }; /** - * Lists all secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + listAlertsForEnterprise: { + (params?: RestEndpointMethodTypes["secretScanning"]["listAlertsForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + listAlertsForOrg: { + (params?: RestEndpointMethodTypes["secretScanning"]["listAlertsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -6845,7 +9034,23 @@ export declare type RestEndpointMethods = { }>; }; /** - * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + listLocationsForAlert: { + (params?: RestEndpointMethodTypes["secretScanning"]["listLocationsForAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ @@ -6859,11 +9064,11 @@ export declare type RestEndpointMethods = { }; teams: { /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a 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/)." + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person 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. * @@ -6895,7 +9100,7 @@ export declare type RestEndpointMethods = { * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. * - * For more information about the permission levels, see "[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". */ addOrUpdateRepoPermissionsInOrg: { (params?: RestEndpointMethodTypes["teams"]["addOrUpdateRepoPermissionsInOrg"]["parameters"]): Promise; @@ -6933,9 +9138,9 @@ export declare type RestEndpointMethods = { }>; }; /** - * 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)." + * 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://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." * - * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". */ create: { (params?: RestEndpointMethodTypes["teams"]["create"]["parameters"]): Promise; @@ -6947,7 +9152,7 @@ export declare type RestEndpointMethods = { /** * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ @@ -6961,7 +9166,7 @@ export declare type RestEndpointMethods = { /** * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ @@ -7053,7 +9258,10 @@ export declare type RestEndpointMethods = { * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. * - * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). */ getMembershipForUserInOrg: { (params?: RestEndpointMethodTypes["teams"]["getMembershipForUserInOrg"]["parameters"]): Promise; @@ -7167,11 +9375,11 @@ export declare type RestEndpointMethods = { }>; }; /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-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/)." + * **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://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ @@ -7246,6 +9454,7 @@ export declare type RestEndpointMethods = { users: { /** * This endpoint is accessible with the `user` scope. + * @deprecated octokit.rest.users.addEmailForAuthenticated() has been renamed to octokit.rest.users.addEmailForAuthenticatedUser() (2021-10-05) */ addEmailForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["addEmailForAuthenticated"]["parameters"]): Promise; @@ -7254,6 +9463,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * This endpoint is accessible with the `user` scope. + */ + addEmailForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["addEmailForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; block: { (params?: RestEndpointMethodTypes["users"]["block"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; @@ -7284,6 +9503,7 @@ export declare type RestEndpointMethods = { }; /** * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.createGpgKeyForAuthenticated() has been renamed to octokit.rest.users.createGpgKeyForAuthenticatedUser() (2021-10-05) */ createGpgKeyForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["createGpgKeyForAuthenticated"]["parameters"]): Promise; @@ -7292,8 +9512,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + createGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["createGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.createPublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.createPublicSshKeyForAuthenticatedUser() (2021-10-05) */ createPublicSshKeyForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["createPublicSshKeyForAuthenticated"]["parameters"]): Promise; @@ -7302,8 +9533,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + createPublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["createPublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * This endpoint is accessible with the `user` scope. + * @deprecated octokit.rest.users.deleteEmailForAuthenticated() has been renamed to octokit.rest.users.deleteEmailForAuthenticatedUser() (2021-10-05) */ deleteEmailForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["deleteEmailForAuthenticated"]["parameters"]): Promise; @@ -7312,8 +9554,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * This endpoint is accessible with the `user` scope. + */ + deleteEmailForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deleteEmailForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.deleteGpgKeyForAuthenticated() has been renamed to octokit.rest.users.deleteGpgKeyForAuthenticatedUser() (2021-10-05) */ deleteGpgKeyForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["deleteGpgKeyForAuthenticated"]["parameters"]): Promise; @@ -7322,8 +9575,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deleteGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.deletePublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.deletePublicSshKeyForAuthenticatedUser() (2021-10-05) */ deletePublicSshKeyForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["deletePublicSshKeyForAuthenticated"]["parameters"]): Promise; @@ -7332,6 +9596,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deletePublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deletePublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." * @@ -7391,6 +9665,7 @@ export declare type RestEndpointMethods = { }; /** * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.getGpgKeyForAuthenticated() has been renamed to octokit.rest.users.getGpgKeyForAuthenticatedUser() (2021-10-05) */ getGpgKeyForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["getGpgKeyForAuthenticated"]["parameters"]): Promise; @@ -7399,8 +9674,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["getGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.getPublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.getPublicSshKeyForAuthenticatedUser() (2021-10-05) */ getPublicSshKeyForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["getPublicSshKeyForAuthenticated"]["parameters"]): Promise; @@ -7409,6 +9695,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getPublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["getPublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. * @@ -7423,6 +9719,7 @@ export declare type RestEndpointMethods = { }; /** * List the users you've blocked on your personal account. + * @deprecated octokit.rest.users.listBlockedByAuthenticated() has been renamed to octokit.rest.users.listBlockedByAuthenticatedUser() (2021-10-05) */ listBlockedByAuthenticated: { (params?: RestEndpointMethodTypes["users"]["listBlockedByAuthenticated"]["parameters"]): Promise; @@ -7431,8 +9728,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * List the users you've blocked on your personal account. + */ + listBlockedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listBlockedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. + * @deprecated octokit.rest.users.listEmailsForAuthenticated() has been renamed to octokit.rest.users.listEmailsForAuthenticatedUser() (2021-10-05) */ listEmailsForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["listEmailsForAuthenticated"]["parameters"]): Promise; @@ -7441,8 +9749,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. + */ + listEmailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listEmailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists the people who the authenticated user follows. + * @deprecated octokit.rest.users.listFollowedByAuthenticated() has been renamed to octokit.rest.users.listFollowedByAuthenticatedUser() (2021-10-05) */ listFollowedByAuthenticated: { (params?: RestEndpointMethodTypes["users"]["listFollowedByAuthenticated"]["parameters"]): Promise; @@ -7451,6 +9770,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Lists the people who the authenticated user follows. + */ + listFollowedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists the people following the authenticated user. */ @@ -7483,6 +9812,7 @@ export declare type RestEndpointMethods = { }; /** * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.listGpgKeysForAuthenticated() has been renamed to octokit.rest.users.listGpgKeysForAuthenticatedUser() (2021-10-05) */ listGpgKeysForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["listGpgKeysForAuthenticated"]["parameters"]): Promise; @@ -7491,6 +9821,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listGpgKeysForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listGpgKeysForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists the GPG keys for a user. This information is accessible by anyone. */ @@ -7503,6 +9843,7 @@ export declare type RestEndpointMethods = { }; /** * Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. + * @deprecated octokit.rest.users.listPublicEmailsForAuthenticated() has been renamed to octokit.rest.users.listPublicEmailsForAuthenticatedUser() (2021-10-05) */ listPublicEmailsForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["listPublicEmailsForAuthenticated"]["parameters"]): Promise; @@ -7511,6 +9852,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. + */ + listPublicEmailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listPublicEmailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ @@ -7523,6 +9874,7 @@ export declare type RestEndpointMethods = { }; /** * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.listPublicSshKeysForAuthenticated() has been renamed to octokit.rest.users.listPublicSshKeysForAuthenticatedUser() (2021-10-05) */ listPublicSshKeysForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["listPublicSshKeysForAuthenticated"]["parameters"]): Promise; @@ -7531,8 +9883,19 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * 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://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listPublicSshKeysForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listPublicSshKeysForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; /** * Sets the visibility for your primary email addresses. + * @deprecated octokit.rest.users.setPrimaryEmailVisibilityForAuthenticated() has been renamed to octokit.rest.users.setPrimaryEmailVisibilityForAuthenticatedUser() (2021-10-05) */ setPrimaryEmailVisibilityForAuthenticated: { (params?: RestEndpointMethodTypes["users"]["setPrimaryEmailVisibilityForAuthenticated"]["parameters"]): Promise; @@ -7541,6 +9904,16 @@ export declare type RestEndpointMethods = { url: string; }>; }; + /** + * Sets the visibility for your primary email addresses. + */ + setPrimaryEmailVisibilityForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["setPrimaryEmailVisibilityForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; unblock: { (params?: RestEndpointMethodTypes["users"]["unblock"]["parameters"]): Promise; defaults: RequestInterface["defaults"]; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts index 71ddc3d..ce2a2f1 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts @@ -1,14 +1,30 @@ import { Endpoints, RequestParameters } from "@octokit/types"; export declare type RestEndpointMethodTypes = { actions: { + addCustomLabelsToSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + addCustomLabelsToSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; addSelectedRepoToOrgSecret: { parameters: RequestParameters & Omit; response: Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"]["response"]; }; + approveWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"]["response"]; + }; cancelWorkflowRun: { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"]["response"]; }; + createOrUpdateEnvironmentSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; createOrUpdateOrgSecret: { parameters: RequestParameters & Omit; response: Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}"]["response"]; @@ -37,10 +53,22 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"]["response"]; }; + deleteActionsCacheById: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"]["response"]; + }; + deleteActionsCacheByKey: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"]["response"]; + }; deleteArtifact: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"]["response"]; }; + deleteEnvironmentSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; deleteOrgSecret: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}"]["response"]; @@ -81,6 +109,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"]["response"]; }; + downloadWorkflowRunAttemptLogs: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"]["response"]; + }; downloadWorkflowRunLogs: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"]["response"]; @@ -93,6 +125,26 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"]["response"]; }; + getActionsCacheList: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"]; + }; + getActionsCacheUsage: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/cache/usage"]["response"]; + }; + getActionsCacheUsageByRepoForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"]; + }; + getActionsCacheUsageForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/cache/usage"]["response"]; + }; + getActionsCacheUsageForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/cache/usage"]["response"]; + }; getAllowedActionsOrganization: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/actions/permissions/selected-actions"]["response"]; @@ -105,6 +157,26 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"]["response"]; }; + getEnvironmentPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"]["response"]; + }; + getEnvironmentSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; + getGithubActionsDefaultWorkflowPermissionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/permissions/workflow"]["response"]; + }; + getGithubActionsDefaultWorkflowPermissionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/permissions/workflow"]["response"]; + }; + getGithubActionsDefaultWorkflowPermissionsRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions/workflow"]["response"]; + }; getGithubActionsPermissionsOrganization: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/actions/permissions"]["response"]; @@ -125,6 +197,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}"]["response"]; }; + getPendingDeploymentsForRun: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"]["response"]; + }; getRepoPermissions: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["response"]; @@ -137,6 +213,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["response"]; }; + getReviewsForRun: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"]["response"]; + }; getSelfHostedRunnerForOrg: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/actions/runners/{runner_id}"]["response"]; @@ -149,10 +229,18 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"]["response"]; }; + getWorkflowAccessToRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions/access"]["response"]; + }; getWorkflowRun: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}"]["response"]; }; + getWorkflowRunAttempt: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"]["response"]; + }; getWorkflowRunUsage: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"]["response"]; @@ -165,10 +253,26 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["response"]; }; + listEnvironmentSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets"]["response"]; + }; listJobsForWorkflowRun: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["response"]; }; + listJobsForWorkflowRunAttempt: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"]; + }; + listLabelsForSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + listLabelsForSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; listOrgSecrets: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/actions/secrets"]["response"]; @@ -217,14 +321,42 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["response"]; }; + reRunJobForWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"]["response"]; + }; reRunWorkflow: { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"]["response"]; }; + reRunWorkflowFailedJobs: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"]["response"]; + }; + removeAllCustomLabelsFromSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + removeAllCustomLabelsFromSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + removeCustomLabelFromSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"]["response"]; + }; + removeCustomLabelFromSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"]["response"]; + }; removeSelectedRepoFromOrgSecret: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"]["response"]; }; + reviewPendingDeploymentsForRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"]["response"]; + }; setAllowedActionsOrganization: { parameters: RequestParameters & Omit; response: Endpoints["PUT /orgs/{org}/actions/permissions/selected-actions"]["response"]; @@ -233,6 +365,26 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"]["response"]; }; + setCustomLabelsForSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + setCustomLabelsForSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + setGithubActionsDefaultWorkflowPermissionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /enterprises/{enterprise}/actions/permissions/workflow"]["response"]; + }; + setGithubActionsDefaultWorkflowPermissionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/permissions/workflow"]["response"]; + }; + setGithubActionsDefaultWorkflowPermissionsRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/workflow"]["response"]; + }; setGithubActionsPermissionsOrganization: { parameters: RequestParameters & Omit; response: Endpoints["PUT /orgs/{org}/actions/permissions"]["response"]; @@ -249,6 +401,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["PUT /orgs/{org}/actions/permissions/repositories"]["response"]; }; + setWorkflowAccessToRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/access"]["response"]; + }; }; activity: { checkRepoIsStarredByAuthenticatedUser: { @@ -381,14 +537,14 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["PUT /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; }; + addRepoToInstallationForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; checkToken: { parameters: RequestParameters & Omit; response: Endpoints["POST /applications/{client_id}/token"]["response"]; }; - createContentAttachment: { - parameters: RequestParameters & Omit; - response: Endpoints["POST /content_references/{content_reference_id}/attachments"]["response"]; - }; createFromManifest: { parameters: RequestParameters & Omit; response: Endpoints["POST /app-manifests/{code}/conversions"]["response"]; @@ -445,6 +601,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /app/hook/config"]["response"]; }; + getWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /app/hook/deliveries/{delivery_id}"]["response"]; + }; listAccountsForPlan: { parameters: RequestParameters & Omit; response: Endpoints["GET /marketplace_listing/plans/{plan_id}/accounts"]["response"]; @@ -485,10 +645,22 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /user/marketplace_purchases/stubbed"]["response"]; }; + listWebhookDeliveries: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /app/hook/deliveries"]["response"]; + }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /app/hook/deliveries/{delivery_id}/attempts"]["response"]; + }; removeRepoFromInstallation: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; }; + removeRepoFromInstallationForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; resetToken: { parameters: RequestParameters & Omit; response: Endpoints["PATCH /applications/{client_id}/token"]["response"]; @@ -523,6 +695,14 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /users/{username}/settings/billing/actions"]["response"]; }; + getGithubAdvancedSecurityBillingGhe: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/settings/billing/advanced-security"]["response"]; + }; + getGithubAdvancedSecurityBillingOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/settings/billing/advanced-security"]["response"]; + }; getGithubPackagesBillingOrg: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/settings/billing/packages"]["response"]; @@ -573,6 +753,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["response"]; }; + rerequestRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"]["response"]; + }; rerequestSuite: { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"]["response"]; @@ -603,6 +787,14 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"]["response"]; }; + listAlertInstances: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"]; + }; + listAlertsForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["response"]; + }; listAlertsForRepo: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts"]["response"]; @@ -633,9 +825,203 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /codes_of_conduct/{key}"]["response"]; }; - getForRepo: { - parameters: RequestParameters & Omit; - response: Endpoints["GET /repos/{owner}/{repo}/community/code_of_conduct"]["response"]; + }; + codespaces: { + addRepositoryForSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + codespaceMachinesForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/{codespace_name}/machines"]["response"]; + }; + createForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/codespaces"]["response"]; + }; + createOrUpdateRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + createOrUpdateSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}"]["response"]; + }; + createWithPrForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"]["response"]; + }; + createWithRepoForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/codespaces"]["response"]; + }; + deleteForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/codespaces/{codespace_name}"]["response"]; + }; + deleteFromOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"]["response"]; + }; + deleteRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + deleteSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/codespaces/secrets/{secret_name}"]["response"]; + }; + exportForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/codespaces/{codespace_name}/exports"]["response"]; + }; + getExportDetailsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/{codespace_name}/exports/{export_id}"]["response"]; + }; + getForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/{codespace_name}"]["response"]; + }; + getPublicKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/secrets/public-key"]["response"]; + }; + getRepoPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"]["response"]; + }; + getRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + getSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/secrets/{secret_name}"]["response"]; + }; + listDevcontainersInRepositoryForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces"]["response"]; + }; + listInOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/codespaces"]["response"]; + }; + listInRepositoryForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"]; + }; + listRepoSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"]; + }; + listRepositoriesForSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/secrets/{secret_name}/repositories"]["response"]; + }; + listSecretsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/secrets"]["response"]; + }; + removeRepositoryForSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + repoMachinesForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/machines"]["response"]; + }; + setRepositoriesForSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}/repositories"]["response"]; + }; + startForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/codespaces/{codespace_name}/start"]["response"]; + }; + stopForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/codespaces/{codespace_name}/stop"]["response"]; + }; + stopInOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"]["response"]; + }; + updateForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/codespaces/{codespace_name}"]["response"]; + }; + }; + dependabot: { + addSelectedRepoToOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + createOrUpdateOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + createOrUpdateRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + deleteOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + deleteRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + getOrgPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/public-key"]["response"]; + }; + getOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + getRepoPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"]["response"]; + }; + getRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + listOrgSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"]; + }; + listRepoSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"]; + }; + listSelectedReposForOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]; + }; + removeSelectedRepoFromOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + setSelectedReposForOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]; + }; + }; + dependencyGraph: { + createRepositorySnapshot: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/dependency-graph/snapshots"]["response"]; + }; + diffRange: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"]["response"]; }; }; emojis: { @@ -645,6 +1031,10 @@ export declare type RestEndpointMethodTypes = { }; }; enterpriseAdmin: { + addCustomLabelsToSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels"]["response"]; + }; disableSelectedOrganizationGithubActionsEnterprise: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"]["response"]; @@ -661,14 +1051,34 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /enterprises/{enterprise}/actions/permissions"]["response"]; }; + getServerStatistics: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprise-installation/{enterprise_or_org}/server-statistics"]["response"]; + }; + listLabelsForSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels"]["response"]; + }; listSelectedOrganizationsEnabledGithubActionsEnterprise: { parameters: RequestParameters & Omit; response: Endpoints["GET /enterprises/{enterprise}/actions/permissions/organizations"]["response"]; }; + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels"]["response"]; + }; + removeCustomLabelFromSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}"]["response"]; + }; setAllowedActionsEnterprise: { parameters: RequestParameters & Omit; response: Endpoints["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"]["response"]; }; + setCustomLabelsForSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels"]["response"]; + }; setGithubActionsPermissionsEnterprise: { parameters: RequestParameters & Omit; response: Endpoints["PUT /enterprises/{enterprise}/actions/permissions"]["response"]; @@ -1123,6 +1533,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/migrations"]["response"]; }; + listReposForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; + }; listReposForOrg: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/migrations/{migration_id}/repositories"]["response"]; @@ -1221,6 +1635,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/config"]["response"]; }; + getWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"]["response"]; + }; list: { parameters: RequestParameters & Omit; response: Endpoints["GET /organizations"]["response"]; @@ -1233,6 +1651,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/blocks"]["response"]; }; + listCustomRoles: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /organizations/{organization_id}/custom_roles"]["response"]; + }; listFailedInvitations: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/failed_invitations"]["response"]; @@ -1269,6 +1691,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/public_members"]["response"]; }; + listWebhookDeliveries: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["response"]; + }; listWebhooks: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/hooks"]["response"]; @@ -1277,6 +1703,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /orgs/{org}/hooks/{hook_id}/pings"]["response"]; }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"]["response"]; + }; removeMember: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /orgs/{org}/members/{username}"]["response"]; @@ -1331,6 +1761,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["DELETE /orgs/{org}/packages/{package_type}/{package_name}"]["response"]; }; + deletePackageForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /users/{username}/packages/{package_type}/{package_name}"]["response"]; + }; deletePackageVersionForAuthenticatedUser: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; @@ -1339,6 +1773,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; }; + deletePackageVersionForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; getAllPackageVersionsForAPackageOwnedByAnOrg: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; @@ -1347,6 +1785,14 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; }; + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForPackageOwnedByOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; + }; getAllPackageVersionsForPackageOwnedByUser: { parameters: RequestParameters & Omit; response: Endpoints["GET /users/{username}/packages/{package_type}/{package_name}/versions"]["response"]; @@ -1375,13 +1821,29 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; }; + listPackagesForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/packages"]["response"]; + }; + listPackagesForOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/packages"]["response"]; + }; + listPackagesForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/packages"]["response"]; + }; restorePackageForAuthenticatedUser: { - parameters: RequestParameters & Omit; - response: Endpoints["POST /user/packages/{package_type}/{package_name}/restore"]["response"]; + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/packages/{package_type}/{package_name}/restore{?token}"]["response"]; }; restorePackageForOrg: { - parameters: RequestParameters & Omit; - response: Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/restore"]["response"]; + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"]["response"]; + }; + restorePackageForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"]["response"]; }; restorePackageVersionForAuthenticatedUser: { parameters: RequestParameters & Omit; @@ -1391,6 +1853,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["response"]; }; + restorePackageVersionForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["response"]; + }; }; projects: { addCollaborator: { @@ -1627,6 +2093,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["response"]; }; + createForRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; createForTeamDiscussionCommentInOrg: { parameters: RequestParameters & Omit; response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; @@ -1651,6 +2121,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"]["response"]; }; + deleteForRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"]["response"]; + }; deleteForTeamDiscussion: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"]["response"]; @@ -1659,10 +2133,6 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"]["response"]; }; - deleteLegacy: { - parameters: RequestParameters & Omit; - response: Endpoints["DELETE /reactions/{reaction_id}"]["response"]; - }; listForCommitComment: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["response"]; @@ -1679,6 +2149,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["response"]; }; + listForRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; listForTeamDiscussionCommentInOrg: { parameters: RequestParameters & Omit; response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; @@ -1693,6 +2167,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["PATCH /user/repository_invitations/{invitation_id}"]["response"]; }; + acceptInvitationForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/repository_invitations/{invitation_id}"]["response"]; + }; addAppAccessRestrictions: { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; @@ -1721,10 +2199,22 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; }; + codeownersErrors: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codeowners/errors"]["response"]; + }; compareCommits: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/compare/{base}...{head}"]["response"]; }; + compareCommitsWithBasehead: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/compare/{basehead}"]["response"]; + }; + createAutolink: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/autolinks"]["response"]; + }; createCommitComment: { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["response"]; @@ -1765,6 +2255,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /orgs/{org}/repos"]["response"]; }; + createOrUpdateEnvironment: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; createOrUpdateFileContents: { parameters: RequestParameters & Omit; response: Endpoints["PUT /repos/{owner}/{repo}/contents/{path}"]["response"]; @@ -1777,6 +2271,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/releases"]["response"]; }; + createTagProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/tags/protection"]["response"]; + }; createUsingTemplate: { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{template_owner}/{template_repo}/generate"]["response"]; @@ -1789,6 +2287,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["DELETE /user/repository_invitations/{invitation_id}"]["response"]; }; + declineInvitationForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/repository_invitations/{invitation_id}"]["response"]; + }; delete: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}"]["response"]; @@ -1801,6 +2303,14 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["response"]; }; + deleteAnEnvironment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; + deleteAutolink: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"]["response"]; + }; deleteBranchProtection: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"]["response"]; @@ -1845,6 +2355,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"]["response"]; }; + deleteTagProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"]["response"]; + }; deleteWebhook: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"]["response"]; @@ -1853,6 +2367,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/automated-security-fixes"]["response"]; }; + disableLfsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/lfs"]["response"]; + }; disableVulnerabilityAlerts: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; @@ -1873,10 +2391,18 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["PUT /repos/{owner}/{repo}/automated-security-fixes"]["response"]; }; + enableLfsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/lfs"]["response"]; + }; enableVulnerabilityAlerts: { parameters: RequestParameters & Omit; response: Endpoints["PUT /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; }; + generateReleaseNotes: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/releases/generate-notes"]["response"]; + }; get: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}"]["response"]; @@ -1889,6 +2415,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["response"]; }; + getAllEnvironments: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"]; + }; getAllStatusCheckContexts: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; @@ -1901,6 +2431,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; }; + getAutolink: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"]["response"]; + }; getBranch: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}"]["response"]; @@ -1965,6 +2499,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"]["response"]; }; + getEnvironment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; getLatestPagesBuild: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/pages/builds/latest"]["response"]; @@ -1981,6 +2519,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/pages/builds/{build_id}"]["response"]; }; + getPagesHealthCheck: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pages/health"]["response"]; + }; getParticipationStats: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/stats/participation"]["response"]; @@ -1997,6 +2539,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/readme"]["response"]; }; + getReadmeInDirectory: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/readme/{dir}"]["response"]; + }; getRelease: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}"]["response"]; @@ -2041,6 +2587,14 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"]["response"]; }; + getWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"]["response"]; + }; + listAutolinks: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/autolinks"]["response"]; + }; listBranches: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/branches"]["response"]; @@ -2133,6 +2687,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]; }; + listTagProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/tags/protection"]["response"]; + }; listTags: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/tags"]["response"]; @@ -2141,6 +2699,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/teams"]["response"]; }; + listWebhookDeliveries: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["response"]; + }; listWebhooks: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/hooks"]["response"]; @@ -2149,10 +2711,18 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/merges"]["response"]; }; + mergeUpstream: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/merge-upstream"]["response"]; + }; pingWebhook: { parameters: RequestParameters & Omit; response: Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"]["response"]; }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"]["response"]; + }; removeAppAccessRestrictions: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; @@ -2305,10 +2875,22 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]["response"]; }; + listAlertsForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["response"]; + }; + listAlertsForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["response"]; + }; listAlertsForRepo: { parameters: RequestParameters & Omit; response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["response"]; }; + listLocationsForAlert: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["response"]; + }; updateAlert: { parameters: RequestParameters & Omit; response: Endpoints["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]["response"]; @@ -2441,6 +3023,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /user/emails"]["response"]; }; + addEmailForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/emails"]["response"]; + }; block: { parameters: RequestParameters & Omit; response: Endpoints["PUT /user/blocks/{username}"]["response"]; @@ -2461,22 +3047,42 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["POST /user/gpg_keys"]["response"]; }; + createGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/gpg_keys"]["response"]; + }; createPublicSshKeyForAuthenticated: { parameters: RequestParameters & Omit; response: Endpoints["POST /user/keys"]["response"]; }; + createPublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/keys"]["response"]; + }; deleteEmailForAuthenticated: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /user/emails"]["response"]; }; + deleteEmailForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/emails"]["response"]; + }; deleteGpgKeyForAuthenticated: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /user/gpg_keys/{gpg_key_id}"]["response"]; }; + deleteGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/gpg_keys/{gpg_key_id}"]["response"]; + }; deletePublicSshKeyForAuthenticated: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /user/keys/{key_id}"]["response"]; }; + deletePublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/keys/{key_id}"]["response"]; + }; follow: { parameters: RequestParameters & Omit; response: Endpoints["PUT /user/following/{username}"]["response"]; @@ -2497,10 +3103,18 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /user/gpg_keys/{gpg_key_id}"]["response"]; }; + getGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/gpg_keys/{gpg_key_id}"]["response"]; + }; getPublicSshKeyForAuthenticated: { parameters: RequestParameters & Omit; response: Endpoints["GET /user/keys/{key_id}"]["response"]; }; + getPublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/keys/{key_id}"]["response"]; + }; list: { parameters: RequestParameters & Omit; response: Endpoints["GET /users"]["response"]; @@ -2509,14 +3123,26 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /user/blocks"]["response"]; }; + listBlockedByAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/blocks"]["response"]; + }; listEmailsForAuthenticated: { parameters: RequestParameters & Omit; response: Endpoints["GET /user/emails"]["response"]; }; + listEmailsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/emails"]["response"]; + }; listFollowedByAuthenticated: { parameters: RequestParameters & Omit; response: Endpoints["GET /user/following"]["response"]; }; + listFollowedByAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/following"]["response"]; + }; listFollowersForAuthenticatedUser: { parameters: RequestParameters & Omit; response: Endpoints["GET /user/followers"]["response"]; @@ -2533,6 +3159,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /user/gpg_keys"]["response"]; }; + listGpgKeysForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/gpg_keys"]["response"]; + }; listGpgKeysForUser: { parameters: RequestParameters & Omit; response: Endpoints["GET /users/{username}/gpg_keys"]["response"]; @@ -2541,6 +3171,10 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /user/public_emails"]["response"]; }; + listPublicEmailsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/public_emails"]["response"]; + }; listPublicKeysForUser: { parameters: RequestParameters & Omit; response: Endpoints["GET /users/{username}/keys"]["response"]; @@ -2549,10 +3183,18 @@ export declare type RestEndpointMethodTypes = { parameters: RequestParameters & Omit; response: Endpoints["GET /user/keys"]["response"]; }; + listPublicSshKeysForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/keys"]["response"]; + }; setPrimaryEmailVisibilityForAuthenticated: { parameters: RequestParameters & Omit; response: Endpoints["PATCH /user/email/visibility"]["response"]; }; + setPrimaryEmailVisibilityForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/email/visibility"]["response"]; + }; unblock: { parameters: RequestParameters & Omit; response: Endpoints["DELETE /user/blocks/{username}"]["response"]; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts index beef376..a81f3b0 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts @@ -5,3 +5,7 @@ export declare function restEndpointMethods(octokit: Octokit): Api; export declare namespace restEndpointMethods { var VERSION: string; } +export declare function legacyRestEndpointMethods(octokit: Octokit): Api["rest"] & Api; +export declare namespace legacyRestEndpointMethods { + var VERSION: string; +} diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts index e9b177b..3628f02 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts @@ -1,6 +1,8 @@ import { Route, RequestParameters } from "@octokit/types"; import { RestEndpointMethods } from "./generated/method-types"; -export declare type Api = RestEndpointMethods; +export declare type Api = { + rest: RestEndpointMethods; +}; export declare type EndpointDecorations = { mapToData?: string; deprecated?: string; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts index d52e106..04c17e0 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "4.12.0"; +export declare const VERSION = "5.16.2"; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js index 5b760a5..e35644d 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js @@ -1,11 +1,23 @@ const Endpoints = { actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels", + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], addSelectedRepoToOrgSecret: [ "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve", + ], cancelWorkflowRun: [ "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel", ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], createOrUpdateRepoSecret: [ "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}", @@ -23,9 +35,18 @@ const Endpoints = { createWorkflowDispatch: [ "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}", + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}", + ], deleteArtifact: [ "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}", ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], deleteRepoSecret: [ "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}", @@ -52,6 +73,9 @@ const Endpoints = { downloadJobLogsForWorkflowRun: [ "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs", ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", + ], downloadWorkflowRunLogs: [ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs", ], @@ -61,6 +85,15 @@ const Endpoints = { enableWorkflow: [ "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository", + ], + getActionsCacheUsageForEnterprise: [ + "GET /enterprises/{enterprise}/actions/cache/usage", + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], getAllowedActionsOrganization: [ "GET /orgs/{org}/actions/permissions/selected-actions", ], @@ -68,6 +101,21 @@ const Endpoints = { "GET /repos/{owner}/{repo}/actions/permissions/selected-actions", ], getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key", + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], + getGithubActionsDefaultWorkflowPermissionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions/workflow", + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow", + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow", + ], getGithubActionsPermissionsOrganization: [ "GET /orgs/{org}/actions/permissions", ], @@ -77,6 +125,9 @@ const Endpoints = { getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", + ], getRepoPermissions: [ "GET /repos/{owner}/{repo}/actions/permissions", {}, @@ -84,12 +135,21 @@ const Endpoints = { ], getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals", + ], getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], getSelfHostedRunnerForRepo: [ "GET /repos/{owner}/{repo}/actions/runners/{runner_id}", ], getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access", + ], getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", + ], getWorkflowRunUsage: [ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing", ], @@ -97,9 +157,21 @@ const Endpoints = { "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", ], listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + ], listJobsForWorkflowRun: [ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels", + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], @@ -122,16 +194,52 @@ const Endpoints = { "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", ], listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", + ], reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels", + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}", + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", + ], removeSelectedRepoFromOrgSecret: [ "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", + ], setAllowedActionsOrganization: [ "PUT /orgs/{org}/actions/permissions/selected-actions", ], setAllowedActionsRepository: [ "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions", ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels", + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + setGithubActionsDefaultWorkflowPermissionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/workflow", + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow", + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow", + ], setGithubActionsPermissionsOrganization: [ "PUT /orgs/{org}/actions/permissions", ], @@ -144,6 +252,9 @@ const Endpoints = { setSelectedRepositoriesEnabledGithubActionsOrganization: [ "PUT /orgs/{org}/actions/permissions/repositories", ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access", + ], }, activity: { checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], @@ -193,12 +304,13 @@ const Endpoints = { apps: { addRepoToInstallation: [ "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }, ], - checkToken: ["POST /applications/{client_id}/token"], - createContentAttachment: [ - "POST /content_references/{content_reference_id}/attachments", - { mediaType: { previews: ["corsair"] } }, + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", ], + checkToken: ["POST /applications/{client_id}/token"], createFromManifest: ["POST /app-manifests/{code}/conversions"], createInstallationAccessToken: [ "POST /app/installations/{installation_id}/access_tokens", @@ -219,6 +331,7 @@ const Endpoints = { ], getUserInstallation: ["GET /users/{username}/installation"], getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], listAccountsForPlanStubbed: [ "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", @@ -235,8 +348,17 @@ const Endpoints = { listSubscriptionsForAuthenticatedUserStubbed: [ "GET /user/marketplace_purchases/stubbed", ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts", + ], removeRepoFromInstallation: [ "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] }, + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", ], resetToken: ["PATCH /applications/{client_id}/token"], revokeInstallationAccessToken: ["DELETE /installation/token"], @@ -252,6 +374,12 @@ const Endpoints = { getGithubActionsBillingUser: [ "GET /users/{username}/settings/billing/actions", ], + getGithubAdvancedSecurityBillingGhe: [ + "GET /enterprises/{enterprise}/settings/billing/advanced-security", + ], + getGithubAdvancedSecurityBillingOrg: [ + "GET /orgs/{org}/settings/billing/advanced-security", + ], getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], getGithubPackagesBillingUser: [ "GET /users/{username}/settings/billing/packages", @@ -276,6 +404,9 @@ const Endpoints = { "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", ], listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", + ], rerequestSuite: [ "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", ], @@ -297,9 +428,15 @@ const Endpoints = { "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", ], getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], listAlertsInstances: [ "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] }, ], listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], updateAlert: [ @@ -308,21 +445,138 @@ const Endpoints = { uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"], }, codesOfConduct: { - getAllCodesOfConduct: [ - "GET /codes_of_conduct", - { mediaType: { previews: ["scarlet-witch"] } }, + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"], + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}", ], - getConductCode: [ - "GET /codes_of_conduct/{key}", - { mediaType: { previews: ["scarlet-witch"] } }, + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines", ], - getForRepo: [ - "GET /repos/{owner}/{repo}/community/code_of_conduct", - { mediaType: { previews: ["scarlet-witch"] } }, + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}", + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces", + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces", + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}", + ], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}", + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports", + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}", + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key", + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key", + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}", + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } }, + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces", + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories", + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}", + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines", + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories", + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"], + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}", + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key", + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + ], + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots", + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}", ], }, emojis: { get: ["GET /emojis"] }, enterpriseAdmin: { + addCustomLabelsToSelfHostedRunnerForEnterprise: [ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], disableSelectedOrganizationGithubActionsEnterprise: [ "DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}", ], @@ -335,12 +589,27 @@ const Endpoints = { getGithubActionsPermissionsEnterprise: [ "GET /enterprises/{enterprise}/actions/permissions", ], + getServerStatistics: [ + "GET /enterprise-installation/{enterprise_or_org}/server-statistics", + ], + listLabelsForSelfHostedRunnerForEnterprise: [ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], listSelectedOrganizationsEnabledGithubActionsEnterprise: [ "GET /enterprises/{enterprise}/actions/permissions/organizations", ], + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + removeCustomLabelFromSelfHostedRunnerForEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", + ], setAllowedActionsEnterprise: [ "PUT /enterprises/{enterprise}/actions/permissions/selected-actions", ], + setCustomLabelsForSelfHostedRunnerForEnterprise: [ + "PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], setGithubActionsPermissionsEnterprise: [ "PUT /enterprises/{enterprise}/actions/permissions", ], @@ -449,7 +718,6 @@ const Endpoints = { listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], listEventsForTimeline: [ "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", - { mediaType: { previews: ["mockingbird"] } }, ], listForAuthenticatedUser: ["GET /user/issues"], listForOrg: ["GET /orgs/{org}/issues"], @@ -503,46 +771,31 @@ const Endpoints = { cancelImport: ["DELETE /repos/{owner}/{repo}/import"], deleteArchiveForAuthenticatedUser: [ "DELETE /user/migrations/{migration_id}/archive", - { mediaType: { previews: ["wyandotte"] } }, ], deleteArchiveForOrg: [ "DELETE /orgs/{org}/migrations/{migration_id}/archive", - { mediaType: { previews: ["wyandotte"] } }, ], downloadArchiveForOrg: [ "GET /orgs/{org}/migrations/{migration_id}/archive", - { mediaType: { previews: ["wyandotte"] } }, ], getArchiveForAuthenticatedUser: [ "GET /user/migrations/{migration_id}/archive", - { mediaType: { previews: ["wyandotte"] } }, ], getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], getImportStatus: ["GET /repos/{owner}/{repo}/import"], getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], - getStatusForAuthenticatedUser: [ - "GET /user/migrations/{migration_id}", - { mediaType: { previews: ["wyandotte"] } }, - ], - getStatusForOrg: [ - "GET /orgs/{org}/migrations/{migration_id}", - { mediaType: { previews: ["wyandotte"] } }, - ], - listForAuthenticatedUser: [ - "GET /user/migrations", - { mediaType: { previews: ["wyandotte"] } }, - ], - listForOrg: [ - "GET /orgs/{org}/migrations", - { mediaType: { previews: ["wyandotte"] } }, - ], - listReposForOrg: [ - "GET /orgs/{org}/migrations/{migration_id}/repositories", - { mediaType: { previews: ["wyandotte"] } }, + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories", ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], listReposForUser: [ "GET /user/migrations/{migration_id}/repositories", - { mediaType: { previews: ["wyandotte"] } }, + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] }, ], mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], @@ -551,11 +804,9 @@ const Endpoints = { startImport: ["PUT /repos/{owner}/{repo}/import"], unlockRepoForAuthenticatedUser: [ "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", - { mediaType: { previews: ["wyandotte"] } }, ], unlockRepoForOrg: [ "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", - { mediaType: { previews: ["wyandotte"] } }, ], updateImport: ["PATCH /repos/{owner}/{repo}/import"], }, @@ -576,9 +827,13 @@ const Endpoints = { getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", + ], list: ["GET /organizations"], listAppInstallations: ["GET /orgs/{org}/installations"], listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomRoles: ["GET /organizations/{organization_id}/custom_roles"], listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], listForAuthenticatedUser: ["GET /user/orgs"], listForUser: ["GET /users/{username}/orgs"], @@ -588,8 +843,12 @@ const Endpoints = { listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], listPendingInvitations: ["GET /orgs/{org}/invitations"], listPublicMembers: ["GET /orgs/{org}/public_members"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], listWebhooks: ["GET /orgs/{org}/hooks"], pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", + ], removeMember: ["DELETE /orgs/{org}/members/{username}"], removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], removeOutsideCollaborator: [ @@ -617,17 +876,38 @@ const Endpoints = { deletePackageForOrg: [ "DELETE /orgs/{org}/packages/{package_type}/{package_name}", ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}", + ], deletePackageVersionForAuthenticatedUser: [ "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}", ], deletePackageVersionForOrg: [ "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], getAllPackageVersionsForAPackageOwnedByAnOrg: [ "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] }, ], getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser", + ], + }, + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", ], getAllPackageVersionsForPackageOwnedByUser: [ "GET /users/{username}/packages/{package_type}/{package_name}/versions", @@ -650,11 +930,17 @@ const Endpoints = { getPackageVersionForUser: [ "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], restorePackageForAuthenticatedUser: [ - "POST /user/packages/{package_type}/{package_name}/restore", + "POST /user/packages/{package_type}/{package_name}/restore{?token}", ], restorePackageForOrg: [ - "POST /orgs/{org}/packages/{package_type}/{package_name}/restore", + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}", + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}", ], restorePackageVersionForAuthenticatedUser: [ "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", @@ -662,108 +948,40 @@ const Endpoints = { restorePackageVersionForOrg: [ "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", + ], }, projects: { - addCollaborator: [ - "PUT /projects/{project_id}/collaborators/{username}", - { mediaType: { previews: ["inertia"] } }, - ], - createCard: [ - "POST /projects/columns/{column_id}/cards", - { mediaType: { previews: ["inertia"] } }, - ], - createColumn: [ - "POST /projects/{project_id}/columns", - { mediaType: { previews: ["inertia"] } }, - ], - createForAuthenticatedUser: [ - "POST /user/projects", - { mediaType: { previews: ["inertia"] } }, - ], - createForOrg: [ - "POST /orgs/{org}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - createForRepo: [ - "POST /repos/{owner}/{repo}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - delete: [ - "DELETE /projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, - ], - deleteCard: [ - "DELETE /projects/columns/cards/{card_id}", - { mediaType: { previews: ["inertia"] } }, - ], - deleteColumn: [ - "DELETE /projects/columns/{column_id}", - { mediaType: { previews: ["inertia"] } }, - ], - get: [ - "GET /projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, - ], - getCard: [ - "GET /projects/columns/cards/{card_id}", - { mediaType: { previews: ["inertia"] } }, - ], - getColumn: [ - "GET /projects/columns/{column_id}", - { mediaType: { previews: ["inertia"] } }, - ], + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], getPermissionForUser: [ "GET /projects/{project_id}/collaborators/{username}/permission", - { mediaType: { previews: ["inertia"] } }, - ], - listCards: [ - "GET /projects/columns/{column_id}/cards", - { mediaType: { previews: ["inertia"] } }, - ], - listCollaborators: [ - "GET /projects/{project_id}/collaborators", - { mediaType: { previews: ["inertia"] } }, - ], - listColumns: [ - "GET /projects/{project_id}/columns", - { mediaType: { previews: ["inertia"] } }, - ], - listForOrg: [ - "GET /orgs/{org}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - listForRepo: [ - "GET /repos/{owner}/{repo}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - listForUser: [ - "GET /users/{username}/projects", - { mediaType: { previews: ["inertia"] } }, - ], - moveCard: [ - "POST /projects/columns/cards/{card_id}/moves", - { mediaType: { previews: ["inertia"] } }, - ], - moveColumn: [ - "POST /projects/columns/{column_id}/moves", - { mediaType: { previews: ["inertia"] } }, ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], removeCollaborator: [ "DELETE /projects/{project_id}/collaborators/{username}", - { mediaType: { previews: ["inertia"] } }, - ], - update: [ - "PATCH /projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, - ], - updateCard: [ - "PATCH /projects/columns/cards/{card_id}", - { mediaType: { previews: ["inertia"] } }, - ], - updateColumn: [ - "PATCH /projects/columns/{column_id}", - { mediaType: { previews: ["inertia"] } }, ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"], }, pulls: { checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], @@ -816,7 +1034,6 @@ const Endpoints = { update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], updateBranch: [ "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch", - { mediaType: { previews: ["lydian"] } }, ], updateReview: [ "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", @@ -829,86 +1046,75 @@ const Endpoints = { reactions: { createForCommitComment: [ "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], createForIssue: [ "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], createForIssueComment: [ "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], createForPullRequestReviewComment: [ "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions", ], createForTeamDiscussionCommentInOrg: [ "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], createForTeamDiscussionInOrg: [ "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForCommitComment: [ "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForIssue: [ "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForIssueComment: [ "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForPullRequestComment: [ "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", ], deleteForTeamDiscussion: [ "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, ], deleteForTeamDiscussionComment: [ "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, - ], - deleteLegacy: [ - "DELETE /reactions/{reaction_id}", - { mediaType: { previews: ["squirrel-girl"] } }, - { - deprecated: "octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy", - }, ], listForCommitComment: [ "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, - ], - listForIssue: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], listForIssueComment: [ "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], listForPullRequestReviewComment: [ "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", ], listForTeamDiscussionCommentInOrg: [ "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], listForTeamDiscussionInOrg: [ "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", - { mediaType: { previews: ["squirrel-girl"] } }, ], }, repos: { - acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}"], + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] }, + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}", + ], addAppAccessRestrictions: [ "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, @@ -933,15 +1139,18 @@ const Endpoints = { checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], checkVulnerabilityAlerts: [ "GET /repos/{owner}/{repo}/vulnerability-alerts", - { mediaType: { previews: ["dorian"] } }, ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}", + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], createCommitComment: [ "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments", ], createCommitSignatureProtection: [ "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", - { mediaType: { previews: ["zzzax"] } }, ], createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], createDeployKey: ["POST /repos/{owner}/{repo}/keys"], @@ -953,18 +1162,25 @@ const Endpoints = { createForAuthenticatedUser: ["POST /user/repos"], createFork: ["POST /repos/{owner}/{repo}/forks"], createInOrg: ["POST /orgs/{org}/repos"], - createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], - createPagesSite: [ - "POST /repos/{owner}/{repo}/pages", - { mediaType: { previews: ["switcheroo"] } }, + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}", ], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], createRelease: ["POST /repos/{owner}/{repo}/releases"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], createUsingTemplate: [ "POST /repos/{template_owner}/{template_repo}/generate", - { mediaType: { previews: ["baptiste"] } }, ], createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] }, + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}", + ], delete: ["DELETE /repos/{owner}/{repo}"], deleteAccessRestrictions: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions", @@ -972,13 +1188,16 @@ const Endpoints = { deleteAdminBranchProtection: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}", + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], deleteBranchProtection: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection", ], deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], deleteCommitSignatureProtection: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", - { mediaType: { previews: ["zzzax"] } }, ], deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], deleteDeployment: [ @@ -988,10 +1207,7 @@ const Endpoints = { deleteInvitation: [ "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}", ], - deletePagesSite: [ - "DELETE /repos/{owner}/{repo}/pages", - { mediaType: { previews: ["switcheroo"] } }, - ], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], deletePullRequestReviewProtection: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", ], @@ -999,14 +1215,16 @@ const Endpoints = { deleteReleaseAsset: [ "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}", ], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}", + ], deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], disableAutomatedSecurityFixes: [ "DELETE /repos/{owner}/{repo}/automated-security-fixes", - { mediaType: { previews: ["london"] } }, ], + disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"], disableVulnerabilityAlerts: [ "DELETE /repos/{owner}/{repo}/vulnerability-alerts", - { mediaType: { previews: ["dorian"] } }, ], downloadArchive: [ "GET /repos/{owner}/{repo}/zipball/{ref}", @@ -1017,11 +1235,13 @@ const Endpoints = { downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], enableAutomatedSecurityFixes: [ "PUT /repos/{owner}/{repo}/automated-security-fixes", - { mediaType: { previews: ["london"] } }, ], + enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], enableVulnerabilityAlerts: [ "PUT /repos/{owner}/{repo}/vulnerability-alerts", - { mediaType: { previews: ["dorian"] } }, + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes", ], get: ["GET /repos/{owner}/{repo}"], getAccessRestrictions: [ @@ -1030,16 +1250,15 @@ const Endpoints = { getAdminBranchProtection: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], getAllStatusCheckContexts: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", ], - getAllTopics: [ - "GET /repos/{owner}/{repo}/topics", - { mediaType: { previews: ["mercy"] } }, - ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], getAppsWithAccessToProtectedBranch: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], getBranchProtection: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection", @@ -1055,7 +1274,6 @@ const Endpoints = { getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], getCommitSignatureProtection: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", - { mediaType: { previews: ["zzzax"] } }, ], getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], @@ -1065,16 +1283,21 @@ const Endpoints = { getDeploymentStatus: [ "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}", + ], getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], getPages: ["GET /repos/{owner}/{repo}/pages"], getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], getPullRequestReviewProtection: [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", ], getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], @@ -1094,10 +1317,13 @@ const Endpoints = { getWebhookConfigForRepo: [ "GET /repos/{owner}/{repo}/hooks/{hook_id}/config", ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", + ], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], listBranches: ["GET /repos/{owner}/{repo}/branches"], listBranchesForHeadCommit: [ "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", - { mediaType: { previews: ["groot"] } }, ], listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], listCommentsForCommit: [ @@ -1125,17 +1351,24 @@ const Endpoints = { listPublic: ["GET /repositories"], listPullRequestsAssociatedWithCommit: [ "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", - { mediaType: { previews: ["groot"] } }, ], listReleaseAssets: [ "GET /repos/{owner}/{repo}/releases/{release_id}/assets", ], listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], listTags: ["GET /repos/{owner}/{repo}/tags"], listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + ], listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", + ], removeAppAccessRestrictions: [ "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, @@ -1163,10 +1396,7 @@ const Endpoints = { { mapToData: "users" }, ], renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], - replaceAllTopics: [ - "PUT /repos/{owner}/{repo}/topics", - { mediaType: { previews: ["mercy"] } }, - ], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], setAdminBranchProtection: [ "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", @@ -1228,18 +1458,25 @@ const Endpoints = { }, search: { code: ["GET /search/code"], - commits: ["GET /search/commits", { mediaType: { previews: ["cloak"] } }], + commits: ["GET /search/commits"], issuesAndPullRequests: ["GET /search/issues"], labels: ["GET /search/labels"], repos: ["GET /search/repositories"], - topics: ["GET /search/topics", { mediaType: { previews: ["mercy"] } }], + topics: ["GET /search/topics"], users: ["GET /search/users"], }, secretScanning: { getAlert: [ "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts", + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + ], updateAlert: [ "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", ], @@ -1250,14 +1487,12 @@ const Endpoints = { ], addOrUpdateProjectPermissionsInOrg: [ "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, ], addOrUpdateRepoPermissionsInOrg: [ "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", ], checkPermissionsForProjectInOrg: [ "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", - { mediaType: { previews: ["inertia"] } }, ], checkPermissionsForRepoInOrg: [ "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", @@ -1295,10 +1530,7 @@ const Endpoints = { listPendingInvitationsInOrg: [ "GET /orgs/{org}/teams/{team_slug}/invitations", ], - listProjectsInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/projects", - { mediaType: { previews: ["inertia"] } }, - ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], removeMembershipForUserInOrg: [ "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}", @@ -1318,42 +1550,119 @@ const Endpoints = { updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"], }, users: { - addEmailForAuthenticated: ["POST /user/emails"], + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] }, + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], block: ["PUT /user/blocks/{username}"], checkBlocked: ["GET /user/blocks/{username}"], checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], - createGpgKeyForAuthenticated: ["POST /user/gpg_keys"], - createPublicSshKeyForAuthenticated: ["POST /user/keys"], - deleteEmailForAuthenticated: ["DELETE /user/emails"], - deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}"], - deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] }, + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] }, + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] }, + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] }, + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] }, + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], follow: ["PUT /user/following/{username}"], getAuthenticated: ["GET /user"], getByUsername: ["GET /users/{username}"], getContextForUser: ["GET /users/{username}/hovercard"], - getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}"], - getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] }, + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] }, + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], list: ["GET /users"], - listBlockedByAuthenticated: ["GET /user/blocks"], - listEmailsForAuthenticated: ["GET /user/emails"], - listFollowedByAuthenticated: ["GET /user/following"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] }, + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] }, + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] }, + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], listFollowersForAuthenticatedUser: ["GET /user/followers"], listFollowersForUser: ["GET /users/{username}/followers"], listFollowingForUser: ["GET /users/{username}/following"], - listGpgKeysForAuthenticated: ["GET /user/gpg_keys"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] }, + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], - listPublicEmailsForAuthenticated: ["GET /user/public_emails"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] }, + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], listPublicKeysForUser: ["GET /users/{username}/keys"], - listPublicSshKeysForAuthenticated: ["GET /user/keys"], - setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] }, + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] }, + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility", + ], unblock: ["DELETE /user/blocks/{username}"], unfollow: ["DELETE /user/following/{username}"], updateAuthenticated: ["PATCH /user"], }, }; -const VERSION = "4.12.0"; +const VERSION = "5.16.2"; function endpointsToMethods(octokit, endpointsMap) { const newMethods = {}; @@ -1417,9 +1726,20 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } function restEndpointMethods(octokit) { - return endpointsToMethods(octokit, Endpoints); + const api = endpointsToMethods(octokit, Endpoints); + return { + rest: api, + }; } restEndpointMethods.VERSION = VERSION; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, Endpoints); + return { + ...api, + rest: api, + }; +} +legacyRestEndpointMethods.VERSION = VERSION; -export { restEndpointMethods }; +export { legacyRestEndpointMethods, restEndpointMethods }; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map index 6c0dc46..d33402a 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/generated/endpoints.js","../dist-src/version.js","../dist-src/endpoints-to-methods.js","../dist-src/index.js"],"sourcesContent":["const Endpoints = {\n actions: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\",\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\",\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\",\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\",\n ],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\",\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\",\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\",\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\",\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\",\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\",\n ],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\",\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\",\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] },\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\",\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\",\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\",\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\",\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\",\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\",\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\",\n ],\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\",\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\",\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\",\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\",\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\",\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\",\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"],\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createContentAttachment: [\n \"POST /content_references/{content_reference_id}/attachments\",\n { mediaType: { previews: [\"corsair\"] } },\n ],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\",\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\",\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\",\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\",\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\",\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\",\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"],\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\",\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\",\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\",\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\",\n ],\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\",\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\",\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } },\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\",\n ],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"],\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\n \"GET /codes_of_conduct\",\n { mediaType: { previews: [\"scarlet-witch\"] } },\n ],\n getConductCode: [\n \"GET /codes_of_conduct/{key}\",\n { mediaType: { previews: [\"scarlet-witch\"] } },\n ],\n getForRepo: [\n \"GET /repos/{owner}/{repo}/community/code_of_conduct\",\n { mediaType: { previews: [\"scarlet-witch\"] } },\n ],\n },\n emojis: { get: [\"GET /emojis\"] },\n enterpriseAdmin: {\n disableSelectedOrganizationGithubActionsEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n enableSelectedOrganizationGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n getAllowedActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n getGithubActionsPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions\",\n ],\n listSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n setAllowedActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n setGithubActionsPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions\",\n ],\n setSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"],\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"],\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"],\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] },\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\",\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] },\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] },\n ],\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\",\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n { mediaType: { previews: [\"mockingbird\"] } },\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\",\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"],\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } },\n ],\n },\n meta: {\n get: [\"GET /meta\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"],\n },\n migrations: {\n cancelImport: [\"DELETE /repos/{owner}/{repo}/import\"],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n getCommitAuthors: [\"GET /repos/{owner}/{repo}/import/authors\"],\n getImportStatus: [\"GET /repos/{owner}/{repo}/import\"],\n getLargeFiles: [\"GET /repos/{owner}/{repo}/import/large_files\"],\n getStatusForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n getStatusForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n listForAuthenticatedUser: [\n \"GET /user/migrations\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n listForOrg: [\n \"GET /orgs/{org}/migrations\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n listReposForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n mapCommitAuthor: [\"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\"],\n setLfsPreference: [\"PATCH /repos/{owner}/{repo}/import/lfs\"],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\"PUT /repos/{owner}/{repo}/import\"],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\",\n { mediaType: { previews: [\"wyandotte\"] } },\n ],\n updateImport: [\"PATCH /repos/{owner}/{repo}/import\"],\n },\n orgs: {\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\",\n ],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n get: [\"GET /orgs/{org}\"],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\",\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\",\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\",\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\",\n ],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"],\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\",\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\",\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\",\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\",\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore\",\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore\",\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n },\n projects: {\n addCollaborator: [\n \"PUT /projects/{project_id}/collaborators/{username}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createCard: [\n \"POST /projects/columns/{column_id}/cards\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createColumn: [\n \"POST /projects/{project_id}/columns\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createForAuthenticatedUser: [\n \"POST /user/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createForOrg: [\n \"POST /orgs/{org}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n createForRepo: [\n \"POST /repos/{owner}/{repo}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n delete: [\n \"DELETE /projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n deleteCard: [\n \"DELETE /projects/columns/cards/{card_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n deleteColumn: [\n \"DELETE /projects/columns/{column_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n get: [\n \"GET /projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n getCard: [\n \"GET /projects/columns/cards/{card_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n getColumn: [\n \"GET /projects/columns/{column_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listCards: [\n \"GET /projects/columns/{column_id}/cards\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listCollaborators: [\n \"GET /projects/{project_id}/collaborators\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listColumns: [\n \"GET /projects/{project_id}/columns\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listForOrg: [\n \"GET /orgs/{org}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listForRepo: [\n \"GET /repos/{owner}/{repo}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listForUser: [\n \"GET /users/{username}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n moveCard: [\n \"POST /projects/columns/cards/{card_id}/moves\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n moveColumn: [\n \"POST /projects/columns/{column_id}/moves\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n update: [\n \"PATCH /projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n updateCard: [\n \"PATCH /projects/columns/cards/{card_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n updateColumn: [\n \"PATCH /projects/columns/{column_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\",\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\",\n { mediaType: { previews: [\"lydian\"] } },\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n deleteLegacy: [\n \"DELETE /reactions/{reaction_id}\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n {\n deprecated: \"octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy\",\n },\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n { mediaType: { previews: [\"squirrel-girl\"] } },\n ],\n },\n repos: {\n acceptInvitation: [\"PATCH /user/repository_invitations/{invitation_id}\"],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\",\n { mediaType: { previews: [\"dorian\"] } },\n ],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n { mediaType: { previews: [\"zzzax\"] } },\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createPagesSite: [\n \"POST /repos/{owner}/{repo}/pages\",\n { mediaType: { previews: [\"switcheroo\"] } },\n ],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\",\n { mediaType: { previews: [\"baptiste\"] } },\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\"DELETE /user/repository_invitations/{invitation_id}\"],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n { mediaType: { previews: [\"zzzax\"] } },\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\",\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n deletePagesSite: [\n \"DELETE /repos/{owner}/{repo}/pages\",\n { mediaType: { previews: [\"switcheroo\"] } },\n ],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\",\n { mediaType: { previews: [\"london\"] } },\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\",\n { mediaType: { previews: [\"dorian\"] } },\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] },\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\",\n { mediaType: { previews: [\"london\"] } },\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\",\n { mediaType: { previews: [\"dorian\"] } },\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n ],\n getAllTopics: [\n \"GET /repos/{owner}/{repo}/topics\",\n { mediaType: { previews: [\"mercy\"] } },\n ],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n ],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\",\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n { mediaType: { previews: [\"zzzax\"] } },\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\",\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\",\n { mediaType: { previews: [\"groot\"] } },\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n { mediaType: { previews: [\"groot\"] } },\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\",\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\n \"PUT /repos/{owner}/{repo}/topics\",\n { mediaType: { previews: [\"mercy\"] } },\n ],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] },\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" },\n ],\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\", { mediaType: { previews: [\"cloak\"] } }],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\", { mediaType: { previews: [\"mercy\"] } }],\n users: [\"GET /search/users\"],\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n ],\n listProjectsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n { mediaType: { previews: [\"inertia\"] } },\n ],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"],\n },\n users: {\n addEmailForAuthenticated: [\"POST /user/emails\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\"POST /user/keys\"],\n deleteEmailForAuthenticated: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\"DELETE /user/keys/{key_id}\"],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\"GET /user/keys/{key_id}\"],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\"GET /user/keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\"PATCH /user/email/visibility\"],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"],\n },\n};\nexport default Endpoints;\n","export const VERSION = \"4.12.0\";\n","export function endpointsToMethods(octokit, endpointsMap) {\n const newMethods = {};\n for (const [scope, endpoints] of Object.entries(endpointsMap)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign({ method, url }, defaults);\n if (!newMethods[scope]) {\n newMethods[scope] = {};\n }\n const scopeMethods = newMethods[scope];\n if (decorations) {\n scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);\n continue;\n }\n scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);\n }\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n /* istanbul ignore next */\n function withDecorations(...args) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args);\n // There are currently no other decorations than `.mapToData`\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined,\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(decorations.renamedParameters)) {\n if (name in options) {\n octokit.log.warn(`\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`);\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n delete options[name];\n }\n }\n return requestWithDefaults(options);\n }\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n","import ENDPOINTS from \"./generated/endpoints\";\nimport { VERSION } from \"./version\";\nimport { endpointsToMethods } from \"./endpoints-to-methods\";\nexport function restEndpointMethods(octokit) {\n return endpointsToMethods(octokit, ENDPOINTS);\n}\nrestEndpointMethods.VERSION = VERSION;\n"],"names":["ENDPOINTS"],"mappings":"AAAA,MAAM,SAAS,GAAG;AAClB,IAAI,OAAO,EAAE;AACb,QAAQ,0BAA0B,EAAE;AACpC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,+CAA+C,CAAC;AAClF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,+CAA+C,CAAC;AAClF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,kDAAkD,CAAC;AAC7E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,oDAAoD,CAAC;AACjF,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,kDAAkD,EAAE;AAC5D,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,iDAAiD,EAAE;AAC3D,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,2DAA2D,CAAC;AAClF,QAAQ,uCAAuC,EAAE;AACjD,YAAY,qCAAqC;AACjD,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,iDAAiD,CAAC;AACjF,QAAQ,eAAe,EAAE,CAAC,4CAA4C,CAAC;AACvE,QAAQ,YAAY,EAAE,CAAC,+CAA+C,CAAC;AACvE,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,+CAA+C;AAC3D,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,uCAAuC,CAAC,EAAE;AAC7E,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,sDAAsD,CAAC;AAClF,QAAQ,aAAa,EAAE,CAAC,yDAAyD,CAAC;AAClF,QAAQ,yBAAyB,EAAE,CAAC,6CAA6C,CAAC;AAClF,QAAQ,0BAA0B,EAAE;AACpC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,2DAA2D,CAAC;AAClF,QAAQ,cAAc,EAAE,CAAC,iDAAiD,CAAC;AAC3E,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,6CAA6C,CAAC;AAC7E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,iCAAiC,CAAC;AAC3D,QAAQ,eAAe,EAAE,CAAC,2CAA2C,CAAC;AACtE,QAAQ,iBAAiB,EAAE,CAAC,6CAA6C,CAAC;AAC1E,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,6BAA6B,EAAE;AACvC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,wDAAwD,EAAE;AAClE,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,2BAA2B,EAAE,CAAC,iCAAiC,CAAC;AACxE,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,wCAAwC,CAAC;AAC3E,QAAQ,aAAa,EAAE,CAAC,wDAAwD,CAAC;AACjF,QAAQ,+BAA+B,EAAE;AACzC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,uCAAuC,EAAE;AACjD,YAAY,qCAAqC;AACjD,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,uDAAuD,EAAE;AACjE,YAAY,kDAAkD;AAC9D,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,qCAAqC,EAAE,CAAC,kCAAkC,CAAC;AACnF,QAAQ,sBAAsB,EAAE,CAAC,2CAA2C,CAAC;AAC7E,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,YAAY,CAAC;AAChC,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,SAAS,EAAE,CAAC,wCAAwC,CAAC;AAC7D,QAAQ,yCAAyC,EAAE;AACnD,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,8BAA8B,EAAE,CAAC,8BAA8B,CAAC;AACxE,QAAQ,qCAAqC,EAAE,CAAC,oBAAoB,CAAC;AACrE,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,aAAa,CAAC;AACzC,QAAQ,8BAA8B,EAAE,CAAC,qCAAqC,CAAC;AAC/E,QAAQ,uBAAuB,EAAE,CAAC,qCAAqC,CAAC;AACxE,QAAQ,mBAAmB,EAAE,CAAC,wBAAwB,CAAC;AACvD,QAAQ,yBAAyB,EAAE,CAAC,uCAAuC,CAAC;AAC5E,QAAQ,+BAA+B,EAAE;AACzC,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,kCAAkC,CAAC;AAC5D,QAAQ,yCAAyC,EAAE;AACnD,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,mCAAmC,EAAE,CAAC,mBAAmB,CAAC;AAClE,QAAQ,sBAAsB,EAAE,CAAC,+BAA+B,CAAC;AACjE,QAAQ,sBAAsB,EAAE,CAAC,qCAAqC,CAAC;AACvE,QAAQ,qBAAqB,EAAE,CAAC,sCAAsC,CAAC;AACvE,QAAQ,oCAAoC,EAAE,CAAC,yBAAyB,CAAC;AACzE,QAAQ,mBAAmB,EAAE,CAAC,uCAAuC,CAAC;AACtE,QAAQ,uBAAuB,EAAE,CAAC,oBAAoB,CAAC;AACvD,QAAQ,2BAA2B,EAAE,CAAC,yCAAyC,CAAC;AAChF,QAAQ,gBAAgB,EAAE,CAAC,0CAA0C,CAAC;AACtE,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,4BAA4B,EAAE,CAAC,kCAAkC,CAAC;AAC1E,QAAQ,8BAA8B,EAAE,CAAC,qCAAqC,CAAC;AAC/E,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,uBAAuB,EAAE;AACjC,YAAY,6DAA6D;AACzE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,wCAAwC,CAAC;AACtE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,kBAAkB,EAAE,CAAC,6CAA6C,CAAC;AAC3E,QAAQ,WAAW,EAAE,CAAC,wCAAwC,CAAC;AAC/D,QAAQ,gBAAgB,EAAE,CAAC,UAAU,CAAC;AACtC,QAAQ,SAAS,EAAE,CAAC,sBAAsB,CAAC;AAC3C,QAAQ,eAAe,EAAE,CAAC,0CAA0C,CAAC;AACrE,QAAQ,kBAAkB,EAAE,CAAC,8BAA8B,CAAC;AAC5D,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,oCAAoC,CAAC;AACnE,QAAQ,sBAAsB,EAAE,CAAC,sBAAsB,CAAC;AACxD,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,0BAA0B,EAAE;AACpC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,wBAAwB,CAAC;AACrD,QAAQ,qCAAqC,EAAE,CAAC,yBAAyB,CAAC;AAC1E,QAAQ,SAAS,EAAE,CAAC,gCAAgC,CAAC;AACrD,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,iCAAiC,EAAE,CAAC,gCAAgC,CAAC;AAC7E,QAAQ,qCAAqC,EAAE,CAAC,iCAAiC,CAAC;AAClF,QAAQ,4CAA4C,EAAE;AACtD,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,uCAAuC,CAAC;AAC7D,QAAQ,6BAA6B,EAAE,CAAC,4BAA4B,CAAC;AACrE,QAAQ,UAAU,EAAE,CAAC,6CAA6C,CAAC;AACnE,QAAQ,mBAAmB,EAAE,CAAC,oDAAoD,CAAC;AACnF,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,wBAAwB,CAAC;AAC7D,KAAK;AACL,IAAI,OAAO,EAAE;AACb,QAAQ,0BAA0B,EAAE,CAAC,0CAA0C,CAAC;AAChF,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,2BAA2B,EAAE,CAAC,2CAA2C,CAAC;AAClF,QAAQ,4BAA4B,EAAE;AACtC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,uDAAuD;AACnE,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,MAAM,EAAE,CAAC,uCAAuC,CAAC;AACzD,QAAQ,WAAW,EAAE,CAAC,yCAAyC,CAAC;AAChE,QAAQ,GAAG,EAAE,CAAC,qDAAqD,CAAC;AACpE,QAAQ,QAAQ,EAAE,CAAC,yDAAyD,CAAC;AAC7E,QAAQ,eAAe,EAAE;AACzB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,oDAAoD,CAAC;AAC1E,QAAQ,YAAY,EAAE;AACtB,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,sDAAsD,CAAC;AAClF,QAAQ,cAAc,EAAE;AACxB,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,uDAAuD,CAAC;AACzE,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,cAAc,EAAE;AACxB,YAAY,oFAAoF;AAChG,SAAS;AACT,QAAQ,QAAQ,EAAE;AAClB,YAAY,+DAA+D;AAC3E,YAAY,EAAE;AACd,YAAY,EAAE,iBAAiB,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE;AAC/D,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,2DAA2D,CAAC;AAC/E,QAAQ,iBAAiB,EAAE,CAAC,gDAAgD,CAAC;AAC7E,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yEAAyE;AACrF,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,kDAAkD,CAAC;AAChF,QAAQ,WAAW,EAAE;AACrB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,iDAAiD,CAAC;AACxE,KAAK;AACL,IAAI,cAAc,EAAE;AACpB,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,uBAAuB;AACnC,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,6BAA6B;AACzC,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,UAAU,EAAE;AACpB,YAAY,qDAAqD;AACjE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE;AACpC,IAAI,eAAe,EAAE;AACrB,QAAQ,kDAAkD,EAAE;AAC5D,YAAY,6EAA6E;AACzF,SAAS;AACT,QAAQ,iDAAiD,EAAE;AAC3D,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,uDAAuD,EAAE;AACjE,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,iEAAiE;AAC7E,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,cAAc,EAAE,CAAC,2BAA2B,CAAC;AACrD,QAAQ,MAAM,EAAE,CAAC,aAAa,CAAC;AAC/B,QAAQ,aAAa,EAAE,CAAC,gCAAgC,CAAC;AACzD,QAAQ,MAAM,EAAE,CAAC,yBAAyB,CAAC;AAC3C,QAAQ,aAAa,EAAE,CAAC,+CAA+C,CAAC;AACxE,QAAQ,IAAI,EAAE,CAAC,6BAA6B,CAAC;AAC7C,QAAQ,GAAG,EAAE,CAAC,sBAAsB,CAAC;AACrC,QAAQ,UAAU,EAAE,CAAC,4CAA4C,CAAC;AAClE,QAAQ,WAAW,EAAE,CAAC,4BAA4B,CAAC;AACnD,QAAQ,IAAI,EAAE,CAAC,YAAY,CAAC;AAC5B,QAAQ,YAAY,EAAE,CAAC,+BAA+B,CAAC;AACvD,QAAQ,WAAW,EAAE,CAAC,8BAA8B,CAAC;AACrD,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,4BAA4B,CAAC;AACjD,QAAQ,UAAU,EAAE,CAAC,mBAAmB,CAAC;AACzC,QAAQ,WAAW,EAAE,CAAC,oBAAoB,CAAC;AAC3C,QAAQ,IAAI,EAAE,CAAC,2BAA2B,CAAC;AAC3C,QAAQ,MAAM,EAAE,CAAC,8BAA8B,CAAC;AAChD,QAAQ,MAAM,EAAE,CAAC,wBAAwB,CAAC;AAC1C,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,KAAK;AACL,IAAI,GAAG,EAAE;AACT,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,YAAY,EAAE,CAAC,wCAAwC,CAAC;AAChE,QAAQ,SAAS,EAAE,CAAC,qCAAqC,CAAC;AAC1D,QAAQ,SAAS,EAAE,CAAC,qCAAqC,CAAC;AAC1D,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,SAAS,EAAE,CAAC,6CAA6C,CAAC;AAClE,QAAQ,OAAO,EAAE,CAAC,gDAAgD,CAAC;AACnE,QAAQ,SAAS,EAAE,CAAC,oDAAoD,CAAC;AACzE,QAAQ,MAAM,EAAE,CAAC,yCAAyC,CAAC;AAC3D,QAAQ,MAAM,EAAE,CAAC,8CAA8C,CAAC;AAChE,QAAQ,OAAO,EAAE,CAAC,gDAAgD,CAAC;AACnE,QAAQ,gBAAgB,EAAE,CAAC,mDAAmD,CAAC;AAC/E,QAAQ,SAAS,EAAE,CAAC,4CAA4C,CAAC;AACjE,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,eAAe,EAAE,CAAC,0BAA0B,CAAC;AACrD,QAAQ,WAAW,EAAE,CAAC,iCAAiC,CAAC;AACxD,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,mCAAmC,EAAE,CAAC,8BAA8B,CAAC;AAC7E,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,sBAAsB,EAAE,CAAC,8CAA8C,CAAC;AAChF,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,8BAA8B;AAC1C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,qCAAqC,CAAC,EAAE;AAChF,SAAS;AACT,QAAQ,sCAAsC,EAAE,CAAC,iCAAiC,CAAC;AACnF,QAAQ,wBAAwB,EAAE,CAAC,uCAAuC,CAAC;AAC3E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,iCAAiC;AAC7C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,wCAAwC,CAAC,EAAE;AACnF,SAAS;AACT,QAAQ,mCAAmC,EAAE,CAAC,8BAA8B,CAAC;AAC7E,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,sBAAsB,EAAE,CAAC,8CAA8C,CAAC;AAChF,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,8BAA8B;AAC1C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,qCAAqC,CAAC,EAAE;AAChF,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,YAAY,EAAE;AACtB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,yDAAyD,CAAC;AAC9E,QAAQ,sBAAsB,EAAE,CAAC,gDAAgD,CAAC;AAClF,QAAQ,MAAM,EAAE,CAAC,mCAAmC,CAAC;AACrD,QAAQ,aAAa,EAAE;AACvB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,mCAAmC,CAAC;AAC1D,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,aAAa,EAAE;AACvB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,4CAA4C,CAAC;AACnE,QAAQ,eAAe,EAAE;AACzB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,iDAAiD,CAAC;AAChE,QAAQ,UAAU,EAAE,CAAC,wDAAwD,CAAC;AAC9E,QAAQ,QAAQ,EAAE,CAAC,oDAAoD,CAAC;AACxE,QAAQ,QAAQ,EAAE,CAAC,yCAAyC,CAAC;AAC7D,QAAQ,YAAY,EAAE,CAAC,yDAAyD,CAAC;AACjF,QAAQ,IAAI,EAAE,CAAC,aAAa,CAAC;AAC7B,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,YAAY,EAAE,CAAC,0DAA0D,CAAC;AAClF,QAAQ,mBAAmB,EAAE,CAAC,2CAA2C,CAAC;AAC1E,QAAQ,UAAU,EAAE,CAAC,wDAAwD,CAAC;AAC9E,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,0DAA0D;AACtE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE;AACxD,SAAS;AACT,QAAQ,wBAAwB,EAAE,CAAC,kBAAkB,CAAC;AACtD,QAAQ,UAAU,EAAE,CAAC,wBAAwB,CAAC;AAC9C,QAAQ,WAAW,EAAE,CAAC,kCAAkC,CAAC;AACzD,QAAQ,sBAAsB,EAAE;AAChC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,kCAAkC,CAAC;AAC/D,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,sCAAsC,CAAC;AAChE,QAAQ,IAAI,EAAE,CAAC,sDAAsD,CAAC;AACtE,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,wDAAwD,CAAC;AAC7E,QAAQ,MAAM,EAAE,CAAC,yDAAyD,CAAC;AAC3E,QAAQ,MAAM,EAAE,CAAC,mDAAmD,CAAC;AACrE,QAAQ,aAAa,EAAE,CAAC,0DAA0D,CAAC;AACnF,QAAQ,WAAW,EAAE,CAAC,2CAA2C,CAAC;AAClE,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,GAAG,EAAE,CAAC,yBAAyB,CAAC;AACxC,QAAQ,kBAAkB,EAAE,CAAC,eAAe,CAAC;AAC7C,QAAQ,UAAU,EAAE,CAAC,mCAAmC,CAAC;AACzD,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,MAAM,EAAE,CAAC,gBAAgB,CAAC;AAClC,QAAQ,SAAS,EAAE;AACnB,YAAY,oBAAoB;AAChC,YAAY,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE,EAAE;AACxE,SAAS;AACT,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,GAAG,EAAE,CAAC,WAAW,CAAC;AAC1B,QAAQ,UAAU,EAAE,CAAC,cAAc,CAAC;AACpC,QAAQ,MAAM,EAAE,CAAC,UAAU,CAAC;AAC5B,QAAQ,IAAI,EAAE,CAAC,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,YAAY,EAAE,CAAC,qCAAqC,CAAC;AAC7D,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,gDAAgD;AAC5D,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,sDAAsD;AAClE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mDAAmD;AAC/D,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,6CAA6C;AACzD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,0CAA0C,CAAC;AACtE,QAAQ,eAAe,EAAE,CAAC,kCAAkC,CAAC;AAC7D,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,qCAAqC;AACjD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,2CAA2C;AACvD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,sBAAsB;AAClC,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,UAAU,EAAE;AACpB,YAAY,4BAA4B;AACxC,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,wDAAwD;AACpE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,kDAAkD;AAC9D,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,wDAAwD,CAAC;AACnF,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,yBAAyB,EAAE,CAAC,uBAAuB,CAAC;AAC5D,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,WAAW,EAAE,CAAC,kCAAkC,CAAC;AACzD,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,qEAAqE;AACjF,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;AACtD,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,SAAS,EAAE,CAAC,mCAAmC,CAAC;AACxD,QAAQ,gBAAgB,EAAE,CAAC,gDAAgD,CAAC;AAC5E,QAAQ,gBAAgB,EAAE,CAAC,mCAAmC,CAAC;AAC/D,QAAQ,sBAAsB,EAAE,CAAC,oCAAoC,CAAC;AACtE,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,8BAA8B,CAAC;AAC1D,QAAQ,aAAa,EAAE,CAAC,wBAAwB,CAAC;AACjD,QAAQ,aAAa,EAAE,CAAC,oCAAoC,CAAC;AAC7D,QAAQ,GAAG,EAAE,CAAC,iBAAiB,CAAC;AAChC,QAAQ,iCAAiC,EAAE,CAAC,kCAAkC,CAAC;AAC/E,QAAQ,oBAAoB,EAAE,CAAC,wCAAwC,CAAC;AACxE,QAAQ,UAAU,EAAE,CAAC,iCAAiC,CAAC;AACvD,QAAQ,sBAAsB,EAAE,CAAC,wCAAwC,CAAC;AAC1E,QAAQ,IAAI,EAAE,CAAC,oBAAoB,CAAC;AACpC,QAAQ,oBAAoB,EAAE,CAAC,+BAA+B,CAAC;AAC/D,QAAQ,gBAAgB,EAAE,CAAC,wBAAwB,CAAC;AACpD,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,wBAAwB,EAAE,CAAC,gBAAgB,CAAC;AACpD,QAAQ,WAAW,EAAE,CAAC,4BAA4B,CAAC;AACnD,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,WAAW,EAAE,CAAC,yBAAyB,CAAC;AAChD,QAAQ,mCAAmC,EAAE,CAAC,4BAA4B,CAAC;AAC3E,QAAQ,wBAAwB,EAAE,CAAC,uCAAuC,CAAC;AAC3E,QAAQ,sBAAsB,EAAE,CAAC,6BAA6B,CAAC;AAC/D,QAAQ,iBAAiB,EAAE,CAAC,gCAAgC,CAAC;AAC7D,QAAQ,YAAY,EAAE,CAAC,uBAAuB,CAAC;AAC/C,QAAQ,WAAW,EAAE,CAAC,wCAAwC,CAAC;AAC/D,QAAQ,YAAY,EAAE,CAAC,uCAAuC,CAAC;AAC/D,QAAQ,uBAAuB,EAAE,CAAC,2CAA2C,CAAC;AAC9E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,0CAA0C,EAAE;AACpD,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,wCAAwC,CAAC;AACxE,QAAQ,uCAAuC,EAAE;AACjD,YAAY,2CAA2C;AACvD,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,sCAAsC,CAAC;AAC7D,QAAQ,MAAM,EAAE,CAAC,mBAAmB,CAAC;AACrC,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,oCAAoC;AAChD,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,mCAAmC,CAAC;AAC5D,QAAQ,yBAAyB,EAAE,CAAC,0CAA0C,CAAC;AAC/E,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,mFAAmF;AAC/F,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,4CAA4C,EAAE;AACtD,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,2DAA2D,EAAE;AACrE,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,0CAA0C,EAAE;AACpD,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,gFAAgF;AAC5F,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,sFAAsF;AAClG,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,4FAA4F;AACxG,SAAS;AACT,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,+FAA+F;AAC3G,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,eAAe,EAAE;AACzB,YAAY,qDAAqD;AACjE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,UAAU,EAAE;AACpB,YAAY,0CAA0C;AACtD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,qCAAqC;AACjD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,qBAAqB;AACjC,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,2BAA2B;AACvC,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,aAAa,EAAE;AACvB,YAAY,qCAAqC;AACjD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,MAAM,EAAE;AAChB,YAAY,+BAA+B;AAC3C,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,UAAU,EAAE;AACpB,YAAY,0CAA0C;AACtD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,sCAAsC;AAClD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,GAAG,EAAE;AACb,YAAY,4BAA4B;AACxC,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,OAAO,EAAE;AACjB,YAAY,uCAAuC;AACnD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,SAAS,EAAE;AACnB,YAAY,mCAAmC;AAC/C,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,gEAAgE;AAC5E,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,SAAS,EAAE;AACnB,YAAY,yCAAyC;AACrD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,0CAA0C;AACtD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,oCAAoC;AAChD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,UAAU,EAAE;AACpB,YAAY,0BAA0B;AACtC,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,oCAAoC;AAChD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,gCAAgC;AAC5C,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,QAAQ,EAAE;AAClB,YAAY,8CAA8C;AAC1D,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,UAAU,EAAE;AACpB,YAAY,0CAA0C;AACtD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,MAAM,EAAE;AAChB,YAAY,8BAA8B;AAC1C,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,UAAU,EAAE;AACpB,YAAY,yCAAyC;AACrD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,qCAAqC;AACjD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,aAAa,EAAE,CAAC,qDAAqD,CAAC;AAC9E,QAAQ,MAAM,EAAE,CAAC,kCAAkC,CAAC;AACpD,QAAQ,2BAA2B,EAAE;AACrC,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,wDAAwD,CAAC;AAChF,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,aAAa,EAAE;AACvB,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,+CAA+C,CAAC;AAC9D,QAAQ,SAAS,EAAE;AACnB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,uDAAuD,CAAC;AACnF,QAAQ,IAAI,EAAE,CAAC,iCAAiC,CAAC;AACjD,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,uDAAuD,CAAC;AAC9E,QAAQ,SAAS,EAAE,CAAC,qDAAqD,CAAC;AAC1E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,0CAA0C,CAAC;AAC/E,QAAQ,WAAW,EAAE,CAAC,uDAAuD,CAAC;AAC9E,QAAQ,KAAK,EAAE,CAAC,qDAAqD,CAAC;AACtE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,iDAAiD,CAAC;AACnE,QAAQ,YAAY,EAAE;AACtB,YAAY,6DAA6D;AACzE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;AACnD,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yDAAyD;AACrE,SAAS;AACT,KAAK;AACL,IAAI,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,EAAE;AAC3C,IAAI,SAAS,EAAE;AACf,QAAQ,sBAAsB,EAAE;AAChC,YAAY,4DAA4D;AACxE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,4DAA4D;AACxE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mEAAmE;AAC/E,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,kEAAkE;AAC9E,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,wGAAwG;AACpH,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,4EAA4E;AACxF,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,4EAA4E;AACxF,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mFAAmF;AAC/F,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,kFAAkF;AAC9F,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,8FAA8F;AAC1G,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,wHAAwH;AACpI,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,iCAAiC;AAC7C,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,YAAY;AACZ,gBAAgB,UAAU,EAAE,oHAAoH;AAChJ,aAAa;AACb,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,2DAA2D;AACvE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,2DAA2D;AACvE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,kEAAkE;AAC9E,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,iEAAiE;AAC7E,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,uGAAuG;AACnH,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,6EAA6E;AACzF,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;AAC1D,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,gBAAgB,EAAE,CAAC,oDAAoD,CAAC;AAChF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,oDAAoD,CAAC;AAC/E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,yFAAyF;AACrG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,4EAA4E;AACxF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,4EAA4E;AACxF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,oDAAoD,CAAC;AACjF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,gDAAgD;AAC5D,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;AACnD,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,mDAAmD,CAAC;AAC7E,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,6EAA6E;AACzF,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;AAClD,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,2CAA2C,CAAC;AACzE,QAAQ,eAAe,EAAE,CAAC,iCAAiC,CAAC;AAC5D,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,sBAAsB,EAAE;AAChC,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,uCAAuC,CAAC;AACtE,QAAQ,0BAA0B,EAAE,CAAC,kBAAkB,CAAC;AACxD,QAAQ,UAAU,EAAE,CAAC,kCAAkC,CAAC;AACxD,QAAQ,WAAW,EAAE,CAAC,wBAAwB,CAAC;AAC/C,QAAQ,0BAA0B,EAAE,CAAC,2CAA2C,CAAC;AACjF,QAAQ,eAAe,EAAE;AACzB,YAAY,kCAAkC;AAC9C,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE;AACvD,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,uDAAuD;AACnE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE;AACrD,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,kCAAkC,CAAC;AAC3D,QAAQ,iBAAiB,EAAE,CAAC,qDAAqD,CAAC;AAClF,QAAQ,MAAM,EAAE,CAAC,8BAA8B,CAAC;AAChD,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,oDAAoD,CAAC;AACnF,QAAQ,+BAA+B,EAAE;AACzC,YAAY,+EAA+E;AAC3F,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;AAClD,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,4CAA4C,CAAC;AACvE,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,8CAA8C,CAAC;AACpE,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,oCAAoC;AAChD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE;AACvD,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,oDAAoD,CAAC;AAC7E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,uDAAuD;AACnE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;AACnD,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,mDAAmD;AAC/D,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;AACnD,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,yCAAyC;AACrD,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,wBAAwB,CAAC,EAAE;AAC5D,SAAS;AACT,QAAQ,sBAAsB,EAAE,CAAC,yCAAyC,CAAC;AAC3E,QAAQ,sBAAsB,EAAE,CAAC,yCAAyC,CAAC;AAC3E,QAAQ,4BAA4B,EAAE;AACtC,YAAY,oDAAoD;AAChE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;AACnD,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,gDAAgD;AAC5D,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;AACnD,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,2BAA2B,CAAC;AAC1C,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,wFAAwF;AACpG,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,kCAAkC;AAC9C,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;AAClD,SAAS;AACT,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,6CAA6C,CAAC;AAClE,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,0CAA0C,CAAC;AAC/D,QAAQ,qBAAqB,EAAE,CAAC,gDAAgD,CAAC;AACjF,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,gDAAgD,CAAC;AACnF,QAAQ,SAAS,EAAE,CAAC,yCAAyC,CAAC;AAC9D,QAAQ,sBAAsB,EAAE,CAAC,iDAAiD,CAAC;AACnF,QAAQ,gBAAgB,EAAE,CAAC,iDAAiD,CAAC;AAC7E,QAAQ,4BAA4B,EAAE;AACtC,YAAY,4EAA4E;AACxF,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;AAClD,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,6CAA6C,CAAC;AACnF,QAAQ,UAAU,EAAE,CAAC,2CAA2C,CAAC;AACjE,QAAQ,oBAAoB,EAAE,CAAC,8CAA8C,CAAC;AAC9E,QAAQ,YAAY,EAAE,CAAC,yCAAyC,CAAC;AACjE,QAAQ,aAAa,EAAE,CAAC,uDAAuD,CAAC;AAChF,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,+CAA+C,CAAC;AAC9E,QAAQ,gBAAgB,EAAE,CAAC,2CAA2C,CAAC;AACvE,QAAQ,QAAQ,EAAE,CAAC,iCAAiC,CAAC;AACrD,QAAQ,aAAa,EAAE,CAAC,mDAAmD,CAAC;AAC5E,QAAQ,qBAAqB,EAAE,CAAC,+CAA+C,CAAC;AAChF,QAAQ,8BAA8B,EAAE;AACxC,YAAY,sFAAsF;AAClG,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,4CAA4C,CAAC;AACzE,QAAQ,SAAS,EAAE,CAAC,kCAAkC,CAAC;AACvD,QAAQ,UAAU,EAAE,CAAC,iDAAiD,CAAC;AACvE,QAAQ,eAAe,EAAE,CAAC,sDAAsD,CAAC;AACjF,QAAQ,eAAe,EAAE,CAAC,+CAA+C,CAAC;AAC1E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,iDAAiD,CAAC;AACxE,QAAQ,eAAe,EAAE,CAAC,qDAAqD,CAAC;AAChF,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,yCAAyC,CAAC;AAC7D,QAAQ,UAAU,EAAE,CAAC,2CAA2C,CAAC;AACjE,QAAQ,uBAAuB,EAAE;AACjC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,QAAQ,yBAAyB,EAAE;AACnC,YAAY,oEAAoE;AAChF,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;AAClD,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,oCAAoC,CAAC;AACzE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,mCAAmC,CAAC;AAC1D,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,cAAc,EAAE,CAAC,gCAAgC,CAAC;AAC1D,QAAQ,sBAAsB,EAAE;AAChC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACrD,QAAQ,UAAU,EAAE,CAAC,uBAAuB,CAAC;AAC7C,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,iCAAiC,CAAC;AACtD,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,mCAAmC,EAAE,CAAC,kCAAkC,CAAC;AACjF,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,eAAe,EAAE,CAAC,wCAAwC,CAAC;AACnE,QAAQ,UAAU,EAAE,CAAC,mBAAmB,CAAC;AACzC,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,sDAAsD;AAClE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;AAClD,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,QAAQ,QAAQ,EAAE,CAAC,gCAAgC,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,iCAAiC,CAAC;AACtD,QAAQ,YAAY,EAAE,CAAC,iCAAiC,CAAC;AACzD,QAAQ,KAAK,EAAE,CAAC,mCAAmC,CAAC;AACpD,QAAQ,WAAW,EAAE,CAAC,kDAAkD,CAAC;AACzE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,6EAA6E;AACzF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2FAA2F;AACvG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,kFAAkF;AAC9F,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,qDAAqD,CAAC;AAC7E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,kCAAkC;AAC9C,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;AAClD,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,0EAA0E;AACtF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wFAAwF;AACpG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,kDAAkD,CAAC;AAC7E,QAAQ,QAAQ,EAAE,CAAC,qCAAqC,CAAC;AACzD,QAAQ,MAAM,EAAE,CAAC,6BAA6B,CAAC;AAC/C,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,+BAA+B,EAAE,CAAC,iCAAiC,CAAC;AAC5E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,wFAAwF;AACpG,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,mDAAmD,CAAC;AAC5E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,iFAAiF;AAC7F,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,6BAA6B,CAAC,EAAE;AACjE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,iFAAiF;AAC7F,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,6CAA6C,CAAC;AACtE,QAAQ,0BAA0B,EAAE;AACpC,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,sEAAsE;AAClF,YAAY,EAAE,OAAO,EAAE,4BAA4B,EAAE;AACrD,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,IAAI,EAAE,CAAC,kBAAkB,CAAC;AAClC,QAAQ,OAAO,EAAE,CAAC,qBAAqB,EAAE,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;AAChF,QAAQ,qBAAqB,EAAE,CAAC,oBAAoB,CAAC;AACrD,QAAQ,MAAM,EAAE,CAAC,oBAAoB,CAAC;AACtC,QAAQ,KAAK,EAAE,CAAC,0BAA0B,CAAC;AAC3C,QAAQ,MAAM,EAAE,CAAC,oBAAoB,EAAE,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;AAC9E,QAAQ,KAAK,EAAE,CAAC,mBAAmB,CAAC;AACpC,KAAK;AACL,IAAI,cAAc,EAAE;AACpB,QAAQ,QAAQ,EAAE;AAClB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,kDAAkD,CAAC;AAC/E,QAAQ,WAAW,EAAE;AACrB,YAAY,mEAAmE;AAC/E,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,yDAAyD;AACrE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,yDAAyD;AACrE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,wBAAwB,CAAC;AAC1C,QAAQ,4BAA4B,EAAE;AACtC,YAAY,6EAA6E;AACzF,SAAS;AACT,QAAQ,qBAAqB,EAAE,CAAC,gDAAgD,CAAC;AACjF,QAAQ,4BAA4B,EAAE;AACtC,YAAY,gGAAgG;AAC5G,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,sCAAsC,CAAC;AAC7D,QAAQ,SAAS,EAAE,CAAC,mCAAmC,CAAC;AACxD,QAAQ,yBAAyB,EAAE;AACnC,YAAY,6FAA6F;AACzG,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,IAAI,EAAE,CAAC,uBAAuB,CAAC;AACvC,QAAQ,cAAc,EAAE,CAAC,yCAAyC,CAAC;AACnE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,+CAA+C,CAAC;AAC/E,QAAQ,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACrD,QAAQ,gBAAgB,EAAE,CAAC,2CAA2C,CAAC;AACvE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,4CAA4C;AACxD,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,yCAAyC,CAAC;AACnE,QAAQ,4BAA4B,EAAE;AACtC,YAAY,6DAA6D;AACzE,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,+FAA+F;AAC3G,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,qCAAqC,CAAC;AAC5D,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,wBAAwB,EAAE,CAAC,mBAAmB,CAAC;AACvD,QAAQ,KAAK,EAAE,CAAC,6BAA6B,CAAC;AAC9C,QAAQ,YAAY,EAAE,CAAC,6BAA6B,CAAC;AACrD,QAAQ,qBAAqB,EAAE,CAAC,+CAA+C,CAAC;AAChF,QAAQ,oCAAoC,EAAE,CAAC,gCAAgC,CAAC;AAChF,QAAQ,4BAA4B,EAAE,CAAC,qBAAqB,CAAC;AAC7D,QAAQ,kCAAkC,EAAE,CAAC,iBAAiB,CAAC;AAC/D,QAAQ,2BAA2B,EAAE,CAAC,qBAAqB,CAAC;AAC5D,QAAQ,4BAA4B,EAAE,CAAC,oCAAoC,CAAC;AAC5E,QAAQ,kCAAkC,EAAE,CAAC,4BAA4B,CAAC;AAC1E,QAAQ,MAAM,EAAE,CAAC,gCAAgC,CAAC;AAClD,QAAQ,gBAAgB,EAAE,CAAC,WAAW,CAAC;AACvC,QAAQ,aAAa,EAAE,CAAC,uBAAuB,CAAC;AAChD,QAAQ,iBAAiB,EAAE,CAAC,iCAAiC,CAAC;AAC9D,QAAQ,yBAAyB,EAAE,CAAC,iCAAiC,CAAC;AACtE,QAAQ,+BAA+B,EAAE,CAAC,yBAAyB,CAAC;AACpE,QAAQ,IAAI,EAAE,CAAC,YAAY,CAAC;AAC5B,QAAQ,0BAA0B,EAAE,CAAC,kBAAkB,CAAC;AACxD,QAAQ,0BAA0B,EAAE,CAAC,kBAAkB,CAAC;AACxD,QAAQ,2BAA2B,EAAE,CAAC,qBAAqB,CAAC;AAC5D,QAAQ,iCAAiC,EAAE,CAAC,qBAAqB,CAAC;AAClE,QAAQ,oBAAoB,EAAE,CAAC,iCAAiC,CAAC;AACjE,QAAQ,oBAAoB,EAAE,CAAC,iCAAiC,CAAC;AACjE,QAAQ,2BAA2B,EAAE,CAAC,oBAAoB,CAAC;AAC3D,QAAQ,kBAAkB,EAAE,CAAC,gCAAgC,CAAC;AAC9D,QAAQ,gCAAgC,EAAE,CAAC,yBAAyB,CAAC;AACrE,QAAQ,qBAAqB,EAAE,CAAC,4BAA4B,CAAC;AAC7D,QAAQ,iCAAiC,EAAE,CAAC,gBAAgB,CAAC;AAC7D,QAAQ,yCAAyC,EAAE,CAAC,8BAA8B,CAAC;AACnF,QAAQ,OAAO,EAAE,CAAC,gCAAgC,CAAC;AACnD,QAAQ,QAAQ,EAAE,CAAC,mCAAmC,CAAC;AACvD,QAAQ,mBAAmB,EAAE,CAAC,aAAa,CAAC;AAC5C,KAAK;AACL,CAAC;;ACz0CM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACApC,SAAS,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE;AAC1D,IAAI,MAAM,UAAU,GAAG,EAAE,CAAC;AAC1B,IAAI,KAAK,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACnE,QAAQ,KAAK,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;AACxE,YAAY,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC;AAC5D,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACnD,YAAY,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC9E,YAAY,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;AACpC,gBAAgB,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AACvC,aAAa;AACb,YAAY,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AACnD,YAAY,IAAI,WAAW,EAAE;AAC7B,gBAAgB,YAAY,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC;AAC/G,gBAAgB,SAAS;AACzB,aAAa;AACb,YAAY,YAAY,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAClF,SAAS;AACT,KAAK;AACL,IAAI,OAAO,UAAU,CAAC;AACtB,CAAC;AACD,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE;AACrE,IAAI,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnE;AACA,IAAI,SAAS,eAAe,CAAC,GAAG,IAAI,EAAE;AACtC;AACA,QAAQ,IAAI,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AAClE;AACA,QAAQ,IAAI,WAAW,CAAC,SAAS,EAAE;AACnC,YAAY,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE;AACjD,gBAAgB,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC;AACpD,gBAAgB,CAAC,WAAW,CAAC,SAAS,GAAG,SAAS;AAClD,aAAa,CAAC,CAAC;AACf,YAAY,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAChD,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,OAAO,EAAE;AACjC,YAAY,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC;AAClE,YAAY,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,+BAA+B,EAAE,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5H,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,UAAU,EAAE;AACpC,YAAY,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,iBAAiB,EAAE;AAC3C;AACA,YAAY,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AACxE,YAAY,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE;AACvF,gBAAgB,IAAI,IAAI,IAAI,OAAO,EAAE;AACrC,oBAAoB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACzI,oBAAoB,IAAI,EAAE,KAAK,IAAI,OAAO,CAAC,EAAE;AAC7C,wBAAwB,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACvD,qBAAqB;AACrB,oBAAoB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACzC,iBAAiB;AACjB,aAAa;AACb,YAAY,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAChD,SAAS;AACT;AACA,QAAQ,OAAO,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;AAC5C,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;AAC/D,CAAC;;ACxDM,SAAS,mBAAmB,CAAC,OAAO,EAAE;AAC7C,IAAI,OAAO,kBAAkB,CAAC,OAAO,EAAEA,SAAS,CAAC,CAAC;AAClD,CAAC;AACD,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/generated/endpoints.js","../dist-src/version.js","../dist-src/endpoints-to-methods.js","../dist-src/index.js"],"sourcesContent":["const Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\",\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\",\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\",\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\",\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\",\n ],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\",\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\",\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\",\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\",\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\",\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\",\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\",\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\",\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\",\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\",\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n ],\n getActionsCacheUsageForEnterprise: [\n \"GET /enterprises/{enterprise}/actions/cache/usage\",\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\",\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\",\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n getGithubActionsDefaultWorkflowPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\",\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] },\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\",\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\",\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\",\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\",\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\",\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\",\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\",\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\",\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n setGithubActionsDefaultWorkflowPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\",\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\",\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\",\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\",\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\",\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\",\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\",\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\",\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"],\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] },\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\",\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\",\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\",\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\",\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\",\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\",\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] },\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\",\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"],\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\",\n ],\n getGithubAdvancedSecurityBillingGhe: [\n \"GET /enterprises/{enterprise}/settings/billing/advanced-security\",\n ],\n getGithubAdvancedSecurityBillingOrg: [\n \"GET /orgs/{org}/settings/billing/advanced-security\",\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\",\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\",\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\",\n ],\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\",\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\",\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\",\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } },\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\",\n ],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] },\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"],\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"],\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\",\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\",\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\",\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\",\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\",\n ],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\",\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\",\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\",\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\",\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\",\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } },\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\",\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\",\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\",\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"],\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\",\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\",\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\",\n ],\n },\n emojis: { get: [\"GET /emojis\"] },\n enterpriseAdmin: {\n addCustomLabelsToSelfHostedRunnerForEnterprise: [\n \"POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n disableSelectedOrganizationGithubActionsEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n enableSelectedOrganizationGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n getAllowedActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n getGithubActionsPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions\",\n ],\n getServerStatistics: [\n \"GET /enterprise-installation/{enterprise_or_org}/server-statistics\",\n ],\n listLabelsForSelfHostedRunnerForEnterprise: [\n \"GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n listSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}\",\n ],\n setAllowedActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n setGithubActionsPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions\",\n ],\n setSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"],\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"],\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"],\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] },\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\",\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] },\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] },\n ],\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\",\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\",\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"],\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } },\n ],\n },\n meta: {\n get: [\"GET /meta\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"],\n },\n migrations: {\n cancelImport: [\"DELETE /repos/{owner}/{repo}/import\"],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\",\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\",\n ],\n getCommitAuthors: [\"GET /repos/{owner}/{repo}/import/authors\"],\n getImportStatus: [\"GET /repos/{owner}/{repo}/import\"],\n getLargeFiles: [\"GET /repos/{owner}/{repo}/import/large_files\"],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] },\n ],\n mapCommitAuthor: [\"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\"],\n setLfsPreference: [\"PATCH /repos/{owner}/{repo}/import/lfs\"],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\"PUT /repos/{owner}/{repo}/import\"],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n updateImport: [\"PATCH /repos/{owner}/{repo}/import\"],\n },\n orgs: {\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\",\n ],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n get: [\"GET /orgs/{org}\"],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomRoles: [\"GET /organizations/{organization_id}/custom_roles\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\",\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\",\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\",\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\",\n ],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"],\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\",\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\",\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] },\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\",\n ],\n },\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\",\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\",\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\",\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\",\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\",\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"],\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\",\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\",\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\",\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\",\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] },\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\",\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\",\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] },\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\",\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\",\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n disableLfsForRepo: [\"DELETE /repos/{owner}/{repo}/lfs\"],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] },\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n enableLfsForRepo: [\"PUT /repos/{owner}/{repo}/lfs\"],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\",\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\",\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\",\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\",\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\",\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] },\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" },\n ],\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"],\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"],\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] },\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] },\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] },\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] },\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] },\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] },\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] },\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] },\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] },\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] },\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] },\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] },\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] },\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] },\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] },\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\",\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"],\n },\n};\nexport default Endpoints;\n","export const VERSION = \"5.16.2\";\n","export function endpointsToMethods(octokit, endpointsMap) {\n const newMethods = {};\n for (const [scope, endpoints] of Object.entries(endpointsMap)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign({ method, url }, defaults);\n if (!newMethods[scope]) {\n newMethods[scope] = {};\n }\n const scopeMethods = newMethods[scope];\n if (decorations) {\n scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);\n continue;\n }\n scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);\n }\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n /* istanbul ignore next */\n function withDecorations(...args) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args);\n // There are currently no other decorations than `.mapToData`\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined,\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(decorations.renamedParameters)) {\n if (name in options) {\n octokit.log.warn(`\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`);\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n delete options[name];\n }\n }\n return requestWithDefaults(options);\n }\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n","import ENDPOINTS from \"./generated/endpoints\";\nimport { VERSION } from \"./version\";\nimport { endpointsToMethods } from \"./endpoints-to-methods\";\nexport function restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, ENDPOINTS);\n return {\n rest: api,\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nexport function legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, ENDPOINTS);\n return {\n ...api,\n rest: api,\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n"],"names":["ENDPOINTS"],"mappings":"AAAA,MAAM,SAAS,GAAG;AAClB,IAAI,OAAO,EAAE;AACb,QAAQ,uCAAuC,EAAE;AACjD,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,+CAA+C,CAAC;AAClF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,+CAA+C,CAAC;AAClF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,4FAA4F;AACxG,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,kDAAkD,CAAC;AAC7E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,oDAAoD,CAAC;AACjF,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,kDAAkD,EAAE;AAC5D,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,gFAAgF;AAC5F,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,iDAAiD,EAAE;AAC3D,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,0CAA0C,CAAC;AACzE,QAAQ,oBAAoB,EAAE,CAAC,+CAA+C,CAAC;AAC/E,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,qCAAqC,CAAC;AAC3E,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,2DAA2D,CAAC;AAClF,QAAQ,uBAAuB,EAAE;AACjC,YAAY,sFAAsF;AAClG,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,oDAAoD,EAAE;AAC9D,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,oDAAoD,EAAE;AAC9D,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,uCAAuC,EAAE;AACjD,YAAY,qCAAqC;AACjD,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,iDAAiD,CAAC;AACjF,QAAQ,eAAe,EAAE,CAAC,4CAA4C,CAAC;AACvE,QAAQ,YAAY,EAAE,CAAC,+CAA+C,CAAC;AACvE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,+CAA+C;AAC3D,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,uCAAuC,CAAC,EAAE;AAC7E,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,sDAAsD,CAAC;AAClF,QAAQ,aAAa,EAAE,CAAC,yDAAyD,CAAC;AAClF,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,6CAA6C,CAAC;AAClF,QAAQ,0BAA0B,EAAE;AACpC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,2DAA2D,CAAC;AAClF,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,iDAAiD,CAAC;AAC3E,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,6CAA6C,CAAC;AAC7E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,gFAAgF;AAC5F,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,iCAAiC,CAAC;AAC3D,QAAQ,eAAe,EAAE,CAAC,2CAA2C,CAAC;AACtE,QAAQ,iBAAiB,EAAE,CAAC,6CAA6C,CAAC;AAC1E,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,6BAA6B,EAAE;AACvC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,wDAAwD,EAAE;AAClE,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,2BAA2B,EAAE,CAAC,iCAAiC,CAAC;AACxE,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,wCAAwC,CAAC;AAC3E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,wDAAwD,CAAC;AACjF,QAAQ,uBAAuB,EAAE;AACjC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,+CAA+C,EAAE;AACzD,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,gDAAgD,EAAE;AAC1D,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,2CAA2C,EAAE;AACrD,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,4CAA4C,EAAE;AACtD,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,oDAAoD,EAAE;AAC9D,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,oDAAoD,EAAE;AAC9D,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,uCAAuC,EAAE;AACjD,YAAY,qCAAqC;AACjD,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,uDAAuD,EAAE;AACjE,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,qCAAqC,EAAE,CAAC,kCAAkC,CAAC;AACnF,QAAQ,sBAAsB,EAAE,CAAC,2CAA2C,CAAC;AAC7E,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,YAAY,CAAC;AAChC,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,SAAS,EAAE,CAAC,wCAAwC,CAAC;AAC7D,QAAQ,yCAAyC,EAAE;AACnD,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,8BAA8B,EAAE,CAAC,8BAA8B,CAAC;AACxE,QAAQ,qCAAqC,EAAE,CAAC,oBAAoB,CAAC;AACrE,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,aAAa,CAAC;AACzC,QAAQ,8BAA8B,EAAE,CAAC,qCAAqC,CAAC;AAC/E,QAAQ,uBAAuB,EAAE,CAAC,qCAAqC,CAAC;AACxE,QAAQ,mBAAmB,EAAE,CAAC,wBAAwB,CAAC;AACvD,QAAQ,yBAAyB,EAAE,CAAC,uCAAuC,CAAC;AAC5E,QAAQ,+BAA+B,EAAE;AACzC,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,kCAAkC,CAAC;AAC5D,QAAQ,yCAAyC,EAAE;AACnD,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,mCAAmC,EAAE,CAAC,mBAAmB,CAAC;AAClE,QAAQ,sBAAsB,EAAE,CAAC,+BAA+B,CAAC;AACjE,QAAQ,sBAAsB,EAAE,CAAC,qCAAqC,CAAC;AACvE,QAAQ,qBAAqB,EAAE,CAAC,sCAAsC,CAAC;AACvE,QAAQ,oCAAoC,EAAE,CAAC,yBAAyB,CAAC;AACzE,QAAQ,mBAAmB,EAAE,CAAC,uCAAuC,CAAC;AACtE,QAAQ,uBAAuB,EAAE,CAAC,oBAAoB,CAAC;AACvD,QAAQ,2BAA2B,EAAE,CAAC,yCAAyC,CAAC;AAChF,QAAQ,gBAAgB,EAAE,CAAC,0CAA0C,CAAC;AACtE,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,4BAA4B,EAAE,CAAC,kCAAkC,CAAC;AAC1E,QAAQ,8BAA8B,EAAE,CAAC,qCAAqC,CAAC;AAC/E,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,wEAAwE;AACpF,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,2CAA2C,CAAC,EAAE;AAC9E,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,kBAAkB,EAAE,CAAC,wCAAwC,CAAC;AACtE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,kBAAkB,EAAE,CAAC,6CAA6C,CAAC;AAC3E,QAAQ,WAAW,EAAE,CAAC,wCAAwC,CAAC;AAC/D,QAAQ,gBAAgB,EAAE,CAAC,UAAU,CAAC;AACtC,QAAQ,SAAS,EAAE,CAAC,sBAAsB,CAAC;AAC3C,QAAQ,eAAe,EAAE,CAAC,0CAA0C,CAAC;AACrE,QAAQ,kBAAkB,EAAE,CAAC,8BAA8B,CAAC;AAC5D,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,oCAAoC,CAAC;AACnE,QAAQ,sBAAsB,EAAE,CAAC,sBAAsB,CAAC;AACxD,QAAQ,kBAAkB,EAAE,CAAC,wCAAwC,CAAC;AACtE,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,0BAA0B,EAAE;AACpC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,wBAAwB,CAAC;AACrD,QAAQ,qCAAqC,EAAE,CAAC,yBAAyB,CAAC;AAC1E,QAAQ,SAAS,EAAE,CAAC,gCAAgC,CAAC;AACrD,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,iCAAiC,EAAE,CAAC,gCAAgC,CAAC;AAC7E,QAAQ,qCAAqC,EAAE,CAAC,iCAAiC,CAAC;AAClF,QAAQ,4CAA4C,EAAE;AACtD,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,qBAAqB,EAAE,CAAC,0BAA0B,CAAC;AAC3D,QAAQ,wBAAwB,EAAE;AAClC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,gDAAgD,CAAC,EAAE;AACnF,SAAS;AACT,QAAQ,8CAA8C,EAAE;AACxD,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,uCAAuC,CAAC;AAC7D,QAAQ,6BAA6B,EAAE,CAAC,4BAA4B,CAAC;AACrE,QAAQ,UAAU,EAAE,CAAC,6CAA6C,CAAC;AACnE,QAAQ,mBAAmB,EAAE,CAAC,oDAAoD,CAAC;AACnF,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,wBAAwB,CAAC;AAC7D,KAAK;AACL,IAAI,OAAO,EAAE;AACb,QAAQ,0BAA0B,EAAE,CAAC,0CAA0C,CAAC;AAChF,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,2BAA2B,EAAE,CAAC,2CAA2C,CAAC;AAClF,QAAQ,4BAA4B,EAAE;AACtC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,uDAAuD;AACnE,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,MAAM,EAAE,CAAC,uCAAuC,CAAC;AACzD,QAAQ,WAAW,EAAE,CAAC,yCAAyC,CAAC;AAChE,QAAQ,GAAG,EAAE,CAAC,qDAAqD,CAAC;AACpE,QAAQ,QAAQ,EAAE,CAAC,yDAAyD,CAAC;AAC7E,QAAQ,eAAe,EAAE;AACzB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,oDAAoD,CAAC;AAC1E,QAAQ,YAAY,EAAE;AACtB,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,sDAAsD,CAAC;AAClF,QAAQ,YAAY,EAAE;AACtB,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,uDAAuD,CAAC;AACzE,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,cAAc,EAAE;AACxB,YAAY,oFAAoF;AAChG,SAAS;AACT,QAAQ,QAAQ,EAAE;AAClB,YAAY,+DAA+D;AAC3E,YAAY,EAAE;AACd,YAAY,EAAE,iBAAiB,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE;AAC/D,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,2DAA2D,CAAC;AAC/E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,yEAAyE;AACrF,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,sCAAsC,CAAC;AAClE,QAAQ,iBAAiB,EAAE,CAAC,gDAAgD,CAAC;AAC7E,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yEAAyE;AACrF,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,oBAAoB,CAAC,EAAE;AAC/D,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,kDAAkD,CAAC;AAChF,QAAQ,WAAW,EAAE;AACrB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,iDAAiD,CAAC;AACxE,KAAK;AACL,IAAI,cAAc,EAAE;AACpB,QAAQ,oBAAoB,EAAE,CAAC,uBAAuB,CAAC;AACvD,QAAQ,cAAc,EAAE,CAAC,6BAA6B,CAAC;AACvD,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,0CAA0C,EAAE;AACpD,YAAY,yEAAyE;AACrF,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,uBAAuB,CAAC;AAC7D,QAAQ,wBAAwB,EAAE;AAClC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,4CAA4C;AACxD,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,uCAAuC;AACnD,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,0CAA0C,CAAC;AAChF,QAAQ,sBAAsB,EAAE;AAChC,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,uCAAuC,CAAC;AAC1E,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,aAAa,EAAE;AACvB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,4CAA4C;AACxD,SAAS;AACT,QAAQ,iDAAiD,EAAE;AAC3D,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,wBAAwB,EAAE,CAAC,sBAAsB,CAAC;AAC1D,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,4BAA4B;AACxC,YAAY,EAAE;AACd,YAAY,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,sCAAsC;AAClD,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,8CAA8C,CAAC;AACzE,QAAQ,6CAA6C,EAAE;AACvD,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE,CAAC,8BAA8B,CAAC;AACzE,QAAQ,6CAA6C,EAAE;AACvD,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,4CAA4C,EAAE;AACtD,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,8CAA8C,CAAC;AACnF,QAAQ,wBAAwB,EAAE,CAAC,6CAA6C,CAAC;AACjF,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,yCAAyC,CAAC;AAC/E,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,0BAA0B,EAAE;AACpC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,qDAAqD,CAAC;AAChF,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,+CAA+C,CAAC;AAC1E,QAAQ,YAAY,EAAE,CAAC,kDAAkD,CAAC;AAC1E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,aAAa,EAAE;AACvB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,oCAAoC,CAAC;AAC9D,QAAQ,eAAe,EAAE,CAAC,8CAA8C,CAAC;AACzE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,kFAAkF;AAC9F,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,+DAA+D;AAC3E,SAAS;AACT,KAAK;AACL,IAAI,eAAe,EAAE;AACrB,QAAQ,wBAAwB,EAAE;AAClC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,SAAS,EAAE;AACnB,YAAY,+DAA+D;AAC3E,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE;AACpC,IAAI,eAAe,EAAE;AACrB,QAAQ,8CAA8C,EAAE;AACxD,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,kDAAkD,EAAE;AAC5D,YAAY,6EAA6E;AACzF,SAAS;AACT,QAAQ,iDAAiD,EAAE;AAC3D,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,0CAA0C,EAAE;AACpD,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,uDAAuD,EAAE;AACjE,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,kDAAkD,EAAE;AAC5D,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,+CAA+C,EAAE;AACzD,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,iEAAiE;AAC7E,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,cAAc,EAAE,CAAC,2BAA2B,CAAC;AACrD,QAAQ,MAAM,EAAE,CAAC,aAAa,CAAC;AAC/B,QAAQ,aAAa,EAAE,CAAC,gCAAgC,CAAC;AACzD,QAAQ,MAAM,EAAE,CAAC,yBAAyB,CAAC;AAC3C,QAAQ,aAAa,EAAE,CAAC,+CAA+C,CAAC;AACxE,QAAQ,IAAI,EAAE,CAAC,6BAA6B,CAAC;AAC7C,QAAQ,GAAG,EAAE,CAAC,sBAAsB,CAAC;AACrC,QAAQ,UAAU,EAAE,CAAC,4CAA4C,CAAC;AAClE,QAAQ,WAAW,EAAE,CAAC,4BAA4B,CAAC;AACnD,QAAQ,IAAI,EAAE,CAAC,YAAY,CAAC;AAC5B,QAAQ,YAAY,EAAE,CAAC,+BAA+B,CAAC;AACvD,QAAQ,WAAW,EAAE,CAAC,8BAA8B,CAAC;AACrD,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,4BAA4B,CAAC;AACjD,QAAQ,UAAU,EAAE,CAAC,mBAAmB,CAAC;AACzC,QAAQ,WAAW,EAAE,CAAC,oBAAoB,CAAC;AAC3C,QAAQ,IAAI,EAAE,CAAC,2BAA2B,CAAC;AAC3C,QAAQ,MAAM,EAAE,CAAC,8BAA8B,CAAC;AAChD,QAAQ,MAAM,EAAE,CAAC,wBAAwB,CAAC;AAC1C,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,KAAK;AACL,IAAI,GAAG,EAAE;AACT,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,YAAY,EAAE,CAAC,wCAAwC,CAAC;AAChE,QAAQ,SAAS,EAAE,CAAC,qCAAqC,CAAC;AAC1D,QAAQ,SAAS,EAAE,CAAC,qCAAqC,CAAC;AAC1D,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,SAAS,EAAE,CAAC,6CAA6C,CAAC;AAClE,QAAQ,OAAO,EAAE,CAAC,gDAAgD,CAAC;AACnE,QAAQ,SAAS,EAAE,CAAC,oDAAoD,CAAC;AACzE,QAAQ,MAAM,EAAE,CAAC,yCAAyC,CAAC;AAC3D,QAAQ,MAAM,EAAE,CAAC,8CAA8C,CAAC;AAChE,QAAQ,OAAO,EAAE,CAAC,gDAAgD,CAAC;AACnE,QAAQ,gBAAgB,EAAE,CAAC,mDAAmD,CAAC;AAC/E,QAAQ,SAAS,EAAE,CAAC,4CAA4C,CAAC;AACjE,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,eAAe,EAAE,CAAC,0BAA0B,CAAC;AACrD,QAAQ,WAAW,EAAE,CAAC,iCAAiC,CAAC;AACxD,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,mCAAmC,EAAE,CAAC,8BAA8B,CAAC;AAC7E,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,sBAAsB,EAAE,CAAC,8CAA8C,CAAC;AAChF,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,8BAA8B;AAC1C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,qCAAqC,CAAC,EAAE;AAChF,SAAS;AACT,QAAQ,sCAAsC,EAAE,CAAC,iCAAiC,CAAC;AACnF,QAAQ,wBAAwB,EAAE,CAAC,uCAAuC,CAAC;AAC3E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,iCAAiC;AAC7C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,wCAAwC,CAAC,EAAE;AACnF,SAAS;AACT,QAAQ,mCAAmC,EAAE,CAAC,8BAA8B,CAAC;AAC7E,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,sBAAsB,EAAE,CAAC,8CAA8C,CAAC;AAChF,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,8BAA8B;AAC1C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,qCAAqC,CAAC,EAAE;AAChF,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,YAAY,EAAE;AACtB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,yDAAyD,CAAC;AAC9E,QAAQ,sBAAsB,EAAE,CAAC,gDAAgD,CAAC;AAClF,QAAQ,MAAM,EAAE,CAAC,mCAAmC,CAAC;AACrD,QAAQ,aAAa,EAAE;AACvB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,mCAAmC,CAAC;AAC1D,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,aAAa,EAAE;AACvB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,4CAA4C,CAAC;AACnE,QAAQ,eAAe,EAAE;AACzB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,iDAAiD,CAAC;AAChE,QAAQ,UAAU,EAAE,CAAC,wDAAwD,CAAC;AAC9E,QAAQ,QAAQ,EAAE,CAAC,oDAAoD,CAAC;AACxE,QAAQ,QAAQ,EAAE,CAAC,yCAAyC,CAAC;AAC7D,QAAQ,YAAY,EAAE,CAAC,yDAAyD,CAAC;AACjF,QAAQ,IAAI,EAAE,CAAC,aAAa,CAAC;AAC7B,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,YAAY,EAAE,CAAC,0DAA0D,CAAC;AAClF,QAAQ,mBAAmB,EAAE,CAAC,2CAA2C,CAAC;AAC1E,QAAQ,UAAU,EAAE,CAAC,wDAAwD,CAAC;AAC9E,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,wBAAwB,EAAE,CAAC,kBAAkB,CAAC;AACtD,QAAQ,UAAU,EAAE,CAAC,wBAAwB,CAAC;AAC9C,QAAQ,WAAW,EAAE,CAAC,kCAAkC,CAAC;AACzD,QAAQ,sBAAsB,EAAE;AAChC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,kCAAkC,CAAC;AAC/D,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,sCAAsC,CAAC;AAChE,QAAQ,IAAI,EAAE,CAAC,sDAAsD,CAAC;AACtE,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,wDAAwD,CAAC;AAC7E,QAAQ,MAAM,EAAE,CAAC,yDAAyD,CAAC;AAC3E,QAAQ,MAAM,EAAE,CAAC,mDAAmD,CAAC;AACrE,QAAQ,aAAa,EAAE,CAAC,0DAA0D,CAAC;AACnF,QAAQ,WAAW,EAAE,CAAC,2CAA2C,CAAC;AAClE,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,GAAG,EAAE,CAAC,yBAAyB,CAAC;AACxC,QAAQ,kBAAkB,EAAE,CAAC,eAAe,CAAC;AAC7C,QAAQ,UAAU,EAAE,CAAC,mCAAmC,CAAC;AACzD,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,MAAM,EAAE,CAAC,gBAAgB,CAAC;AAClC,QAAQ,SAAS,EAAE;AACnB,YAAY,oBAAoB;AAChC,YAAY,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE,EAAE;AACxE,SAAS;AACT,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,GAAG,EAAE,CAAC,WAAW,CAAC;AAC1B,QAAQ,UAAU,EAAE,CAAC,cAAc,CAAC;AACpC,QAAQ,MAAM,EAAE,CAAC,UAAU,CAAC;AAC5B,QAAQ,IAAI,EAAE,CAAC,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,YAAY,EAAE,CAAC,qCAAqC,CAAC;AAC7D,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,6CAA6C;AACzD,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,0CAA0C,CAAC;AACtE,QAAQ,eAAe,EAAE,CAAC,kCAAkC,CAAC;AAC7D,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,QAAQ,6BAA6B,EAAE,CAAC,qCAAqC,CAAC;AAC9E,QAAQ,eAAe,EAAE,CAAC,2CAA2C,CAAC;AACtE,QAAQ,wBAAwB,EAAE,CAAC,sBAAsB,CAAC;AAC1D,QAAQ,UAAU,EAAE,CAAC,4BAA4B,CAAC;AAClD,QAAQ,6BAA6B,EAAE;AACvC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,wDAAwD,CAAC;AACnF,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,kDAAkD;AAC9D,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,+BAA+B,CAAC,EAAE;AACxE,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,wDAAwD,CAAC;AACnF,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,yBAAyB,EAAE,CAAC,uBAAuB,CAAC;AAC5D,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,WAAW,EAAE,CAAC,kCAAkC,CAAC;AACzD,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,SAAS,EAAE,CAAC,mCAAmC,CAAC;AACxD,QAAQ,gBAAgB,EAAE,CAAC,gDAAgD,CAAC;AAC5E,QAAQ,gBAAgB,EAAE,CAAC,mCAAmC,CAAC;AAC/D,QAAQ,sBAAsB,EAAE,CAAC,oCAAoC,CAAC;AACtE,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,8BAA8B,CAAC;AAC1D,QAAQ,aAAa,EAAE,CAAC,wBAAwB,CAAC;AACjD,QAAQ,aAAa,EAAE,CAAC,oCAAoC,CAAC;AAC7D,QAAQ,GAAG,EAAE,CAAC,iBAAiB,CAAC;AAChC,QAAQ,iCAAiC,EAAE,CAAC,kCAAkC,CAAC;AAC/E,QAAQ,oBAAoB,EAAE,CAAC,wCAAwC,CAAC;AACxE,QAAQ,UAAU,EAAE,CAAC,iCAAiC,CAAC;AACvD,QAAQ,sBAAsB,EAAE,CAAC,wCAAwC,CAAC;AAC1E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,IAAI,EAAE,CAAC,oBAAoB,CAAC;AACpC,QAAQ,oBAAoB,EAAE,CAAC,+BAA+B,CAAC;AAC/D,QAAQ,gBAAgB,EAAE,CAAC,wBAAwB,CAAC;AACpD,QAAQ,eAAe,EAAE,CAAC,mDAAmD,CAAC;AAC9E,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,wBAAwB,EAAE,CAAC,gBAAgB,CAAC;AACpD,QAAQ,WAAW,EAAE,CAAC,4BAA4B,CAAC;AACnD,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,WAAW,EAAE,CAAC,yBAAyB,CAAC;AAChD,QAAQ,mCAAmC,EAAE,CAAC,4BAA4B,CAAC;AAC3E,QAAQ,wBAAwB,EAAE,CAAC,uCAAuC,CAAC;AAC3E,QAAQ,sBAAsB,EAAE,CAAC,6BAA6B,CAAC;AAC/D,QAAQ,iBAAiB,EAAE,CAAC,gCAAgC,CAAC;AAC7D,QAAQ,qBAAqB,EAAE,CAAC,4CAA4C,CAAC;AAC7E,QAAQ,YAAY,EAAE,CAAC,uBAAuB,CAAC;AAC/C,QAAQ,WAAW,EAAE,CAAC,wCAAwC,CAAC;AAC/D,QAAQ,wBAAwB,EAAE;AAClC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,uCAAuC,CAAC;AAC/D,QAAQ,uBAAuB,EAAE,CAAC,2CAA2C,CAAC;AAC9E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,0CAA0C,EAAE;AACpD,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,wCAAwC,CAAC;AACxE,QAAQ,uCAAuC,EAAE;AACjD,YAAY,2CAA2C;AACvD,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,sCAAsC,CAAC;AAC7D,QAAQ,MAAM,EAAE,CAAC,mBAAmB,CAAC;AACrC,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,oCAAoC;AAChD,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,mCAAmC,CAAC;AAC5D,QAAQ,yBAAyB,EAAE,CAAC,0CAA0C,CAAC;AAC/E,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,mFAAmF;AAC/F,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,+FAA+F;AAC3G,SAAS;AACT,QAAQ,4CAA4C,EAAE;AACtD,YAAY,iEAAiE;AAC7E,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,2CAA2C,CAAC,EAAE;AAClF,SAAS;AACT,QAAQ,2DAA2D,EAAE;AACrE,YAAY,2DAA2D;AACvE,YAAY,EAAE;AACd,YAAY;AACZ,gBAAgB,OAAO,EAAE;AACzB,oBAAoB,UAAU;AAC9B,oBAAoB,yDAAyD;AAC7E,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,QAAQ,uDAAuD,EAAE;AACjE,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,0CAA0C,EAAE;AACpD,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,gFAAgF;AAC5F,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,sFAAsF;AAClG,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,4FAA4F;AACxG,SAAS;AACT,QAAQ,gCAAgC,EAAE,CAAC,oBAAoB,CAAC;AAChE,QAAQ,2BAA2B,EAAE,CAAC,0BAA0B,CAAC;AACjE,QAAQ,mBAAmB,EAAE,CAAC,gCAAgC,CAAC;AAC/D,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,yEAAyE;AACrF,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,+FAA+F;AAC3G,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,qGAAqG;AACjH,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,eAAe,EAAE,CAAC,qDAAqD,CAAC;AAChF,QAAQ,UAAU,EAAE,CAAC,0CAA0C,CAAC;AAChE,QAAQ,YAAY,EAAE,CAAC,qCAAqC,CAAC;AAC7D,QAAQ,0BAA0B,EAAE,CAAC,qBAAqB,CAAC;AAC3D,QAAQ,YAAY,EAAE,CAAC,2BAA2B,CAAC;AACnD,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,MAAM,EAAE,CAAC,+BAA+B,CAAC;AACjD,QAAQ,UAAU,EAAE,CAAC,0CAA0C,CAAC;AAChE,QAAQ,YAAY,EAAE,CAAC,sCAAsC,CAAC;AAC9D,QAAQ,GAAG,EAAE,CAAC,4BAA4B,CAAC;AAC3C,QAAQ,OAAO,EAAE,CAAC,uCAAuC,CAAC;AAC1D,QAAQ,SAAS,EAAE,CAAC,mCAAmC,CAAC;AACxD,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,yCAAyC,CAAC;AAC9D,QAAQ,iBAAiB,EAAE,CAAC,0CAA0C,CAAC;AACvE,QAAQ,WAAW,EAAE,CAAC,oCAAoC,CAAC;AAC3D,QAAQ,UAAU,EAAE,CAAC,0BAA0B,CAAC;AAChD,QAAQ,WAAW,EAAE,CAAC,oCAAoC,CAAC;AAC3D,QAAQ,WAAW,EAAE,CAAC,gCAAgC,CAAC;AACvD,QAAQ,QAAQ,EAAE,CAAC,8CAA8C,CAAC;AAClE,QAAQ,UAAU,EAAE,CAAC,0CAA0C,CAAC;AAChE,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,8BAA8B,CAAC;AAChD,QAAQ,UAAU,EAAE,CAAC,yCAAyC,CAAC;AAC/D,QAAQ,YAAY,EAAE,CAAC,qCAAqC,CAAC;AAC7D,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,aAAa,EAAE,CAAC,qDAAqD,CAAC;AAC9E,QAAQ,MAAM,EAAE,CAAC,kCAAkC,CAAC;AACpD,QAAQ,2BAA2B,EAAE;AACrC,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,wDAAwD,CAAC;AAChF,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,aAAa,EAAE;AACvB,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,+CAA+C,CAAC;AAC9D,QAAQ,SAAS,EAAE;AACnB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,uDAAuD,CAAC;AACnF,QAAQ,IAAI,EAAE,CAAC,iCAAiC,CAAC;AACjD,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,uDAAuD,CAAC;AAC9E,QAAQ,SAAS,EAAE,CAAC,qDAAqD,CAAC;AAC1E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,0CAA0C,CAAC;AAC/E,QAAQ,WAAW,EAAE,CAAC,uDAAuD,CAAC;AAC9E,QAAQ,KAAK,EAAE,CAAC,qDAAqD,CAAC;AACtE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,iDAAiD,CAAC;AACnE,QAAQ,YAAY,EAAE;AACtB,YAAY,6DAA6D;AACzE,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yDAAyD;AACrE,SAAS;AACT,KAAK;AACL,IAAI,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,EAAE;AAC3C,IAAI,SAAS,EAAE;AACf,QAAQ,sBAAsB,EAAE;AAChC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,wGAAwG;AACpH,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mFAAmF;AAC/F,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,kFAAkF;AAC9F,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,8FAA8F;AAC1G,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,wHAAwH;AACpI,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,2DAA2D,CAAC;AACnF,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,uGAAuG;AACnH,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,6EAA6E;AACzF,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,oDAAoD;AAChE,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,sCAAsC,CAAC,EAAE;AAC1E,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,oDAAoD,CAAC;AAC/E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,yFAAyF;AACrG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,4EAA4E;AACxF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,4EAA4E;AACxF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,oDAAoD,CAAC;AACjF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,6CAA6C,CAAC;AACzE,QAAQ,cAAc,EAAE,CAAC,mDAAmD,CAAC;AAC7E,QAAQ,0BAA0B,EAAE;AACpC,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,sCAAsC,CAAC;AAChE,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,6EAA6E;AACzF,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,2CAA2C,CAAC;AACzE,QAAQ,eAAe,EAAE,CAAC,iCAAiC,CAAC;AAC5D,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,sBAAsB,EAAE;AAChC,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,uCAAuC,CAAC;AACtE,QAAQ,0BAA0B,EAAE,CAAC,kBAAkB,CAAC;AACxD,QAAQ,UAAU,EAAE,CAAC,kCAAkC,CAAC;AACxD,QAAQ,WAAW,EAAE,CAAC,wBAAwB,CAAC;AAC/C,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,2CAA2C,CAAC;AACjF,QAAQ,eAAe,EAAE,CAAC,kCAAkC,CAAC;AAC7D,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,mBAAmB,EAAE,CAAC,4CAA4C,CAAC;AAC3E,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,kCAAkC,CAAC;AAC3D,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,qDAAqD;AACjE,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,uCAAuC,CAAC,EAAE;AAC3E,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,8BAA8B,CAAC;AAChD,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,sDAAsD,CAAC;AAChF,QAAQ,sBAAsB,EAAE;AAChC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,oDAAoD,CAAC;AACnF,QAAQ,+BAA+B,EAAE;AACzC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,4CAA4C,CAAC;AACvE,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,8CAA8C,CAAC;AACpE,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,oCAAoC,CAAC;AAC/D,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,oDAAoD,CAAC;AAC7E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,kCAAkC,CAAC;AAC/D,QAAQ,0BAA0B,EAAE;AACpC,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,yCAAyC;AACrD,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,wBAAwB,CAAC,EAAE;AAC5D,SAAS;AACT,QAAQ,sBAAsB,EAAE,CAAC,yCAAyC,CAAC;AAC3E,QAAQ,sBAAsB,EAAE,CAAC,yCAAyC,CAAC;AAC3E,QAAQ,4BAA4B,EAAE;AACtC,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,+BAA+B,CAAC;AAC3D,QAAQ,yBAAyB,EAAE;AACnC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,2BAA2B,CAAC;AAC1C,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,wCAAwC,CAAC;AACtE,QAAQ,yBAAyB,EAAE;AACnC,YAAY,wFAAwF;AACpG,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,kCAAkC,CAAC;AAC1D,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,mDAAmD,CAAC;AAC1E,QAAQ,SAAS,EAAE,CAAC,6CAA6C,CAAC;AAClE,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,0CAA0C,CAAC;AAC/D,QAAQ,qBAAqB,EAAE,CAAC,gDAAgD,CAAC;AACjF,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,gDAAgD,CAAC;AACnF,QAAQ,SAAS,EAAE,CAAC,yCAAyC,CAAC;AAC9D,QAAQ,sBAAsB,EAAE,CAAC,iDAAiD,CAAC;AACnF,QAAQ,gBAAgB,EAAE,CAAC,iDAAiD,CAAC;AAC7E,QAAQ,4BAA4B,EAAE;AACtC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,6CAA6C,CAAC;AACnF,QAAQ,UAAU,EAAE,CAAC,2CAA2C,CAAC;AACjE,QAAQ,oBAAoB,EAAE,CAAC,8CAA8C,CAAC;AAC9E,QAAQ,YAAY,EAAE,CAAC,yCAAyC,CAAC;AACjE,QAAQ,aAAa,EAAE,CAAC,uDAAuD,CAAC;AAChF,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,+CAA+C,CAAC;AAC9E,QAAQ,gBAAgB,EAAE,CAAC,2CAA2C,CAAC;AACvE,QAAQ,QAAQ,EAAE,CAAC,iCAAiC,CAAC;AACrD,QAAQ,aAAa,EAAE,CAAC,mDAAmD,CAAC;AAC5E,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,qBAAqB,EAAE,CAAC,+CAA+C,CAAC;AAChF,QAAQ,8BAA8B,EAAE;AACxC,YAAY,sFAAsF;AAClG,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,4CAA4C,CAAC;AACzE,QAAQ,SAAS,EAAE,CAAC,kCAAkC,CAAC;AACvD,QAAQ,oBAAoB,EAAE,CAAC,wCAAwC,CAAC;AACxE,QAAQ,UAAU,EAAE,CAAC,iDAAiD,CAAC;AACvE,QAAQ,eAAe,EAAE,CAAC,sDAAsD,CAAC;AACjF,QAAQ,eAAe,EAAE,CAAC,+CAA+C,CAAC;AAC1E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,iDAAiD,CAAC;AACxE,QAAQ,eAAe,EAAE,CAAC,qDAAqD,CAAC;AAChF,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,yCAAyC,CAAC;AAC7D,QAAQ,UAAU,EAAE,CAAC,2CAA2C,CAAC;AACjE,QAAQ,uBAAuB,EAAE;AACjC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,QAAQ,yBAAyB,EAAE;AACnC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,oCAAoC,CAAC;AACzE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,mCAAmC,CAAC;AAC1D,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,cAAc,EAAE,CAAC,gCAAgC,CAAC;AAC1D,QAAQ,sBAAsB,EAAE;AAChC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACrD,QAAQ,UAAU,EAAE,CAAC,uBAAuB,CAAC;AAC7C,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,iCAAiC,CAAC;AACtD,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,mCAAmC,EAAE,CAAC,kCAAkC,CAAC;AACjF,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,eAAe,EAAE,CAAC,wCAAwC,CAAC;AACnE,QAAQ,UAAU,EAAE,CAAC,mBAAmB,CAAC;AACzC,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,QAAQ,iBAAiB,EAAE,CAAC,2CAA2C,CAAC;AACxE,QAAQ,QAAQ,EAAE,CAAC,gCAAgC,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,iCAAiC,CAAC;AACtD,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,iCAAiC,CAAC;AACzD,QAAQ,KAAK,EAAE,CAAC,mCAAmC,CAAC;AACpD,QAAQ,aAAa,EAAE,CAAC,2CAA2C,CAAC;AACpE,QAAQ,WAAW,EAAE,CAAC,kDAAkD,CAAC;AACzE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,6EAA6E;AACzF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2FAA2F;AACvG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,kFAAkF;AAC9F,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,qDAAqD,CAAC;AAC7E,QAAQ,gBAAgB,EAAE,CAAC,kCAAkC,CAAC;AAC9D,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,0EAA0E;AACtF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wFAAwF;AACpG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,kDAAkD,CAAC;AAC7E,QAAQ,QAAQ,EAAE,CAAC,qCAAqC,CAAC;AACzD,QAAQ,MAAM,EAAE,CAAC,6BAA6B,CAAC;AAC/C,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,+BAA+B,EAAE,CAAC,iCAAiC,CAAC;AAC5E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,wFAAwF;AACpG,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,mDAAmD,CAAC;AAC5E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,iFAAiF;AAC7F,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,6BAA6B,CAAC,EAAE;AACjE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,iFAAiF;AAC7F,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,6CAA6C,CAAC;AACtE,QAAQ,0BAA0B,EAAE;AACpC,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,sEAAsE;AAClF,YAAY,EAAE,OAAO,EAAE,4BAA4B,EAAE;AACrD,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,IAAI,EAAE,CAAC,kBAAkB,CAAC;AAClC,QAAQ,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACxC,QAAQ,qBAAqB,EAAE,CAAC,oBAAoB,CAAC;AACrD,QAAQ,MAAM,EAAE,CAAC,oBAAoB,CAAC;AACtC,QAAQ,KAAK,EAAE,CAAC,0BAA0B,CAAC;AAC3C,QAAQ,MAAM,EAAE,CAAC,oBAAoB,CAAC;AACtC,QAAQ,KAAK,EAAE,CAAC,mBAAmB,CAAC;AACpC,KAAK;AACL,IAAI,cAAc,EAAE;AACpB,QAAQ,QAAQ,EAAE;AAClB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,iBAAiB,EAAE,CAAC,kDAAkD,CAAC;AAC/E,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,mEAAmE;AAC/E,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,wBAAwB,CAAC;AAC1C,QAAQ,4BAA4B,EAAE;AACtC,YAAY,6EAA6E;AACzF,SAAS;AACT,QAAQ,qBAAqB,EAAE,CAAC,gDAAgD,CAAC;AACjF,QAAQ,4BAA4B,EAAE;AACtC,YAAY,gGAAgG;AAC5G,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,sCAAsC,CAAC;AAC7D,QAAQ,SAAS,EAAE,CAAC,mCAAmC,CAAC;AACxD,QAAQ,yBAAyB,EAAE;AACnC,YAAY,6FAA6F;AACzG,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,IAAI,EAAE,CAAC,uBAAuB,CAAC;AACvC,QAAQ,cAAc,EAAE,CAAC,yCAAyC,CAAC;AACnE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,+CAA+C,CAAC;AAC/E,QAAQ,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACrD,QAAQ,gBAAgB,EAAE,CAAC,2CAA2C,CAAC;AACvE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,4CAA4C,CAAC;AACzE,QAAQ,cAAc,EAAE,CAAC,yCAAyC,CAAC;AACnE,QAAQ,4BAA4B,EAAE;AACtC,YAAY,6DAA6D;AACzE,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,+FAA+F;AAC3G,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,qCAAqC,CAAC;AAC5D,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,wBAAwB,EAAE;AAClC,YAAY,mBAAmB;AAC/B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,8BAA8B,CAAC,EAAE;AAClE,SAAS;AACT,QAAQ,4BAA4B,EAAE,CAAC,mBAAmB,CAAC;AAC3D,QAAQ,KAAK,EAAE,CAAC,6BAA6B,CAAC;AAC9C,QAAQ,YAAY,EAAE,CAAC,6BAA6B,CAAC;AACrD,QAAQ,qBAAqB,EAAE,CAAC,+CAA+C,CAAC;AAChF,QAAQ,oCAAoC,EAAE,CAAC,gCAAgC,CAAC;AAChF,QAAQ,4BAA4B,EAAE;AACtC,YAAY,qBAAqB;AACjC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,kCAAkC,CAAC,EAAE;AACtE,SAAS;AACT,QAAQ,gCAAgC,EAAE,CAAC,qBAAqB,CAAC;AACjE,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,iBAAiB;AAC7B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,wCAAwC,CAAC,EAAE;AAC5E,SAAS;AACT,QAAQ,sCAAsC,EAAE,CAAC,iBAAiB,CAAC;AACnE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,qBAAqB;AACjC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,EAAE;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE,CAAC,qBAAqB,CAAC;AAChE,QAAQ,4BAA4B,EAAE;AACtC,YAAY,oCAAoC;AAChD,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,kCAAkC,CAAC,EAAE;AACtE,SAAS;AACT,QAAQ,gCAAgC,EAAE,CAAC,oCAAoC,CAAC;AAChF,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,4BAA4B;AACxC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,wCAAwC,CAAC,EAAE;AAC5E,SAAS;AACT,QAAQ,sCAAsC,EAAE,CAAC,4BAA4B,CAAC;AAC9E,QAAQ,MAAM,EAAE,CAAC,gCAAgC,CAAC;AAClD,QAAQ,gBAAgB,EAAE,CAAC,WAAW,CAAC;AACvC,QAAQ,aAAa,EAAE,CAAC,uBAAuB,CAAC;AAChD,QAAQ,iBAAiB,EAAE,CAAC,iCAAiC,CAAC;AAC9D,QAAQ,yBAAyB,EAAE;AACnC,YAAY,iCAAiC;AAC7C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,+BAA+B,CAAC,EAAE;AACnE,SAAS;AACT,QAAQ,6BAA6B,EAAE,CAAC,iCAAiC,CAAC;AAC1E,QAAQ,+BAA+B,EAAE;AACzC,YAAY,yBAAyB;AACrC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,qCAAqC,CAAC,EAAE;AACzE,SAAS;AACT,QAAQ,mCAAmC,EAAE,CAAC,yBAAyB,CAAC;AACxE,QAAQ,IAAI,EAAE,CAAC,YAAY,CAAC;AAC5B,QAAQ,0BAA0B,EAAE;AACpC,YAAY,kBAAkB;AAC9B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,gCAAgC,CAAC,EAAE;AACpE,SAAS;AACT,QAAQ,8BAA8B,EAAE,CAAC,kBAAkB,CAAC;AAC5D,QAAQ,0BAA0B,EAAE;AACpC,YAAY,kBAAkB;AAC9B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,gCAAgC,CAAC,EAAE;AACpE,SAAS;AACT,QAAQ,8BAA8B,EAAE,CAAC,kBAAkB,CAAC;AAC5D,QAAQ,2BAA2B,EAAE;AACrC,YAAY,qBAAqB;AACjC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,EAAE;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE,CAAC,qBAAqB,CAAC;AAChE,QAAQ,iCAAiC,EAAE,CAAC,qBAAqB,CAAC;AAClE,QAAQ,oBAAoB,EAAE,CAAC,iCAAiC,CAAC;AACjE,QAAQ,oBAAoB,EAAE,CAAC,iCAAiC,CAAC;AACjE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,oBAAoB;AAChC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,EAAE;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE,CAAC,oBAAoB,CAAC;AAC/D,QAAQ,kBAAkB,EAAE,CAAC,gCAAgC,CAAC;AAC9D,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,yBAAyB;AACrC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,sCAAsC,CAAC,EAAE;AAC1E,SAAS;AACT,QAAQ,oCAAoC,EAAE,CAAC,yBAAyB,CAAC;AACzE,QAAQ,qBAAqB,EAAE,CAAC,4BAA4B,CAAC;AAC7D,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,gBAAgB;AAC5B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,uCAAuC,CAAC,EAAE;AAC3E,SAAS;AACT,QAAQ,qCAAqC,EAAE,CAAC,gBAAgB,CAAC;AACjE,QAAQ,yCAAyC,EAAE;AACnD,YAAY,8BAA8B;AAC1C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,+CAA+C,CAAC,EAAE;AACnF,SAAS;AACT,QAAQ,6CAA6C,EAAE;AACvD,YAAY,8BAA8B;AAC1C,SAAS;AACT,QAAQ,OAAO,EAAE,CAAC,gCAAgC,CAAC;AACnD,QAAQ,QAAQ,EAAE,CAAC,mCAAmC,CAAC;AACvD,QAAQ,mBAAmB,EAAE,CAAC,aAAa,CAAC;AAC5C,KAAK;AACL,CAAC;;AC9nDM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACApC,SAAS,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE;AAC1D,IAAI,MAAM,UAAU,GAAG,EAAE,CAAC;AAC1B,IAAI,KAAK,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACnE,QAAQ,KAAK,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;AACxE,YAAY,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC;AAC5D,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACnD,YAAY,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC9E,YAAY,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;AACpC,gBAAgB,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AACvC,aAAa;AACb,YAAY,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AACnD,YAAY,IAAI,WAAW,EAAE;AAC7B,gBAAgB,YAAY,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC;AAC/G,gBAAgB,SAAS;AACzB,aAAa;AACb,YAAY,YAAY,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAClF,SAAS;AACT,KAAK;AACL,IAAI,OAAO,UAAU,CAAC;AACtB,CAAC;AACD,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE;AACrE,IAAI,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnE;AACA,IAAI,SAAS,eAAe,CAAC,GAAG,IAAI,EAAE;AACtC;AACA,QAAQ,IAAI,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AAClE;AACA,QAAQ,IAAI,WAAW,CAAC,SAAS,EAAE;AACnC,YAAY,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE;AACjD,gBAAgB,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC;AACpD,gBAAgB,CAAC,WAAW,CAAC,SAAS,GAAG,SAAS;AAClD,aAAa,CAAC,CAAC;AACf,YAAY,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAChD,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,OAAO,EAAE;AACjC,YAAY,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC;AAClE,YAAY,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,+BAA+B,EAAE,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5H,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,UAAU,EAAE;AACpC,YAAY,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,iBAAiB,EAAE;AAC3C;AACA,YAAY,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AACxE,YAAY,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE;AACvF,gBAAgB,IAAI,IAAI,IAAI,OAAO,EAAE;AACrC,oBAAoB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACzI,oBAAoB,IAAI,EAAE,KAAK,IAAI,OAAO,CAAC,EAAE;AAC7C,wBAAwB,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACvD,qBAAqB;AACrB,oBAAoB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACzC,iBAAiB;AACjB,aAAa;AACb,YAAY,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAChD,SAAS;AACT;AACA,QAAQ,OAAO,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;AAC5C,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;AAC/D,CAAC;;ACxDM,SAAS,mBAAmB,CAAC,OAAO,EAAE;AAC7C,IAAI,MAAM,GAAG,GAAG,kBAAkB,CAAC,OAAO,EAAEA,SAAS,CAAC,CAAC;AACvD,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,GAAG;AACjB,KAAK,CAAC;AACN,CAAC;AACD,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAC;AACtC,AAAO,SAAS,yBAAyB,CAAC,OAAO,EAAE;AACnD,IAAI,MAAM,GAAG,GAAG,kBAAkB,CAAC,OAAO,EAAEA,SAAS,CAAC,CAAC;AACvD,IAAI,OAAO;AACX,QAAQ,GAAG,GAAG;AACd,QAAQ,IAAI,EAAE,GAAG;AACjB,KAAK,CAAC;AACN,CAAC;AACD,yBAAyB,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/package.json b/node_modules/@octokit/plugin-rest-endpoint-methods/package.json index d3ff174..42c5ce3 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/package.json +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/package.json @@ -1,93 +1,59 @@ { - "_from": "@octokit/plugin-rest-endpoint-methods@^4.0.0", - "_id": "@octokit/plugin-rest-endpoint-methods@4.12.0", - "_inBundle": false, - "_integrity": "sha512-RgnQ1aoetdOJjZYC37LV5FNlL7GY/v1CdC5dur1Zp/UiADJlbRFbAz/xLx26ovXw67dK7EUtwCghS+6QyiI9RA==", - "_location": "/@octokit/plugin-rest-endpoint-methods", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/plugin-rest-endpoint-methods@^4.0.0", - "name": "@octokit/plugin-rest-endpoint-methods", - "escapedName": "@octokit%2fplugin-rest-endpoint-methods", - "scope": "@octokit", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/@actions/github" + "name": "@octokit/plugin-rest-endpoint-methods", + "description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", + "version": "5.16.2", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.12.0.tgz", - "_shasum": "1cec405cd4eaf0bdb58cb7d2a9b3d8473b3a70e8", - "_spec": "@octokit/plugin-rest-endpoint-methods@^4.0.0", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@actions\\github", - "bugs": { - "url": "https://github.com/octokit/plugin-rest-endpoint-methods.js/issues" - }, - "bundleDependencies": false, + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "github:octokit/plugin-rest-endpoint-methods.js", "dependencies": { - "@octokit/types": "^6.10.0", + "@octokit/types": "^6.39.0", "deprecation": "^2.3.1" }, - "deprecated": false, - "description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", + "peerDependencies": { + "@octokit/core": ">=3" + }, "devDependencies": { "@gimenete/type-writer": "^0.1.5", "@octokit/core": "^3.0.0", - "@octokit/graphql": "^4.3.1", "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-web": "^0.9.0", "@pika/plugin-ts-standard-pkg": "^0.9.0", "@types/fetch-mock": "^7.3.1", - "@types/jest": "^26.0.0", - "@types/node": "^14.0.4", + "@types/jest": "^27.0.0", + "@types/node": "^16.0.0", "fetch-mock": "^9.0.0", - "fs-extra": "^9.0.0", - "jest": "^26.1.0", + "fs-extra": "^10.0.0", + "github-openapi-graphql-query": "^2.0.0", + "jest": "^27.0.0", "lodash.camelcase": "^4.3.0", "lodash.set": "^4.3.2", "lodash.upperfirst": "^4.3.1", "mustache": "^4.0.0", "npm-run-all": "^4.1.5", - "prettier": "^2.0.1", - "semantic-release": "^17.0.0", + "prettier": "2.7.1", "semantic-release-plugin-update-version-in-files": "^1.0.0", - "sort-keys": "^4.0.0", + "sort-keys": "^4.2.0", "string-to-jsdoc-comment": "^1.0.0", - "ts-jest": "^26.1.3", + "ts-jest": "^27.0.0-next.12", "typescript": "^4.0.2" }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/plugin-rest-endpoint-methods.js#readme", - "keywords": [ - "github", - "api", - "sdk", - "toolkit" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/plugin-rest-endpoint-methods", - "peerDependencies": { - "@octokit/core": ">=3" - }, - "pika": true, "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/plugin-rest-endpoint-methods.js.git" - }, - "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "version": "4.12.0" + "main": "dist-node/index.js", + "module": "dist-web/index.js" } diff --git a/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/request-error/README.md index c939cda..1bf5384 100644 --- a/node_modules/@octokit/request-error/README.md +++ b/node_modules/@octokit/request-error/README.md @@ -55,11 +55,11 @@ const error = new RequestError("Oops", 500, { 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]' } +error.response; // { url, status, headers, data } ``` ## LICENSE diff --git a/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/request-error/dist-node/index.js index 95b9c57..619f462 100644 --- a/node_modules/@octokit/request-error/dist-node/index.js +++ b/node_modules/@octokit/request-error/dist-node/index.js @@ -7,7 +7,8 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau var deprecation = require('deprecation'); var once = _interopDefault(require('once')); -const logOnce = once(deprecation => console.warn(deprecation)); +const logOnceCode = once(deprecation => console.warn(deprecation)); +const logOnceHeaders = once(deprecation => console.warn(deprecation)); /** * Error with extra properties to help with debugging */ @@ -24,14 +25,17 @@ class RequestError extends Error { 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; - } + let headers; + + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } // redact request credentials without mutating original request options - }); - this.headers = options.headers || {}; // redact request credentials without mutating original request options const requestCopy = Object.assign({}, options.request); @@ -46,7 +50,22 @@ class RequestError extends Error { .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; + this.request = requestCopy; // deprecations + + Object.defineProperty(this, "code", { + get() { + logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + } + + }); } } diff --git a/node_modules/@octokit/request-error/dist-node/index.js.map b/node_modules/@octokit/request-error/dist-node/index.js.map index f5d527e..9134ddb 100644 --- a/node_modules/@octokit/request-error/dist-node/index.js.map +++ b/node_modules/@octokit/request-error/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnce = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n Object.defineProperty(this, \"code\", {\n get() {\n logOnce(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n this.headers = options.headers || {};\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n }\n}\n"],"names":["logOnce","once","deprecation","console","warn","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","Object","defineProperty","get","Deprecation","headers","requestCopy","assign","request","authorization","replace","url"],"mappings":";;;;;;;;;AAEA,MAAMA,OAAO,GAAGC,IAAI,CAAEC,WAAD,IAAiBC,OAAO,CAACC,IAAR,CAAaF,WAAb,CAAlB,CAApB;AACA;AACA;AACA;;AACO,MAAMG,YAAN,SAA2BC,KAA3B,CAAiC;AACpCC,EAAAA,WAAW,CAACC,OAAD,EAAUC,UAAV,EAAsBC,OAAtB,EAA+B;AACtC,UAAMF,OAAN,EADsC;;AAGtC;;AACA,QAAIF,KAAK,CAACK,iBAAV,EAA6B;AACzBL,MAAAA,KAAK,CAACK,iBAAN,CAAwB,IAAxB,EAA8B,KAAKJ,WAAnC;AACH;;AACD,SAAKK,IAAL,GAAY,WAAZ;AACA,SAAKC,MAAL,GAAcJ,UAAd;AACAK,IAAAA,MAAM,CAACC,cAAP,CAAsB,IAAtB,EAA4B,MAA5B,EAAoC;AAChCC,MAAAA,GAAG,GAAG;AACFhB,QAAAA,OAAO,CAAC,IAAIiB,uBAAJ,CAAgB,0EAAhB,CAAD,CAAP;AACA,eAAOR,UAAP;AACH;;AAJ+B,KAApC;AAMA,SAAKS,OAAL,GAAeR,OAAO,CAACQ,OAAR,IAAmB,EAAlC,CAfsC;;AAiBtC,UAAMC,WAAW,GAAGL,MAAM,CAACM,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACW,OAA1B,CAApB;;AACA,QAAIX,OAAO,CAACW,OAAR,CAAgBH,OAAhB,CAAwBI,aAA5B,EAA2C;AACvCH,MAAAA,WAAW,CAACD,OAAZ,GAAsBJ,MAAM,CAACM,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACW,OAAR,CAAgBH,OAAlC,EAA2C;AAC7DI,QAAAA,aAAa,EAAEZ,OAAO,CAACW,OAAR,CAAgBH,OAAhB,CAAwBI,aAAxB,CAAsCC,OAAtC,CAA8C,MAA9C,EAAsD,aAAtD;AAD8C,OAA3C,CAAtB;AAGH;;AACDJ,IAAAA,WAAW,CAACK,GAAZ,GAAkBL,WAAW,CAACK,GAAZ;AAEd;AAFc,KAGbD,OAHa,CAGL,sBAHK,EAGmB,0BAHnB;AAKd;AALc,KAMbA,OANa,CAML,qBANK,EAMkB,yBANlB,CAAlB;AAOA,SAAKF,OAAL,GAAeF,WAAf;AACH;;AAhCmC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":["logOnceCode","once","deprecation","console","warn","logOnceHeaders","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","headers","response","requestCopy","Object","assign","request","authorization","replace","url","defineProperty","get","Deprecation"],"mappings":";;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,IAAI,CAAEC,WAAD,IAAiBC,OAAO,CAACC,IAAR,CAAaF,WAAb,CAAlB,CAAxB;AACA,MAAMG,cAAc,GAAGJ,IAAI,CAAEC,WAAD,IAAiBC,OAAO,CAACC,IAAR,CAAaF,WAAb,CAAlB,CAA3B;AACA;AACA;AACA;;AACO,MAAMI,YAAN,SAA2BC,KAA3B,CAAiC;AACpCC,EAAAA,WAAW,CAACC,OAAD,EAAUC,UAAV,EAAsBC,OAAtB,EAA+B;AACtC,UAAMF,OAAN,EADsC;;AAGtC;;AACA,QAAIF,KAAK,CAACK,iBAAV,EAA6B;AACzBL,MAAAA,KAAK,CAACK,iBAAN,CAAwB,IAAxB,EAA8B,KAAKJ,WAAnC;AACH;;AACD,SAAKK,IAAL,GAAY,WAAZ;AACA,SAAKC,MAAL,GAAcJ,UAAd;AACA,QAAIK,OAAJ;;AACA,QAAI,aAAaJ,OAAb,IAAwB,OAAOA,OAAO,CAACI,OAAf,KAA2B,WAAvD,EAAoE;AAChEA,MAAAA,OAAO,GAAGJ,OAAO,CAACI,OAAlB;AACH;;AACD,QAAI,cAAcJ,OAAlB,EAA2B;AACvB,WAAKK,QAAL,GAAgBL,OAAO,CAACK,QAAxB;AACAD,MAAAA,OAAO,GAAGJ,OAAO,CAACK,QAAR,CAAiBD,OAA3B;AACH,KAhBqC;;;AAkBtC,UAAME,WAAW,GAAGC,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBR,OAAO,CAACS,OAA1B,CAApB;;AACA,QAAIT,OAAO,CAACS,OAAR,CAAgBL,OAAhB,CAAwBM,aAA5B,EAA2C;AACvCJ,MAAAA,WAAW,CAACF,OAAZ,GAAsBG,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBR,OAAO,CAACS,OAAR,CAAgBL,OAAlC,EAA2C;AAC7DM,QAAAA,aAAa,EAAEV,OAAO,CAACS,OAAR,CAAgBL,OAAhB,CAAwBM,aAAxB,CAAsCC,OAAtC,CAA8C,MAA9C,EAAsD,aAAtD;AAD8C,OAA3C,CAAtB;AAGH;;AACDL,IAAAA,WAAW,CAACM,GAAZ,GAAkBN,WAAW,CAACM,GAAZ;AAEd;AAFc,KAGbD,OAHa,CAGL,sBAHK,EAGmB,0BAHnB;AAKd;AALc,KAMbA,OANa,CAML,qBANK,EAMkB,yBANlB,CAAlB;AAOA,SAAKF,OAAL,GAAeH,WAAf,CA/BsC;;AAiCtCC,IAAAA,MAAM,CAACM,cAAP,CAAsB,IAAtB,EAA4B,MAA5B,EAAoC;AAChCC,MAAAA,GAAG,GAAG;AACFzB,QAAAA,WAAW,CAAC,IAAI0B,uBAAJ,CAAgB,0EAAhB,CAAD,CAAX;AACA,eAAOhB,UAAP;AACH;;AAJ+B,KAApC;AAMAQ,IAAAA,MAAM,CAACM,cAAP,CAAsB,IAAtB,EAA4B,SAA5B,EAAuC;AACnCC,MAAAA,GAAG,GAAG;AACFpB,QAAAA,cAAc,CAAC,IAAIqB,uBAAJ,CAAgB,uFAAhB,CAAD,CAAd;AACA,eAAOX,OAAO,IAAI,EAAlB;AACH;;AAJkC,KAAvC;AAMH;;AA9CmC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/request-error/dist-src/index.js index c880b45..5eb1927 100644 --- a/node_modules/@octokit/request-error/dist-src/index.js +++ b/node_modules/@octokit/request-error/dist-src/index.js @@ -1,6 +1,7 @@ import { Deprecation } from "deprecation"; import once from "once"; -const logOnce = once((deprecation) => console.warn(deprecation)); +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = once((deprecation) => console.warn(deprecation)); /** * Error with extra properties to help with debugging */ @@ -14,13 +15,14 @@ export class RequestError extends Error { } 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 || {}; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } // redact request credentials without mutating original request options const requestCopy = Object.assign({}, options.request); if (options.request.headers.authorization) { @@ -36,5 +38,18 @@ export class RequestError extends Error { // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); this.request = requestCopy; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); } } diff --git a/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/request-error/dist-types/index.d.ts index baa8a0e..d6e089c 100644 --- a/node_modules/@octokit/request-error/dist-types/index.d.ts +++ b/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -1,4 +1,4 @@ -import { RequestOptions, ResponseHeaders } from "@octokit/types"; +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; import { RequestErrorOptions } from "./types"; /** * Error with extra properties to help with debugging @@ -15,13 +15,19 @@ export declare class RequestError extends Error { * @deprecated `error.code` is deprecated in favor of `error.status` */ code: number; + /** + * Request options that lead to the error. + */ + request: RequestOptions; /** * error response headers + * + * @deprecated `error.headers` is deprecated in favor of `error.response.headers` */ headers: ResponseHeaders; /** - * Request options that lead to the error. + * Response object if a response was received */ - request: RequestOptions; + response?: OctokitResponse; 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 index 865d213..7785231 100644 --- a/node_modules/@octokit/request-error/dist-types/types.d.ts +++ b/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -1,5 +1,9 @@ -import { RequestOptions, ResponseHeaders } from "@octokit/types"; +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; export declare type RequestErrorOptions = { + /** @deprecated set `response` instead */ headers?: ResponseHeaders; request: RequestOptions; +} | { + response: OctokitResponse; + request: RequestOptions; }; diff --git a/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/request-error/dist-web/index.js index feec58e..0fb64be 100644 --- a/node_modules/@octokit/request-error/dist-web/index.js +++ b/node_modules/@octokit/request-error/dist-web/index.js @@ -1,7 +1,8 @@ import { Deprecation } from 'deprecation'; import once from 'once'; -const logOnce = once((deprecation) => console.warn(deprecation)); +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = once((deprecation) => console.warn(deprecation)); /** * Error with extra properties to help with debugging */ @@ -15,13 +16,14 @@ class RequestError extends Error { } 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 || {}; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } // redact request credentials without mutating original request options const requestCopy = Object.assign({}, options.request); if (options.request.headers.authorization) { @@ -37,6 +39,19 @@ class RequestError extends Error { // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); this.request = requestCopy; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); } } diff --git a/node_modules/@octokit/request-error/dist-web/index.js.map b/node_modules/@octokit/request-error/dist-web/index.js.map index 130740d..78f677f 100644 --- a/node_modules/@octokit/request-error/dist-web/index.js.map +++ b/node_modules/@octokit/request-error/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnce = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n Object.defineProperty(this, \"code\", {\n get() {\n logOnce(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n this.headers = options.headers || {};\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACjE;AACA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;AAC9C,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;AAChC,QAAQ,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;AACjC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,YAAY,GAAG,GAAG;AAClB,gBAAgB,OAAO,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;AACrH,gBAAgB,OAAO,UAAU,CAAC;AAClC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;AAC7C;AACA,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/D,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;AACnD,YAAY,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;AAC7E,gBAAgB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;AACnG,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;AACzC;AACA;AACA,aAAa,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AACxE;AACA;AACA,aAAa,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;AACvE,QAAQ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AACnC,KAAK;AACL;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACxE;AACA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;AAC9C,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;AAChC,QAAQ,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;AACjC,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW,EAAE;AAC5E,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,SAAS;AACT,QAAQ,IAAI,UAAU,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAC7C,YAAY,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/C,SAAS;AACT;AACA,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/D,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;AACnD,YAAY,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;AAC7E,gBAAgB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;AACnG,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;AACzC;AACA;AACA,aAAa,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AACxE;AACA;AACA,aAAa,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;AACvE,QAAQ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AACnC;AACA,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,YAAY,GAAG,GAAG;AAClB,gBAAgB,WAAW,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;AACzH,gBAAgB,OAAO,UAAU,CAAC;AAClC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;AAC/C,YAAY,GAAG,GAAG;AAClB,gBAAgB,cAAc,CAAC,IAAI,WAAW,CAAC,uFAAuF,CAAC,CAAC,CAAC;AACzI,gBAAgB,OAAO,OAAO,IAAI,EAAE,CAAC;AACrC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/request-error/package.json index 823b597..2f5b239 100644 --- a/node_modules/@octokit/request-error/package.json +++ b/node_modules/@octokit/request-error/package.json @@ -1,39 +1,26 @@ { - "_from": "@octokit/request-error@^2.0.0", - "_id": "@octokit/request-error@2.0.5", - "_inBundle": false, - "_integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==", - "_location": "/@octokit/request-error", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/request-error@^2.0.0", - "name": "@octokit/request-error", - "escapedName": "@octokit%2frequest-error", - "scope": "@octokit", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/@octokit/request" + "name": "@octokit/request-error", + "description": "Error class for Octokit request errors", + "version": "2.1.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz", - "_shasum": "72cc91edc870281ad583a42619256b380c600143", - "_spec": "@octokit/request-error@^2.0.0", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\request", - "bugs": { - "url": "https://github.com/octokit/request-error.js/issues" - }, - "bundleDependencies": false, + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "repository": "github:octokit/request-error.js", "dependencies": { "@octokit/types": "^6.0.3", "deprecation": "^2.0.0", "once": "^1.4.0" }, - "deprecated": false, - "description": "Error class for Octokit request errors", "devDependencies": { "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", @@ -43,38 +30,18 @@ "@types/jest": "^26.0.0", "@types/node": "^14.0.4", "@types/once": "^1.4.0", - "jest": "^26.0.0", + "jest": "^27.0.0", "pika-plugin-unpkg-field": "^1.1.0", - "prettier": "^2.0.1", + "prettier": "2.3.1", "semantic-release": "^17.0.0", - "ts-jest": "^26.0.0", + "ts-jest": "^27.0.0-next.12", "typescript": "^4.0.0" }, - "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": "2.0.5" + "main": "dist-node/index.js", + "module": "dist-web/index.js" } diff --git a/node_modules/@octokit/request/README.md b/node_modules/@octokit/request/README.md index 514eb6e..747a670 100644 --- a/node_modules/@octokit/request/README.md +++ b/node_modules/@octokit/request/README.md @@ -218,7 +218,7 @@ const { data: app } = await requestWithAuth( String - If route is set it has to be a string consisting of the request method and URL, e.g. GET /orgs/{org} + **Required**. If route is set it has to be a string consisting of the request method and URL, e.g. GET /orgs/{org} @@ -229,7 +229,7 @@ const { data: app } = await requestWithAuth( String - Required. Any supported http verb, case insensitive. Defaults to https://api.github.com. + The base URL that route or url will be prefixed with, if they use relative paths. Defaults to https://api.github.com. @@ -274,7 +274,7 @@ const { data: app } = await requestWithAuth( String - Required. Any supported http verb, case insensitive. Defaults to Get. + Any supported http verb, case insensitive. Defaults to Get. @@ -285,7 +285,7 @@ const { data: app } = await requestWithAuth( String - Required. A path or full URL which may contain :variable or {variable} placeholders, + **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. @@ -343,6 +343,16 @@ const { data: app } = await requestWithAuth( Use an AbortController instance to cancel a request. In node you can only cancel streamed requests. + + + options.request.log + + + object + + + Used for internal logging. Defaults to console. + @@ -406,8 +416,8 @@ All other options except `options.request.*` will be passed depending on the `me 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` +- `error.response` The http response object with `url`, `headers`, and `data` ## `request.defaults()` diff --git a/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/request/dist-node/index.js index d3caaae..685e2f5 100644 --- a/node_modules/@octokit/request/dist-node/index.js +++ b/node_modules/@octokit/request/dist-node/index.js @@ -10,13 +10,15 @@ var isPlainObject = require('is-plain-object'); var nodeFetch = _interopDefault(require('node-fetch')); var requestError = require('@octokit/request-error'); -const VERSION = "5.4.14"; +const VERSION = "5.6.3"; function getBufferResponse(response) { return response.arrayBuffer(); } function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { requestOptions.body = JSON.stringify(requestOptions.body); } @@ -30,7 +32,9 @@ function fetchWrapper(requestOptions) { body: requestOptions.body, headers: requestOptions.headers, redirect: requestOptions.redirect - }, requestOptions.request)).then(response => { + }, // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)).then(async response => { url = response.url; status = response.status; @@ -38,6 +42,12 @@ function fetchWrapper(requestOptions) { headers[keyAndValue[0]] = keyAndValue[1]; } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { return; } // GitHub API returns 200 for HEAD requests @@ -49,49 +59,43 @@ function fetchWrapper(requestOptions) { } throw new requestError.RequestError(response.statusText, status, { - headers, + response: { + url, + status, + headers, + data: undefined + }, request: requestOptions }); } if (status === 304) { throw new requestError.RequestError("Not modified", status, { - headers, + response: { + url, + status, + headers, + data: await getResponseData(response) + }, request: requestOptions }); } if (status >= 400) { - return response.text().then(message => { - const error = new requestError.RequestError(message, status, { + const data = await getResponseData(response); + const error = new requestError.RequestError(toErrorMessage(data), status, { + response: { + url, + status, headers, - request: requestOptions - }); - - try { - let responseBody = JSON.parse(error.message); - Object.assign(error, responseBody); - let errors = responseBody.errors; // Assumption `errors` would always be in Array format - - error.message = error.message + ": " + errors.map(JSON.stringify).join(", "); - } catch (e) {// ignore, see octokit/rest.js#684 - } - - throw error; + data + }, + request: requestOptions }); + 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); + return getResponseData(response); }).then(data => { return { status, @@ -100,17 +104,42 @@ function fetchWrapper(requestOptions) { data }; }).catch(error => { - if (error instanceof requestError.RequestError) { - throw error; - } - + if (error instanceof requestError.RequestError) throw error; throw new requestError.RequestError(error.message, 500, { - headers, request: requestOptions }); }); } +async function getResponseData(response) { + 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); +} + +function toErrorMessage(data) { + if (typeof data === "string") return data; // istanbul ignore else - just in case + + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + + return data.message; + } // istanbul ignore next - just in case + + + return `Unknown error: ${JSON.stringify(data)}`; +} + function withDefaults(oldEndpoint, newDefaults) { const endpoint = oldEndpoint.defaults(newDefaults); diff --git a/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/request/dist-node/index.js.map index c8c21cd..9a51ed1 100644 --- a/node_modules/@octokit/request/dist-node/index.js.map +++ b/node_modules/@octokit/request/dist-node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.4.14\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, requestOptions.request))\n .then((response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n headers,\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n headers,\n request: requestOptions,\n });\n }\n if (status >= 400) {\n return response\n .text()\n .then((message) => {\n const error = new RequestError(message, status, {\n headers,\n request: requestOptions,\n });\n try {\n let responseBody = JSON.parse(error.message);\n Object.assign(error, responseBody);\n let errors = responseBody.errors;\n // Assumption `errors` would always be in Array format\n error.message =\n error.message + \": \" + errors.map(JSON.stringify).join(\", \");\n }\n catch (e) {\n // ignore, see octokit/rest.js#684\n }\n throw error;\n });\n }\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError) {\n throw error;\n }\n throw new RequestError(error.message, 500, {\n headers,\n request: requestOptions,\n });\n });\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","request","nodeFetch","Object","assign","method","redirect","then","keyAndValue","RequestError","statusText","text","message","error","responseBody","parse","errors","map","join","e","contentType","get","test","json","getBuffer","data","catch","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAQ,SAASC,iBAAT,CAA2BC,QAA3B,EAAqC;AAChD,SAAOA,QAAQ,CAACC,WAAT,EAAP;AACH;;ACEc,SAASC,YAAT,CAAsBC,cAAtB,EAAsC;AACjD,MAAIC,2BAAa,CAACD,cAAc,CAACE,IAAhB,CAAb,IACAC,KAAK,CAACC,OAAN,CAAcJ,cAAc,CAACE,IAA7B,CADJ,EACwC;AACpCF,IAAAA,cAAc,CAACE,IAAf,GAAsBG,IAAI,CAACC,SAAL,CAAeN,cAAc,CAACE,IAA9B,CAAtB;AACH;;AACD,MAAIK,OAAO,GAAG,EAAd;AACA,MAAIC,MAAJ;AACA,MAAIC,GAAJ;AACA,QAAMC,KAAK,GAAIV,cAAc,CAACW,OAAf,IAA0BX,cAAc,CAACW,OAAf,CAAuBD,KAAlD,IAA4DE,SAA1E;AACA,SAAOF,KAAK,CAACV,cAAc,CAACS,GAAhB,EAAqBI,MAAM,CAACC,MAAP,CAAc;AAC3CC,IAAAA,MAAM,EAAEf,cAAc,CAACe,MADoB;AAE3Cb,IAAAA,IAAI,EAAEF,cAAc,CAACE,IAFsB;AAG3CK,IAAAA,OAAO,EAAEP,cAAc,CAACO,OAHmB;AAI3CS,IAAAA,QAAQ,EAAEhB,cAAc,CAACgB;AAJkB,GAAd,EAK9BhB,cAAc,CAACW,OALe,CAArB,CAAL,CAMFM,IANE,CAMIpB,QAAD,IAAc;AACpBY,IAAAA,GAAG,GAAGZ,QAAQ,CAACY,GAAf;AACAD,IAAAA,MAAM,GAAGX,QAAQ,CAACW,MAAlB;;AACA,SAAK,MAAMU,WAAX,IAA0BrB,QAAQ,CAACU,OAAnC,EAA4C;AACxCA,MAAAA,OAAO,CAACW,WAAW,CAAC,CAAD,CAAZ,CAAP,GAA0BA,WAAW,CAAC,CAAD,CAArC;AACH;;AACD,QAAIV,MAAM,KAAK,GAAX,IAAkBA,MAAM,KAAK,GAAjC,EAAsC;AAClC;AACH,KARmB;;;AAUpB,QAAIR,cAAc,CAACe,MAAf,KAA0B,MAA9B,EAAsC;AAClC,UAAIP,MAAM,GAAG,GAAb,EAAkB;AACd;AACH;;AACD,YAAM,IAAIW,yBAAJ,CAAiBtB,QAAQ,CAACuB,UAA1B,EAAsCZ,MAAtC,EAA8C;AAChDD,QAAAA,OADgD;AAEhDI,QAAAA,OAAO,EAAEX;AAFuC,OAA9C,CAAN;AAIH;;AACD,QAAIQ,MAAM,KAAK,GAAf,EAAoB;AAChB,YAAM,IAAIW,yBAAJ,CAAiB,cAAjB,EAAiCX,MAAjC,EAAyC;AAC3CD,QAAAA,OAD2C;AAE3CI,QAAAA,OAAO,EAAEX;AAFkC,OAAzC,CAAN;AAIH;;AACD,QAAIQ,MAAM,IAAI,GAAd,EAAmB;AACf,aAAOX,QAAQ,CACVwB,IADE,GAEFJ,IAFE,CAEIK,OAAD,IAAa;AACnB,cAAMC,KAAK,GAAG,IAAIJ,yBAAJ,CAAiBG,OAAjB,EAA0Bd,MAA1B,EAAkC;AAC5CD,UAAAA,OAD4C;AAE5CI,UAAAA,OAAO,EAAEX;AAFmC,SAAlC,CAAd;;AAIA,YAAI;AACA,cAAIwB,YAAY,GAAGnB,IAAI,CAACoB,KAAL,CAAWF,KAAK,CAACD,OAAjB,CAAnB;AACAT,UAAAA,MAAM,CAACC,MAAP,CAAcS,KAAd,EAAqBC,YAArB;AACA,cAAIE,MAAM,GAAGF,YAAY,CAACE,MAA1B,CAHA;;AAKAH,UAAAA,KAAK,CAACD,OAAN,GACIC,KAAK,CAACD,OAAN,GAAgB,IAAhB,GAAuBI,MAAM,CAACC,GAAP,CAAWtB,IAAI,CAACC,SAAhB,EAA2BsB,IAA3B,CAAgC,IAAhC,CAD3B;AAEH,SAPD,CAQA,OAAOC,CAAP,EAAU;AAET;;AACD,cAAMN,KAAN;AACH,OAnBM,CAAP;AAoBH;;AACD,UAAMO,WAAW,GAAGjC,QAAQ,CAACU,OAAT,CAAiBwB,GAAjB,CAAqB,cAArB,CAApB;;AACA,QAAI,oBAAoBC,IAApB,CAAyBF,WAAzB,CAAJ,EAA2C;AACvC,aAAOjC,QAAQ,CAACoC,IAAT,EAAP;AACH;;AACD,QAAI,CAACH,WAAD,IAAgB,yBAAyBE,IAAzB,CAA8BF,WAA9B,CAApB,EAAgE;AAC5D,aAAOjC,QAAQ,CAACwB,IAAT,EAAP;AACH;;AACD,WAAOa,iBAAS,CAACrC,QAAD,CAAhB;AACH,GA7DM,EA8DFoB,IA9DE,CA8DIkB,IAAD,IAAU;AAChB,WAAO;AACH3B,MAAAA,MADG;AAEHC,MAAAA,GAFG;AAGHF,MAAAA,OAHG;AAIH4B,MAAAA;AAJG,KAAP;AAMH,GArEM,EAsEFC,KAtEE,CAsEKb,KAAD,IAAW;AAClB,QAAIA,KAAK,YAAYJ,yBAArB,EAAmC;AAC/B,YAAMI,KAAN;AACH;;AACD,UAAM,IAAIJ,yBAAJ,CAAiBI,KAAK,CAACD,OAAvB,EAAgC,GAAhC,EAAqC;AACvCf,MAAAA,OADuC;AAEvCI,MAAAA,OAAO,EAAEX;AAF8B,KAArC,CAAN;AAIH,GA9EM,CAAP;AA+EH;;AC3Fc,SAASqC,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;AAC3D,QAAMC,QAAQ,GAAGF,WAAW,CAACG,QAAZ,CAAqBF,WAArB,CAAjB;;AACA,QAAMG,MAAM,GAAG,UAAUC,KAAV,EAAiBC,UAAjB,EAA6B;AACxC,UAAMC,eAAe,GAAGL,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAxB;;AACA,QAAI,CAACC,eAAe,CAAClC,OAAjB,IAA4B,CAACkC,eAAe,CAAClC,OAAhB,CAAwBoC,IAAzD,EAA+D;AAC3D,aAAOhD,YAAY,CAACyC,QAAQ,CAACf,KAAT,CAAeoB,eAAf,CAAD,CAAnB;AACH;;AACD,UAAMlC,OAAO,GAAG,CAACgC,KAAD,EAAQC,UAAR,KAAuB;AACnC,aAAO7C,YAAY,CAACyC,QAAQ,CAACf,KAAT,CAAee,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAf,CAAD,CAAnB;AACH,KAFD;;AAGA/B,IAAAA,MAAM,CAACC,MAAP,CAAcH,OAAd,EAAuB;AACnB6B,MAAAA,QADmB;AAEnBC,MAAAA,QAAQ,EAAEJ,YAAY,CAACW,IAAb,CAAkB,IAAlB,EAAwBR,QAAxB;AAFS,KAAvB;AAIA,WAAOK,eAAe,CAAClC,OAAhB,CAAwBoC,IAAxB,CAA6BpC,OAA7B,EAAsCkC,eAAtC,CAAP;AACH,GAbD;;AAcA,SAAOhC,MAAM,CAACC,MAAP,CAAc4B,MAAd,EAAsB;AACzBF,IAAAA,QADyB;AAEzBC,IAAAA,QAAQ,EAAEJ,YAAY,CAACW,IAAb,CAAkB,IAAlB,EAAwBR,QAAxB;AAFe,GAAtB,CAAP;AAIH;;MCjBY7B,OAAO,GAAG0B,YAAY,CAACG,iBAAD,EAAW;AAC1CjC,EAAAA,OAAO,EAAE;AACL,kBAAe,sBAAqBZ,OAAQ,IAAGsD,+BAAY,EAAG;AADzD;AADiC,CAAX,CAA5B;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.6.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","log","request","console","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","nodeFetch","Object","assign","method","redirect","then","keyAndValue","matches","link","match","deprecationLink","pop","warn","sunset","RequestError","statusText","data","undefined","getResponseData","error","toErrorMessage","catch","message","contentType","get","test","json","text","getBuffer","errors","map","join","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","parse","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAQ,SAASC,iBAAT,CAA2BC,QAA3B,EAAqC;AAChD,SAAOA,QAAQ,CAACC,WAAT,EAAP;AACH;;ACEc,SAASC,YAAT,CAAsBC,cAAtB,EAAsC;AACjD,QAAMC,GAAG,GAAGD,cAAc,CAACE,OAAf,IAA0BF,cAAc,CAACE,OAAf,CAAuBD,GAAjD,GACND,cAAc,CAACE,OAAf,CAAuBD,GADjB,GAENE,OAFN;;AAGA,MAAIC,2BAAa,CAACJ,cAAc,CAACK,IAAhB,CAAb,IACAC,KAAK,CAACC,OAAN,CAAcP,cAAc,CAACK,IAA7B,CADJ,EACwC;AACpCL,IAAAA,cAAc,CAACK,IAAf,GAAsBG,IAAI,CAACC,SAAL,CAAeT,cAAc,CAACK,IAA9B,CAAtB;AACH;;AACD,MAAIK,OAAO,GAAG,EAAd;AACA,MAAIC,MAAJ;AACA,MAAIC,GAAJ;AACA,QAAMC,KAAK,GAAIb,cAAc,CAACE,OAAf,IAA0BF,cAAc,CAACE,OAAf,CAAuBW,KAAlD,IAA4DC,SAA1E;AACA,SAAOD,KAAK,CAACb,cAAc,CAACY,GAAhB,EAAqBG,MAAM,CAACC,MAAP,CAAc;AAC3CC,IAAAA,MAAM,EAAEjB,cAAc,CAACiB,MADoB;AAE3CZ,IAAAA,IAAI,EAAEL,cAAc,CAACK,IAFsB;AAG3CK,IAAAA,OAAO,EAAEV,cAAc,CAACU,OAHmB;AAI3CQ,IAAAA,QAAQ,EAAElB,cAAc,CAACkB;AAJkB,GAAd;AAOjC;AACAlB,EAAAA,cAAc,CAACE,OARkB,CAArB,CAAL,CASFiB,IATE,CASG,MAAOtB,QAAP,IAAoB;AAC1Be,IAAAA,GAAG,GAAGf,QAAQ,CAACe,GAAf;AACAD,IAAAA,MAAM,GAAGd,QAAQ,CAACc,MAAlB;;AACA,SAAK,MAAMS,WAAX,IAA0BvB,QAAQ,CAACa,OAAnC,EAA4C;AACxCA,MAAAA,OAAO,CAACU,WAAW,CAAC,CAAD,CAAZ,CAAP,GAA0BA,WAAW,CAAC,CAAD,CAArC;AACH;;AACD,QAAI,iBAAiBV,OAArB,EAA8B;AAC1B,YAAMW,OAAO,GAAGX,OAAO,CAACY,IAAR,IAAgBZ,OAAO,CAACY,IAAR,CAAaC,KAAb,CAAmB,8BAAnB,CAAhC;AACA,YAAMC,eAAe,GAAGH,OAAO,IAAIA,OAAO,CAACI,GAAR,EAAnC;AACAxB,MAAAA,GAAG,CAACyB,IAAJ,CAAU,uBAAsB1B,cAAc,CAACiB,MAAO,IAAGjB,cAAc,CAACY,GAAI,qDAAoDF,OAAO,CAACiB,MAAO,GAAEH,eAAe,GAAI,SAAQA,eAAgB,EAA5B,GAAgC,EAAG,EAAnM;AACH;;AACD,QAAIb,MAAM,KAAK,GAAX,IAAkBA,MAAM,KAAK,GAAjC,EAAsC;AAClC;AACH,KAbyB;;;AAe1B,QAAIX,cAAc,CAACiB,MAAf,KAA0B,MAA9B,EAAsC;AAClC,UAAIN,MAAM,GAAG,GAAb,EAAkB;AACd;AACH;;AACD,YAAM,IAAIiB,yBAAJ,CAAiB/B,QAAQ,CAACgC,UAA1B,EAAsClB,MAAtC,EAA8C;AAChDd,QAAAA,QAAQ,EAAE;AACNe,UAAAA,GADM;AAEND,UAAAA,MAFM;AAGND,UAAAA,OAHM;AAINoB,UAAAA,IAAI,EAAEC;AAJA,SADsC;AAOhD7B,QAAAA,OAAO,EAAEF;AAPuC,OAA9C,CAAN;AASH;;AACD,QAAIW,MAAM,KAAK,GAAf,EAAoB;AAChB,YAAM,IAAIiB,yBAAJ,CAAiB,cAAjB,EAAiCjB,MAAjC,EAAyC;AAC3Cd,QAAAA,QAAQ,EAAE;AACNe,UAAAA,GADM;AAEND,UAAAA,MAFM;AAGND,UAAAA,OAHM;AAINoB,UAAAA,IAAI,EAAE,MAAME,eAAe,CAACnC,QAAD;AAJrB,SADiC;AAO3CK,QAAAA,OAAO,EAAEF;AAPkC,OAAzC,CAAN;AASH;;AACD,QAAIW,MAAM,IAAI,GAAd,EAAmB;AACf,YAAMmB,IAAI,GAAG,MAAME,eAAe,CAACnC,QAAD,CAAlC;AACA,YAAMoC,KAAK,GAAG,IAAIL,yBAAJ,CAAiBM,cAAc,CAACJ,IAAD,CAA/B,EAAuCnB,MAAvC,EAA+C;AACzDd,QAAAA,QAAQ,EAAE;AACNe,UAAAA,GADM;AAEND,UAAAA,MAFM;AAGND,UAAAA,OAHM;AAINoB,UAAAA;AAJM,SAD+C;AAOzD5B,QAAAA,OAAO,EAAEF;AAPgD,OAA/C,CAAd;AASA,YAAMiC,KAAN;AACH;;AACD,WAAOD,eAAe,CAACnC,QAAD,CAAtB;AACH,GA/DM,EAgEFsB,IAhEE,CAgEIW,IAAD,IAAU;AAChB,WAAO;AACHnB,MAAAA,MADG;AAEHC,MAAAA,GAFG;AAGHF,MAAAA,OAHG;AAIHoB,MAAAA;AAJG,KAAP;AAMH,GAvEM,EAwEFK,KAxEE,CAwEKF,KAAD,IAAW;AAClB,QAAIA,KAAK,YAAYL,yBAArB,EACI,MAAMK,KAAN;AACJ,UAAM,IAAIL,yBAAJ,CAAiBK,KAAK,CAACG,OAAvB,EAAgC,GAAhC,EAAqC;AACvClC,MAAAA,OAAO,EAAEF;AAD8B,KAArC,CAAN;AAGH,GA9EM,CAAP;AA+EH;;AACD,eAAegC,eAAf,CAA+BnC,QAA/B,EAAyC;AACrC,QAAMwC,WAAW,GAAGxC,QAAQ,CAACa,OAAT,CAAiB4B,GAAjB,CAAqB,cAArB,CAApB;;AACA,MAAI,oBAAoBC,IAApB,CAAyBF,WAAzB,CAAJ,EAA2C;AACvC,WAAOxC,QAAQ,CAAC2C,IAAT,EAAP;AACH;;AACD,MAAI,CAACH,WAAD,IAAgB,yBAAyBE,IAAzB,CAA8BF,WAA9B,CAApB,EAAgE;AAC5D,WAAOxC,QAAQ,CAAC4C,IAAT,EAAP;AACH;;AACD,SAAOC,iBAAS,CAAC7C,QAAD,CAAhB;AACH;;AACD,SAASqC,cAAT,CAAwBJ,IAAxB,EAA8B;AAC1B,MAAI,OAAOA,IAAP,KAAgB,QAApB,EACI,OAAOA,IAAP,CAFsB;;AAI1B,MAAI,aAAaA,IAAjB,EAAuB;AACnB,QAAIxB,KAAK,CAACC,OAAN,CAAcuB,IAAI,CAACa,MAAnB,CAAJ,EAAgC;AAC5B,aAAQ,GAAEb,IAAI,CAACM,OAAQ,KAAIN,IAAI,CAACa,MAAL,CAAYC,GAAZ,CAAgBpC,IAAI,CAACC,SAArB,EAAgCoC,IAAhC,CAAqC,IAArC,CAA2C,EAAtE;AACH;;AACD,WAAOf,IAAI,CAACM,OAAZ;AACH,GATyB;;;AAW1B,SAAQ,kBAAiB5B,IAAI,CAACC,SAAL,CAAeqB,IAAf,CAAqB,EAA9C;AACH;;ACrHc,SAASgB,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;AAC3D,QAAMC,QAAQ,GAAGF,WAAW,CAACG,QAAZ,CAAqBF,WAArB,CAAjB;;AACA,QAAMG,MAAM,GAAG,UAAUC,KAAV,EAAiBC,UAAjB,EAA6B;AACxC,UAAMC,eAAe,GAAGL,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAxB;;AACA,QAAI,CAACC,eAAe,CAACpD,OAAjB,IAA4B,CAACoD,eAAe,CAACpD,OAAhB,CAAwBsD,IAAzD,EAA+D;AAC3D,aAAOzD,YAAY,CAACkD,QAAQ,CAACQ,KAAT,CAAeH,eAAf,CAAD,CAAnB;AACH;;AACD,UAAMpD,OAAO,GAAG,CAACkD,KAAD,EAAQC,UAAR,KAAuB;AACnC,aAAOtD,YAAY,CAACkD,QAAQ,CAACQ,KAAT,CAAeR,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAf,CAAD,CAAnB;AACH,KAFD;;AAGAtC,IAAAA,MAAM,CAACC,MAAP,CAAcd,OAAd,EAAuB;AACnB+C,MAAAA,QADmB;AAEnBC,MAAAA,QAAQ,EAAEJ,YAAY,CAACY,IAAb,CAAkB,IAAlB,EAAwBT,QAAxB;AAFS,KAAvB;AAIA,WAAOK,eAAe,CAACpD,OAAhB,CAAwBsD,IAAxB,CAA6BtD,OAA7B,EAAsCoD,eAAtC,CAAP;AACH,GAbD;;AAcA,SAAOvC,MAAM,CAACC,MAAP,CAAcmC,MAAd,EAAsB;AACzBF,IAAAA,QADyB;AAEzBC,IAAAA,QAAQ,EAAEJ,YAAY,CAACY,IAAb,CAAkB,IAAlB,EAAwBT,QAAxB;AAFe,GAAtB,CAAP;AAIH;;MCjBY/C,OAAO,GAAG4C,YAAY,CAACG,iBAAD,EAAW;AAC1CvC,EAAAA,OAAO,EAAE;AACL,kBAAe,sBAAqBf,OAAQ,IAAGgE,+BAAY,EAAG;AADzD;AADiC,CAAX,CAA5B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/request/dist-src/fetch-wrapper.js index e4ae1b0..79653c4 100644 --- a/node_modules/@octokit/request/dist-src/fetch-wrapper.js +++ b/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -3,6 +3,9 @@ import nodeFetch from "node-fetch"; import { RequestError } from "@octokit/request-error"; import getBuffer from "./get-buffer-response"; export default function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { requestOptions.body = JSON.stringify(requestOptions.body); @@ -16,13 +19,21 @@ export default function fetchWrapper(requestOptions) { body: requestOptions.body, headers: requestOptions.headers, redirect: requestOptions.redirect, - }, requestOptions.request)) - .then((response) => { + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { url = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } if (status === 204 || status === 205) { return; } @@ -32,46 +43,40 @@ export default function fetchWrapper(requestOptions) { return; } throw new RequestError(response.statusText, status, { - headers, + response: { + url, + status, + headers, + data: undefined, + }, request: requestOptions, }); } if (status === 304) { throw new RequestError("Not modified", status, { - headers, + response: { + url, + status, + headers, + data: await getResponseData(response), + }, request: requestOptions, }); } if (status >= 400) { - return response - .text() - .then((message) => { - const error = new RequestError(message, status, { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, headers, - request: requestOptions, - }); - try { - let responseBody = JSON.parse(error.message); - Object.assign(error, responseBody); - let errors = responseBody.errors; - // Assumption `errors` would always be in Array format - error.message = - error.message + ": " + errors.map(JSON.stringify).join(", "); - } - catch (e) { - // ignore, see octokit/rest.js#684 - } - throw error; + data, + }, + request: requestOptions, }); + 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); + return getResponseData(response); }) .then((data) => { return { @@ -82,12 +87,33 @@ export default function fetchWrapper(requestOptions) { }; }) .catch((error) => { - if (error instanceof RequestError) { + if (error instanceof RequestError) throw error; - } throw new RequestError(error.message, 500, { - headers, request: requestOptions, }); }); } +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} diff --git a/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/request/dist-src/version.js index 8c1c723..a068c68 100644 --- a/node_modules/@octokit/request/dist-src/version.js +++ b/node_modules/@octokit/request/dist-src/version.js @@ -1 +1 @@ -export const VERSION = "5.4.14"; +export const VERSION = "5.6.3"; diff --git a/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/request/dist-types/version.d.ts index f6f6c1b..5629807 100644 --- a/node_modules/@octokit/request/dist-types/version.d.ts +++ b/node_modules/@octokit/request/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "5.4.14"; +export declare const VERSION = "5.6.3"; diff --git a/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/request/dist-web/index.js index 6323184..44359f8 100644 --- a/node_modules/@octokit/request/dist-web/index.js +++ b/node_modules/@octokit/request/dist-web/index.js @@ -4,13 +4,16 @@ import { isPlainObject } from 'is-plain-object'; import nodeFetch from 'node-fetch'; import { RequestError } from '@octokit/request-error'; -const VERSION = "5.4.14"; +const VERSION = "5.6.3"; function getBufferResponse(response) { return response.arrayBuffer(); } function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { requestOptions.body = JSON.stringify(requestOptions.body); @@ -24,13 +27,21 @@ function fetchWrapper(requestOptions) { body: requestOptions.body, headers: requestOptions.headers, redirect: requestOptions.redirect, - }, requestOptions.request)) - .then((response) => { + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { url = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } if (status === 204 || status === 205) { return; } @@ -40,46 +51,40 @@ function fetchWrapper(requestOptions) { return; } throw new RequestError(response.statusText, status, { - headers, + response: { + url, + status, + headers, + data: undefined, + }, request: requestOptions, }); } if (status === 304) { throw new RequestError("Not modified", status, { - headers, + response: { + url, + status, + headers, + data: await getResponseData(response), + }, request: requestOptions, }); } if (status >= 400) { - return response - .text() - .then((message) => { - const error = new RequestError(message, status, { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, headers, - request: requestOptions, - }); - try { - let responseBody = JSON.parse(error.message); - Object.assign(error, responseBody); - let errors = responseBody.errors; - // Assumption `errors` would always be in Array format - error.message = - error.message + ": " + errors.map(JSON.stringify).join(", "); - } - catch (e) { - // ignore, see octokit/rest.js#684 - } - throw error; + data, + }, + request: requestOptions, }); + 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); + return getResponseData(response); }) .then((data) => { return { @@ -90,15 +95,36 @@ function fetchWrapper(requestOptions) { }; }) .catch((error) => { - if (error instanceof RequestError) { + if (error instanceof RequestError) throw error; - } throw new RequestError(error.message, 500, { - headers, request: requestOptions, }); }); } +async function getResponseData(response) { + 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); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} function withDefaults(oldEndpoint, newDefaults) { const endpoint = oldEndpoint.defaults(newDefaults); diff --git a/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/request/dist-web/index.js.map index b25fbfa..b3cda51 100644 --- a/node_modules/@octokit/request/dist-web/index.js.map +++ b/node_modules/@octokit/request/dist-web/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.4.14\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, requestOptions.request))\n .then((response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n headers,\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n headers,\n request: requestOptions,\n });\n }\n if (status >= 400) {\n return response\n .text()\n .then((message) => {\n const error = new RequestError(message, status, {\n headers,\n request: requestOptions,\n });\n try {\n let responseBody = JSON.parse(error.message);\n Object.assign(error, responseBody);\n let errors = responseBody.errors;\n // Assumption `errors` would always be in Array format\n error.message =\n error.message + \": \" + errors.map(JSON.stringify).join(\", \");\n }\n catch (e) {\n // ignore, see octokit/rest.js#684\n }\n throw error;\n });\n }\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError) {\n throw error;\n }\n throw new RequestError(error.message, 500, {\n headers,\n request: requestOptions,\n });\n });\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA3B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACpD,IAAI,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;AACrD,IAAI,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;AAC1C,QAAQ,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK;AACL,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC;AACxF,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACnD,QAAQ,MAAM,EAAE,cAAc,CAAC,MAAM;AACrC,QAAQ,IAAI,EAAE,cAAc,CAAC,IAAI;AACjC,QAAQ,OAAO,EAAE,cAAc,CAAC,OAAO;AACvC,QAAQ,QAAQ,EAAE,cAAc,CAAC,QAAQ;AACzC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;AAC/B,SAAS,IAAI,CAAC,CAAC,QAAQ,KAAK;AAC5B,QAAQ,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC3B,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,QAAQ,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;AACpD,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;AAC9C,YAAY,OAAO;AACnB,SAAS;AACT;AACA,QAAQ,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9C,YAAY,IAAI,MAAM,GAAG,GAAG,EAAE;AAC9B,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;AAChE,gBAAgB,OAAO;AACvB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;AAC3D,gBAAgB,OAAO;AACvB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE;AAC3B,YAAY,OAAO,QAAQ;AAC3B,iBAAiB,IAAI,EAAE;AACvB,iBAAiB,IAAI,CAAC,CAAC,OAAO,KAAK;AACnC,gBAAgB,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE;AAChE,oBAAoB,OAAO;AAC3B,oBAAoB,OAAO,EAAE,cAAc;AAC3C,iBAAiB,CAAC,CAAC;AACnB,gBAAgB,IAAI;AACpB,oBAAoB,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACjE,oBAAoB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AACvD,oBAAoB,IAAI,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;AACrD;AACA,oBAAoB,KAAK,CAAC,OAAO;AACjC,wBAAwB,KAAK,CAAC,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrF,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,EAAE;AAC1B;AACA,iBAAiB;AACjB,gBAAgB,MAAM,KAAK,CAAC;AAC5B,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACjE,QAAQ,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACnD,YAAY,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACnC,SAAS;AACT,QAAQ,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACxE,YAAY,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACnC,SAAS;AACT,QAAQ,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;AACnC,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK;AACxB,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,GAAG;AACf,YAAY,OAAO;AACnB,YAAY,IAAI;AAChB,SAAS,CAAC;AACV,KAAK,CAAC;AACN,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1B,QAAQ,IAAI,KAAK,YAAY,YAAY,EAAE;AAC3C,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;AACnD,YAAY,OAAO;AACnB,YAAY,OAAO,EAAE,cAAc;AACnC,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;;AC3Fc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACvD,IAAI,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;AAChD,QAAQ,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;AACvE,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;AAC/C,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AAC/B,YAAY,QAAQ;AACpB,YAAY,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACtE,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,CAAC;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,CAAC,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.6.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA3B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACpD,IAAI,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;AACrD,IAAI,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG;AACpE,UAAU,cAAc,CAAC,OAAO,CAAC,GAAG;AACpC,UAAU,OAAO,CAAC;AAClB,IAAI,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;AAC1C,QAAQ,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK;AACL,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC;AACxF,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACnD,QAAQ,MAAM,EAAE,cAAc,CAAC,MAAM;AACrC,QAAQ,IAAI,EAAE,cAAc,CAAC,IAAI;AACjC,QAAQ,OAAO,EAAE,cAAc,CAAC,OAAO;AACvC,QAAQ,QAAQ,EAAE,cAAc,CAAC,QAAQ;AACzC,KAAK;AACL;AACA;AACA,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC5B,SAAS,IAAI,CAAC,OAAO,QAAQ,KAAK;AAClC,QAAQ,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC3B,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,QAAQ,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;AACpD,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,aAAa,IAAI,OAAO,EAAE;AACtC,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC/F,YAAY,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7D,YAAY,GAAG,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,kDAAkD,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClN,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;AAC9C,YAAY,OAAO;AACnB,SAAS;AACT;AACA,QAAQ,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9C,YAAY,IAAI,MAAM,GAAG,GAAG,EAAE;AAC9B,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;AAChE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,SAAS;AACnC,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;AAC3D,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,MAAM,eAAe,CAAC,QAAQ,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE;AAC3B,YAAY,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;AACzE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI;AACxB,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzC,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK;AACxB,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,GAAG;AACf,YAAY,OAAO;AACnB,YAAY,IAAI;AAChB,SAAS,CAAC;AACV,KAAK,CAAC;AACN,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1B,QAAQ,IAAI,KAAK,YAAY,YAAY;AACzC,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;AACnD,YAAY,OAAO,EAAE,cAAc;AACnC,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;AACD,eAAe,eAAe,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC7D,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AAC/C,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACpE,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AACD,SAAS,cAAc,CAAC,IAAI,EAAE;AAC9B,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AAChC,QAAQ,OAAO,IAAI,CAAC;AACpB;AACA,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE;AAC3B,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACxC,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpF,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL;AACA,IAAI,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;;ACrHc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACvD,IAAI,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;AAChD,QAAQ,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;AACvE,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;AAC/C,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AAC/B,YAAY,QAAQ;AACpB,YAAY,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACtE,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,CAAC;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/package.json b/node_modules/@octokit/request/package.json index 72173fc..e38c955 100644 --- a/node_modules/@octokit/request/package.json +++ b/node_modules/@octokit/request/package.json @@ -1,91 +1,56 @@ { - "_from": "@octokit/request@^5.4.12", - "_id": "@octokit/request@5.4.14", - "_inBundle": false, - "_integrity": "sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==", - "_location": "/@octokit/request", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/request@^5.4.12", - "name": "@octokit/request", - "escapedName": "@octokit%2frequest", - "scope": "@octokit", - "rawSpec": "^5.4.12", - "saveSpec": null, - "fetchSpec": "^5.4.12" - }, - "_requiredBy": [ - "/@octokit/core", - "/@octokit/graphql" + "name": "@octokit/request", + "description": "Send parameterized requests to GitHub's APIs with sensible defaults in browsers and Node", + "version": "5.6.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.14.tgz", - "_shasum": "ec5f96f78333bb2af390afa5ff66f114b063bc96", - "_spec": "@octokit/request@^5.4.12", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\core", - "bugs": { - "url": "https://github.com/octokit/request.js/issues" - }, - "bundleDependencies": false, + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "repository": "github:octokit/request.js", "dependencies": { "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.0.0", - "@octokit/types": "^6.7.1", - "deprecation": "^2.0.0", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.1", - "once": "^1.4.0", + "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" }, - "deprecated": false, - "description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node", "devDependencies": { - "@octokit/auth-app": "^2.1.2", + "@octokit/auth-app": "^3.0.0", "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-web": "^0.9.0", "@pika/plugin-ts-standard-pkg": "^0.9.0", "@types/fetch-mock": "^7.2.4", - "@types/jest": "^26.0.0", + "@types/jest": "^27.0.0", "@types/lolex": "^5.1.0", "@types/node": "^14.0.0", "@types/node-fetch": "^2.3.3", "@types/once": "^1.4.0", "fetch-mock": "^9.3.1", - "jest": "^26.0.1", + "jest": "^27.0.0", "lolex": "^6.0.0", - "prettier": "^2.0.1", - "semantic-release": "^17.0.0", + "prettier": "2.4.1", + "semantic-release": "^18.0.0", "semantic-release-plugin-update-version-in-files": "^1.0.0", - "ts-jest": "^26.1.0", + "string-to-arraybuffer": "^1.0.2", + "ts-jest": "^27.0.0", "typescript": "^4.0.2" }, - "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.4.14" + "main": "dist-node/index.js", + "module": "dist-web/index.js" } diff --git a/node_modules/@octokit/types/README.md b/node_modules/@octokit/types/README.md index 3c34447..c48ce42 100644 --- a/node_modules/@octokit/types/README.md +++ b/node_modules/@octokit/types/README.md @@ -27,7 +27,8 @@ See all exported types at https://octokit.github.io/types.ts ```ts import { Endpoints } from "@octokit/types"; -type listUserReposParameters = Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; async function listRepos( diff --git a/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/types/dist-node/index.js index 03e4f7f..b3c252b 100644 --- a/node_modules/@octokit/types/dist-node/index.js +++ b/node_modules/@octokit/types/dist-node/index.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); -const VERSION = "6.10.0"; +const VERSION = "6.41.0"; exports.VERSION = VERSION; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/types/dist-src/VERSION.js index aefa712..45a11b8 100644 --- a/node_modules/@octokit/types/dist-src/VERSION.js +++ b/node_modules/@octokit/types/dist-src/VERSION.js @@ -1 +1 @@ -export const VERSION = "6.10.0"; +export const VERSION = "6.41.0"; diff --git a/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts index 19ffff8..28fdfb8 100644 --- a/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts +++ b/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -11,7 +11,7 @@ export declare type OctokitResponse = { */ url: Url; /** - * This is the data you would see in https://developer.Octokit.com/v3/ + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference */ data: T; }; diff --git a/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/types/dist-types/VERSION.d.ts index 4510d46..dc24575 100644 --- a/node_modules/@octokit/types/dist-types/VERSION.d.ts +++ b/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -1 +1 @@ -export declare const VERSION = "6.10.0"; +export declare const VERSION = "6.41.0"; diff --git a/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts index 6f597d3..3fe7cf8 100644 --- a/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts +++ b/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -29,7 +29,7 @@ declare type Operation> : ExtractOctokitResponse : ExtractOctokitResponse; + response: ExtractOctokitResponse; }; declare type MethodsMap = { delete: "DELETE"; @@ -38,7 +38,7 @@ declare type MethodsMap = { post: "POST"; put: "PUT"; }; -declare type SuccessStatuses = 200 | 201 | 204; +declare type SuccessStatuses = 200 | 201 | 202 | 204; declare type RedirectStatuses = 301 | 302; declare type EmptyResponseStatuses = 201 | 204; declare type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; @@ -56,125 +56,13 @@ declare type DataType = { [K in KnownJsonResponseTypes & keyof T]: T[K]; }[KnownJsonResponseTypes & keyof T]; declare type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; -declare type EndpointsWithMissingRequiredResponseDataSchema = { - "/app/hook/config": "get" | "patch"; - "/app/installations/{installation_id}/access_tokens": "post"; - "/emojis": "get"; - "/enterprises/{enterprise}/actions/permissions": "get"; - "/enterprises/{enterprise}/actions/permissions/organizations": "get"; - "/enterprises/{enterprise}/actions/permissions/selected-actions": "get"; - "/enterprises/{enterprise}/actions/runner-groups": "get" | "post"; - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": "get" | "patch"; - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": "get"; - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": "get"; - "/enterprises/{enterprise}/actions/runners": "get"; - "/enterprises/{enterprise}/actions/runners/downloads": "get"; - "/enterprises/{enterprise}/settings/billing/actions": "get"; - "/enterprises/{enterprise}/settings/billing/packages": "get"; - "/enterprises/{enterprise}/settings/billing/shared-storage": "get"; - "/installation/repositories": "get"; - "/notifications": "get"; - "/notifications/threads/{thread_id}": "get"; - "/orgs/{org}/actions/permissions": "get"; - "/orgs/{org}/actions/permissions/repositories": "get"; - "/orgs/{org}/actions/permissions/selected-actions": "get"; - "/orgs/{org}/actions/runner-groups": "get" | "post"; - "/orgs/{org}/actions/runner-groups/{runner_group_id}": "get" | "patch"; - "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": "get"; - "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": "get"; - "/orgs/{org}/actions/runners": "get"; - "/orgs/{org}/actions/runners/downloads": "get"; - "/orgs/{org}/actions/secrets": "get"; - "/orgs/{org}/actions/secrets/{secret_name}/repositories": "get"; - "/orgs/{org}/hooks/{hook_id}/config": "get" | "patch"; - "/orgs/{org}/installations": "get"; - "/orgs/{org}/invitations": "get" | "post"; - "/orgs/{org}/settings/billing/actions": "get"; - "/orgs/{org}/settings/billing/packages": "get"; - "/orgs/{org}/settings/billing/shared-storage": "get"; - "/orgs/{org}/team-sync/groups": "get"; - "/orgs/{org}/teams/{team_slug}/invitations": "get"; - "/orgs/{org}/teams/{team_slug}/projects": "get"; - "/orgs/{org}/teams/{team_slug}/projects/{project_id}": "get"; - "/orgs/{org}/teams/{team_slug}/team-sync/group-mappings": "get" | "patch"; - "/projects/columns/cards/{card_id}/moves": "post"; - "/projects/columns/{column_id}/moves": "post"; - "/repos/{owner}/{repo}/actions/artifacts": "get"; - "/repos/{owner}/{repo}/actions/permissions": "get"; - "/repos/{owner}/{repo}/actions/permissions/selected-actions": "get"; - "/repos/{owner}/{repo}/actions/runners": "get"; - "/repos/{owner}/{repo}/actions/runners/downloads": "get"; - "/repos/{owner}/{repo}/actions/runs": "get"; - "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": "get"; - "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": "get"; - "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": "get"; - "/repos/{owner}/{repo}/actions/secrets": "get"; - "/repos/{owner}/{repo}/actions/workflows": "get"; - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": "get"; - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": "get"; - "/repos/{owner}/{repo}/check-suites/preferences": "patch"; - "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": "get"; - "/repos/{owner}/{repo}/code-scanning/alerts": "get"; - "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": "get" | "patch"; - "/repos/{owner}/{repo}/code-scanning/analyses": "get"; - "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": "get"; - "/repos/{owner}/{repo}/commits/{ref}/check-runs": "get"; - "/repos/{owner}/{repo}/commits/{ref}/check-suites": "get"; - "/repos/{owner}/{repo}/commits/{ref}/statuses": "get"; - "/repos/{owner}/{repo}/contents/{path}": "put" | "delete"; - "/repos/{owner}/{repo}/git/blobs": "post"; - "/repos/{owner}/{repo}/git/commits": "post"; - "/repos/{owner}/{repo}/git/commits/{commit_sha}": "get"; - "/repos/{owner}/{repo}/git/matching-refs/{ref}": "get"; - "/repos/{owner}/{repo}/git/ref/{ref}": "get"; - "/repos/{owner}/{repo}/git/refs": "post"; - "/repos/{owner}/{repo}/git/refs/{ref}": "patch"; - "/repos/{owner}/{repo}/hooks/{hook_id}/config": "get" | "patch"; - "/repos/{owner}/{repo}/issues/{issue_number}/events": "get"; - "/repos/{owner}/{repo}/issues/{issue_number}/timeline": "get"; - "/repos/{owner}/{repo}/keys": "get" | "post"; - "/repos/{owner}/{repo}/keys/{key_id}": "get"; - "/repos/{owner}/{repo}/languages": "get"; - "/repos/{owner}/{repo}/notifications": "get"; - "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": "get"; - "/repos/{owner}/{repo}/stats/participation": "get"; - "/repos/{owner}/{repo}/statuses/{sha}": "post"; - "/repos/{owner}/{repo}/topics": "get" | "put"; - "/scim/v2/enterprises/{enterprise}/Groups": "get" | "post"; - "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": "get" | "put" | "patch"; - "/scim/v2/enterprises/{enterprise}/Users": "get" | "post"; - "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": "get" | "put" | "patch"; - "/search/code": "get"; - "/search/commits": "get"; - "/search/issues": "get"; - "/search/labels": "get"; - "/search/repositories": "get"; - "/search/topics": "get"; - "/search/users": "get"; - "/teams/{team_id}/invitations": "get"; - "/teams/{team_id}/projects": "get"; - "/teams/{team_id}/projects/{project_id}": "get"; - "/teams/{team_id}/team-sync/group-mappings": "get" | "patch"; - "/user/installations": "get"; - "/user/installations/{installation_id}/repositories": "get"; - "/user/keys": "get" | "post"; - "/user/keys/{key_id}": "get"; - "/users/{username}/settings/billing/actions": "get"; - "/users/{username}/settings/billing/packages": "get"; - "/users/{username}/settings/billing/shared-storage": "get"; -}; -declare type NotNill = T extends null | undefined ? never : T; -declare type Primitive = undefined | null | boolean | string | number | Function; -declare type DeepRequired = T extends Primitive ? NotNill : { - [P in keyof T]-?: T[P] extends Array ? Array> : T[P] extends ReadonlyArray ? DeepRequired : DeepRequired; -}; export interface Endpoints { /** - * @see https://docs.github.com/v3/apps/#delete-an-installation-for-the-authenticated-app + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app */ "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; /** - * @see https://docs.github.com/v3/apps/#unsuspend-an-app-installation + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation */ "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; /** @@ -185,44 +73,44 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization */ "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; - /** - * @see https://docs.github.com/rest/reference/apps#revoke-a-grant-for-an-application - */ - "DELETE /applications/{client_id}/grants/{access_token}": Operation<"/applications/{client_id}/grants/{access_token}", "delete">; /** * @see https://docs.github.com/rest/reference/apps#delete-an-app-token */ "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; - /** - * @see https://docs.github.com/rest/reference/apps#revoke-an-authorization-for-an-application - */ - "DELETE /applications/{client_id}/tokens/{access_token}": Operation<"/applications/{client_id}/tokens/{access_token}", "delete">; /** * @see https://docs.github.com/rest/reference/oauth-authorizations#delete-an-authorization */ "DELETE /authorizations/{authorization_id}": Operation<"/authorizations/{authorization_id}", "delete">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#disable-a-selected-organization-for-github-actions-in-an-enterprise + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-organization-for-github-actions-in-an-enterprise */ "DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "delete">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#delete-a-self-hosted-runner-group-from-an-enterprise + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-enterprise */ "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "delete">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + * @see https://docs.github.com/rest/reference/actions#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise */ "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "delete">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise */ "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#delete-self-hosted-runner-from-an-enterprise + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise */ "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; /** - * @see https://docs.github.com/v3/gists/#delete-a-gist + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist */ "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; /** @@ -230,7 +118,7 @@ export interface Endpoints { */ "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; /** - * @see https://docs.github.com/v3/gists/#unstar-a-gist + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist */ "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; /** @@ -261,6 +149,14 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization */ "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; /** * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret */ @@ -274,9 +170,17 @@ export interface Endpoints { */ "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; /** - * @see https://docs.github.com/v3/orgs/#remove-a-saml-sso-authorization-for-an-organization + * @see https://docs.github.com/rest/reference/orgs#remove-a-saml-sso-authorization-for-an-organization */ "DELETE /orgs/{org}/credential-authorizations/{credential_id}": Operation<"/orgs/{org}/credential-authorizations/{credential_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; /** * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook */ @@ -293,6 +197,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member */ "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; /** * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user */ @@ -300,11 +208,11 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive */ - "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete", "wyandotte">; + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; /** * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository */ - "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete", "wyandotte">; + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; /** * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization */ @@ -322,7 +230,7 @@ export interface Endpoints { */ "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; /** - * @see https://docs.github.com/v3/teams/#delete-a-team + * @see https://docs.github.com/rest/reference/teams#delete-a-team */ "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; /** @@ -334,57 +242,73 @@ export interface Endpoints { */ "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; /** - * @see https://docs.github.com/v3/reactions/#delete-team-discussion-comment-reaction + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction */ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete", "squirrel-girl">; + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; /** - * @see https://docs.github.com/v3/reactions/#delete-team-discussion-reaction + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction */ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete", "squirrel-girl">; + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#unlink-external-idp-group-team-connection + */ + "DELETE /orgs/{org}/teams/{team_slug}/external-groups": Operation<"/orgs/{org}/teams/{team_slug}/external-groups", "delete">; /** * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user */ "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; /** - * @see https://docs.github.com/v3/teams/#remove-a-project-from-a-team + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team */ "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; /** - * @see https://docs.github.com/v3/teams/#remove-a-repository-from-a-team + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team */ "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; /** * @see https://docs.github.com/rest/reference/projects#delete-a-project-card */ - "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete", "inertia">; + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; /** * @see https://docs.github.com/rest/reference/projects#delete-a-project-column */ - "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete", "inertia">; + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; /** - * @see https://docs.github.com/v3/projects/#delete-a-project + * @see https://docs.github.com/rest/reference/projects#delete-a-project */ - "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete", "inertia">; + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; /** * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator */ - "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete", "inertia">; - /** - * @see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy - */ - "DELETE /reactions/{reaction_id}": Operation<"/reactions/{reaction_id}", "delete", "squirrel-girl">; + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; /** - * @see https://docs.github.com/v3/repos/#delete-a-repository + * @see https://docs.github.com/rest/reference/repos#delete-a-repository */ "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; /** * @see https://docs.github.com/rest/reference/actions#delete-an-artifact */ "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; /** * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository */ "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; /** * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run */ @@ -398,9 +322,13 @@ export interface Endpoints { */ "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; /** - * @see https://docs.github.com/v3/repos/#disable-automated-security-fixes + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes */ - "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete", "london">; + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; /** * @see https://docs.github.com/rest/reference/repos#delete-branch-protection */ @@ -416,7 +344,7 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/repos#delete-commit-signature-protection */ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete", "zzzax">; + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; /** * @see https://docs.github.com/rest/reference/repos#remove-status-check-protection */ @@ -445,6 +373,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository */ "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; /** * @see https://docs.github.com/rest/reference/repos#remove-a-repository-collaborator */ @@ -454,17 +386,25 @@ export interface Endpoints { */ "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; /** - * @see https://docs.github.com/v3/reactions/#delete-a-commit-comment-reaction + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction */ - "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete", "squirrel-girl">; + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; /** * @see https://docs.github.com/rest/reference/repos#delete-a-file */ "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; /** * @see https://docs.github.com/rest/reference/repos#delete-a-deployment */ "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; /** * @see https://docs.github.com/rest/reference/git#delete-a-reference */ @@ -490,9 +430,9 @@ export interface Endpoints { */ "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; /** - * @see https://docs.github.com/v3/reactions/#delete-an-issue-comment-reaction + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction */ - "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete", "squirrel-girl">; + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; /** * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue */ @@ -506,13 +446,13 @@ export interface Endpoints { */ "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; /** - * @see https://docs.github.com/v3/issues/#unlock-an-issue + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue */ "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; /** - * @see https://docs.github.com/v3/reactions/#delete-an-issue-reaction + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction */ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete", "squirrel-girl">; + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; /** * @see https://docs.github.com/rest/reference/repos#delete-a-deploy-key */ @@ -521,6 +461,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/issues#delete-a-label */ "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; /** * @see https://docs.github.com/rest/reference/issues#delete-a-milestone */ @@ -528,15 +472,15 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/repos#delete-a-github-pages-site */ - "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete", "switcheroo">; + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; /** * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request */ "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; /** - * @see https://docs.github.com/v3/reactions/#delete-a-pull-request-comment-reaction + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction */ - "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete", "squirrel-girl">; + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; /** * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request */ @@ -553,14 +497,26 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#delete-a-release */ "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; /** * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription */ "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; /** - * @see https://docs.github.com/v3/repos/#disable-vulnerability-alerts + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository */ - "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete", "dorian">; + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; /** * @see https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-group-from-an-enterprise */ @@ -570,11 +526,11 @@ export interface Endpoints { */ "DELETE /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "delete">; /** - * @see https://docs.github.com/v3/scim/#delete-a-scim-user-from-an-organization + * @see https://docs.github.com/rest/reference/scim#delete-a-scim-user-from-an-organization */ "DELETE /scim/v2/organizations/{org}/Users/{scim_user_id}": Operation<"/scim/v2/organizations/{org}/Users/{scim_user_id}", "delete">; /** - * @see https://docs.github.com/v3/teams/#delete-a-team-legacy + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy */ "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; /** @@ -594,17 +550,29 @@ export interface Endpoints { */ "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; /** - * @see https://docs.github.com/v3/teams/#remove-a-project-from-a-team-legacy + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy */ "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; /** - * @see https://docs.github.com/v3/teams/#remove-a-repository-from-a-team-legacy + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy */ "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; /** * @see https://docs.github.com/rest/reference/users#unblock-a-user */ "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; /** * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user */ @@ -632,11 +600,11 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive */ - "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete", "wyandotte">; + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; /** * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository */ - "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete", "wyandotte">; + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; /** * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user */ @@ -654,23 +622,39 @@ export interface Endpoints { */ "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; /** - * @see + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint */ "GET /": Operation<"/", "get">; /** - * @see https://docs.github.com/v3/apps/#get-the-authenticated-app + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app */ "GET /app": Operation<"/app", "get">; /** - * @see https://docs.github.com/v3/apps#get-a-webhook-configuration-for-an-app + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app */ "GET /app/hook/config": Operation<"/app/hook/config", "get">; /** - * @see https://docs.github.com/v3/apps/#list-installations-for-the-authenticated-app + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app */ "GET /app/installations": Operation<"/app/installations", "get">; /** - * @see https://docs.github.com/v3/apps/#get-an-installation-for-the-authenticated-app + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app */ "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; /** @@ -682,11 +666,7 @@ export interface Endpoints { */ "GET /applications/grants/{grant_id}": Operation<"/applications/grants/{grant_id}", "get">; /** - * @see https://docs.github.com/rest/reference/apps#check-an-authorization - */ - "GET /applications/{client_id}/tokens/{access_token}": Operation<"/applications/{client_id}/tokens/{access_token}", "get">; - /** - * @see https://docs.github.com/v3/apps/#get-an-app + * @see https://docs.github.com/rest/reference/apps/#get-an-app */ "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; /** @@ -698,71 +678,99 @@ export interface Endpoints { */ "GET /authorizations/{authorization_id}": Operation<"/authorizations/{authorization_id}", "get">; /** - * @see https://docs.github.com/v3/codes_of_conduct/#get-all-codes-of-conduct + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct */ - "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get", "scarlet-witch">; + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; /** - * @see https://docs.github.com/v3/codes_of_conduct/#get-a-code-of-conduct + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct */ - "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get", "scarlet-witch">; + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; /** - * @see https://docs.github.com/v3/emojis/#get-emojis + * @see https://docs.github.com/rest/reference/emojis#get-emojis */ "GET /emojis": Operation<"/emojis", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#get-github-actions-permissions-for-an-enterprise + * @see https://docs.github.com/rest/reference/enterprise-admin#get-github-enterprise-server-statistics + */ + "GET /enterprise-installation/{enterprise_or_org}/server-statistics": Operation<"/enterprise-installation/{enterprise_or_org}/server-statistics", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/cache/usage": Operation<"/enterprises/{enterprise}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/permissions": Operation<"/enterprises/{enterprise}/actions/permissions", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-selected-organizations-enabled-for-github-actions-in-an-enterprise + * @see https://docs.github.com/rest/reference/actions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise */ "GET /enterprises/{enterprise}/actions/permissions/organizations": Operation<"/enterprises/{enterprise}/actions/permissions/organizations", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#get-allowed-actions-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/permissions/selected-actions": Operation<"/enterprises/{enterprise}/actions/permissions/selected-actions", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runner-groups-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/workflow": Operation<"/enterprises/{enterprise}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#get-a-self-hosted-runner-group-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise + * @see https://docs.github.com/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise */ "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runners-in-a-group-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runners-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runners": Operation<"/enterprises/{enterprise}/actions/runners", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#list-runner-applications-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runners/downloads": Operation<"/enterprises/{enterprise}/actions/runners/downloads", "get">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#get-a-self-hosted-runner-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-enterprise */ "GET /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; /** * @see https://docs.github.com/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise */ "GET /enterprises/{enterprise}/audit-log": Operation<"/enterprises/{enterprise}/audit-log", "get">; /** - * @see https://docs.github.com/v3/billing/#get-github-actions-billing-for-an-enterprise + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code-scanning/alerts": Operation<"/enterprises/{enterprise}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-enterprise */ "GET /enterprises/{enterprise}/settings/billing/actions": Operation<"/enterprises/{enterprise}/settings/billing/actions", "get">; /** - * @see https://docs.github.com/v3/billing/#get-github-packages-billing-for-an-enterprise + * @see https://docs.github.com/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise + */ + "GET /enterprises/{enterprise}/settings/billing/advanced-security": Operation<"/enterprises/{enterprise}/settings/billing/advanced-security", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-enterprise */ "GET /enterprises/{enterprise}/settings/billing/packages": Operation<"/enterprises/{enterprise}/settings/billing/packages", "get">; /** - * @see https://docs.github.com/v3/billing/#get-shared-storage-billing-for-an-enterprise + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-enterprise */ "GET /enterprises/{enterprise}/settings/billing/shared-storage": Operation<"/enterprises/{enterprise}/settings/billing/shared-storage", "get">; /** @@ -774,19 +782,19 @@ export interface Endpoints { */ "GET /feeds": Operation<"/feeds", "get">; /** - * @see https://docs.github.com/v3/gists/#list-gists-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user */ "GET /gists": Operation<"/gists", "get">; /** - * @see https://docs.github.com/v3/gists/#list-public-gists + * @see https://docs.github.com/rest/reference/gists#list-public-gists */ "GET /gists/public": Operation<"/gists/public", "get">; /** - * @see https://docs.github.com/v3/gists/#list-starred-gists + * @see https://docs.github.com/rest/reference/gists#list-starred-gists */ "GET /gists/starred": Operation<"/gists/starred", "get">; /** - * @see https://docs.github.com/v3/gists/#get-a-gist + * @see https://docs.github.com/rest/reference/gists#get-a-gist */ "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; /** @@ -798,27 +806,27 @@ export interface Endpoints { */ "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; /** - * @see https://docs.github.com/v3/gists/#list-gist-commits + * @see https://docs.github.com/rest/reference/gists#list-gist-commits */ "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; /** - * @see https://docs.github.com/v3/gists/#list-gist-forks + * @see https://docs.github.com/rest/reference/gists#list-gist-forks */ "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; /** - * @see https://docs.github.com/v3/gists/#check-if-a-gist-is-starred + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred */ "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; /** - * @see https://docs.github.com/v3/gists/#get-a-gist-revision + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision */ "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; /** - * @see https://docs.github.com/v3/gitignore/#get-all-gitignore-templates + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates */ "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; /** - * @see https://docs.github.com/v3/gitignore/#get-a-gitignore-template + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template */ "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; /** @@ -826,15 +834,15 @@ export interface Endpoints { */ "GET /installation/repositories": Operation<"/installation/repositories", "get">; /** - * @see https://docs.github.com/v3/issues/#list-issues-assigned-to-the-authenticated-user + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user */ "GET /issues": Operation<"/issues", "get">; /** - * @see https://docs.github.com/v3/licenses/#get-all-commonly-used-licenses + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses */ "GET /licenses": Operation<"/licenses", "get">; /** - * @see https://docs.github.com/v3/licenses/#get-a-license + * @see https://docs.github.com/rest/reference/licenses#get-a-license */ "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; /** @@ -862,7 +870,7 @@ export interface Endpoints { */ "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; /** - * @see https://docs.github.com/v3/meta/#get-github-meta-information + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information */ "GET /meta": Operation<"/meta", "get">; /** @@ -882,17 +890,38 @@ export interface Endpoints { */ "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; /** - * @see + * @see https://docs.github.com/rest/reference/meta#get-octocat */ "GET /octocat": Operation<"/octocat", "get">; /** - * @see https://docs.github.com/v3/orgs/#list-organizations + * @see https://docs.github.com/rest/reference/orgs#list-organizations */ "GET /organizations": Operation<"/organizations", "get">; /** - * @see https://docs.github.com/v3/orgs/#get-an-organization + * @see https://docs.github.com/rest/reference/orgs#list-custom-repository-roles-in-an-organization + */ + "GET /organizations/{organization_id}/custom_roles": Operation<"/organizations/{organization_id}/custom_roles", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization */ "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; /** * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization */ @@ -905,6 +934,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization */ "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; /** * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization */ @@ -933,6 +966,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization */ "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; /** * @see https://docs.github.com/rest/reference/actions#list-organization-secrets */ @@ -950,7 +987,7 @@ export interface Endpoints { */ "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; /** - * @see https://docs.github.com/rest/reference/orgs#get-the-audit-log-for-an-organization + * @see https://docs.github.com/rest/reference/orgs#get-audit-log */ "GET /orgs/{org}/audit-log": Operation<"/orgs/{org}/audit-log", "get">; /** @@ -962,13 +999,45 @@ export interface Endpoints { */ "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; /** - * @see https://docs.github.com/v3/orgs/#list-saml-sso-authorizations-for-an-organization + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-saml-sso-authorizations-for-an-organization */ "GET /orgs/{org}/credential-authorizations": Operation<"/orgs/{org}/credential-authorizations", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; /** * @see https://docs.github.com/rest/reference/activity#list-public-organization-events */ "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#external-idp-group-info-for-an-organization + */ + "GET /orgs/{org}/external-group/{group_id}": Operation<"/orgs/{org}/external-group/{group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-external-idp-groups-for-an-organization + */ + "GET /orgs/{org}/external-groups": Operation<"/orgs/{org}/external-groups", "get">; /** * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations */ @@ -982,15 +1051,23 @@ export interface Endpoints { */ "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; /** - * @see https://docs.github.com/v3/orgs#get-a-webhook-configuration-for-an-organization + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization */ "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; /** - * @see https://docs.github.com/v3/apps/#get-an-organization-installation-for-the-authenticated-app + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app */ "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; /** - * @see https://docs.github.com/v3/orgs/#list-app-installations-for-an-organization + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization */ "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; /** @@ -1006,7 +1083,7 @@ export interface Endpoints { */ "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; /** - * @see https://docs.github.com/v3/issues/#list-organization-issues-assigned-to-the-authenticated-user + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user */ "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; /** @@ -1024,29 +1101,33 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations */ - "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get", "wyandotte">; + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; /** * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status */ - "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get", "wyandotte">; + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; /** * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive */ - "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get", "wyandotte">; + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; /** * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration */ - "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get", "wyandotte">; + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; /** * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization */ "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; /** * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization */ "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; /** - * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization */ "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; /** @@ -1054,9 +1135,9 @@ export interface Endpoints { */ "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; /** - * @see https://docs.github.com/v3/projects/#list-organization-projects + * @see https://docs.github.com/rest/reference/projects#list-organization-projects */ - "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get", "inertia">; + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; /** * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members */ @@ -1066,19 +1147,27 @@ export interface Endpoints { */ "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; /** - * @see https://docs.github.com/v3/repos/#list-organization-repositories + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories */ "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; /** - * @see https://docs.github.com/v3/billing/#get-github-actions-billing-for-an-organization + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization */ "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; /** - * @see https://docs.github.com/v3/billing/#get-github-packages-billing-for-an-organization + * @see https://docs.github.com/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization + */ + "GET /orgs/{org}/settings/billing/advanced-security": Operation<"/orgs/{org}/settings/billing/advanced-security", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization */ "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; /** - * @see https://docs.github.com/v3/billing/#get-shared-storage-billing-for-an-organization + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization */ "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; /** @@ -1086,11 +1175,11 @@ export interface Endpoints { */ "GET /orgs/{org}/team-sync/groups": Operation<"/orgs/{org}/team-sync/groups", "get">; /** - * @see https://docs.github.com/v3/teams/#list-teams + * @see https://docs.github.com/rest/reference/teams#list-teams */ "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; /** - * @see https://docs.github.com/v3/teams/#get-a-team-by-name + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name */ "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; /** @@ -1110,13 +1199,17 @@ export interface Endpoints { */ "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion */ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get", "squirrel-girl">; + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-team-discussion + * @see https://docs.github.com/rest/reference/teams#list-external-idp-group-team-connection */ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get", "squirrel-girl">; + "GET /orgs/{org}/teams/{team_slug}/external-groups": Operation<"/orgs/{org}/teams/{team_slug}/external-groups", "get">; /** * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations */ @@ -1130,19 +1223,19 @@ export interface Endpoints { */ "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; /** - * @see https://docs.github.com/v3/teams/#list-team-projects + * @see https://docs.github.com/rest/reference/teams#list-team-projects */ - "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get", "inertia">; + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; /** - * @see https://docs.github.com/v3/teams/#check-team-permissions-for-a-project + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project */ - "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get", "inertia">; + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; /** - * @see https://docs.github.com/v3/teams/#list-team-repositories + * @see https://docs.github.com/rest/reference/teams#list-team-repositories */ "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; /** - * @see https://docs.github.com/v3/teams/#check-team-permissions-for-a-repository + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository */ "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; /** @@ -1150,43 +1243,43 @@ export interface Endpoints { */ "GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings": Operation<"/orgs/{org}/teams/{team_slug}/team-sync/group-mappings", "get">; /** - * @see https://docs.github.com/v3/teams/#list-child-teams + * @see https://docs.github.com/rest/reference/teams#list-child-teams */ "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; /** * @see https://docs.github.com/rest/reference/projects#get-a-project-card */ - "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get", "inertia">; + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; /** * @see https://docs.github.com/rest/reference/projects#get-a-project-column */ - "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get", "inertia">; + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; /** * @see https://docs.github.com/rest/reference/projects#list-project-cards */ - "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get", "inertia">; + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; /** - * @see https://docs.github.com/v3/projects/#get-a-project + * @see https://docs.github.com/rest/reference/projects#get-a-project */ - "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get", "inertia">; + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; /** * @see https://docs.github.com/rest/reference/projects#list-project-collaborators */ - "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get", "inertia">; + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; /** * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user */ - "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get", "inertia">; + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; /** * @see https://docs.github.com/rest/reference/projects#list-project-columns */ - "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get", "inertia">; + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; /** - * @see https://docs.github.com/v3/rate_limit/#get-rate-limit-status-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user */ "GET /rate_limit": Operation<"/rate_limit", "get">; /** - * @see https://docs.github.com/v3/repos/#get-a-repository + * @see https://docs.github.com/rest/reference/repos#get-a-repository */ "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; /** @@ -1201,6 +1294,14 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#download-an-artifact */ "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; /** * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run */ @@ -1209,14 +1310,26 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run */ "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; /** * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository */ "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; /** * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository */ "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; /** * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository */ @@ -1229,6 +1342,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository */ "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; /** * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository */ @@ -1237,10 +1354,26 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run */ "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; /** * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts */ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; /** * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run */ @@ -1249,6 +1382,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs */ "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; /** * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage */ @@ -1289,6 +1426,14 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned */ "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; /** * @see https://docs.github.com/rest/reference/repos#list-branches */ @@ -1312,7 +1457,7 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/repos#get-commit-signature-protection */ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get", "zzzax">; + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; /** * @see https://docs.github.com/rest/reference/repos#get-status-checks-protection */ @@ -1379,9 +1524,41 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; /** - * @see https://docs.github.com/rest/reference/code-scanning#get-information-about-a-sarif-upload + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository */ "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; /** * @see https://docs.github.com/rest/reference/repos#list-repository-collaborators */ @@ -1403,9 +1580,9 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-commit-comment + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment */ - "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get", "squirrel-girl">; + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; /** * @see https://docs.github.com/rest/reference/repos#list-commits */ @@ -1413,7 +1590,7 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/repos#list-branches-for-head-commit */ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get", "groot">; + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; /** * @see https://docs.github.com/rest/reference/repos#list-commit-comments */ @@ -1421,7 +1598,7 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/repos#list-pull-requests-associated-with-a-commit */ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get", "groot">; + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; /** * @see https://docs.github.com/rest/reference/repos#get-a-commit */ @@ -1442,14 +1619,14 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#list-commit-statuses-for-a-reference */ "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; - /** - * @see https://docs.github.com/v3/codes_of_conduct/#get-the-code-of-conduct-for-a-repository - */ - "GET /repos/{owner}/{repo}/community/code_of_conduct": Operation<"/repos/{owner}/{repo}/community/code_of_conduct", "get", "scarlet-witch">; /** * @see https://docs.github.com/rest/reference/repos#get-community-profile-metrics */ "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; /** * @see https://docs.github.com/rest/reference/repos#compare-two-commits */ @@ -1459,9 +1636,25 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; /** - * @see https://docs.github.com/v3/repos/#list-repository-contributors + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors */ "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; /** * @see https://docs.github.com/rest/reference/repos#list-deployments */ @@ -1478,6 +1671,14 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#get-a-deployment-status */ "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; /** * @see https://docs.github.com/rest/reference/activity#list-repository-events */ @@ -1519,9 +1720,17 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; /** - * @see https://docs.github.com/v3/repos#get-a-webhook-configuration-for-a-repository + * @see https://docs.github.com/rest/reference/repos#get-a-webhook-configuration-for-a-repository */ "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; /** * @see https://docs.github.com/rest/reference/migrations#get-an-import-status */ @@ -1535,7 +1744,7 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; /** - * @see https://docs.github.com/v3/apps/#get-a-repository-installation-for-the-authenticated-app + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app */ "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; /** @@ -1547,7 +1756,7 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; /** - * @see https://docs.github.com/v3/issues/#list-repository-issues + * @see https://docs.github.com/rest/reference/issues#list-repository-issues */ "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; /** @@ -1559,9 +1768,9 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-an-issue-comment + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment */ - "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get", "squirrel-girl">; + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; /** * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository */ @@ -1571,7 +1780,7 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; /** - * @see https://docs.github.com/v3/issues/#get-an-issue + * @see https://docs.github.com/rest/reference/issues#get-an-issue */ "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; /** @@ -1587,13 +1796,13 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-an-issue + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue */ - "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get", "squirrel-girl">; + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; /** * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue */ - "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get", "mockingbird">; + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; /** * @see https://docs.github.com/rest/reference/repos#list-deploy-keys */ @@ -1611,11 +1820,11 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; /** - * @see https://docs.github.com/v3/repos/#list-repository-languages + * @see https://docs.github.com/rest/reference/repos#list-repository-languages */ "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; /** - * @see https://docs.github.com/v3/licenses/#get-the-license-for-a-repository + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository */ "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; /** @@ -1651,11 +1860,15 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; /** - * @see https://docs.github.com/v3/projects/#list-repository-projects + * @see https://docs.github.com/rest/reference/repos#get-a-dns-health-check-for-github-pages */ - "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get", "inertia">; + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; /** - * @see https://docs.github.com/v3/pulls/#list-pull-requests + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests */ "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; /** @@ -1667,11 +1880,11 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment */ - "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get", "squirrel-girl">; + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; /** - * @see https://docs.github.com/v3/pulls/#get-a-pull-request + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request */ "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; /** @@ -1679,15 +1892,15 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; /** - * @see https://docs.github.com/v3/pulls/#list-commits-on-a-pull-request + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request */ "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; /** - * @see https://docs.github.com/v3/pulls/#list-pull-requests-files + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files */ "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; /** - * @see https://docs.github.com/v3/pulls/#check-if-a-pull-request-has-been-merged + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged */ "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; /** @@ -1710,6 +1923,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme */ "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; /** * @see https://docs.github.com/rest/reference/repos#list-releases */ @@ -1734,6 +1951,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#list-release-assets */ "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; /** * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository */ @@ -1742,6 +1963,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert */ "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; /** * @see https://docs.github.com/rest/reference/activity#list-stargazers */ @@ -1775,21 +2000,25 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; /** - * @see https://docs.github.com/v3/repos/#list-repository-tags + * @see https://docs.github.com/rest/reference/repos#list-repository-tags */ "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; /** * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive */ "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; /** - * @see https://docs.github.com/v3/repos/#list-repository-teams + * @see https://docs.github.com/rest/reference/repos#list-repository-teams */ "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; /** - * @see https://docs.github.com/v3/repos/#get-all-repository-topics + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics */ - "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get", "mercy">; + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; /** * @see https://docs.github.com/rest/reference/repos#get-repository-clones */ @@ -1807,17 +2036,29 @@ export interface Endpoints { */ "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; /** - * @see https://docs.github.com/v3/repos/#check-if-vulnerability-alerts-are-enabled-for-a-repository + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository */ - "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get", "dorian">; + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; /** * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive */ "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; /** - * @see https://docs.github.com/v3/repos/#list-public-repositories + * @see https://docs.github.com/rest/reference/repos#list-public-repositories */ "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; /** * @see https://docs.github.com/rest/reference/enterprise-admin#list-provisioned-scim-groups-for-an-enterprise */ @@ -1835,43 +2076,43 @@ export interface Endpoints { */ "GET /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "get">; /** - * @see https://docs.github.com/v3/scim/#list-scim-provisioned-identities + * @see https://docs.github.com/rest/reference/scim#list-scim-provisioned-identities */ "GET /scim/v2/organizations/{org}/Users": Operation<"/scim/v2/organizations/{org}/Users", "get">; /** - * @see https://docs.github.com/v3/scim/#get-scim-provisioning-information-for-a-user + * @see https://docs.github.com/rest/reference/scim#get-scim-provisioning-information-for-a-user */ "GET /scim/v2/organizations/{org}/Users/{scim_user_id}": Operation<"/scim/v2/organizations/{org}/Users/{scim_user_id}", "get">; /** - * @see https://docs.github.com/v3/search/#search-code + * @see https://docs.github.com/rest/reference/search#search-code */ "GET /search/code": Operation<"/search/code", "get">; /** - * @see https://docs.github.com/v3/search/#search-commits + * @see https://docs.github.com/rest/reference/search#search-commits */ - "GET /search/commits": Operation<"/search/commits", "get", "cloak">; + "GET /search/commits": Operation<"/search/commits", "get">; /** - * @see https://docs.github.com/v3/search/#search-issues-and-pull-requests + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests */ "GET /search/issues": Operation<"/search/issues", "get">; /** - * @see https://docs.github.com/v3/search/#search-labels + * @see https://docs.github.com/rest/reference/search#search-labels */ "GET /search/labels": Operation<"/search/labels", "get">; /** - * @see https://docs.github.com/v3/search/#search-repositories + * @see https://docs.github.com/rest/reference/search#search-repositories */ "GET /search/repositories": Operation<"/search/repositories", "get">; /** - * @see https://docs.github.com/v3/search/#search-topics + * @see https://docs.github.com/rest/reference/search#search-topics */ - "GET /search/topics": Operation<"/search/topics", "get", "mercy">; + "GET /search/topics": Operation<"/search/topics", "get">; /** - * @see https://docs.github.com/v3/search/#search-users + * @see https://docs.github.com/rest/reference/search#search-users */ "GET /search/users": Operation<"/search/users", "get">; /** - * @see https://docs.github.com/v3/teams/#get-a-team-legacy + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy */ "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; /** @@ -1891,13 +2132,13 @@ export interface Endpoints { */ "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy */ - "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get", "squirrel-girl">; + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; /** - * @see https://docs.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy */ - "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get", "squirrel-girl">; + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; /** * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy */ @@ -1915,19 +2156,19 @@ export interface Endpoints { */ "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; /** - * @see https://docs.github.com/v3/teams/#list-team-projects-legacy + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy */ - "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get", "inertia">; + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; /** - * @see https://docs.github.com/v3/teams/#check-team-permissions-for-a-project-legacy + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy */ - "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get", "inertia">; + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; /** - * @see https://docs.github.com/v3/teams/#list-team-repositories-legacy + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy */ "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; /** - * @see https://docs.github.com/v3/teams/#check-team-permissions-for-a-repository-legacy + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy */ "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; /** @@ -1935,11 +2176,11 @@ export interface Endpoints { */ "GET /teams/{team_id}/team-sync/group-mappings": Operation<"/teams/{team_id}/team-sync/group-mappings", "get">; /** - * @see https://docs.github.com/v3/teams/#list-child-teams-legacy + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy */ "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; /** - * @see https://docs.github.com/v3/users/#get-the-authenticated-user + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user */ "GET /user": Operation<"/user", "get">; /** @@ -1950,6 +2191,38 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user */ "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; /** * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user */ @@ -1987,7 +2260,7 @@ export interface Endpoints { */ "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; /** - * @see https://docs.github.com/v3/issues/#list-user-account-issues-assigned-to-the-authenticated-user + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user */ "GET /user/issues": Operation<"/user/issues", "get">; /** @@ -2017,23 +2290,27 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/migrations#list-user-migrations */ - "GET /user/migrations": Operation<"/user/migrations", "get", "wyandotte">; + "GET /user/migrations": Operation<"/user/migrations", "get">; /** * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status */ - "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get", "wyandotte">; + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; /** * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive */ - "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get", "wyandotte">; + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; /** * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration */ - "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get", "wyandotte">; + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; /** - * @see https://docs.github.com/v3/orgs/#list-organizations-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user */ "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; /** * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user */ @@ -2051,7 +2328,7 @@ export interface Endpoints { */ "GET /user/public_emails": Operation<"/user/public_emails", "get">; /** - * @see https://docs.github.com/v3/repos/#list-repositories-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user */ "GET /user/repos": Operation<"/user/repos", "get">; /** @@ -2071,15 +2348,15 @@ export interface Endpoints { */ "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; /** - * @see https://docs.github.com/v3/teams/#list-teams-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user */ "GET /user/teams": Operation<"/user/teams", "get">; /** - * @see https://docs.github.com/v3/users/#list-users + * @see https://docs.github.com/rest/reference/users#list-users */ "GET /users": Operation<"/users", "get">; /** - * @see https://docs.github.com/v3/users/#get-a-user + * @see https://docs.github.com/rest/reference/users#get-a-user */ "GET /users/{username}": Operation<"/users/{username}", "get">; /** @@ -2107,7 +2384,7 @@ export interface Endpoints { */ "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; /** - * @see https://docs.github.com/v3/gists/#list-gists-for-a-user + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user */ "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; /** @@ -2115,11 +2392,11 @@ export interface Endpoints { */ "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; /** - * @see https://docs.github.com/v3/users/#get-contextual-information-for-a-user + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user */ "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; /** - * @see https://docs.github.com/v3/apps/#get-a-user-installation-for-the-authenticated-app + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app */ "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; /** @@ -2127,9 +2404,13 @@ export interface Endpoints { */ "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; /** - * @see https://docs.github.com/v3/orgs/#list-organizations-for-a-user + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user */ "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; /** * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user */ @@ -2143,9 +2424,9 @@ export interface Endpoints { */ "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; /** - * @see https://docs.github.com/v3/projects/#list-user-projects + * @see https://docs.github.com/rest/reference/projects#list-user-projects */ - "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get", "inertia">; + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; /** * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user */ @@ -2155,19 +2436,19 @@ export interface Endpoints { */ "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; /** - * @see https://docs.github.com/v3/repos/#list-repositories-for-a-user + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user */ "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; /** - * @see https://docs.github.com/v3/billing/#get-github-actions-billing-for-a-user + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user */ "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; /** - * @see https://docs.github.com/v3/billing/#get-github-packages-billing-for-a-user + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user */ "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; /** - * @see https://docs.github.com/v3/billing/#get-shared-storage-billing-for-a-user + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user */ "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; /** @@ -2183,7 +2464,7 @@ export interface Endpoints { */ "GET /zen": Operation<"/zen", "get">; /** - * @see https://docs.github.com/v3/apps#update-a-webhook-configuration-for-an-app + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app */ "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; /** @@ -2195,11 +2476,11 @@ export interface Endpoints { */ "PATCH /authorizations/{authorization_id}": Operation<"/authorizations/{authorization_id}", "patch">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#update-a-self-hosted-runner-group-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-enterprise */ "PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "patch">; /** - * @see https://docs.github.com/v3/gists/#update-a-gist + * @see https://docs.github.com/rest/reference/gists/#update-a-gist */ "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; /** @@ -2211,7 +2492,7 @@ export interface Endpoints { */ "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; /** - * @see https://docs.github.com/v3/orgs/#update-an-organization + * @see https://docs.github.com/rest/reference/orgs/#update-an-organization */ "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; /** @@ -2223,11 +2504,11 @@ export interface Endpoints { */ "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; /** - * @see https://docs.github.com/v3/orgs#update-a-webhook-configuration-for-an-organization + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization */ "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; /** - * @see https://docs.github.com/v3/teams/#update-a-team + * @see https://docs.github.com/rest/reference/teams#update-a-team */ "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; /** @@ -2238,6 +2519,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment */ "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#link-external-idp-group-team-connection + */ + "PATCH /orgs/{org}/teams/{team_slug}/external-groups": Operation<"/orgs/{org}/teams/{team_slug}/external-groups", "patch">; /** * @see https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections */ @@ -2245,17 +2530,17 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/projects#update-a-project-card */ - "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch", "inertia">; + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; /** * @see https://docs.github.com/rest/reference/projects#update-a-project-column */ - "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch", "inertia">; + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; /** - * @see https://docs.github.com/v3/projects/#update-a-project + * @see https://docs.github.com/rest/reference/projects#update-a-project */ - "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch", "inertia">; + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; /** - * @see https://docs.github.com/v3/repos/#update-a-repository + * @see https://docs.github.com/rest/reference/repos/#update-a-repository */ "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; /** @@ -2263,7 +2548,7 @@ export interface Endpoints { */ "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; /** - * @see https://docs.github.com/rest/reference/repos#update-status-check-potection + * @see https://docs.github.com/rest/reference/repos#update-status-check-protection */ "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; /** @@ -2291,7 +2576,7 @@ export interface Endpoints { */ "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; /** - * @see https://docs.github.com/v3/repos#update-a-webhook-configuration-for-a-repository + * @see https://docs.github.com/rest/reference/repos#update-a-webhook-configuration-for-a-repository */ "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; /** @@ -2315,7 +2600,7 @@ export interface Endpoints { */ "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; /** - * @see https://docs.github.com/v3/issues/#update-an-issue + * @see https://docs.github.com/rest/reference/issues/#update-an-issue */ "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; /** @@ -2331,7 +2616,7 @@ export interface Endpoints { */ "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; /** - * @see https://docs.github.com/v3/pulls/#update-a-pull-request + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request */ "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; /** @@ -2355,11 +2640,11 @@ export interface Endpoints { */ "PATCH /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "patch">; /** - * @see https://docs.github.com/v3/scim/#update-an-attribute-for-a-scim-user + * @see https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user */ "PATCH /scim/v2/organizations/{org}/Users/{scim_user_id}": Operation<"/scim/v2/organizations/{org}/Users/{scim_user_id}", "patch">; /** - * @see https://docs.github.com/v3/teams/#update-a-team-legacy + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy */ "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; /** @@ -2375,9 +2660,13 @@ export interface Endpoints { */ "PATCH /teams/{team_id}/team-sync/group-mappings": Operation<"/teams/{team_id}/team-sync/group-mappings", "patch">; /** - * @see https://docs.github.com/v3/users/#update-the-authenticated-user + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user */ "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; /** * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user */ @@ -2391,11 +2680,15 @@ export interface Endpoints { */ "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; /** - * @see https://docs.github.com/v3/apps/#create-a-github-app-from-a-manifest + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest */ "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; /** - * @see https://docs.github.com/v3/apps/#create-an-installation-access-token-for-an-app + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app */ "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; /** @@ -2406,32 +2699,28 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token */ "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; - /** - * @see https://docs.github.com/rest/reference/apps#reset-an-authorization - */ - "POST /applications/{client_id}/tokens/{access_token}": Operation<"/applications/{client_id}/tokens/{access_token}", "post">; /** * @see https://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization */ "POST /authorizations": Operation<"/authorizations", "post">; /** - * @see https://docs.github.com/rest/reference/apps#create-a-content-attachment - */ - "POST /content_references/{content_reference_id}/attachments": Operation<"/content_references/{content_reference_id}/attachments", "post", "corsair">; - /** - * @see https://docs.github.com/rest/reference/enterprise-admin#create-self-hosted-runner-group-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise */ "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#create-a-registration-token-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-enterprise */ "POST /enterprises/{enterprise}/actions/runners/registration-token": Operation<"/enterprises/{enterprise}/actions/runners/registration-token", "post">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#create-a-remove-token-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-enterprise */ "POST /enterprises/{enterprise}/actions/runners/remove-token": Operation<"/enterprises/{enterprise}/actions/runners/remove-token", "post">; /** - * @see https://docs.github.com/v3/gists/#create-a-gist + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist */ "POST /gists": Operation<"/gists", "post">; /** @@ -2439,15 +2728,15 @@ export interface Endpoints { */ "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; /** - * @see https://docs.github.com/v3/gists/#fork-a-gist + * @see https://docs.github.com/rest/reference/gists#fork-a-gist */ "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; /** - * @see https://docs.github.com/v3/markdown/#render-a-markdown-document + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document */ "POST /markdown": Operation<"/markdown", "post">; /** - * @see https://docs.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode */ "POST /markdown/raw": Operation<"/markdown/raw", "post">; /** @@ -2462,10 +2751,18 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization */ "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; /** * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook */ "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; /** * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook */ @@ -2474,6 +2771,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation */ "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; /** * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration */ @@ -2481,21 +2782,21 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization */ - "POST /orgs/{org}/packages/{package_type}/{package_name}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; /** * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization */ "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; /** - * @see https://docs.github.com/v3/projects/#create-an-organization-project + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project */ - "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post", "inertia">; + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; /** - * @see https://docs.github.com/v3/repos/#create-an-organization-repository + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository */ "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; /** - * @see https://docs.github.com/v3/teams/#create-a-team + * @see https://docs.github.com/rest/reference/teams#create-a-team */ "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; /** @@ -2507,29 +2808,33 @@ export interface Endpoints { */ "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; /** - * @see https://docs.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment */ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post", "squirrel-girl">; + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; /** - * @see https://docs.github.com/v3/reactions/#create-reaction-for-a-team-discussion + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion */ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post", "squirrel-girl">; + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; /** * @see https://docs.github.com/rest/reference/projects#move-a-project-card */ - "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post", "inertia">; + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; /** * @see https://docs.github.com/rest/reference/projects#create-a-project-card */ - "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post", "inertia">; + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; /** * @see https://docs.github.com/rest/reference/projects#move-a-project-column */ - "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post", "inertia">; + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; /** * @see https://docs.github.com/rest/reference/projects#create-a-project-column */ - "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post", "inertia">; + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; /** * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository */ @@ -2538,18 +2843,38 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository */ "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; /** * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run */ "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; /** * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow */ "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; /** * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event */ "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; /** * @see https://docs.github.com/rest/reference/repos#set-admin-branch-protection */ @@ -2557,7 +2882,7 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/repos#create-commit-signature-protection */ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post", "zzzax">; + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; /** * @see https://docs.github.com/rest/reference/repos#add-status-check-contexts */ @@ -2582,6 +2907,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/checks#create-a-check-run */ "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; /** * @see https://docs.github.com/rest/reference/checks#create-a-check-suite */ @@ -2591,17 +2920,25 @@ export interface Endpoints { */ "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; /** - * @see https://docs.github.com/rest/reference/code-scanning#upload-an-analysis-as-sarif-data + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file */ "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; /** - * @see https://docs.github.com/v3/reactions/#create-reaction-for-a-commit-comment + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository */ - "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post", "squirrel-girl">; + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; /** * @see https://docs.github.com/rest/reference/repos#create-a-commit-comment */ "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; /** * @see https://docs.github.com/rest/reference/repos#create-a-deployment */ @@ -2611,7 +2948,7 @@ export interface Endpoints { */ "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; /** - * @see https://docs.github.com/v3/repos/#create-a-repository-dispatch-event + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event */ "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; /** @@ -2642,6 +2979,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#create-a-repository-webhook */ "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; /** * @see https://docs.github.com/rest/reference/repos#ping-a-repository-webhook */ @@ -2651,13 +2992,13 @@ export interface Endpoints { */ "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; /** - * @see https://docs.github.com/v3/issues/#create-an-issue + * @see https://docs.github.com/rest/reference/issues#create-an-issue */ "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; /** - * @see https://docs.github.com/v3/reactions/#create-reaction-for-an-issue-comment + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment */ - "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post", "squirrel-girl">; + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; /** * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue */ @@ -2671,9 +3012,9 @@ export interface Endpoints { */ "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; /** - * @see https://docs.github.com/v3/reactions/#create-reaction-for-an-issue + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue */ - "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post", "squirrel-girl">; + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; /** * @see https://docs.github.com/rest/reference/repos#create-a-deploy-key */ @@ -2682,6 +3023,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/issues#create-a-label */ "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; /** * @see https://docs.github.com/rest/reference/repos#merge-a-branch */ @@ -2693,23 +3038,27 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/repos#create-a-github-pages-site */ - "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post", "switcheroo">; + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; /** * @see https://docs.github.com/rest/reference/repos#request-a-github-pages-build */ "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; /** - * @see https://docs.github.com/v3/projects/#create-a-repository-project + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project */ - "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post", "inertia">; + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; /** - * @see https://docs.github.com/v3/pulls/#create-a-pull-request + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request */ "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; /** - * @see https://docs.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment */ - "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post", "squirrel-girl">; + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; /** * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request */ @@ -2734,18 +3083,30 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#create-a-release */ "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; /** * @see https://docs.github.com/rest/reference/repos#create-a-commit-status */ "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; /** - * @see https://docs.github.com/v3/repos/#transfer-a-repository + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository */ "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; /** - * @see https://docs.github.com/v3/repos/#create-a-repository-using-a-template + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template */ - "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post", "baptiste">; + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; /** * @see https://docs.github.com/rest/reference/enterprise-admin#provision-a-scim-enterprise-group-and-invite-users */ @@ -2755,7 +3116,7 @@ export interface Endpoints { */ "POST /scim/v2/enterprises/{enterprise}/Users": Operation<"/scim/v2/enterprises/{enterprise}/Users", "post">; /** - * @see https://docs.github.com/v3/scim/#provision-and-invite-a-scim-user + * @see https://docs.github.com/rest/reference/scim#provision-and-invite-a-scim-user */ "POST /scim/v2/organizations/{org}/Users": Operation<"/scim/v2/organizations/{org}/Users", "post">; /** @@ -2767,13 +3128,29 @@ export interface Endpoints { */ "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; /** - * @see https://docs.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see */ - "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post", "squirrel-girl">; + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; /** - * @see https://docs.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user */ - "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post", "squirrel-girl">; + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; /** * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user */ @@ -2793,25 +3170,33 @@ export interface Endpoints { /** * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user */ - "POST /user/packages/{package_type}/{package_name}/restore": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; /** * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user */ "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; /** - * @see https://docs.github.com/v3/projects/#create-a-user-project + * @see https://docs.github.com/rest/reference/projects#create-a-user-project */ - "POST /user/projects": Operation<"/user/projects", "post", "inertia">; + "POST /user/projects": Operation<"/user/projects", "post">; /** - * @see https://docs.github.com/v3/repos/#create-a-repository-for-the-authenticated-user + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user */ "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; /** * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset */ "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; /** - * @see https://docs.github.com/v3/apps/#suspend-an-app-installation + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation */ "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; /** @@ -2823,39 +3208,51 @@ export interface Endpoints { */ "PUT /authorizations/clients/{client_id}/{fingerprint}": Operation<"/authorizations/clients/{client_id}/{fingerprint}", "put">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#set-github-actions-permissions-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions/oidc#set-actions-oidc-custom-issuer-policy-for-enterprise + */ + "PUT /enterprises/{enterprise}/actions/oidc/customization/issuer": Operation<"/enterprises/{enterprise}/actions/oidc/customization/issuer", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-enterprise */ "PUT /enterprises/{enterprise}/actions/permissions": Operation<"/enterprises/{enterprise}/actions/permissions", "put">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#set-selected-organizations-enabled-for-github-actions-in-an-enterprise + * @see https://docs.github.com/rest/reference/actions#set-selected-organizations-enabled-for-github-actions-in-an-enterprise */ "PUT /enterprises/{enterprise}/actions/permissions/organizations": Operation<"/enterprises/{enterprise}/actions/permissions/organizations", "put">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#enable-a-selected-organization-for-github-actions-in-an-enterprise + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise */ "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#set-allowed-actions-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-enterprise */ "PUT /enterprises/{enterprise}/actions/permissions/selected-actions": Operation<"/enterprises/{enterprise}/actions/permissions/selected-actions", "put">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/workflow": Operation<"/enterprises/{enterprise}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise */ "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "put">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise */ "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#set-self-hosted-runners-in-a-group-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-enterprise */ "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "put">; /** - * @see https://docs.github.com/rest/reference/enterprise-admin#add-a-self-hosted-runner-to-a-group-for-an-enterprise + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-enterprise */ "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; /** - * @see https://docs.github.com/v3/gists/#star-a-gist + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist */ "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; /** @@ -2866,6 +3263,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription */ "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; /** * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization */ @@ -2882,6 +3283,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization */ "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; /** * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization */ @@ -2898,6 +3303,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization */ "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; /** * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret */ @@ -2914,6 +3323,18 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization */ "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; /** * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization */ @@ -2935,25 +3356,41 @@ export interface Endpoints { */ "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; /** - * @see https://docs.github.com/v3/teams/#add-or-update-team-project-permissions + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions */ - "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put", "inertia">; + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; /** - * @see https://docs.github.com/v3/teams/#add-or-update-team-repository-permissions + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions */ "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; /** * @see https://docs.github.com/rest/reference/projects#add-project-collaborator */ - "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put", "inertia">; + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; /** * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository */ "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; /** * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository */ "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; /** * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret */ @@ -2967,9 +3404,9 @@ export interface Endpoints { */ "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; /** - * @see https://docs.github.com/v3/repos/#enable-automated-security-fixes + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes */ - "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put", "london">; + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; /** * @see https://docs.github.com/rest/reference/repos#update-branch-protection */ @@ -2990,6 +3427,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#set-user-access-restrictions */ "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; /** * @see https://docs.github.com/rest/reference/repos#add-a-repository-collaborator */ @@ -2998,6 +3439,14 @@ export interface Endpoints { * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents */ "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; /** * @see https://docs.github.com/rest/reference/migrations#start-an-import */ @@ -3011,9 +3460,13 @@ export interface Endpoints { */ "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; /** - * @see https://docs.github.com/v3/issues/#lock-an-issue + * @see https://docs.github.com/rest/reference/issues#lock-an-issue */ "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; /** * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read */ @@ -3023,7 +3476,7 @@ export interface Endpoints { */ "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; /** - * @see https://docs.github.com/v3/pulls/#merge-a-pull-request + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request */ "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; /** @@ -3035,21 +3488,25 @@ export interface Endpoints { */ "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; /** - * @see https://docs.github.com/v3/pulls/#update-a-pull-request-branch + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch */ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put", "lydian">; + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; /** * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription */ "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; /** - * @see https://docs.github.com/v3/repos/#replace-all-repository-topics + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics */ - "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put", "mercy">; + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; /** - * @see https://docs.github.com/v3/repos/#enable-vulnerability-alerts + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts */ - "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put", "dorian">; + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; /** * @see https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-group */ @@ -3059,7 +3516,7 @@ export interface Endpoints { */ "PUT /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "put">; /** - * @see https://docs.github.com/v3/scim/#set-scim-information-for-a-provisioned-user + * @see https://docs.github.com/rest/reference/scim#set-scim-information-for-a-provisioned-user */ "PUT /scim/v2/organizations/{org}/Users/{scim_user_id}": Operation<"/scim/v2/organizations/{org}/Users/{scim_user_id}", "put">; /** @@ -3071,17 +3528,29 @@ export interface Endpoints { */ "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; /** - * @see https://docs.github.com/v3/teams/#add-or-update-team-project-permissions-legacy + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy */ - "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put", "inertia">; + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; /** - * @see https://docs.github.com/v3/teams/#add-or-update-team-repository-permissions-legacy + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions-legacy */ "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; /** * @see https://docs.github.com/rest/reference/users#block-a-user */ "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; /** * @see https://docs.github.com/rest/reference/users#follow-a-user */ diff --git a/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/types/dist-web/index.js index 4955761..b1b47d5 100644 --- a/node_modules/@octokit/types/dist-web/index.js +++ b/node_modules/@octokit/types/dist-web/index.js @@ -1,4 +1,4 @@ -const VERSION = "6.10.0"; +const VERSION = "6.41.0"; export { VERSION }; //# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/types/package.json b/node_modules/@octokit/types/package.json index 9a06e5a..960747f 100644 --- a/node_modules/@octokit/types/package.json +++ b/node_modules/@octokit/types/package.json @@ -1,94 +1,54 @@ { - "_from": "@octokit/types@^6.0.3", - "_id": "@octokit/types@6.10.0", - "_inBundle": false, - "_integrity": "sha512-aMDo10kglofejJ96edCBIgQLVuzMDyjxmhdgEcoUUD64PlHYSrNsAGqN0wZtoiX4/PCQ3JLA50IpkP1bcKD/cA==", - "_location": "/@octokit/types", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@octokit/types@^6.0.3", - "name": "@octokit/types", - "escapedName": "@octokit%2ftypes", - "scope": "@octokit", - "rawSpec": "^6.0.3", - "saveSpec": null, - "fetchSpec": "^6.0.3" - }, - "_requiredBy": [ - "/@octokit/auth-token", - "/@octokit/core", - "/@octokit/endpoint", - "/@octokit/graphql", - "/@octokit/plugin-paginate-rest", - "/@octokit/plugin-rest-endpoint-methods", - "/@octokit/request", - "/@octokit/request-error" + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "6.41.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" ], - "_resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.10.0.tgz", - "_shasum": "243faa864b0955f574012d52e179de38ac9ebafe", - "_spec": "@octokit/types@^6.0.3", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\core", - "bugs": { - "url": "https://github.com/octokit/types.ts/issues" + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "6.8.0" }, - "bundleDependencies": false, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", "dependencies": { - "@octokit/openapi-types": "^5.1.0" + "@octokit/openapi-types": "^12.11.0" }, - "deprecated": false, - "description": "Shared TypeScript definitions for Octokit projects", "devDependencies": { - "@octokit/graphql": "^4.2.2", - "@pika/pack": "^0.5.0", + "@pika/pack": "^0.3.7", "@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-web": "^0.9.0", "@pika/plugin-ts-standard-pkg": "^0.9.0", "@types/node": ">= 8", + "github-openapi-graphql-query": "^2.0.0", "handlebars": "^4.7.6", - "json-schema-to-typescript": "^10.0.0", + "json-schema-to-typescript": "^11.0.0", "lodash.set": "^4.3.2", "npm-run-all": "^4.1.5", "pascal-case": "^3.1.1", "pika-plugin-merge-properties": "^1.0.6", "prettier": "^2.0.0", - "semantic-release": "^17.0.0", + "semantic-release": "^19.0.3", "semantic-release-plugin-update-version-in-files": "^1.0.0", - "sort-keys": "^4.0.0", + "sort-keys": "^4.2.0", "string-to-jsdoc-comment": "^1.0.0", - "typedoc": "^0.20.0", + "typedoc": "^0.23.0", "typescript": "^4.0.2" }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/types.ts#readme", - "keywords": [ - "github", - "api", - "sdk", - "toolkit", - "typescript" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/types", - "octokit": { - "openapi-version": "2.11.0" - }, - "pika": true, "publishConfig": { "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/types.ts.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "6.10.0" + } } diff --git a/node_modules/@types/jsonwebtoken/README.md b/node_modules/@types/jsonwebtoken/README.md index 473f988..2582d95 100644 --- a/node_modules/@types/jsonwebtoken/README.md +++ b/node_modules/@types/jsonwebtoken/README.md @@ -8,9 +8,9 @@ This package contains type definitions for jsonwebtoken (https://github.com/auth Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonwebtoken. ### Additional Details - * Last updated: Wed, 13 May 2020 18:46:57 GMT + * Last updated: Thu, 12 Jan 2023 20:02:36 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node) * Global values: none # Credits -These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), [Daniel Heim](https://github.com/danielheim), [Brice BERNARD](https://github.com/brikou), [Veli-Pekka Kestilä](https://github.com/vpk), [Daniel Parker](https://github.com/rlgod), [Kjell Dießel](https://github.com/kettil), [Robert Gajda](https://github.com/RunAge), [Nico Flaig](https://github.com/nflaig), [Linus Unnebäck](https://github.com/LinusU), [Ivan Sieder](https://github.com/ivansieder), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). +These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), [Daniel Heim](https://github.com/danielheim), [Brice BERNARD](https://github.com/brikou), [Veli-Pekka Kestilä](https://github.com/vpk), [Daniel Parker](https://github.com/GeneralistDev), [Kjell Dießel](https://github.com/kettil), [Robert Gajda](https://github.com/RunAge), [Nico Flaig](https://github.com/nflaig), [Linus Unnebäck](https://github.com/LinusU), [Ivan Sieder](https://github.com/ivansieder), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Nandor Kraszlan](https://github.com/nandi95). diff --git a/node_modules/@types/jsonwebtoken/index.d.ts b/node_modules/@types/jsonwebtoken/index.d.ts index cf3213d..e13ca1f 100644 --- a/node_modules/@types/jsonwebtoken/index.d.ts +++ b/node_modules/@types/jsonwebtoken/index.d.ts @@ -1,20 +1,23 @@ -// Type definitions for jsonwebtoken 8.5 +// Type definitions for jsonwebtoken 9.0 // Project: https://github.com/auth0/node-jsonwebtoken // Definitions by: Maxime LUCE , // Daniel Heim , // Brice BERNARD , // Veli-Pekka Kestilä , -// Daniel Parker , +// Daniel Parker , // Kjell Dießel , // Robert Gajda , // Nico Flaig , // Linus Unnebäck // Ivan Sieder // Piotr Błażejewicz +// Nandor Kraszlan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +import { KeyObject } from 'crypto'; + export class JsonWebTokenError extends Error { inner: Error; @@ -50,72 +53,96 @@ export interface SignOptions { * - ES512: ECDSA using P-521 curve and SHA-512 hash algorithm * - none: No digital signature or MAC value included */ - algorithm?: Algorithm; - keyid?: string; + algorithm?: Algorithm | undefined; + keyid?: string | undefined; /** expressed in seconds or a string describing a time span [zeit/ms](https://github.com/zeit/ms.js). Eg: 60, "2 days", "10h", "7d" */ - expiresIn?: string | number; + expiresIn?: string | number | undefined; /** expressed in seconds or a string describing a time span [zeit/ms](https://github.com/zeit/ms.js). Eg: 60, "2 days", "10h", "7d" */ - notBefore?: string | number; - audience?: string | string[]; - subject?: string; - issuer?: string; - jwtid?: string; - mutatePayload?: boolean; - noTimestamp?: boolean; - header?: object; - encoding?: string; + notBefore?: string | number | undefined; + audience?: string | string[] | undefined; + subject?: string | undefined; + issuer?: string | undefined; + jwtid?: string | undefined; + mutatePayload?: boolean | undefined; + noTimestamp?: boolean | undefined; + header?: JwtHeader | undefined; + encoding?: string | undefined; + allowInsecureKeySizes?: boolean | undefined; + allowInvalidAsymmetricKeyTypes?: boolean | undefined; } export interface VerifyOptions { - algorithms?: Algorithm[]; - audience?: string | RegExp | Array; - clockTimestamp?: number; - clockTolerance?: number; + algorithms?: Algorithm[] | undefined; + audience?: string | RegExp | Array | undefined; + clockTimestamp?: number | undefined; + clockTolerance?: number | undefined; /** return an object with the decoded `{ payload, header, signature }` instead of only the usual content of the payload. */ - complete?: boolean; - issuer?: string | string[]; - ignoreExpiration?: boolean; - ignoreNotBefore?: boolean; - jwtid?: string; + complete?: boolean | undefined; + issuer?: string | string[] | undefined; + ignoreExpiration?: boolean | undefined; + ignoreNotBefore?: boolean | undefined; + jwtid?: string | undefined; /** * If you want to check `nonce` claim, provide a string value here. * It is used on Open ID for the ID Tokens. ([Open ID implementation notes](https://openid.net/specs/openid-connect-core-1_0.html#NonceNotes)) */ - nonce?: string; - subject?: string; - /** - * @deprecated - * Max age of token - */ - maxAge?: string; + nonce?: string | undefined; + subject?: string | undefined; + maxAge?: string | number | undefined; + allowInvalidAsymmetricKeyTypes?: boolean | undefined; } export interface DecodeOptions { - complete?: boolean; - json?: boolean; + complete?: boolean | undefined; + json?: boolean | undefined; } export type VerifyErrors = | JsonWebTokenError | NotBeforeError | TokenExpiredError; -export type VerifyCallback = ( - err: VerifyErrors | null, - decoded: object | undefined, +export type VerifyCallback = ( + error: VerifyErrors | null, + decoded: T | undefined, ) => void; export type SignCallback = ( - err: Error | null, encoded: string | undefined + error: Error | null, + encoded: string | undefined, ) => void; +// standard names https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1 export interface JwtHeader { - alg: string; - typ?: string; - kid?: string; - jku?: string; - x5u?: string; - x5t?: string; + alg: string | Algorithm; + typ?: string | undefined; + cty?: string | undefined; + crit?: Array> | undefined; + kid?: string | undefined; + jku?: string | undefined; + x5u?: string | string[] | undefined; + 'x5t#S256'?: string | undefined; + x5t?: string | undefined; + x5c?: string | string[] | undefined; +} + +// standard claims https://datatracker.ietf.org/doc/html/rfc7519#section-4.1 +export interface JwtPayload { + [key: string]: any; + iss?: string | undefined; + sub?: string | undefined; + aud?: string | string[] | undefined; + exp?: number | undefined; + nbf?: number | undefined; + iat?: number | undefined; + jti?: string | undefined; +} + +export interface Jwt { + header: JwtHeader; + payload: JwtPayload | string; + signature: string; } +// https://github.com/auth0/node-jsonwebtoken#algorithms-supported export type Algorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | @@ -124,8 +151,8 @@ export type Algorithm = "none"; export type SigningKeyCallback = ( - err: any, - signingKey?: Secret, + error: Error | null, + signingKey?: Secret ) => void; export type GetPublicKeyOrSecret = ( @@ -136,6 +163,7 @@ export type GetPublicKeyOrSecret = ( export type Secret = | string | Buffer + | KeyObject | { key: string | Buffer; passphrase: string }; /** @@ -177,7 +205,9 @@ export function sign( * [options] - Options for the verification * returns - The decoded token. */ -export function verify(token: string, secretOrPublicKey: Secret, options?: VerifyOptions): object | string; +export function verify(token: string, secretOrPublicKey: Secret, options: VerifyOptions & { complete: true }): Jwt; +export function verify(token: string, secretOrPublicKey: Secret, options?: VerifyOptions & { complete?: false }): JwtPayload | string; +export function verify(token: string, secretOrPublicKey: Secret, options?: VerifyOptions): Jwt | JwtPayload | string; /** * Asynchronously verify given token using a secret or a public key to get a decoded token @@ -191,7 +221,19 @@ export function verify(token: string, secretOrPublicKey: Secret, options?: Verif export function verify( token: string, secretOrPublicKey: Secret | GetPublicKeyOrSecret, - callback?: VerifyCallback, + callback?: VerifyCallback, +): void; +export function verify( + token: string, + secretOrPublicKey: Secret | GetPublicKeyOrSecret, + options: VerifyOptions & { complete: true }, + callback?: VerifyCallback, +): void; +export function verify( + token: string, + secretOrPublicKey: Secret | GetPublicKeyOrSecret, + options?: VerifyOptions & { complete?: false }, + callback?: VerifyCallback, ): void; export function verify( token: string, @@ -206,5 +248,6 @@ export function verify( * [options] - Options for decoding * returns - The decoded Token */ -export function decode(token: string, options: DecodeOptions & { json: true }): null | { [key: string]: any }; -export function decode(token: string, options?: DecodeOptions): null | { [key: string]: any } | string; +export function decode(token: string, options: DecodeOptions & { complete: true }): null | Jwt; +export function decode(token: string, options: DecodeOptions & { json: true }): null | JwtPayload; +export function decode(token: string, options?: DecodeOptions): null | JwtPayload | string; diff --git a/node_modules/@types/jsonwebtoken/package.json b/node_modules/@types/jsonwebtoken/package.json index f79486a..c671e4a 100644 --- a/node_modules/@types/jsonwebtoken/package.json +++ b/node_modules/@types/jsonwebtoken/package.json @@ -1,95 +1,82 @@ { - "_from": "@types/jsonwebtoken@^8.3.3", - "_id": "@types/jsonwebtoken@8.5.0", - "_inBundle": false, - "_integrity": "sha512-9bVao7LvyorRGZCw0VmH/dr7Og+NdjYSsKAxB43OQoComFbBgsEpoR9JW6+qSq/ogwVBg8GI2MfAlk4SYI4OLg==", - "_location": "/@types/jsonwebtoken", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/jsonwebtoken@^8.3.3", "name": "@types/jsonwebtoken", - "escapedName": "@types%2fjsonwebtoken", - "scope": "@types", - "rawSpec": "^8.3.3", - "saveSpec": null, - "fetchSpec": "^8.3.3" - }, - "_requiredBy": [ - "/universal-github-app-jwt" - ], - "_resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.0.tgz", - "_shasum": "2531d5e300803aa63279b232c014acf780c981c5", - "_spec": "@types/jsonwebtoken@^8.3.3", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\universal-github-app-jwt", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Maxime LUCE", - "url": "https://github.com/SomaticIT" + "version": "9.0.1", + "description": "TypeScript definitions for jsonwebtoken", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonwebtoken", + "license": "MIT", + "contributors": [ + { + "name": "Maxime LUCE", + "url": "https://github.com/SomaticIT", + "githubUsername": "SomaticIT" + }, + { + "name": "Daniel Heim", + "url": "https://github.com/danielheim", + "githubUsername": "danielheim" + }, + { + "name": "Brice BERNARD", + "url": "https://github.com/brikou", + "githubUsername": "brikou" + }, + { + "name": "Veli-Pekka Kestilä", + "url": "https://github.com/vpk", + "githubUsername": "vpk" + }, + { + "name": "Daniel Parker", + "url": "https://github.com/GeneralistDev", + "githubUsername": "GeneralistDev" + }, + { + "name": "Kjell Dießel", + "url": "https://github.com/kettil", + "githubUsername": "kettil" + }, + { + "name": "Robert Gajda", + "url": "https://github.com/RunAge", + "githubUsername": "RunAge" + }, + { + "name": "Nico Flaig", + "url": "https://github.com/nflaig", + "githubUsername": "nflaig" + }, + { + "name": "Linus Unnebäck", + "url": "https://github.com/LinusU", + "githubUsername": "LinusU" + }, + { + "name": "Ivan Sieder", + "url": "https://github.com/ivansieder", + "githubUsername": "ivansieder" + }, + { + "name": "Piotr Błażejewicz", + "url": "https://github.com/peterblazejewicz", + "githubUsername": "peterblazejewicz" + }, + { + "name": "Nandor Kraszlan", + "url": "https://github.com/nandi95", + "githubUsername": "nandi95" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/jsonwebtoken" }, - { - "name": "Daniel Heim", - "url": "https://github.com/danielheim" + "scripts": {}, + "dependencies": { + "@types/node": "*" }, - { - "name": "Brice BERNARD", - "url": "https://github.com/brikou" - }, - { - "name": "Veli-Pekka Kestilä", - "url": "https://github.com/vpk" - }, - { - "name": "Daniel Parker", - "url": "https://github.com/rlgod" - }, - { - "name": "Kjell Dießel", - "url": "https://github.com/kettil" - }, - { - "name": "Robert Gajda", - "url": "https://github.com/RunAge" - }, - { - "name": "Nico Flaig", - "url": "https://github.com/nflaig" - }, - { - "name": "Linus Unnebäck", - "url": "https://github.com/LinusU" - }, - { - "name": "Ivan Sieder", - "url": "https://github.com/ivansieder" - }, - { - "name": "Piotr Błażejewicz", - "url": "https://github.com/peterblazejewicz" - } - ], - "dependencies": { - "@types/node": "*" - }, - "deprecated": false, - "description": "TypeScript definitions for jsonwebtoken", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/jsonwebtoken", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/jsonwebtoken" - }, - "scripts": {}, - "typeScriptVersion": "2.9", - "types": "index.d.ts", - "typesPublisherContentHash": "33f163920deea456c96d5c30432132a88196e2f8e408d0290b804dc12181edcb", - "version": "8.5.0" -} + "typesPublisherContentHash": "50efc79a627000c15b17a4d8c3611d67012a8f4b4ead3ea36265181a3e1f5f7a", + "typeScriptVersion": "4.2" +} \ No newline at end of file diff --git a/node_modules/@types/lru-cache/LICENSE b/node_modules/@types/lru-cache/LICENSE index 2107107..9e841e7 100644 --- a/node_modules/@types/lru-cache/LICENSE +++ b/node_modules/@types/lru-cache/LICENSE @@ -1,6 +1,6 @@ MIT License - Copyright (c) Microsoft Corporation. All rights reserved. + Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/@types/lru-cache/README.md b/node_modules/@types/lru-cache/README.md index 1bd1013..7af91b7 100644 --- a/node_modules/@types/lru-cache/README.md +++ b/node_modules/@types/lru-cache/README.md @@ -2,15 +2,15 @@ > `npm install --save @types/lru-cache` # Summary -This package contains type definitions for lru-cache ( https://github.com/isaacs/node-lru-cache ). +This package contains type definitions for lru-cache (https://github.com/isaacs/node-lru-cache). # Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lru-cache +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lru-cache. -Additional Details - * Last updated: Sat, 23 Feb 2019 00:30:37 GMT +### Additional Details + * Last updated: Tue, 06 Jul 2021 22:02:58 GMT * Dependencies: none * Global values: none # Credits -These definitions were written by Bart van der Schoor , BendingBender . +These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), and [BendingBender](https://github.com/BendingBender). diff --git a/node_modules/@types/lru-cache/index.d.ts b/node_modules/@types/lru-cache/index.d.ts index 2e5e8f5..167b4c4 100644 --- a/node_modules/@types/lru-cache/index.d.ts +++ b/node_modules/@types/lru-cache/index.d.ts @@ -127,14 +127,14 @@ declare namespace LRUCache { * function to all values in the cache. Not setting this is kind of silly, * since that's the whole purpose of this lib, but it defaults to `Infinity`. */ - max?: number; + max?: number | undefined; /** * Maximum age in ms. Items are not pro-actively pruned out as they age, * but if you try to get an item that is too old, it'll drop it and return * undefined instead of giving it to you. */ - maxAge?: number; + maxAge?: number | undefined; /** * Function that is used to calculate the length of stored items. @@ -164,7 +164,7 @@ declare namespace LRUCache { * return `undefined` when you try to get a stale entry, * as if it had already been deleted. */ - stale?: boolean; + stale?: boolean | undefined; /** * By default, if you set a `dispose()` method, then it'll be called whenever @@ -172,7 +172,7 @@ declare namespace LRUCache { * `dispose()` will only be called when a key falls out of the cache, * not when it is overwritten. */ - noDisposeOnSet?: boolean; + noDisposeOnSet?: boolean | undefined; /** * When using time-expiring entries with `maxAge`, setting this to `true` will make each @@ -180,7 +180,7 @@ declare namespace LRUCache { * causing it to not expire. (It can still fall out of cache based on recency of use, of * course.) */ - updateAgeOnGet?: boolean; + updateAgeOnGet?: boolean | undefined; } interface Entry { diff --git a/node_modules/@types/lru-cache/package.json b/node_modules/@types/lru-cache/package.json index cd48011..4da51e8 100644 --- a/node_modules/@types/lru-cache/package.json +++ b/node_modules/@types/lru-cache/package.json @@ -1,57 +1,30 @@ { - "_from": "@types/lru-cache@^5.1.0", - "_id": "@types/lru-cache@5.1.0", - "_inBundle": false, - "_integrity": "sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w==", - "_location": "/@types/lru-cache", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/lru-cache@^5.1.0", "name": "@types/lru-cache", - "escapedName": "@types%2flru-cache", - "scope": "@types", - "rawSpec": "^5.1.0", - "saveSpec": null, - "fetchSpec": "^5.1.0" - }, - "_requiredBy": [ - "/@octokit/auth-app" - ], - "_resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.0.tgz", - "_shasum": "57f228f2b80c046b4a1bd5cac031f81f207f4f03", - "_spec": "@types/lru-cache@^5.1.0", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@octokit\\auth-app", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Bart van der Schoor", - "url": "https://github.com/Bartvds" + "version": "5.1.1", + "description": "TypeScript definitions for lru-cache", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lru-cache", + "license": "MIT", + "contributors": [ + { + "name": "Bart van der Schoor", + "url": "https://github.com/Bartvds", + "githubUsername": "Bartvds" + }, + { + "name": "BendingBender", + "url": "https://github.com/BendingBender", + "githubUsername": "BendingBender" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/lru-cache" }, - { - "name": "BendingBender", - "url": "https://github.com/BendingBender" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for lru-cache", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/lru-cache", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/lru-cache" - }, - "scripts": {}, - "typeScriptVersion": "2.3", - "types": "index", - "typesPublisherContentHash": "e788fbaa8d876861ea50498a7ad67836060b1dd5b861e0bf5f0dd307bb5dc4bd", - "version": "5.1.0" -} + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "0ca9e508a03760598fc46f2d2546f293575b69fd823ccc42a80c56f579d650db", + "typeScriptVersion": "3.6" +} \ No newline at end of file diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md index a4842d1..38c7b0c 100644 --- a/node_modules/@types/node/README.md +++ b/node_modules/@types/node/README.md @@ -2,15 +2,15 @@ > `npm install --save @types/node` # Summary -This package contains type definitions for Node.js (http://nodejs.org/). +This package contains type definitions for Node.js (https://nodejs.org/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. ### Additional Details - * Last updated: Fri, 19 Feb 2021 00:38:57 GMT + * Last updated: Mon, 26 Dec 2022 17:32:37 GMT * Dependencies: none - * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout` + * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone` # Credits -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alexander T.](https://github.com/a-tarasyuk), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys). +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts index 720bbc6..e8595e6 100644 --- a/node_modules/@types/node/assert.d.ts +++ b/node_modules/@types/node/assert.d.ts @@ -1,40 +1,180 @@ -declare module 'node:assert' { - import assert = require('assert'); - export = assert; -} - +/** + * The `assert` module provides a set of assertion functions for verifying + * invariants. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js) + */ declare module 'assert' { - /** An alias of `assert.ok()`. */ - function assert(value: any, message?: string | Error): asserts value; + /** + * An alias of {@link ok}. + * @since v0.5.9 + * @param value The input that is checked for being truthy. + */ + function assert(value: unknown, message?: string | Error): asserts value; namespace assert { + /** + * Indicates the failure of an assertion. All errors thrown by the `assert` module + * will be instances of the `AssertionError` class. + */ class AssertionError extends Error { - actual: any; - expected: any; + actual: unknown; + expected: unknown; operator: string; generatedMessage: boolean; code: 'ERR_ASSERTION'; - constructor(options?: { /** If provided, the error message is set to this value. */ - message?: string; + message?: string | undefined; /** The `actual` property on the error instance. */ - actual?: any; + actual?: unknown | undefined; /** The `expected` property on the error instance. */ - expected?: any; + expected?: unknown | undefined; /** The `operator` property on the error instance. */ - operator?: string; + operator?: string | undefined; /** If provided, the generated stack trace omits frames before this function. */ // tslint:disable-next-line:ban-types - stackStartFn?: Function; + stackStartFn?: Function | undefined; }); } - + /** + * This feature is currently experimental and behavior might still change. + * @since v14.2.0, v12.19.0 + * @experimental + */ class CallTracker { + /** + * The wrapper function is expected to be called exactly `exact` times. If the + * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an + * error. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func); + * ``` + * @since v14.2.0, v12.19.0 + * @param [fn='A no-op function'] + * @param [exact=1] + * @return that wraps `fn`. + */ calls(exact?: number): () => void; calls any>(fn?: Func, exact?: number): Func; + /** + * Example: + * + * ```js + * import assert from 'node:assert'; + * + * const tracker = new assert.CallTracker(); + * + * function func() {} + * const callsfunc = tracker.calls(func); + * callsfunc(1, 2, 3); + * + * assert.deepStrictEqual(tracker.getCalls(callsfunc), + * [{ thisArg: this, arguments: [1, 2, 3 ] }]); + * ``` + * + * @since v18.8.0, v16.18.0 + * @params fn + * @returns An Array with the calls to a tracked function. + */ + getCalls(fn: Function): CallTrackerCall[]; + /** + * The arrays contains information about the expected and actual number of calls of + * the functions that have not been called the expected number of times. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * function foo() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func, 2); + * + * // Returns an array containing information on callsfunc() + * tracker.report(); + * // [ + * // { + * // message: 'Expected the func function to be executed 2 time(s) but was + * // executed 0 time(s).', + * // actual: 0, + * // expected: 2, + * // operator: 'func', + * // stack: stack trace + * // } + * // ] + * ``` + * @since v14.2.0, v12.19.0 + * @return of objects containing information about the wrapper functions returned by `calls`. + */ report(): CallTrackerReportInformation[]; + /** + * Reset calls of the call tracker. + * If a tracked function is passed as an argument, the calls will be reset for it. + * If no arguments are passed, all tracked functions will be reset. + * + * ```js + * import assert from 'node:assert'; + * + * const tracker = new assert.CallTracker(); + * + * function func() {} + * const callsfunc = tracker.calls(func); + * + * callsfunc(); + * // Tracker was called once + * tracker.getCalls(callsfunc).length === 1; + * + * tracker.reset(callsfunc); + * tracker.getCalls(callsfunc).length === 0; + * ``` + * + * @since v18.8.0, v16.18.0 + * @param fn a tracked function to reset. + */ + reset(fn?: Function): void; + /** + * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that + * have not been called the expected number of times. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func, 2); + * + * callsfunc(); + * + * // Will throw an error since callsfunc() was only called once. + * tracker.verify(); + * ``` + * @since v14.2.0, v12.19.0 + */ verify(): void; } + interface CallTrackerCall { + thisArg: object; + arguments: unknown[]; + } interface CallTrackerReportInformation { message: string; /** The actual number of times the function was called. */ @@ -46,74 +186,763 @@ declare module 'assert' { /** A stack trace of the function. */ stack: object; } - - type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error; - + type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error; + /** + * Throws an `AssertionError` with the provided error message or a default + * error message. If the `message` parameter is an instance of an `Error` then + * it will be thrown instead of the `AssertionError`. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.fail(); + * // AssertionError [ERR_ASSERTION]: Failed + * + * assert.fail('boom'); + * // AssertionError [ERR_ASSERTION]: boom + * + * assert.fail(new TypeError('need array')); + * // TypeError: need array + * ``` + * + * Using `assert.fail()` with more than two arguments is possible but deprecated. + * See below for further details. + * @since v0.1.21 + * @param [message='Failed'] + */ function fail(message?: string | Error): never; /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ function fail( - actual: any, - expected: any, + actual: unknown, + expected: unknown, message?: string | Error, operator?: string, // tslint:disable-next-line:ban-types - stackStartFn?: Function, + stackStartFn?: Function ): never; - function ok(value: any, message?: string | Error): asserts value; - /** @deprecated since v9.9.0 - use strictEqual() instead. */ - function equal(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use notStrictEqual() instead. */ - function notEqual(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */ - function deepEqual(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */ - function notDeepEqual(actual: any, expected: any, message?: string | Error): void; - function strictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; - function notStrictEqual(actual: any, expected: any, message?: string | Error): void; - function deepStrictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; - function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; - - function throws(block: () => any, message?: string | Error): void; - function throws(block: () => any, error: AssertPredicate, message?: string | Error): void; - function doesNotThrow(block: () => any, message?: string | Error): void; - function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void; - - function ifError(value: any): asserts value is null | undefined; - - function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; - function rejects( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; - function doesNotReject( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - + /** + * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`. + * + * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default + * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. + * + * Be aware that in the `repl` the error message will be different to the one + * thrown in a file! See below for further details. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.ok(true); + * // OK + * assert.ok(1); + * // OK + * + * assert.ok(); + * // AssertionError: No value argument passed to `assert.ok()` + * + * assert.ok(false, 'it\'s false'); + * // AssertionError: it's false + * + * // In the repl: + * assert.ok(typeof 123 === 'string'); + * // AssertionError: false == true + * + * // In a file (e.g. test.js): + * assert.ok(typeof 123 === 'string'); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(typeof 123 === 'string') + * + * assert.ok(false); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(false) + * + * assert.ok(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(0) + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * // Using `assert()` works the same: + * assert(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert(0) + * ``` + * @since v0.1.21 + */ + function ok(value: unknown, message?: string | Error): asserts value; + /** + * **Strict assertion mode** + * + * An alias of {@link strictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link strictEqual} instead. + * + * Tests shallow, coercive equality between the `actual` and `expected` parameters + * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled + * and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'assert'; + * + * assert.equal(1, 1); + * // OK, 1 == 1 + * assert.equal(1, '1'); + * // OK, 1 == '1' + * assert.equal(NaN, NaN); + * // OK + * + * assert.equal(1, 2); + * // AssertionError: 1 == 2 + * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); + * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } + * ``` + * + * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default + * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * @since v0.1.21 + */ + function equal(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. + * + * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is + * specially handled and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'assert'; + * + * assert.notEqual(1, 2); + * // OK + * + * assert.notEqual(1, 1); + * // AssertionError: 1 != 1 + * + * assert.notEqual(1, '1'); + * // AssertionError: 1 != '1' + * ``` + * + * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error + * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * @since v0.1.21 + */ + function notEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link deepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. + * + * Tests for deep equality between the `actual` and `expected` parameters. Consider + * using {@link deepStrictEqual} instead. {@link deepEqual} can have + * surprising results. + * + * _Deep equality_ means that the enumerable "own" properties of child objects + * are also recursively evaluated by the following rules. + * @since v0.1.21 + */ + function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notDeepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. + * + * Tests for any deep inequality. Opposite of {@link deepEqual}. + * + * ```js + * import assert from 'assert'; + * + * const obj1 = { + * a: { + * b: 1 + * } + * }; + * const obj2 = { + * a: { + * b: 2 + * } + * }; + * const obj3 = { + * a: { + * b: 1 + * } + * }; + * const obj4 = Object.create(obj1); + * + * assert.notDeepEqual(obj1, obj1); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj2); + * // OK + * + * assert.notDeepEqual(obj1, obj3); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj4); + * // OK + * ``` + * + * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default + * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Tests strict equality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'assert/strict'; + * + * assert.strictEqual(1, 2); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + * // 1 !== 2 + * + * assert.strictEqual(1, 1); + * // OK + * + * assert.strictEqual('Hello foobar', 'Hello World!'); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + actual - expected + * // + * // + 'Hello foobar' + * // - 'Hello World!' + * // ^ + * + * const apples = 1; + * const oranges = 2; + * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); + * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + * + * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); + * // TypeError: Inputs are not identical + * ``` + * + * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a + * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; + /** + * Tests strict inequality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'assert/strict'; + * + * assert.notStrictEqual(1, 2); + * // OK + * + * assert.notStrictEqual(1, 1); + * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: + * // + * // 1 + * + * assert.notStrictEqual(1, '1'); + * // OK + * ``` + * + * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a + * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Tests for deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. + * @since v1.2.0 + */ + function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; + /** + * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); + * // OK + * ``` + * + * If the values are deeply and strictly equal, an `AssertionError` is thrown + * with a `message` property set equal to the value of the `message` parameter. If + * the `message` parameter is undefined, a default error message is assigned. If + * the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v1.2.0 + */ + function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Expects the function `fn` to throw an error. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * a validation object where each property will be tested for strict deep equality, + * or an instance of error where each property will be tested for strict deep + * equality including the non-enumerable `message` and `name` properties. When + * using an object, it is also possible to use a regular expression, when + * validating against a string property. See below for examples. + * + * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation + * fails. + * + * Custom validation object/error instance: + * + * ```js + * import assert from 'assert/strict'; + * + * const err = new TypeError('Wrong value'); + * err.code = 404; + * err.foo = 'bar'; + * err.info = { + * nested: true, + * baz: 'text' + * }; + * err.reg = /abc/i; + * + * assert.throws( + * () => { + * throw err; + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * info: { + * nested: true, + * baz: 'text' + * } + * // Only properties on the validation object will be tested for. + * // Using nested objects requires all properties to be present. Otherwise + * // the validation is going to fail. + * } + * ); + * + * // Using regular expressions to validate error properties: + * throws( + * () => { + * throw err; + * }, + * { + * // The `name` and `message` properties are strings and using regular + * // expressions on those will match against the string. If they fail, an + * // error is thrown. + * name: /^TypeError$/, + * message: /Wrong/, + * foo: 'bar', + * info: { + * nested: true, + * // It is not possible to use regular expressions for nested properties! + * baz: 'text' + * }, + * // The `reg` property contains a regular expression and only if the + * // validation object contains an identical regular expression, it is going + * // to pass. + * reg: /abc/i + * } + * ); + * + * // Fails due to the different `message` and `name` properties: + * throws( + * () => { + * const otherErr = new Error('Not found'); + * // Copy all enumerable properties from `err` to `otherErr`. + * for (const [key, value] of Object.entries(err)) { + * otherErr[key] = value; + * } + * throw otherErr; + * }, + * // The error's `message` and `name` properties will also be checked when using + * // an error as validation object. + * err + * ); + * ``` + * + * Validate instanceof using constructor: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * Error + * ); + * ``` + * + * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): + * + * Using a regular expression runs `.toString` on the error object, and will + * therefore also include the error name. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * /^Error: Wrong value$/ + * ); + * ``` + * + * Custom error validation: + * + * The function must return `true` to indicate all internal validations passed. + * It will otherwise fail with an `AssertionError`. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * (err) => { + * assert(err instanceof Error); + * assert(/value/.test(err)); + * // Avoid returning anything from validation functions besides `true`. + * // Otherwise, it's not clear what part of the validation failed. Instead, + * // throw an error about the specific validation that failed (as done in this + * // example) and add as much helpful debugging information to that error as + * // possible. + * return true; + * }, + * 'unexpected error' + * ); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same + * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using + * a string as the second argument gets considered: + * + * ```js + * import assert from 'assert/strict'; + * + * function throwingFirst() { + * throw new Error('First'); + * } + * + * function throwingSecond() { + * throw new Error('Second'); + * } + * + * function notThrowing() {} + * + * // The second argument is a string and the input function threw an Error. + * // The first case will not throw as it does not match for the error message + * // thrown by the input function! + * assert.throws(throwingFirst, 'Second'); + * // In the next example the message has no benefit over the message from the + * // error and since it is not clear if the user intended to actually match + * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. + * assert.throws(throwingSecond, 'Second'); + * // TypeError [ERR_AMBIGUOUS_ARGUMENT] + * + * // The string is only used (as message) in case the function does not throw: + * assert.throws(notThrowing, 'Second'); + * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second + * + * // If it was intended to match for the error message do this instead: + * // It does not throw because the error messages match. + * assert.throws(throwingSecond, /Second$/); + * + * // If the error message does not match, an AssertionError is thrown. + * assert.throws(throwingFirst, /Second$/); + * // AssertionError [ERR_ASSERTION] + * ``` + * + * Due to the confusing error-prone notation, avoid a string as the second + * argument. + * @since v0.1.21 + */ + function throws(block: () => unknown, message?: string | Error): void; + function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Asserts that the function `fn` does not throw an error. + * + * Using `assert.doesNotThrow()` is actually not useful because there + * is no benefit in catching an error and then rethrowing it. Instead, consider + * adding a comment next to the specific code path that should not throw and keep + * error messages as expressive as possible. + * + * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function. + * + * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a + * different type, or if the `error` parameter is undefined, the error is + * propagated back to the caller. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation + * function. See {@link throws} for more details. + * + * The following, for instance, will throw the `TypeError` because there is no + * matching error type in the assertion: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError + * ); + * ``` + * + * However, the following will result in an `AssertionError` with the message + * 'Got unwanted exception...': + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * TypeError + * ); + * ``` + * + * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * /Wrong value/, + * 'Whoops' + * ); + * // Throws: AssertionError: Got unwanted exception: Whoops + * ``` + * @since v0.1.21 + */ + function doesNotThrow(block: () => unknown, message?: string | Error): void; + function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Throws `value` if `value` is not `undefined` or `null`. This is useful when + * testing the `error` argument in callbacks. The stack trace contains all frames + * from the error passed to `ifError()` including the potential new frames for`ifError()` itself. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.ifError(null); + * // OK + * assert.ifError(0); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 + * assert.ifError('error'); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' + * assert.ifError(new Error()); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error + * + * // Create some random error frames. + * let err; + * (function errorFrame() { + * err = new Error('test error'); + * })(); + * + * (function ifErrorFrame() { + * assert.ifError(err); + * })(); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + * // at ifErrorFrame + * // at errorFrame + * ``` + * @since v0.1.97 + */ + function ifError(value: unknown): asserts value is null | undefined; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is rejected. + * + * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the + * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error + * handler is skipped. + * + * Besides the async nature to await the completion behaves identically to {@link throws}. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * an object where each property will be tested for, or an instance of error where + * each property will be tested for including the non-enumerable `message` and`name` properties. + * + * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject. + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * { + * name: 'TypeError', + * message: 'Wrong value' + * } + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * (err) => { + * assert.strictEqual(err.name, 'TypeError'); + * assert.strictEqual(err.message, 'Wrong value'); + * return true; + * } + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * assert.rejects( + * Promise.reject(new Error('Wrong value')), + * Error + * ).then(() => { + * // ... + * }); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the + * example in {@link throws} carefully if using a string as the second + * argument gets considered. + * @since v10.0.0 + */ + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is not rejected. + * + * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If + * the function does not return a promise, `assert.doesNotReject()` will return a + * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases + * the error handler is skipped. + * + * Using `assert.doesNotReject()` is actually not useful because there is little + * benefit in catching a rejection and then rejecting it again. Instead, consider + * adding a comment next to the specific code path that should not reject and keep + * error messages as expressive as possible. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation + * function. See {@link throws} for more details. + * + * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.doesNotReject( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) + * .then(() => { + * // ... + * }); + * ``` + * @since v10.0.0 + */ + function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise; + /** + * Expects the `string` input to match the regular expression. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.match('I will fail', /pass/); + * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... + * + * assert.match(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.match('I will pass', /pass/); + * // OK + * ``` + * + * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v13.6.0, v12.16.0 + */ function match(value: string, regExp: RegExp, message?: string | Error): void; + /** + * Expects the `string` input not to match the regular expression. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotMatch('I will fail', /fail/); + * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... + * + * assert.doesNotMatch(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.doesNotMatch('I will pass', /different/); + * // OK + * ``` + * + * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v13.6.0, v12.16.0 + */ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; - - const strict: Omit< - typeof assert, - | 'equal' - | 'notEqual' - | 'deepEqual' - | 'notDeepEqual' - | 'ok' - | 'strictEqual' - | 'deepStrictEqual' - | 'ifError' - | 'strict' - > & { - (value: any, message?: string | Error): asserts value; + const strict: Omit & { + (value: unknown, message?: string | Error): asserts value; equal: typeof strictEqual; notEqual: typeof notStrictEqual; deepEqual: typeof deepStrictEqual; notDeepEqual: typeof notDeepStrictEqual; - // Mapped types and assertion functions are incompatible? // TS2775: Assertions require every name in the call target // to be declared with an explicit type annotation. @@ -124,6 +953,9 @@ declare module 'assert' { strict: typeof strict; }; } - + export = assert; +} +declare module 'node:assert' { + import assert = require('assert'); export = assert; } diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts new file mode 100644 index 0000000..b4319b9 --- /dev/null +++ b/node_modules/@types/node/assert/strict.d.ts @@ -0,0 +1,8 @@ +declare module 'assert/strict' { + import { strict } from 'node:assert'; + export = strict; +} +declare module 'node:assert/strict' { + import { strict } from 'node:assert'; + export = strict; +} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts index 10dccc6..0bf4739 100644 --- a/node_modules/@types/node/async_hooks.d.ts +++ b/node_modules/@types/node/async_hooks.d.ts @@ -1,23 +1,47 @@ /** - * Async Hooks module: https://nodejs.org/api/async_hooks.html - */ -declare module 'node:async_hooks' { - export * from 'async_hooks'; -} - -/** - * Async Hooks module: https://nodejs.org/api/async_hooks.html + * The `async_hooks` module provides an API to track asynchronous resources. It + * can be accessed using: + * + * ```js + * import async_hooks from 'async_hooks'; + * ``` + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js) */ declare module 'async_hooks' { /** - * Returns the asyncId of the current execution context. + * ```js + * import { executionAsyncId } from 'async_hooks'; + * + * console.log(executionAsyncId()); // 1 - bootstrap + * fs.open(path, 'r', (err, fd) => { + * console.log(executionAsyncId()); // 6 - open() + * }); + * ``` + * + * The ID returned from `executionAsyncId()` is related to execution timing, not + * causality (which is covered by `triggerAsyncId()`): + * + * ```js + * const server = net.createServer((conn) => { + * // Returns the ID of the server, not of the new connection, because the + * // callback runs in the execution scope of the server's MakeCallback(). + * async_hooks.executionAsyncId(); + * + * }).listen(port, () => { + * // Returns the ID of a TickObject (process.nextTick()) because all + * // callbacks passed to .listen() are wrapped in a nextTick(). + * async_hooks.executionAsyncId(); + * }); + * ``` + * + * Promise contexts may not get precise `executionAsyncIds` by default. + * See the section on `promise execution tracking`. + * @since v8.1.0 + * @return The `asyncId` of the current execution context. Useful to track when something calls. */ function executionAsyncId(): number; - /** - * The resource representing the current execution. - * Useful to store data within the resource. - * * Resource objects returned by `executionAsyncResource()` are most often internal * Node.js handle objects with undocumented APIs. Using any functions or properties * on the object is likely to crash your application and should be avoided. @@ -25,14 +49,70 @@ declare module 'async_hooks' { * Using `executionAsyncResource()` in the top-level execution context will * return an empty object as there is no handle or request object to use, * but having an object representing the top-level can be helpful. + * + * ```js + * import { open } from 'fs'; + * import { executionAsyncId, executionAsyncResource } from 'async_hooks'; + * + * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} + * open(new URL(import.meta.url), 'r', (err, fd) => { + * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap + * }); + * ``` + * + * This can be used to implement continuation local storage without the + * use of a tracking `Map` to store the metadata: + * + * ```js + * import { createServer } from 'http'; + * import { + * executionAsyncId, + * executionAsyncResource, + * createHook + * } from 'async_hooks'; + * const sym = Symbol('state'); // Private symbol to avoid pollution + * + * createHook({ + * init(asyncId, type, triggerAsyncId, resource) { + * const cr = executionAsyncResource(); + * if (cr) { + * resource[sym] = cr[sym]; + * } + * } + * }).enable(); + * + * const server = createServer((req, res) => { + * executionAsyncResource()[sym] = { state: req.url }; + * setTimeout(function() { + * res.end(JSON.stringify(executionAsyncResource()[sym])); + * }, 100); + * }).listen(3000); + * ``` + * @since v13.9.0, v12.17.0 + * @return The resource representing the current execution. Useful to store data within the resource. */ function executionAsyncResource(): object; - /** - * Returns the ID of the resource responsible for calling the callback that is currently being executed. + * ```js + * const server = net.createServer((conn) => { + * // The resource that caused (or triggered) this callback to be called + * // was that of the new connection. Thus the return value of triggerAsyncId() + * // is the asyncId of "conn". + * async_hooks.triggerAsyncId(); + * + * }).listen(port, () => { + * // Even though all callbacks passed to .listen() are wrapped in a nextTick() + * // the callback itself exists because the call to the server's .listen() + * // was made. So the return value would be the ID of the server. + * async_hooks.triggerAsyncId(); + * }); + * ``` + * + * Promise contexts may not get valid `triggerAsyncId`s by default. See + * the section on `promise execution tracking`. + * @return The ID of the resource responsible for calling the callback that is currently being executed. */ function triggerAsyncId(): number; - interface HookCallbacks { /** * Called when a class is constructed that has the possibility to emit an asynchronous event. @@ -42,73 +122,133 @@ declare module 'async_hooks' { * @param resource reference to the resource representing the async operation, needs to be released during destroy */ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; - /** * When an asynchronous operation is initiated or completes a callback is called to notify the user. * The before callback is called just before said callback is executed. * @param asyncId the unique identifier assigned to the resource about to execute the callback. */ before?(asyncId: number): void; - /** * Called immediately after the callback specified in before is completed. * @param asyncId the unique identifier assigned to the resource which has executed the callback. */ after?(asyncId: number): void; - /** * Called when a promise has resolve() called. This may not be in the same execution id * as the promise itself. * @param asyncId the unique id for the promise that was resolve()d. */ promiseResolve?(asyncId: number): void; - /** * Called after the resource corresponding to asyncId is destroyed * @param asyncId a unique ID for the async resource */ destroy?(asyncId: number): void; } - interface AsyncHook { /** * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. */ enable(): this; - /** * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. */ disable(): this; } - /** - * Registers functions to be called for different lifetime events of each async operation. - * @param options the callbacks to register - * @return an AsyncHooks instance used for disabling and enabling hooks + * Registers functions to be called for different lifetime events of each async + * operation. + * + * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the + * respective asynchronous event during a resource's lifetime. + * + * All callbacks are optional. For example, if only resource cleanup needs to + * be tracked, then only the `destroy` callback needs to be passed. The + * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section. + * + * ```js + * import { createHook } from 'async_hooks'; + * + * const asyncHook = createHook({ + * init(asyncId, type, triggerAsyncId, resource) { }, + * destroy(asyncId) { } + * }); + * ``` + * + * The callbacks will be inherited via the prototype chain: + * + * ```js + * class MyAsyncCallbacks { + * init(asyncId, type, triggerAsyncId, resource) { } + * destroy(asyncId) {} + * } + * + * class MyAddedCallbacks extends MyAsyncCallbacks { + * before(asyncId) { } + * after(asyncId) { } + * } + * + * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); + * ``` + * + * Because promises are asynchronous resources whose lifecycle is tracked + * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises. + * @since v8.1.0 + * @param callbacks The `Hook Callbacks` to register + * @return Instance used for disabling and enabling hooks */ - function createHook(options: HookCallbacks): AsyncHook; - + function createHook(callbacks: HookCallbacks): AsyncHook; interface AsyncResourceOptions { - /** - * The ID of the execution context that created this async event. - * Default: `executionAsyncId()` - */ - triggerAsyncId?: number; - - /** - * Disables automatic `emitDestroy` when the object is garbage collected. - * This usually does not need to be set (even if `emitDestroy` is called - * manually), unless the resource's `asyncId` is retrieved and the - * sensitive API's `emitDestroy` is called with it. - * Default: `false` - */ - requireManualDestroy?: boolean; + /** + * The ID of the execution context that created this async event. + * @default executionAsyncId() + */ + triggerAsyncId?: number | undefined; + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * @default false + */ + requireManualDestroy?: boolean | undefined; } - /** - * The class AsyncResource was designed to be extended by the embedder's async resources. - * Using this users can easily trigger the lifetime events of their own resources. + * The class `AsyncResource` is designed to be extended by the embedder's async + * resources. Using this, users can easily trigger the lifetime events of their + * own resources. + * + * The `init` hook will trigger when an `AsyncResource` is instantiated. + * + * The following is an overview of the `AsyncResource` API. + * + * ```js + * import { AsyncResource, executionAsyncId } from 'async_hooks'; + * + * // AsyncResource() is meant to be extended. Instantiating a + * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * // async_hook.executionAsyncId() is used. + * const asyncResource = new AsyncResource( + * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false } + * ); + * + * // Run a function in the execution context of the resource. This will + * // * establish the context of the resource + * // * trigger the AsyncHooks before callbacks + * // * call the provided function `fn` with the supplied arguments + * // * trigger the AsyncHooks after callbacks + * // * restore the original execution context + * asyncResource.runInAsyncScope(fn, thisArg, ...args); + * + * // Call AsyncHooks destroy callbacks. + * asyncResource.emitDestroy(); + * + * // Return the unique ID assigned to the AsyncResource instance. + * asyncResource.asyncId(); + * + * // Return the trigger ID for the AsyncResource instance. + * asyncResource.triggerAsyncId(); + * ``` */ class AsyncResource { /** @@ -118,116 +258,244 @@ declare module 'async_hooks' { * @param type The type of async event. * @param triggerAsyncId The ID of the execution context that created * this async event (default: `executionAsyncId()`), or an - * AsyncResourceOptions object (since 9.3) + * AsyncResourceOptions object (since v9.3.0) */ - constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions); - + constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); /** * Binds the given function to the current execution context. + * + * The returned function will have an `asyncResource` property referencing + * the `AsyncResource` to which the function is bound. + * @since v14.8.0, v12.19.0 * @param fn The function to bind to the current execution context. * @param type An optional name to associate with the underlying `AsyncResource`. */ - static bind any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource }; - + static bind any, ThisArg>( + fn: Func, + type?: string, + thisArg?: ThisArg + ): Func & { + asyncResource: AsyncResource; + }; /** * Binds the given function to execute to this `AsyncResource`'s scope. + * + * The returned function will have an `asyncResource` property referencing + * the `AsyncResource` to which the function is bound. + * @since v14.8.0, v12.19.0 * @param fn The function to bind to the current `AsyncResource`. */ - bind any>(fn: Func): Func & { asyncResource: AsyncResource }; - + bind any>( + fn: Func + ): Func & { + asyncResource: AsyncResource; + }; /** - * Call the provided function with the provided arguments in the - * execution context of the async resource. This will establish the - * context, trigger the AsyncHooks before callbacks, call the function, - * trigger the AsyncHooks after callbacks, and then restore the original - * execution context. - * @param fn The function to call in the execution context of this - * async resource. + * Call the provided function with the provided arguments in the execution context + * of the async resource. This will establish the context, trigger the AsyncHooks + * before callbacks, call the function, trigger the AsyncHooks after callbacks, and + * then restore the original execution context. + * @since v9.6.0 + * @param fn The function to call in the execution context of this async resource. * @param thisArg The receiver to be used for the function call. * @param args Optional arguments to pass to the function. */ runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result; - /** - * Call AsyncHooks destroy callbacks. + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + * @return A reference to `asyncResource`. */ - emitDestroy(): void; - + emitDestroy(): this; /** - * @return the unique ID assigned to this AsyncResource instance. + * @return The unique `asyncId` assigned to the resource. */ asyncId(): number; - /** - * @return the trigger ID for this AsyncResource instance. + * + * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. */ triggerAsyncId(): number; } - /** - * When having multiple instances of `AsyncLocalStorage`, they are independent - * from each other. It is safe to instantiate this class multiple times. + * This class creates stores that stay coherent through asynchronous operations. + * + * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe + * implementation that involves significant optimizations that are non-obvious to + * implement. + * + * The following example uses `AsyncLocalStorage` to build a simple logger + * that assigns IDs to incoming HTTP requests and includes them in messages + * logged within each request. + * + * ```js + * import http from 'http'; + * import { AsyncLocalStorage } from 'async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * function logWithId(msg) { + * const id = asyncLocalStorage.getStore(); + * console.log(`${id !== undefined ? id : '-'}:`, msg); + * } + * + * let idSeq = 0; + * http.createServer((req, res) => { + * asyncLocalStorage.run(idSeq++, () => { + * logWithId('start'); + * // Imagine any chain of async operations here + * setImmediate(() => { + * logWithId('finish'); + * res.end(); + * }); + * }); + * }).listen(8080); + * + * http.get('http://localhost:8080'); + * http.get('http://localhost:8080'); + * // Prints: + * // 0: start + * // 1: start + * // 0: finish + * // 1: finish + * ``` + * + * Each instance of `AsyncLocalStorage` maintains an independent storage context. + * Multiple instances can safely exist simultaneously without risk of interfering + * with each other's data. + * @since v13.10.0, v12.17.0 */ class AsyncLocalStorage { /** - * This method disables the instance of `AsyncLocalStorage`. All subsequent calls - * to `asyncLocalStorage.getStore()` will return `undefined` until - * `asyncLocalStorage.run()` is called again. + * Disables the instance of `AsyncLocalStorage`. All subsequent calls + * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. * * When calling `asyncLocalStorage.disable()`, all current contexts linked to the * instance will be exited. * - * Calling `asyncLocalStorage.disable()` is required before the - * `asyncLocalStorage` can be garbage collected. This does not apply to stores + * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores * provided by the `asyncLocalStorage`, as those objects are garbage collected * along with the corresponding async resources. * - * This method is to be used when the `asyncLocalStorage` is not in use anymore + * Use this method when the `asyncLocalStorage` is not in use anymore * in the current process. + * @since v13.10.0, v12.17.0 + * @experimental */ disable(): void; - /** - * This method returns the current store. If this method is called outside of an - * asynchronous context initialized by calling `asyncLocalStorage.run`, it will - * return `undefined`. + * Returns the current store. + * If called outside of an asynchronous context initialized by + * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it + * returns `undefined`. + * @since v13.10.0, v12.17.0 */ getStore(): T | undefined; - /** - * This methods runs a function synchronously within a context and return its - * return value. The store is not accessible outside of the callback function or - * the asynchronous operations created within the callback. + * Runs a function synchronously within a context and returns its + * return value. The store is not accessible outside of the callback function. + * The store is accessible to any asynchronous operations created within the + * callback. + * + * The optional `args` are passed to the callback function. * - * Optionally, arguments can be passed to the function. They will be passed to the - * callback function. + * If the callback function throws an error, the error is thrown by `run()` too. + * The stacktrace is not impacted by this call and the context is exited. * - * I the callback function throws an error, it will be thrown by `run` too. The - * stacktrace will not be impacted by this call and the context will be exited. + * Example: + * + * ```js + * const store = { id: 2 }; + * try { + * asyncLocalStorage.run(store, () => { + * asyncLocalStorage.getStore(); // Returns the store object + * setTimeout(() => { + * asyncLocalStorage.getStore(); // Returns the store object + * }, 200); + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns undefined + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 */ - // TODO: Apply generic vararg once available - run(store: T, callback: (...args: any[]) => R, ...args: any[]): R; - + run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; /** - * This methods runs a function synchronously outside of a context and return its - * return value. The store is not accessible within the callback function or the - * asynchronous operations created within the callback. + * Runs a function synchronously outside of a context and returns its + * return value. The store is not accessible within the callback function or + * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`. + * + * The optional `args` are passed to the callback function. * - * Optionally, arguments can be passed to the function. They will be passed to the - * callback function. + * If the callback function throws an error, the error is thrown by `exit()` too. + * The stacktrace is not impacted by this call and the context is re-entered. * - * If the callback function throws an error, it will be thrown by `exit` too. The - * stacktrace will not be impacted by this call and the context will be - * re-entered. + * Example: + * + * ```js + * // Within a call to run + * try { + * asyncLocalStorage.getStore(); // Returns the store object or value + * asyncLocalStorage.exit(() => { + * asyncLocalStorage.getStore(); // Returns undefined + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns the same object or value + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + * @experimental */ - // TODO: Apply generic vararg once available - exit(callback: (...args: any[]) => R, ...args: any[]): R; - + exit(callback: (...args: TArgs) => R, ...args: TArgs): R; /** - * Calling `asyncLocalStorage.enterWith(store)` will transition into the context - * for the remainder of the current synchronous execution and will persist - * through any following asynchronous calls. + * Transitions into the context for the remainder of the current + * synchronous execution and then persists the store through any following + * asynchronous calls. + * + * Example: + * + * ```js + * const store = { id: 1 }; + * // Replaces previous store with the given store object + * asyncLocalStorage.enterWith(store); + * asyncLocalStorage.getStore(); // Returns the store object + * someAsyncOperation(() => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * ``` + * + * This transition will continue for the _entire_ synchronous execution. + * This means that if, for example, the context is entered within an event + * handler subsequent event handlers will also run within that context unless + * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons + * to use the latter method. + * + * ```js + * const store = { id: 1 }; + * + * emitter.on('my-event', () => { + * asyncLocalStorage.enterWith(store); + * }); + * emitter.on('my-event', () => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * + * asyncLocalStorage.getStore(); // Returns undefined + * emitter.emit('my-event'); + * asyncLocalStorage.getStore(); // Returns the same object + * ``` + * @since v13.11.0, v12.17.0 + * @experimental */ enterWith(store: T): void; } } +declare module 'node:async_hooks' { + export * from 'async_hooks'; +} diff --git a/node_modules/@types/node/base.d.ts b/node_modules/@types/node/base.d.ts deleted file mode 100644 index fa67179..0000000 --- a/node_modules/@types/node/base.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -// NOTE: These definitions support NodeJS and TypeScript 3.7. - -// NOTE: TypeScript version-specific augmentations can be found in the following paths: -// - ~/base.d.ts - Shared definitions common to all TypeScript versions -// - ~/index.d.ts - Definitions specific to TypeScript 2.1 -// - ~/ts3.7/base.d.ts - Definitions specific to TypeScript 3.7 -// - ~/ts3.7/index.d.ts - Definitions specific to TypeScript 3.7 with assert pulled in - -// Reference required types from the default lib: -/// -/// -/// -/// - -// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: -/// - -// TypeScript 3.7-specific augmentations: -/// diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts index da17c75..5ec326d 100644 --- a/node_modules/@types/node/buffer.d.ts +++ b/node_modules/@types/node/buffer.d.ts @@ -1,8 +1,51 @@ -declare module 'node:buffer' { - export * from 'buffer'; -} - +/** + * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many + * Node.js APIs support `Buffer`s. + * + * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and + * extends it with methods that cover additional use cases. Node.js APIs accept + * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well. + * + * While the `Buffer` class is available within the global scope, it is still + * recommended to explicitly reference it via an import or require statement. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Creates a zero-filled Buffer of length 10. + * const buf1 = Buffer.alloc(10); + * + * // Creates a Buffer of length 10, + * // filled with bytes which all have the value `1`. + * const buf2 = Buffer.alloc(10, 1); + * + * // Creates an uninitialized buffer of length 10. + * // This is faster than calling Buffer.alloc() but the returned + * // Buffer instance might contain old data that needs to be + * // overwritten using fill(), write(), or other functions that fill the Buffer's + * // contents. + * const buf3 = Buffer.allocUnsafe(10); + * + * // Creates a Buffer containing the bytes [1, 2, 3]. + * const buf4 = Buffer.from([1, 2, 3]); + * + * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries + * // are all truncated using `(value & 255)` to fit into the range 0–255. + * const buf5 = Buffer.from([257, 257.5, -255, '1']); + * + * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést': + * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation) + * // [116, 195, 169, 115, 116] (in decimal notation) + * const buf6 = Buffer.from('tést'); + * + * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. + * const buf7 = Buffer.from('tést', 'latin1'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/buffer.js) + */ declare module 'buffer' { + import { BinaryLike } from 'node:crypto'; + import { ReadableStream as WebReadableStream } from 'node:stream/web'; export const INSPECT_MAX_BYTES: number; export const kMaxLength: number; export const kStringMaxLength: number; @@ -10,17 +53,2206 @@ declare module 'buffer' { MAX_LENGTH: number; MAX_STRING_LENGTH: number; }; - const BuffType: typeof Buffer; - - export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary"; - + export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary'; + /** + * Re-encodes the given `Buffer` or `Uint8Array` instance from one character + * encoding to another. Returns a new `Buffer` instance. + * + * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if + * conversion from `fromEnc` to `toEnc` is not permitted. + * + * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. + * + * The transcoding process will use substitution characters if a given byte + * sequence cannot be adequately represented in the target encoding. For instance: + * + * ```js + * import { Buffer, transcode } from 'buffer'; + * + * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); + * console.log(newBuf.toString('ascii')); + * // Prints: '?' + * ``` + * + * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced + * with `?` in the transcoded `Buffer`. + * @since v7.1.0 + * @param source A `Buffer` or `Uint8Array` instance. + * @param fromEnc The current encoding. + * @param toEnc To target encoding. + */ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; - export const SlowBuffer: { /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */ - new(size: number): Buffer; + new (size: number): Buffer; prototype: Buffer; }; + /** + * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using + * a prior call to `URL.createObjectURL()`. + * @since v16.7.0 + * @experimental + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + export function resolveObjectURL(id: string): Blob | undefined; + export { Buffer }; + /** + * @experimental + */ + export interface BlobOptions { + /** + * @default 'utf8' + */ + encoding?: BufferEncoding | undefined; + /** + * The Blob content-type. The intent is for `type` to convey + * the MIME media type of the data, however no validation of the type format + * is performed. + */ + type?: string | undefined; + } + /** + * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across + * multiple worker threads. + * @since v15.7.0, v14.18.0 + */ + export class Blob { + /** + * The total size of the `Blob` in bytes. + * @since v15.7.0, v14.18.0 + */ + readonly size: number; + /** + * The content-type of the `Blob`. + * @since v15.7.0, v14.18.0 + */ + readonly type: string; + /** + * Creates a new `Blob` object containing a concatenation of the given sources. + * + * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into + * the 'Blob' and can therefore be safely modified after the 'Blob' is created. + * + * String sources are also copied into the `Blob`. + */ + constructor(sources: Array, options?: BlobOptions); + /** + * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of + * the `Blob` data. + * @since v15.7.0, v14.18.0 + */ + arrayBuffer(): Promise; + /** + * Creates and returns a new `Blob` containing a subset of this `Blob` objects + * data. The original `Blob` is not altered. + * @since v15.7.0, v14.18.0 + * @param start The starting index. + * @param end The ending index. + * @param type The content-type for the new `Blob` + */ + slice(start?: number, end?: number, type?: string): Blob; + /** + * Returns a promise that fulfills with the contents of the `Blob` decoded as a + * UTF-8 string. + * @since v15.7.0, v14.18.0 + */ + text(): Promise; + /** + * Returns a new (WHATWG) `ReadableStream` that allows the content of the `Blob` to be read. + * @since v16.7.0 + */ + stream(): WebReadableStream; + } + export import atob = globalThis.atob; + export import btoa = globalThis.btoa; + + import { Blob as NodeBlob } from 'buffer'; + // This conditional type will be the existing global Blob in a browser, or + // the copy below in a Node environment. + type __Blob = typeof globalThis extends { onmessage: any, Blob: infer T } + ? T : NodeBlob; + global { + // Buffer class + type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex'; + type WithImplicitCoercion = + | T + | { + valueOf(): T; + }; + /** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' + */ + interface BufferConstructor { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new (str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new (size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new (array: Uint8Array): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new (array: ReadonlyArray): Buffer; + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. + */ + new (buffer: Buffer): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(arrayBuffer: WithImplicitCoercion, byteOffset?: number, length?: number): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param data data to create a new Buffer + */ + from(data: Uint8Array | ReadonlyArray): Buffer; + from(data: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + */ + from( + str: + | WithImplicitCoercion + | { + [Symbol.toPrimitive](hint: 'string'): string; + }, + encoding?: BufferEncoding + ): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns `true` if `obj` is a `Buffer`, `false` otherwise. + * + * ```js + * import { Buffer } from 'buffer'; + * + * Buffer.isBuffer(Buffer.alloc(10)); // true + * Buffer.isBuffer(Buffer.from('foo')); // true + * Buffer.isBuffer('a string'); // false + * Buffer.isBuffer([]); // false + * Buffer.isBuffer(new Uint8Array(1024)); // false + * ``` + * @since v0.1.101 + */ + isBuffer(obj: any): obj is Buffer; + /** + * Returns `true` if `encoding` is the name of a supported character encoding, + * or `false` otherwise. + * + * ```js + * import { Buffer } from 'buffer'; + * + * console.log(Buffer.isEncoding('utf8')); + * // Prints: true + * + * console.log(Buffer.isEncoding('hex')); + * // Prints: true + * + * console.log(Buffer.isEncoding('utf/8')); + * // Prints: false + * + * console.log(Buffer.isEncoding('')); + * // Prints: false + * ``` + * @since v0.9.1 + * @param encoding A character encoding name to check. + */ + isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Returns the byte length of a string when encoded using `encoding`. + * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account + * for the encoding that is used to convert the string into bytes. + * + * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. + * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the + * return value might be greater than the length of a `Buffer` created from the + * string. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const str = '\u00bd + \u00bc = \u00be'; + * + * console.log(`${str}: ${str.length} characters, ` + + * `${Buffer.byteLength(str, 'utf8')} bytes`); + * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes + * ``` + * + * When `string` is a + * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- + * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- + * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. + * @since v0.1.90 + * @param string A value to calculate the length of. + * @param [encoding='utf8'] If `string` is a string, this is its encoding. + * @return The number of bytes contained within `string`. + */ + byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it is coerced to an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: ReadonlyArray, totalLength?: number): Buffer; + /** + * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('1234'); + * const buf2 = Buffer.from('0123'); + * const arr = [buf1, buf2]; + * + * console.log(arr.sort(Buffer.compare)); + * // Prints: [ , ] + * // (This result is equal to: [buf2, buf1].) + * ``` + * @since v0.11.13 + * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. + */ + compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`,`Buffer.from(array)`, `Buffer.concat()`, and the + * deprecated`new Buffer(size)` constructor only when `size` is less than or equal + * to `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. A zero-length `Buffer` is created + * if `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This + * allows applications to avoid the garbage collection overhead of creating many + * individually allocated `Buffer` instances. This approach improves both + * performance and memory usage by eliminating the need to track and clean up as + * many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + /** + * This is the size (in bytes) of pre-allocated internal `Buffer` instances used + * for pooling. This value may be modified. + * @since v0.11.3 + */ + poolSize: number; + } + interface Buffer extends Uint8Array { + /** + * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did + * not contain enough space to fit the entire string, only part of `string` will be + * written. However, partially encoded characters will not be written. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(256); + * + * const len = buf.write('\u00bd + \u00bc = \u00be', 0); + * + * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); + * // Prints: 12 bytes: ½ + ¼ = ¾ + * + * const buffer = Buffer.alloc(10); + * + * const length = buffer.write('abcd', 8); + * + * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); + * // Prints: 2 bytes : ab + * ``` + * @since v0.1.90 + * @param string String to write to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write `string`. + * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). + * @param [encoding='utf8'] The character encoding of `string`. + * @return Number of bytes written. + */ + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + /** + * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. + * + * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, + * then each invalid byte is replaced with the replacement character `U+FFFD`. + * + * The maximum length of a string instance (in UTF-16 code units) is available + * as {@link constants.MAX_STRING_LENGTH}. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * console.log(buf1.toString('utf8')); + * // Prints: abcdefghijklmnopqrstuvwxyz + * console.log(buf1.toString('utf8', 0, 5)); + * // Prints: abcde + * + * const buf2 = Buffer.from('tést'); + * + * console.log(buf2.toString('hex')); + * // Prints: 74c3a97374 + * console.log(buf2.toString('utf8', 0, 3)); + * // Prints: té + * console.log(buf2.toString(undefined, 0, 3)); + * // Prints: té + * ``` + * @since v0.1.90 + * @param [encoding='utf8'] The character encoding to use. + * @param [start=0] The byte offset to start decoding at. + * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). + */ + toString(encoding?: BufferEncoding, start?: number, end?: number): string; + /** + * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls + * this function when stringifying a `Buffer` instance. + * + * `Buffer.from()` accepts objects in the format returned from this method. + * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); + * const json = JSON.stringify(buf); + * + * console.log(json); + * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} + * + * const copy = JSON.parse(json, (key, value) => { + * return value && value.type === 'Buffer' ? + * Buffer.from(value) : + * value; + * }); + * + * console.log(copy); + * // Prints: + * ``` + * @since v0.9.2 + */ + toJSON(): { + type: 'Buffer'; + data: number[]; + }; + /** + * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('414243', 'hex'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.equals(buf2)); + * // Prints: true + * console.log(buf1.equals(buf3)); + * // Prints: false + * ``` + * @since v0.11.13 + * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. + */ + equals(otherBuffer: Uint8Array): boolean; + /** + * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. + * Comparison is based on the actual sequence of bytes in each `Buffer`. + * + * * `0` is returned if `target` is the same as `buf` + * * `1` is returned if `target` should come _before_`buf` when sorted. + * * `-1` is returned if `target` should come _after_`buf` when sorted. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('BCD'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.compare(buf1)); + * // Prints: 0 + * console.log(buf1.compare(buf2)); + * // Prints: -1 + * console.log(buf1.compare(buf3)); + * // Prints: -1 + * console.log(buf2.compare(buf1)); + * // Prints: 1 + * console.log(buf2.compare(buf3)); + * // Prints: 1 + * console.log([buf1, buf2, buf3].sort(Buffer.compare)); + * // Prints: [ , , ] + * // (This result is equal to: [buf1, buf3, buf2].) + * ``` + * + * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); + * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); + * + * console.log(buf1.compare(buf2, 5, 9, 0, 4)); + * // Prints: 0 + * console.log(buf1.compare(buf2, 0, 6, 4)); + * // Prints: -1 + * console.log(buf1.compare(buf2, 5, 6, 5)); + * // Prints: 1 + * ``` + * + * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. + * @since v0.11.13 + * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. + * @param [targetStart=0] The offset within `target` at which to begin comparison. + * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). + * @param [sourceStart=0] The offset within `buf` at which to begin comparison. + * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). + */ + compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1; + /** + * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. + * + * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available + * for all TypedArrays, including Node.js `Buffer`s, although it takes + * different function arguments. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create two `Buffer` instances. + * const buf1 = Buffer.allocUnsafe(26); + * const buf2 = Buffer.allocUnsafe(26).fill('!'); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. + * buf1.copy(buf2, 8, 16, 20); + * // This is equivalent to: + * // buf2.set(buf1.subarray(16, 20), 8); + * + * console.log(buf2.toString('ascii', 0, 25)); + * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! + * ``` + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a `Buffer` and copy data from one region to an overlapping region + * // within the same `Buffer`. + * + * const buf = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf[i] = i + 97; + * } + * + * buf.copy(buf, 0, 4, 10); + * + * console.log(buf.toString()); + * // Prints: efghijghijklmnopqrstuvwxyz + * ``` + * @since v0.1.90 + * @param target A `Buffer` or {@link Uint8Array} to copy into. + * @param [targetStart=0] The offset within `target` at which to begin writing. + * @param [sourceStart=0] The offset within `buf` from which to begin copying. + * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). + * @return The number of bytes copied. + */ + copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64BE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64LE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64LE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * This function is also available under the `writeBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64BE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * + * This function is also available under the `writeBigUint64LE` alias. + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64LE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64LE(value: bigint, offset?: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintLE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntLE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntLE + * @since v14.9.0, v12.19.0 + */ + writeUintLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintBE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntBE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntBE + * @since v14.9.0, v12.19.0 + */ + writeUintBE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than a signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a + * signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntBE(value: number, offset: number, byteLength: number): number; + /** + * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64BE(0)); + * // Prints: 4294967295n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64BE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + readBigUint64BE(offset?: number): bigint; + /** + * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64LE(0)); + * // Prints: 18446744069414584320n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64LE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + readBigUint64LE(offset?: number): bigint; + /** + * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64BE(offset?: number): bigint; + /** + * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64LE(offset?: number): bigint; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintLE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntLE(0, 6).toString(16)); + * // Prints: ab9078563412 + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntLE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntLE + * @since v14.9.0, v12.19.0 + */ + readUintLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintBE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readUIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntBE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntBE + * @since v14.9.0, v12.19.0 + */ + readUintBE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntLE(0, 6).toString(16)); + * // Prints: -546f87a9cbee + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * console.log(buf.readIntBE(1, 0).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntBE(offset: number, byteLength: number): number; + /** + * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint8` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, -2]); + * + * console.log(buf.readUInt8(0)); + * // Prints: 1 + * console.log(buf.readUInt8(1)); + * // Prints: 254 + * console.log(buf.readUInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readUInt8(offset?: number): number; + /** + * @alias Buffer.readUInt8 + * @since v14.9.0, v12.19.0 + */ + readUint8(offset?: number): number; + /** + * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16LE(0).toString(16)); + * // Prints: 3412 + * console.log(buf.readUInt16LE(1).toString(16)); + * // Prints: 5634 + * console.log(buf.readUInt16LE(2).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16LE(offset?: number): number; + /** + * @alias Buffer.readUInt16LE + * @since v14.9.0, v12.19.0 + */ + readUint16LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16BE(0).toString(16)); + * // Prints: 1234 + * console.log(buf.readUInt16BE(1).toString(16)); + * // Prints: 3456 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16BE(offset?: number): number; + /** + * @alias Buffer.readUInt16BE + * @since v14.9.0, v12.19.0 + */ + readUint16BE(offset?: number): number; + /** + * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32LE(0).toString(16)); + * // Prints: 78563412 + * console.log(buf.readUInt32LE(1).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32LE(offset?: number): number; + /** + * @alias Buffer.readUInt32LE + * @since v14.9.0, v12.19.0 + */ + readUint32LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32BE(0).toString(16)); + * // Prints: 12345678 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32BE(offset?: number): number; + /** + * @alias Buffer.readUInt32BE + * @since v14.9.0, v12.19.0 + */ + readUint32BE(offset?: number): number; + /** + * Reads a signed 8-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([-1, 5]); + * + * console.log(buf.readInt8(0)); + * // Prints: -1 + * console.log(buf.readInt8(1)); + * // Prints: 5 + * console.log(buf.readInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readInt8(offset?: number): number; + /** + * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16LE(0)); + * // Prints: 1280 + * console.log(buf.readInt16LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16LE(offset?: number): number; + /** + * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16BE(offset?: number): number; + /** + * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32LE(0)); + * // Prints: 83886080 + * console.log(buf.readInt32LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32LE(offset?: number): number; + /** + * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32BE(offset?: number): number; + /** + * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatLE(0)); + * // Prints: 1.539989614439558e-36 + * console.log(buf.readFloatLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatLE(offset?: number): number; + /** + * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatBE(0)); + * // Prints: 2.387939260590663e-38 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatBE(offset?: number): number; + /** + * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleLE(0)); + * // Prints: 5.447603722011605e-270 + * console.log(buf.readDoubleLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleLE(offset?: number): number; + /** + * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleBE(0)); + * // Prints: 8.20788039913184e-304 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleBE(offset?: number): number; + reverse(): this; + /** + * Interprets `buf` as an array of unsigned 16-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap16(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap16(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * + * One convenient use of `buf.swap16()` is to perform a fast in-place conversion + * between UTF-16 little-endian and UTF-16 big-endian: + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); + * buf.swap16(); // Convert to big-endian UTF-16 text. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap16(): Buffer; + /** + * Interprets `buf` as an array of unsigned 32-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap32(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap32(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap32(): Buffer; + /** + * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. + * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap64(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap64(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v6.3.0 + * @return A reference to `buf`. + */ + swap64(): Buffer; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a + * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything + * other than an unsigned 8-bit integer. + * + * This function is also available under the `writeUint8` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt8(0x3, 0); + * buf.writeUInt8(0x4, 1); + * buf.writeUInt8(0x23, 2); + * buf.writeUInt8(0x42, 3); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeUInt8(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt8 + * @since v14.9.0, v12.19.0 + */ + writeUint8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 16-bit integer. + * + * This function is also available under the `writeUint16LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16LE(0xdead, 0); + * buf.writeUInt16LE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16LE + * @since v14.9.0, v12.19.0 + */ + writeUint16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 16-bit integer. + * + * This function is also available under the `writeUint16BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16BE(0xdead, 0); + * buf.writeUInt16BE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16BE + * @since v14.9.0, v12.19.0 + */ + writeUint16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 32-bit integer. + * + * This function is also available under the `writeUint32LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32LE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32LE + * @since v14.9.0, v12.19.0 + */ + writeUint32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 32-bit integer. + * + * This function is also available under the `writeUint32BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32BE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32BE + * @since v14.9.0, v12.19.0 + */ + writeUint32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a valid + * signed 8-bit integer. Behavior is undefined when `value` is anything other than + * a signed 8-bit integer. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt8(2, 0); + * buf.writeInt8(-2, 1); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeInt8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16LE(0x0304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16BE(0x0102, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32LE(0x05060708, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32BE(0x01020304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatLE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatBE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatBE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleLE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleBE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleBE(value: number, offset?: number): number; + /** + * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, + * the entire `buf` will be filled: + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Fill a `Buffer` with the ASCII character 'h'. + * + * const b = Buffer.allocUnsafe(50).fill('h'); + * + * console.log(b.toString()); + * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh + * ``` + * + * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or + * integer. If the resulting integer is greater than `255` (decimal), `buf` will be + * filled with `value & 255`. + * + * If the final write of a `fill()` operation falls on a multi-byte character, + * then only the bytes of that character that fit into `buf` are written: + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Fill a `Buffer` with character that takes up two bytes in UTF-8. + * + * console.log(Buffer.allocUnsafe(5).fill('\u0222')); + * // Prints: + * ``` + * + * If `value` contains invalid characters, it is truncated; if no valid + * fill data remains, an exception is thrown: + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(5); + * + * console.log(buf.fill('a')); + * // Prints: + * console.log(buf.fill('aazz', 'hex')); + * // Prints: + * console.log(buf.fill('zz', 'hex')); + * // Throws an exception. + * ``` + * @since v0.5.0 + * @param value The value with which to fill `buf`. + * @param [offset=0] Number of bytes to skip before starting to fill `buf`. + * @param [end=buf.length] Where to stop filling `buf` (not inclusive). + * @param [encoding='utf8'] The encoding for `value` if `value` is a string. + * @return A reference to `buf`. + */ + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + /** + * If `value` is: + * + * * a string, `value` is interpreted according to the character encoding in`encoding`. + * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety. + * To compare a partial `Buffer`, use `buf.subarray`. + * * a number, `value` will be interpreted as an unsigned 8-bit integer + * value between `0` and `255`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.indexOf('this')); + * // Prints: 0 + * console.log(buf.indexOf('is')); + * // Prints: 2 + * console.log(buf.indexOf(Buffer.from('a buffer'))); + * // Prints: 8 + * console.log(buf.indexOf(97)); + * // Prints: 8 (97 is the decimal ASCII value for 'a') + * console.log(buf.indexOf(Buffer.from('a buffer example'))); + * // Prints: -1 + * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: 8 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); + * // Prints: 4 + * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); + * // Prints: 6 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. If the result + * of coercion is `NaN` or `0`, then the entire buffer will be searched. This + * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.indexOf(99.9)); + * console.log(b.indexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN or 0. + * // Prints: 1, searching the whole buffer. + * console.log(b.indexOf('b', undefined)); + * console.log(b.indexOf('b', {})); + * console.log(b.indexOf('b', null)); + * console.log(b.indexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer` and `byteOffset` is less + * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. + * @since v1.5.0 + * @param value What to search for. + * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. + * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. + */ + indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + /** + * Identical to `buf.indexOf()`, except the last occurrence of `value` is found + * rather than the first occurrence. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this buffer is a buffer'); + * + * console.log(buf.lastIndexOf('this')); + * // Prints: 0 + * console.log(buf.lastIndexOf('buffer')); + * // Prints: 17 + * console.log(buf.lastIndexOf(Buffer.from('buffer'))); + * // Prints: 17 + * console.log(buf.lastIndexOf(97)); + * // Prints: 15 (97 is the decimal ASCII value for 'a') + * console.log(buf.lastIndexOf(Buffer.from('yolo'))); + * // Prints: -1 + * console.log(buf.lastIndexOf('buffer', 5)); + * // Prints: 5 + * console.log(buf.lastIndexOf('buffer', 4)); + * // Prints: -1 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); + * // Prints: 6 + * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); + * // Prints: 4 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. Any arguments + * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. + * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.lastIndexOf(99.9)); + * console.log(b.lastIndexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN. + * // Prints: 1, searching the whole buffer. + * console.log(b.lastIndexOf('b', undefined)); + * console.log(b.lastIndexOf('b', {})); + * + * // Passing a byteOffset that coerces to 0. + * // Prints: -1, equivalent to passing 0. + * console.log(b.lastIndexOf('b', null)); + * console.log(b.lastIndexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. + * @since v6.0.0 + * @param value What to search for. + * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. + * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. + */ + lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents + * of `buf`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Log the entire contents of a `Buffer`. + * + * const buf = Buffer.from('buffer'); + * + * for (const pair of buf.entries()) { + * console.log(pair); + * } + * // Prints: + * // [0, 98] + * // [1, 117] + * // [2, 102] + * // [3, 102] + * // [4, 101] + * // [5, 114] + * ``` + * @since v1.1.0 + */ + entries(): IterableIterator<[number, number]>; + /** + * Equivalent to `buf.indexOf() !== -1`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.includes('this')); + * // Prints: true + * console.log(buf.includes('is')); + * // Prints: true + * console.log(buf.includes(Buffer.from('a buffer'))); + * // Prints: true + * console.log(buf.includes(97)); + * // Prints: true (97 is the decimal ASCII value for 'a') + * console.log(buf.includes(Buffer.from('a buffer example'))); + * // Prints: false + * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: true + * console.log(buf.includes('this', 4)); + * // Prints: false + * ``` + * @since v5.3.0 + * @param value What to search for. + * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is its encoding. + * @return `true` if `value` was found in `buf`, `false` otherwise. + */ + includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * for (const key of buf.keys()) { + * console.log(key); + * } + * // Prints: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * ``` + * @since v1.1.0 + */ + keys(): IterableIterator; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is + * called automatically when a `Buffer` is used in a `for..of` statement. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * for (const value of buf.values()) { + * console.log(value); + * } + * // Prints: + * // 98 + * // 117 + * // 102 + * // 102 + * // 101 + * // 114 + * + * for (const value of buf) { + * console.log(value); + * } + * // Prints: + * // 98 + * // 117 + * // 102 + * // 102 + * // 101 + * // 114 + * ``` + * @since v1.1.0 + */ + values(): IterableIterator; + } + var Buffer: BufferConstructor; + /** + * Decodes a string of Base64-encoded data into bytes, and encodes those bytes + * into a string using Latin-1 (ISO-8859-1). + * + * The `data` may be any JavaScript-value that can be coerced into a string. + * + * **This function is only provided for compatibility with legacy web platform APIs** + * **and should never be used in new code, because they use strings to represent** + * **binary data and predate the introduction of typed arrays in JavaScript.** + * **For code running using Node.js APIs, converting between base64-encoded strings** + * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** + * @since v15.13.0, v14.17.0 + * @deprecated Use `Buffer.from(data, 'base64')` instead. + * @param data The Base64-encoded input string. + */ + function atob(data: string): string; + /** + * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes + * into a string using Base64. + * + * The `data` may be any JavaScript-value that can be coerced into a string. + * + * **This function is only provided for compatibility with legacy web platform APIs** + * **and should never be used in new code, because they use strings to represent** + * **binary data and predate the introduction of typed arrays in JavaScript.** + * **For code running using Node.js APIs, converting between base64-encoded strings** + * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** + * @since v15.13.0, v14.17.0 + * @deprecated Use `buf.toString('base64')` instead. + * @param data An ASCII (Latin1) string. + */ + function btoa(data: string): string; - export { BuffType as Buffer }; + interface Blob extends __Blob {} + /** + * `Blob` class is a global reference for `require('node:buffer').Blob` + * https://nodejs.org/api/buffer.html#class-blob + * @since v18.0.0 + */ + var Blob: typeof globalThis extends { + onmessage: any; + Blob: infer T; + } + ? T + : typeof NodeBlob; + } +} +declare module 'node:buffer' { + export * from 'buffer'; } diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts index f9e34f1..c537d6d 100644 --- a/node_modules/@types/node/child_process.d.ts +++ b/node_modules/@types/node/child_process.d.ts @@ -1,43 +1,518 @@ -declare module 'node:child_process' { - export * from 'child_process'; -} - +/** + * The `child_process` module provides the ability to spawn subprocesses in + * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability + * is primarily provided by the {@link spawn} function: + * + * ```js + * const { spawn } = require('child_process'); + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * ls.on('close', (code) => { + * console.log(`child process exited with code ${code}`); + * }); + * ``` + * + * By default, pipes for `stdin`, `stdout`, and `stderr` are established between + * the parent Node.js process and the spawned subprocess. These pipes have + * limited (and platform-specific) capacity. If the subprocess writes to + * stdout in excess of that limit without the output being captured, the + * subprocess blocks waiting for the pipe buffer to accept more data. This is + * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed. + * + * The command lookup is performed using the `options.env.PATH` environment + * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is + * used. If `options.env` is set without `PATH`, lookup on Unix is performed + * on a default search path search of `/usr/bin:/bin` (see your operating system's + * manual for execvpe/execvp), on Windows the current processes environment + * variable `PATH` is used. + * + * On Windows, environment variables are case-insensitive. Node.js + * lexicographically sorts the `env` keys and uses the first one that + * case-insensitively matches. Only first (in lexicographic order) entry will be + * passed to the subprocess. This might lead to issues on Windows when passing + * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`. + * + * The {@link spawn} method spawns the child process asynchronously, + * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks + * the event loop until the spawned process either exits or is terminated. + * + * For convenience, the `child_process` module provides a handful of synchronous + * and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on + * top of {@link spawn} or {@link spawnSync}. + * + * * {@link exec}: spawns a shell and runs a command within that + * shell, passing the `stdout` and `stderr` to a callback function when + * complete. + * * {@link execFile}: similar to {@link exec} except + * that it spawns the command directly without first spawning a shell by + * default. + * * {@link fork}: spawns a new Node.js process and invokes a + * specified module with an IPC communication channel established that allows + * sending messages between parent and child. + * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop. + * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop. + * + * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, + * the synchronous methods can have significant impact on performance due to + * stalling the event loop while spawned processes complete. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/child_process.js) + */ declare module 'child_process' { - import { BaseEncodingOptions } from 'node:fs'; - import * as events from 'node:events'; + import { ObjectEncodingOptions } from 'node:fs'; + import { EventEmitter, Abortable } from 'node:events'; import * as net from 'node:net'; import { Writable, Readable, Stream, Pipe } from 'node:stream'; - - type Serializable = string | object | number | boolean; + import { URL } from 'node:url'; + type Serializable = string | object | number | boolean | bigint; type SendHandle = net.Socket | net.Server; - - interface ChildProcess extends events.EventEmitter { + /** + * Instances of the `ChildProcess` represent spawned child processes. + * + * Instances of `ChildProcess` are not intended to be created directly. Rather, + * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create + * instances of `ChildProcess`. + * @since v2.2.0 + */ + class ChildProcess extends EventEmitter { + /** + * A `Writable Stream` that represents the child process's `stdin`. + * + * If a child process waits to read all of its input, the child will not continue + * until this stream has been closed via `end()`. + * + * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will + * refer to the same value. + * + * The `subprocess.stdin` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ stdin: Writable | null; + /** + * A `Readable Stream` that represents the child process's `stdout`. + * + * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will + * refer to the same value. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn('ls'); + * + * subprocess.stdout.on('data', (data) => { + * console.log(`Received chunk ${data}`); + * }); + * ``` + * + * The `subprocess.stdout` property can be `null` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ stdout: Readable | null; + /** + * A `Readable Stream` that represents the child process's `stderr`. + * + * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will + * refer to the same value. + * + * The `subprocess.stderr` property can be `null` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ stderr: Readable | null; - readonly channel?: Pipe | null; + /** + * The `subprocess.channel` property is a reference to the child's IPC channel. If + * no IPC channel currently exists, this property is `undefined`. + * @since v7.1.0 + */ + readonly channel?: Pipe | null | undefined; + /** + * A sparse array of pipes to the child process, corresponding with positions in + * the `stdio` option passed to {@link spawn} that have been set + * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`, + * respectively. + * + * In the following example, only the child's fd `1` (stdout) is configured as a + * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values + * in the array are `null`. + * + * ```js + * const assert = require('assert'); + * const fs = require('fs'); + * const child_process = require('child_process'); + * + * const subprocess = child_process.spawn('ls', { + * stdio: [ + * 0, // Use parent's stdin for child. + * 'pipe', // Pipe child's stdout to parent. + * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. + * ] + * }); + * + * assert.strictEqual(subprocess.stdio[0], null); + * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); + * + * assert(subprocess.stdout); + * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); + * + * assert.strictEqual(subprocess.stdio[2], null); + * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); + * ``` + * + * The `subprocess.stdio` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.7.10 + */ readonly stdio: [ - Writable | null, // stdin - Readable | null, // stdout - Readable | null, // stderr - Readable | Writable | null | undefined, // extra + Writable | null, + // stdin + Readable | null, + // stdout + Readable | null, + // stderr + Readable | Writable | null | undefined, + // extra Readable | Writable | null | undefined // extra ]; + /** + * The `subprocess.killed` property indicates whether the child process + * successfully received a signal from `subprocess.kill()`. The `killed` property + * does not indicate that the child process has been terminated. + * @since v0.5.10 + */ readonly killed: boolean; - readonly pid: number; + /** + * Returns the process identifier (PID) of the child process. If the child process + * fails to spawn due to errors, then the value is `undefined` and `error` is + * emitted. + * + * ```js + * const { spawn } = require('child_process'); + * const grep = spawn('grep', ['ssh']); + * + * console.log(`Spawned child pid: ${grep.pid}`); + * grep.stdin.end(); + * ``` + * @since v0.1.90 + */ + readonly pid?: number | undefined; + /** + * The `subprocess.connected` property indicates whether it is still possible to + * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages. + * @since v0.7.2 + */ readonly connected: boolean; + /** + * The `subprocess.exitCode` property indicates the exit code of the child process. + * If the child process is still running, the field will be `null`. + */ readonly exitCode: number | null; + /** + * The `subprocess.signalCode` property indicates the signal received by + * the child process if any, else `null`. + */ readonly signalCode: NodeJS.Signals | null; + /** + * The `subprocess.spawnargs` property represents the full list of command-line + * arguments the child process was launched with. + */ readonly spawnargs: string[]; + /** + * The `subprocess.spawnfile` property indicates the executable file name of + * the child process that is launched. + * + * For {@link fork}, its value will be equal to `process.execPath`. + * For {@link spawn}, its value will be the name of + * the executable file. + * For {@link exec}, its value will be the name of the shell + * in which the child process is launched. + */ readonly spawnfile: string; + /** + * The `subprocess.kill()` method sends a signal to the child process. If no + * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function + * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. + * + * ```js + * const { spawn } = require('child_process'); + * const grep = spawn('grep', ['ssh']); + * + * grep.on('close', (code, signal) => { + * console.log( + * `child process terminated due to receipt of signal ${signal}`); + * }); + * + * // Send SIGHUP to process. + * grep.kill('SIGHUP'); + * ``` + * + * The `ChildProcess` object may emit an `'error'` event if the signal + * cannot be delivered. Sending a signal to a child process that has already exited + * is not an error but may have unforeseen consequences. Specifically, if the + * process identifier (PID) has been reassigned to another process, the signal will + * be delivered to that process instead which can have unexpected results. + * + * While the function is called `kill`, the signal delivered to the child process + * may not actually terminate the process. + * + * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. + * + * On Windows, where POSIX signals do not exist, the `signal` argument will be + * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`). + * See `Signal Events` for more details. + * + * On Linux, child processes of child processes will not be terminated + * when attempting to kill their parent. This is likely to happen when running a + * new process in a shell or with the use of the `shell` option of `ChildProcess`: + * + * ```js + * 'use strict'; + * const { spawn } = require('child_process'); + * + * const subprocess = spawn( + * 'sh', + * [ + * '-c', + * `node -e "setInterval(() => { + * console.log(process.pid, 'is alive') + * }, 500);"`, + * ], { + * stdio: ['inherit', 'inherit', 'inherit'] + * } + * ); + * + * setTimeout(() => { + * subprocess.kill(); // Does not terminate the Node.js process in the shell. + * }, 2000); + * ``` + * @since v0.1.90 + */ kill(signal?: NodeJS.Signals | number): boolean; + /** + * When an IPC channel has been established between the parent and child ( + * i.e. when using {@link fork}), the `subprocess.send()` method can + * be used to send messages to the child process. When the child process is a + * Node.js instance, these messages can be received via the `'message'` event. + * + * The message goes through serialization and parsing. The resulting + * message might not be the same as what is originally sent. + * + * For example, in the parent script: + * + * ```js + * const cp = require('child_process'); + * const n = cp.fork(`${__dirname}/sub.js`); + * + * n.on('message', (m) => { + * console.log('PARENT got message:', m); + * }); + * + * // Causes the child to print: CHILD got message: { hello: 'world' } + * n.send({ hello: 'world' }); + * ``` + * + * And then the child script, `'sub.js'` might look like this: + * + * ```js + * process.on('message', (m) => { + * console.log('CHILD got message:', m); + * }); + * + * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } + * process.send({ foo: 'bar', baz: NaN }); + * ``` + * + * Child Node.js processes will have a `process.send()` method of their own + * that allows the child to send messages back to the parent. + * + * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages + * containing a `NODE_` prefix in the `cmd` property are reserved for use within + * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js. + * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice. + * + * The optional `sendHandle` argument that may be passed to `subprocess.send()` is + * for passing a TCP server or socket object to the child process. The child will + * receive the object as the second argument passed to the callback function + * registered on the `'message'` event. Any data that is received + * and buffered in the socket will not be sent to the child. + * + * The optional `callback` is a function that is invoked after the message is + * sent but before the child may have received it. The function is called with a + * single argument: `null` on success, or an `Error` object on failure. + * + * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can + * happen, for instance, when the child process has already exited. + * + * `subprocess.send()` will return `false` if the channel has closed or when the + * backlog of unsent messages exceeds a threshold that makes it unwise to send + * more. Otherwise, the method returns `true`. The `callback` function can be + * used to implement flow control. + * + * #### Example: sending a server object + * + * The `sendHandle` argument can be used, for instance, to pass the handle of + * a TCP server object to the child process as illustrated in the example below: + * + * ```js + * const subprocess = require('child_process').fork('subprocess.js'); + * + * // Open up the server object and send the handle. + * const server = require('net').createServer(); + * server.on('connection', (socket) => { + * socket.end('handled by parent'); + * }); + * server.listen(1337, () => { + * subprocess.send('server', server); + * }); + * ``` + * + * The child would then receive the server object as: + * + * ```js + * process.on('message', (m, server) => { + * if (m === 'server') { + * server.on('connection', (socket) => { + * socket.end('handled by child'); + * }); + * } + * }); + * ``` + * + * Once the server is now shared between the parent and child, some connections + * can be handled by the parent and some by the child. + * + * While the example above uses a server created using the `net` module, `dgram`module servers use exactly the same workflow with the exceptions of listening on + * a `'message'` event instead of `'connection'` and using `server.bind()` instead + * of `server.listen()`. This is, however, currently only supported on Unix + * platforms. + * + * #### Example: sending a socket object + * + * Similarly, the `sendHandler` argument can be used to pass the handle of a + * socket to the child process. The example below spawns two children that each + * handle connections with "normal" or "special" priority: + * + * ```js + * const { fork } = require('child_process'); + * const normal = fork('subprocess.js', ['normal']); + * const special = fork('subprocess.js', ['special']); + * + * // Open up the server and send sockets to child. Use pauseOnConnect to prevent + * // the sockets from being read before they are sent to the child process. + * const server = require('net').createServer({ pauseOnConnect: true }); + * server.on('connection', (socket) => { + * + * // If this is special priority... + * if (socket.remoteAddress === '74.125.127.100') { + * special.send('socket', socket); + * return; + * } + * // This is normal priority. + * normal.send('socket', socket); + * }); + * server.listen(1337); + * ``` + * + * The `subprocess.js` would receive the socket handle as the second argument + * passed to the event callback function: + * + * ```js + * process.on('message', (m, socket) => { + * if (m === 'socket') { + * if (socket) { + * // Check that the client socket exists. + * // It is possible for the socket to be closed between the time it is + * // sent and the time it is received in the child process. + * socket.end(`Request handled with ${process.argv[2]} priority`); + * } + * } + * }); + * ``` + * + * Do not use `.maxConnections` on a socket that has been passed to a subprocess. + * The parent cannot track when the socket is destroyed. + * + * Any `'message'` handlers in the subprocess should verify that `socket` exists, + * as the connection may have been closed during the time it takes to send the + * connection to the child. + * @since v0.5.9 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ send(message: Serializable, callback?: (error: Error | null) => void): boolean; send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean; + /** + * Closes the IPC channel between parent and child, allowing the child to exit + * gracefully once there are no other connections keeping it alive. After calling + * this method the `subprocess.connected` and `process.connected` properties in + * both the parent and child (respectively) will be set to `false`, and it will be + * no longer possible to pass messages between the processes. + * + * The `'disconnect'` event will be emitted when there are no messages in the + * process of being received. This will most often be triggered immediately after + * calling `subprocess.disconnect()`. + * + * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked + * within the child process to close the IPC channel as well. + * @since v0.7.2 + */ disconnect(): void; + /** + * By default, the parent will wait for the detached child to exit. To prevent the + * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not + * include the child in its reference count, allowing the parent to exit + * independently of the child, unless there is an established IPC channel between + * the child and the parent. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore' + * }); + * + * subprocess.unref(); + * ``` + * @since v0.7.10 + */ unref(): void; + /** + * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will + * restore the removed reference count for the child process, forcing the parent + * to wait for the child to exit before exiting itself. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore' + * }); + * + * subprocess.unref(); + * subprocess.ref(); + * ``` + * @since v0.7.10 + */ ref(): void; - /** * events.EventEmitter * 1. close @@ -45,71 +520,68 @@ declare module 'child_process' { * 3. error * 4. exit * 5. message + * 6. spawn */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - + addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: 'disconnect', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + addListener(event: 'spawn', listener: () => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean; - emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean; - + emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: 'disconnect'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean; + emit(event: 'spawn', listener: () => void): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - + on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: 'disconnect', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + on(event: 'spawn', listener: () => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - + once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: 'disconnect', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + once(event: 'spawn', listener: () => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - + prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: 'disconnect', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependListener(event: 'spawn', listener: () => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependOnceListener(event: 'disconnect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependOnceListener(event: 'spawn', listener: () => void): this; } - // return this object when stdio option is undefined or not specified interface ChildProcessWithoutNullStreams extends ChildProcess { stdin: Writable; stdout: Readable; stderr: Readable; readonly stdio: [ - Writable, // stdin - Readable, // stdout - Readable, // stderr - Readable | Writable | null | undefined, // extra, no modification + Writable, + Readable, + Readable, + // stderr + Readable | Writable | null | undefined, + // extra, no modification Readable | Writable | null | undefined // extra, no modification ]; } - // return this object when stdio option is a tuple of 3 - interface ChildProcessByStdio< - I extends null | Writable, - O extends null | Readable, - E extends null | Readable, - > extends ChildProcess { + interface ChildProcessByStdio extends ChildProcess { stdin: I; stdout: O; stderr: E; @@ -117,221 +589,391 @@ declare module 'child_process' { I, O, E, - Readable | Writable | null | undefined, // extra, no modification + Readable | Writable | null | undefined, + // extra, no modification Readable | Writable | null | undefined // extra, no modification ]; } - interface MessageOptions { - keepOpen?: boolean; + keepOpen?: boolean | undefined; } - - type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>; - + type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit'; + type StdioOptions = IOType | Array; type SerializationType = 'json' | 'advanced'; - - interface MessagingOptions { + interface MessagingOptions extends Abortable { /** * Specify the kind of serialization used for sending messages between processes. * @default 'json' */ - serialization?: SerializationType; + serialization?: SerializationType | undefined; + /** + * The signal value to be used when the spawned process will be killed by the abort signal. + * @default 'SIGTERM' + */ + killSignal?: NodeJS.Signals | number | undefined; + /** + * In milliseconds the maximum amount of time the process is allowed to run. + */ + timeout?: number | undefined; } - interface ProcessEnvOptions { - uid?: number; - gid?: number; - cwd?: string; - env?: NodeJS.ProcessEnv; + uid?: number | undefined; + gid?: number | undefined; + cwd?: string | URL | undefined; + env?: NodeJS.ProcessEnv | undefined; } - interface CommonOptions extends ProcessEnvOptions { /** - * @default true + * @default false */ - windowsHide?: boolean; + windowsHide?: boolean | undefined; /** * @default 0 */ - timeout?: number; + timeout?: number | undefined; } - - interface CommonSpawnOptions extends CommonOptions, MessagingOptions { - argv0?: string; - stdio?: StdioOptions; - shell?: boolean | string; - windowsVerbatimArguments?: boolean; + interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { + argv0?: string | undefined; + stdio?: StdioOptions | undefined; + shell?: boolean | string | undefined; + windowsVerbatimArguments?: boolean | undefined; } - interface SpawnOptions extends CommonSpawnOptions { - detached?: boolean; + detached?: boolean | undefined; } - interface SpawnOptionsWithoutStdio extends SpawnOptions { - stdio?: 'pipe' | Array; + stdio?: StdioPipeNamed | StdioPipe[] | undefined; } - type StdioNull = 'inherit' | 'ignore' | Stream; - type StdioPipe = undefined | null | 'pipe'; - - interface SpawnOptionsWithStdioTuple< - Stdin extends StdioNull | StdioPipe, - Stdout extends StdioNull | StdioPipe, - Stderr extends StdioNull | StdioPipe, - > extends SpawnOptions { + type StdioPipeNamed = 'pipe' | 'overlapped'; + type StdioPipe = undefined | null | StdioPipeNamed; + interface SpawnOptionsWithStdioTuple extends SpawnOptions { stdio: [Stdin, Stdout, Stderr]; } - - // overloads of spawn without 'args' + /** + * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults + * to an empty array. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * A third argument may be used to specify additional options, with these defaults: + * + * ```js + * const defaults = { + * cwd: undefined, + * env: process.env + * }; + * ``` + * + * Use `cwd` to specify the working directory from which the process is spawned. + * If not given, the default is to inherit the current working directory. If given, + * but the path does not exist, the child process emits an `ENOENT` error + * and exits immediately. `ENOENT` is also emitted when the command + * does not exist. + * + * Use `env` to specify environment variables that will be visible to the new + * process, the default is `process.env`. + * + * `undefined` values in `env` will be ignored. + * + * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the + * exit code: + * + * ```js + * const { spawn } = require('child_process'); + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * ls.on('close', (code) => { + * console.log(`child process exited with code ${code}`); + * }); + * ``` + * + * Example: A very elaborate way to run `ps ax | grep ssh` + * + * ```js + * const { spawn } = require('child_process'); + * const ps = spawn('ps', ['ax']); + * const grep = spawn('grep', ['ssh']); + * + * ps.stdout.on('data', (data) => { + * grep.stdin.write(data); + * }); + * + * ps.stderr.on('data', (data) => { + * console.error(`ps stderr: ${data}`); + * }); + * + * ps.on('close', (code) => { + * if (code !== 0) { + * console.log(`ps process exited with code ${code}`); + * } + * grep.stdin.end(); + * }); + * + * grep.stdout.on('data', (data) => { + * console.log(data.toString()); + * }); + * + * grep.stderr.on('data', (data) => { + * console.error(`grep stderr: ${data}`); + * }); + * + * grep.on('close', (code) => { + * if (code !== 0) { + * console.log(`grep process exited with code ${code}`); + * } + * }); + * ``` + * + * Example of checking for failed `spawn`: + * + * ```js + * const { spawn } = require('child_process'); + * const subprocess = spawn('bad_command'); + * + * subprocess.on('error', (err) => { + * console.error('Failed to start subprocess.'); + * }); + * ``` + * + * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process + * title while others (Windows, SunOS) will use `command`. + * + * Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent, + * retrieve it with the`process.argv0` property instead. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { spawn } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const grep = spawn('grep', ['ssh'], { signal }); + * grep.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * ``` + * @since v0.1.90 + * @param command The command to run. + * @param args List of string arguments. + */ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; - - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; function spawn(command: string, options: SpawnOptions): ChildProcess; - // overloads of spawn with 'args' function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; - - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess; - interface ExecOptions extends CommonOptions { - shell?: string; - maxBuffer?: number; - killSignal?: NodeJS.Signals | number; + shell?: string | undefined; + signal?: AbortSignal | undefined; + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; } - interface ExecOptionsWithStringEncoding extends ExecOptions { encoding: BufferEncoding; } - interface ExecOptionsWithBufferEncoding extends ExecOptions { encoding: BufferEncoding | null; // specify `null`. } - interface ExecException extends Error { - cmd?: string; - killed?: boolean; - code?: number; - signal?: NodeJS.Signals; + cmd?: string | undefined; + killed?: boolean | undefined; + code?: number | undefined; + signal?: NodeJS.Signals | undefined; } - - // no `options` definitely means stdout/stderr are `string`. + /** + * Spawns a shell then executes the `command` within that shell, buffering any + * generated output. The `command` string passed to the exec function is processed + * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) + * need to be dealt with accordingly: + * + * ```js + * const { exec } = require('child_process'); + * + * exec('"/path/to/test file/test.sh" arg1 arg2'); + * // Double quotes are used so that the space in the path is not interpreted as + * // a delimiter of multiple arguments. + * + * exec('echo "The \\$HOME variable is $HOME"'); + * // The $HOME variable is escaped in the first instance, but not in the second. + * ``` + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * + * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The + * `error.code` property will be + * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the + * process. + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * ```js + * const { exec } = require('child_process'); + * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { + * if (error) { + * console.error(`exec error: ${error}`); + * return; + * } + * console.log(`stdout: ${stdout}`); + * console.error(`stderr: ${stderr}`); + * }); + * ``` + * + * 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. + * + * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace + * the existing process and uses a shell to execute the command. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * const util = require('util'); + * const exec = util.promisify(require('child_process').exec); + * + * async function lsExample() { + * const { stdout, stderr } = await exec('ls'); + * console.log('stdout:', stdout); + * console.error('stderr:', stderr); + * } + * lsExample(); + * ``` + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { exec } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = exec('grep ssh', { signal }, (error) => { + * console.log(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.90 + * @param command The command to run, with space-separated arguments. + * @param callback called with the output when process terminates. + */ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - + function exec( + command: string, + options: { + encoding: 'buffer' | null; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void + ): ChildProcess; // `options` with well known `encoding` means stdout/stderr are definitely `string`. - function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; - + function exec( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void + ): ChildProcess; // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. function exec( command: string, - options: { encoding: BufferEncoding } & ExecOptions, - callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + options: { + encoding: BufferEncoding; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void ): ChildProcess; - // `options` without an `encoding` means stdout/stderr are definitely `string`. function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. function exec( command: string, - options: (BaseEncodingOptions & ExecOptions) | undefined | null, - callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + options: (ObjectEncodingOptions & ExecOptions) | undefined | null, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void ): ChildProcess; - interface PromiseWithChild extends Promise { child: ChildProcess; } - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. namespace exec { - function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; - } - - interface ExecFileOptions extends CommonOptions { - maxBuffer?: number; - killSignal?: NodeJS.Signals | number; - windowsVerbatimArguments?: boolean; - shell?: boolean | string; + function __promisify__(command: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: { + encoding: 'buffer' | null; + } & ExecOptions + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options?: (ObjectEncodingOptions & ExecOptions) | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + } + interface ExecFileOptions extends CommonOptions, Abortable { + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + windowsVerbatimArguments?: boolean | undefined; + shell?: boolean | string | undefined; + signal?: AbortSignal | undefined; } interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { encoding: BufferEncoding; @@ -342,172 +984,386 @@ declare module 'child_process' { interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { encoding: BufferEncoding; } - + type ExecFileException = ExecException & NodeJS.ErrnoException; + /** + * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified + * executable `file` is spawned directly as a new process making it slightly more + * efficient than {@link exec}. + * + * The same options as {@link exec} are supported. Since a shell is + * not spawned, behaviors such as I/O redirection and file globbing are not + * supported. + * + * ```js + * const { execFile } = require('child_process'); + * const child = execFile('node', ['--version'], (error, stdout, stderr) => { + * if (error) { + * throw error; + * } + * console.log(stdout); + * }); + * ``` + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * const util = require('util'); + * const execFile = util.promisify(require('child_process').execFile); + * async function getVersion() { + * const { stdout } = await execFile('node', ['--version']); + * console.log(stdout); + * } + * getVersion(); + * ``` + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { execFile } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = execFile('node', ['--version'], { signal }, (error) => { + * console.log(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.91 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @param callback Called with the output when process terminates. + */ function execFile(file: string): ChildProcess; - function execFile(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess; + function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess; function execFile(file: string, args?: ReadonlyArray | null): ChildProcess; - function execFile(file: string, args: ReadonlyArray | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess; - + function execFile(file: string, args: ReadonlyArray | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess; // no `options` definitely means stdout/stderr are `string`. - function execFile(file: string, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; - function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; - + function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; function execFile( file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptionsWithBufferEncoding, - callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void, + callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void ): ChildProcess; - // `options` with well known `encoding` means stdout/stderr are definitely `string`. - function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; function execFile( file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptionsWithStringEncoding, - callback: (error: ExecException | null, stdout: string, stderr: string) => void, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void ): ChildProcess; - // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. - function execFile( - file: string, - options: ExecFileOptionsWithOtherEncoding, - callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, - ): ChildProcess; + function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; function execFile( file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptionsWithOtherEncoding, - callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void ): ChildProcess; - // `options` without an `encoding` means stdout/stderr are definitely `string`. - function execFile(file: string, options: ExecFileOptions, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; function execFile( file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptions, - callback: (error: ExecException | null, stdout: string, stderr: string) => void + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. function execFile( file: string, - options: (BaseEncodingOptions & ExecFileOptions) | undefined | null, - callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null ): ChildProcess; function execFile( file: string, args: ReadonlyArray | undefined | null, - options: (BaseEncodingOptions & ExecFileOptions) | undefined | null, - callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null ): ChildProcess; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. namespace execFile { - function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: ReadonlyArray | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__(file: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithBufferEncoding + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; function __promisify__( file: string, args: ReadonlyArray | undefined | null, - options: ExecFileOptionsWithOtherEncoding, - ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; - function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + options: ExecFileOptionsWithBufferEncoding + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithStringEncoding + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; function __promisify__( file: string, args: ReadonlyArray | undefined | null, - options: (BaseEncodingOptions & ExecFileOptions) | undefined | null, - ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; - } - - interface ForkOptions extends ProcessEnvOptions, MessagingOptions { - execPath?: string; - execArgv?: string[]; - silent?: boolean; - stdio?: StdioOptions; - detached?: boolean; - windowsVerbatimArguments?: boolean; + options: ExecFileOptionsWithStringEncoding + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithOtherEncoding + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithOtherEncoding + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; } + interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable { + execPath?: string | undefined; + execArgv?: string[] | undefined; + silent?: boolean | undefined; + stdio?: StdioOptions | undefined; + detached?: boolean | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + /** + * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. + * Like {@link spawn}, a `ChildProcess` object is returned. The + * returned `ChildProcess` will have an additional communication channel + * built-in that allows messages to be passed back and forth between the parent and + * child. See `subprocess.send()` for details. + * + * Keep in mind that spawned Node.js child processes are + * independent of the parent with exception of the IPC communication channel + * that is established between the two. Each process has its own memory, with + * their own V8 instances. Because of the additional resource allocations + * required, spawning a large number of child Node.js processes is not + * recommended. + * + * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative + * execution path to be used. + * + * Node.js processes launched with a custom `execPath` will communicate with the + * parent process using the file descriptor (fd) identified using the + * environment variable `NODE_CHANNEL_FD` on the child process. + * + * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the + * current process. + * + * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * if (process.argv[2] === 'child') { + * setTimeout(() => { + * console.log(`Hello from ${process.argv[2]}!`); + * }, 1_000); + * } else { + * const { fork } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = fork(__filename, ['child'], { signal }); + * child.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * } + * ``` + * @since v0.5.0 + * @param modulePath The module to run in the child. + * @param args List of string arguments. + */ function fork(modulePath: string, options?: ForkOptions): ChildProcess; function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; - interface SpawnSyncOptions extends CommonSpawnOptions { - input?: string | NodeJS.ArrayBufferView; - killSignal?: NodeJS.Signals | number; - maxBuffer?: number; - encoding?: BufferEncoding | 'buffer' | null; + input?: string | NodeJS.ArrayBufferView | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | 'buffer' | null | undefined; } interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { encoding: BufferEncoding; } interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding?: 'buffer' | null; + encoding?: 'buffer' | null | undefined; } interface SpawnSyncReturns { pid: number; - output: string[]; + output: Array; stdout: T; stderr: T; status: number | null; signal: NodeJS.Signals | null; - error?: Error; + error?: Error | undefined; } + /** + * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the process intercepts and handles the `SIGTERM` signal + * and doesn't exit, the parent process will wait until the child process has + * exited. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @param args List of string arguments. + */ function spawnSync(command: string): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns; - - interface ExecSyncOptions extends CommonOptions { - input?: string | Uint8Array; - stdio?: StdioOptions; - shell?: string; - killSignal?: NodeJS.Signals | number; - maxBuffer?: number; - encoding?: BufferEncoding | 'buffer' | null; + function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns; + interface CommonExecOptions extends CommonOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + stdio?: StdioOptions | undefined; + killSignal?: NodeJS.Signals | number | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | 'buffer' | null | undefined; + } + interface ExecSyncOptions extends CommonExecOptions { + shell?: string | undefined; } interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { encoding: BufferEncoding; } interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding?: 'buffer' | null; + encoding?: 'buffer' | null | undefined; } + /** + * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process + * has exited. + * + * If the process times out or has a non-zero exit code, this method will throw. + * The `Error` object will contain the entire result from {@link spawnSync}. + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @return The stdout from the command. + */ function execSync(command: string): Buffer; - function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; - function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; - function execSync(command: string, options?: ExecSyncOptions): Buffer; - - interface ExecFileSyncOptions extends CommonOptions { - input?: string | NodeJS.ArrayBufferView; - stdio?: StdioOptions; - killSignal?: NodeJS.Signals | number; - maxBuffer?: number; - encoding?: BufferEncoding; - shell?: boolean | string; + function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer; + function execSync(command: string, options?: ExecSyncOptions): string | Buffer; + interface ExecFileSyncOptions extends CommonExecOptions { + shell?: boolean | string | undefined; } interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { encoding: BufferEncoding; } interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; // specify `null`. - } - function execFileSync(command: string): Buffer; - function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): Buffer; + encoding?: 'buffer' | null; // specify `null`. + } + /** + * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not + * return until the child process has fully closed. When a timeout has been + * encountered and `killSignal` is sent, the method won't return until the process + * has completely exited. + * + * If the child process intercepts and handles the `SIGTERM` signal and + * does not exit, the parent process will still wait until the child process has + * exited. + * + * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @return The stdout from the command. + */ + function execFileSync(file: string): Buffer; + function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer; + function execFileSync(file: string, args: ReadonlyArray): Buffer; + function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): string | Buffer; +} +declare module 'node:child_process' { + export * from 'child_process'; } diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts index c09ccd6..37dbc57 100644 --- a/node_modules/@types/node/cluster.d.ts +++ b/node_modules/@types/node/cluster.d.ts @@ -1,41 +1,274 @@ -declare module 'node:cluster' { - export * from 'cluster'; -} - +/** + * Clusters of Node.js processes can be used to run multiple instances of Node.js + * that can distribute workloads among their application threads. When process + * isolation is not needed, use the `worker_threads` module instead, which + * allows running multiple application threads within a single Node.js instance. + * + * The cluster module allows easy creation of child processes that all share + * server ports. + * + * ```js + * import cluster from 'cluster'; + * import http from 'http'; + * import { cpus } from 'os'; + * import process from 'process'; + * + * const numCPUs = cpus().length; + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('exit', (worker, code, signal) => { + * console.log(`worker ${worker.process.pid} died`); + * }); + * } else { + * // Workers can share any TCP connection + * // In this case it is an HTTP server + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * + * console.log(`Worker ${process.pid} started`); + * } + * ``` + * + * Running Node.js will now share port 8000 between the workers: + * + * ```console + * $ node server.js + * Primary 3596 is running + * Worker 4324 started + * Worker 4520 started + * Worker 6056 started + * Worker 5644 started + * ``` + * + * On Windows, it is not yet possible to set up a named pipe server in a worker. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/cluster.js) + */ declare module 'cluster' { import * as child from 'node:child_process'; import EventEmitter = require('node:events'); import * as net from 'node:net'; - - // interfaces - interface ClusterSettings { - execArgv?: string[]; // default: process.execArgv - exec?: string; - args?: string[]; - silent?: boolean; - stdio?: any[]; - uid?: number; - gid?: number; - inspectPort?: number | (() => number); + export interface ClusterSettings { + execArgv?: string[] | undefined; // default: process.execArgv + exec?: string | undefined; + args?: string[] | undefined; + silent?: boolean | undefined; + stdio?: any[] | undefined; + uid?: number | undefined; + gid?: number | undefined; + inspectPort?: number | (() => number) | undefined; } - - interface Address { + export interface Address { address: string; port: number; - addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" + addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6" } - - class Worker extends EventEmitter { + /** + * A `Worker` object contains all public information and method about a worker. + * In the primary it can be obtained using `cluster.workers`. In a worker + * it can be obtained using `cluster.worker`. + * @since v0.7.0 + */ + export class Worker extends EventEmitter { + /** + * Each new worker is given its own unique id, this id is stored in the`id`. + * + * While a worker is alive, this is the key that indexes it in`cluster.workers`. + * @since v0.8.0 + */ id: number; + /** + * All workers are created using `child_process.fork()`, the returned object + * from this function is stored as `.process`. In a worker, the global `process`is stored. + * + * See: `Child Process module`. + * + * Workers will call `process.exit(0)` if the `'disconnect'` event occurs + * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against + * accidental disconnection. + * @since v0.7.0 + */ process: child.ChildProcess; - send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean; + /** + * Send a message to a worker or primary, optionally with a handle. + * + * In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`. + * + * In a worker, this sends a message to the primary. It is identical to`process.send()`. + * + * This example will echo back all messages from the primary: + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * worker.send('hi there'); + * + * } else if (cluster.isWorker) { + * process.on('message', (msg) => { + * process.send(msg); + * }); + * } + * ``` + * @since v0.7.0 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: child.Serializable, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean; + /** + * This function will kill the worker. In the primary worker, it does this by + * disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`. + * + * The `kill()` function kills the worker process without waiting for a graceful + * disconnect, it has the same behavior as `worker.process.kill()`. + * + * This method is aliased as `worker.destroy()` for backwards compatibility. + * + * In a worker, `process.kill()` exists, but it is not this function; + * it is `kill()`. + * @since v0.9.12 + * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. + */ kill(signal?: string): void; destroy(signal?: string): void; + /** + * In a worker, this function will close all servers, wait for the `'close'` event + * on those servers, and then disconnect the IPC channel. + * + * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself. + * + * Causes `.exitedAfterDisconnect` to be set. + * + * After a server is closed, it will no longer accept new connections, + * but connections may be accepted by any other listening worker. Existing + * connections will be allowed to close as usual. When no more connections exist, + * see `server.close()`, the IPC channel to the worker will close allowing it + * to die gracefully. + * + * The above applies _only_ to server connections, client connections are not + * automatically closed by workers, and disconnect does not wait for them to close + * before exiting. + * + * In a worker, `process.disconnect` exists, but it is not this function; + * it is `disconnect()`. + * + * Because long living server connections may block workers from disconnecting, it + * may be useful to send a message, so application specific actions may be taken to + * close them. It also may be useful to implement a timeout, killing a worker if + * the `'disconnect'` event has not been emitted after some time. + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * let timeout; + * + * worker.on('listening', (address) => { + * worker.send('shutdown'); + * worker.disconnect(); + * timeout = setTimeout(() => { + * worker.kill(); + * }, 2000); + * }); + * + * worker.on('disconnect', () => { + * clearTimeout(timeout); + * }); + * + * } else if (cluster.isWorker) { + * const net = require('net'); + * const server = net.createServer((socket) => { + * // Connections never end + * }); + * + * server.listen(8000); + * + * process.on('message', (msg) => { + * if (msg === 'shutdown') { + * // Initiate graceful close of any connections to server + * } + * }); + * } + * ``` + * @since v0.7.7 + * @return A reference to `worker`. + */ disconnect(): void; + /** + * This function returns `true` if the worker is connected to its primary via its + * IPC channel, `false` otherwise. A worker is connected to its primary after it + * has been created. It is disconnected after the `'disconnect'` event is emitted. + * @since v0.11.14 + */ isConnected(): boolean; + /** + * This function returns `true` if the worker's process has terminated (either + * because of exiting or being signaled). Otherwise, it returns `false`. + * + * ```js + * import cluster from 'cluster'; + * import http from 'http'; + * import { cpus } from 'os'; + * import process from 'process'; + * + * const numCPUs = cpus().length; + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('fork', (worker) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * + * cluster.on('exit', (worker, code, signal) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * } else { + * // Workers can share any TCP connection. In this case, it is an HTTP server. + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end(`Current process\n ${process.pid}`); + * process.kill(process.pid); + * }).listen(8000); + * } + * ``` + * @since v0.11.14 + */ isDead(): boolean; + /** + * This property is `true` if the worker exited due to `.disconnect()`. + * If the worker exited any other way, it is `false`. If the + * worker has not exited, it is `undefined`. + * + * The boolean `worker.exitedAfterDisconnect` allows distinguishing between + * voluntary and accidental exit, the primary may choose not to respawn a worker + * based on this value. + * + * ```js + * cluster.on('exit', (worker, code, signal) => { + * if (worker.exitedAfterDisconnect === true) { + * console.log('Oh, it was just voluntary – no need to worry'); + * } + * }); + * + * // kill worker + * worker.kill(); + * ``` + * @since v6.0.0 + */ exitedAfterDisconnect: boolean; - /** * events.EventEmitter * 1. disconnect @@ -46,69 +279,67 @@ declare module 'cluster' { * 6. online */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "exit", listener: (code: number, signal: string) => void): this; - addListener(event: "listening", listener: (address: Address) => void): this; - addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: () => void): this; - + addListener(event: 'disconnect', listener: () => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'exit', listener: (code: number, signal: string) => void): this; + addListener(event: 'listening', listener: (address: Address) => void): this; + addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: 'online', listener: () => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "exit", code: number, signal: string): boolean; - emit(event: "listening", address: Address): boolean; - emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; - emit(event: "online"): boolean; - + emit(event: 'disconnect'): boolean; + emit(event: 'error', error: Error): boolean; + emit(event: 'exit', code: number, signal: string): boolean; + emit(event: 'listening', address: Address): boolean; + emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean; + emit(event: 'online'): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "exit", listener: (code: number, signal: string) => void): this; - on(event: "listening", listener: (address: Address) => void): this; - on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: () => void): this; - + on(event: 'disconnect', listener: () => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'exit', listener: (code: number, signal: string) => void): this; + on(event: 'listening', listener: (address: Address) => void): this; + on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: 'online', listener: () => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "exit", listener: (code: number, signal: string) => void): this; - once(event: "listening", listener: (address: Address) => void): this; - once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: () => void): this; - + once(event: 'disconnect', listener: () => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'exit', listener: (code: number, signal: string) => void): this; + once(event: 'listening', listener: (address: Address) => void): this; + once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: 'online', listener: () => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependListener(event: "listening", listener: (address: Address) => void): this; - prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: () => void): this; - + prependListener(event: 'disconnect', listener: () => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'exit', listener: (code: number, signal: string) => void): this; + prependListener(event: 'listening', listener: (address: Address) => void): this; + prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: 'online', listener: () => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "listening", listener: (address: Address) => void): this; - prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: () => void): this; + prependOnceListener(event: 'disconnect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this; + prependOnceListener(event: 'listening', listener: (address: Address) => void): this; + prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: 'online', listener: () => void): this; } - - interface Cluster extends EventEmitter { - Worker: Worker; + export interface Cluster extends EventEmitter { disconnect(callback?: () => void): void; fork(env?: any): Worker; - isMaster: boolean; - isWorker: boolean; + /** @deprecated since v16.0.0 - use isPrimary. */ + readonly isMaster: boolean; + readonly isPrimary: boolean; + readonly isWorker: boolean; schedulingPolicy: number; - settings: ClusterSettings; + readonly settings: ClusterSettings; + /** @deprecated since v16.0.0 - use setupPrimary. */ setupMaster(settings?: ClusterSettings): void; - worker?: Worker; - workers?: NodeJS.Dict; - + /** + * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings. + */ + setupPrimary(settings?: ClusterSettings): void; + readonly worker?: Worker | undefined; + readonly workers?: NodeJS.Dict | undefined; readonly SCHED_NONE: number; readonly SCHED_RR: number; - /** * events.EventEmitter * 1. disconnect @@ -120,147 +351,60 @@ declare module 'cluster' { * 7. setup */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "disconnect", listener: (worker: Worker) => void): this; - addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - addListener(event: "fork", listener: (worker: Worker) => void): this; - addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: (worker: Worker) => void): this; - addListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - + addListener(event: 'disconnect', listener: (worker: Worker) => void): this; + addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: 'fork', listener: (worker: Worker) => void): this; + addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: 'online', listener: (worker: Worker) => void): this; + addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "disconnect", worker: Worker): boolean; - emit(event: "exit", worker: Worker, code: number, signal: string): boolean; - emit(event: "fork", worker: Worker): boolean; - emit(event: "listening", worker: Worker, address: Address): boolean; - emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; - emit(event: "online", worker: Worker): boolean; - emit(event: "setup", settings: ClusterSettings): boolean; - + emit(event: 'disconnect', worker: Worker): boolean; + emit(event: 'exit', worker: Worker, code: number, signal: string): boolean; + emit(event: 'fork', worker: Worker): boolean; + emit(event: 'listening', worker: Worker, address: Address): boolean; + emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + emit(event: 'online', worker: Worker): boolean; + emit(event: 'setup', settings: ClusterSettings): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "disconnect", listener: (worker: Worker) => void): this; - on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - on(event: "fork", listener: (worker: Worker) => void): this; - on(event: "listening", listener: (worker: Worker, address: Address) => void): this; - on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: (worker: Worker) => void): this; - on(event: "setup", listener: (settings: ClusterSettings) => void): this; - + on(event: 'disconnect', listener: (worker: Worker) => void): this; + on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: 'fork', listener: (worker: Worker) => void): this; + on(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: 'online', listener: (worker: Worker) => void): this; + on(event: 'setup', listener: (settings: ClusterSettings) => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "disconnect", listener: (worker: Worker) => void): this; - once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - once(event: "fork", listener: (worker: Worker) => void): this; - once(event: "listening", listener: (worker: Worker, address: Address) => void): this; - once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: (worker: Worker) => void): this; - once(event: "setup", listener: (settings: ClusterSettings) => void): this; - + once(event: 'disconnect', listener: (worker: Worker) => void): this; + once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: 'fork', listener: (worker: Worker) => void): this; + once(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: 'online', listener: (worker: Worker) => void): this; + once(event: 'setup', listener: (settings: ClusterSettings) => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependListener(event: "fork", listener: (worker: Worker) => void): this; - prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: (worker: Worker) => void): this; - prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - + prependListener(event: 'disconnect', listener: (worker: Worker) => void): this; + prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: 'fork', listener: (worker: Worker) => void): this; + prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this; + prependListener(event: 'online', listener: (worker: Worker) => void): this; + prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; - prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; - prependOnceListener(event: "online", listener: (worker: Worker) => void): this; - prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; + prependOnceListener(event: 'online', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; } - - const SCHED_NONE: number; - const SCHED_RR: number; - - function disconnect(callback?: () => void): void; - function fork(env?: any): Worker; - const isMaster: boolean; - const isWorker: boolean; - let schedulingPolicy: number; - const settings: ClusterSettings; - function setupMaster(settings?: ClusterSettings): void; - const worker: Worker; - const workers: NodeJS.Dict; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - function addListener(event: string, listener: (...args: any[]) => void): Cluster; - function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; - function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - // the handle is a net.Socket or net.Server object, or undefined. - function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; - function addListener(event: "online", listener: (worker: Worker) => void): Cluster; - function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function emit(event: string | symbol, ...args: any[]): boolean; - function emit(event: "disconnect", worker: Worker): boolean; - function emit(event: "exit", worker: Worker, code: number, signal: string): boolean; - function emit(event: "fork", worker: Worker): boolean; - function emit(event: "listening", worker: Worker, address: Address): boolean; - function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; - function emit(event: "online", worker: Worker): boolean; - function emit(event: "setup", settings: ClusterSettings): boolean; - - function on(event: string, listener: (...args: any[]) => void): Cluster; - function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function on(event: "fork", listener: (worker: Worker) => void): Cluster; - function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - function on(event: "online", listener: (worker: Worker) => void): Cluster; - function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function once(event: string, listener: (...args: any[]) => void): Cluster; - function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function once(event: "fork", listener: (worker: Worker) => void): Cluster; - function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - function once(event: "online", listener: (worker: Worker) => void): Cluster; - function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function removeListener(event: string, listener: (...args: any[]) => void): Cluster; - function removeAllListeners(event?: string): Cluster; - function setMaxListeners(n: number): Cluster; - function getMaxListeners(): number; - function listeners(event: string): Function[]; - function listenerCount(type: string): number; - - function prependListener(event: string, listener: (...args: any[]) => void): Cluster; - function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; - function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - // the handle is a net.Socket or net.Server object, or undefined. - function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; - function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; - function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster; - function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; - function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - // the handle is a net.Socket or net.Server object, or undefined. - function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; - function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; - function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function eventNames(): string[]; + const cluster: Cluster; + export default cluster; +} +declare module 'node:cluster' { + export * from 'cluster'; + export { default as default } from 'cluster'; } diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts index 2851e99..16c9137 100644 --- a/node_modules/@types/node/console.d.ts +++ b/node_modules/@types/node/console.d.ts @@ -1,97 +1,318 @@ -declare module 'node:console' { +/** + * The `console` module provides a simple debugging console that is similar to the + * JavaScript console mechanism provided by web browsers. + * + * The module exports two specific components: + * + * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream. + * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`. + * + * _**Warning**_: The global console object's methods are neither consistently + * synchronous like the browser APIs they resemble, nor are they consistently + * asynchronous like all other Node.js streams. See the `note on process I/O` for + * more information. + * + * Example using the global `console`: + * + * ```js + * console.log('hello world'); + * // Prints: hello world, to stdout + * console.log('hello %s', 'world'); + * // Prints: hello world, to stdout + * console.error(new Error('Whoops, something bad happened')); + * // Prints error message and stack trace to stderr: + * // Error: Whoops, something bad happened + * // at [eval]:5:15 + * // at Script.runInThisContext (node:vm:132:18) + * // at Object.runInThisContext (node:vm:309:38) + * // at node:internal/process/execution:77:19 + * // at [eval]-wrapper:6:22 + * // at evalScript (node:internal/process/execution:76:60) + * // at node:internal/main/eval_string:23:3 + * + * const name = 'Will Robinson'; + * console.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to stderr + * ``` + * + * Example using the `Console` class: + * + * ```js + * const out = getStreamSomehow(); + * const err = getStreamSomehow(); + * const myConsole = new console.Console(out, err); + * + * myConsole.log('hello world'); + * // Prints: hello world, to out + * myConsole.log('hello %s', 'world'); + * // Prints: hello world, to out + * myConsole.error(new Error('Whoops, something bad happened')); + * // Prints: [Error: Whoops, something bad happened], to err + * + * const name = 'Will Robinson'; + * myConsole.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to err + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js) + */ +declare module 'console' { + import console = require('node:console'); export = console; } - -declare module 'console' { +declare module 'node:console' { import { InspectOptions } from 'node:util'; - global { // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build interface Console { - Console: NodeJS.ConsoleConstructor; + Console: console.ConsoleConstructor; /** - * A simple assertion test that verifies whether `value` is truthy. - * If it is not, an `AssertionError` is thrown. - * If provided, the error `message` is formatted using `util.format()` and used as the error message. + * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only + * writes a message and does not otherwise affect execution. The output always + * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`. + * + * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens. + * + * ```js + * console.assert(true, 'does nothing'); + * + * console.assert(false, 'Whoops %s work', 'didn\'t'); + * // Assertion failed: Whoops didn't work + * + * console.assert(); + * // Assertion failed + * ``` + * @since v0.1.101 + * @param value The value tested for being truthy. + * @param message All arguments besides `value` are used as error message. */ assert(value: any, message?: string, ...optionalParams: any[]): void; /** - * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY. - * When `stdout` is not a TTY, this method does nothing. + * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the + * TTY. When `stdout` is not a TTY, this method does nothing. + * + * The specific operation of `console.clear()` can vary across operating systems + * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the + * current terminal viewport for the Node.js + * binary. + * @since v8.3.0 */ clear(): void; /** - * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`. + * Maintains an internal counter specific to `label` and outputs to `stdout` the + * number of times `console.count()` has been called with the given `label`. + * + * ```js + * > console.count() + * default: 1 + * undefined + * > console.count('default') + * default: 2 + * undefined + * > console.count('abc') + * abc: 1 + * undefined + * > console.count('xyz') + * xyz: 1 + * undefined + * > console.count('abc') + * abc: 2 + * undefined + * > console.count() + * default: 3 + * undefined + * > + * ``` + * @since v8.3.0 + * @param label The display label for the counter. */ count(label?: string): void; /** * Resets the internal counter specific to `label`. + * + * ```js + * > console.count('abc'); + * abc: 1 + * undefined + * > console.countReset('abc'); + * undefined + * > console.count('abc'); + * abc: 1 + * undefined + * > + * ``` + * @since v8.3.0 + * @param label The display label for the counter. */ countReset(label?: string): void; /** - * The `console.debug()` function is an alias for {@link console.log()}. + * The `console.debug()` function is an alias for {@link log}. + * @since v8.0.0 */ debug(message?: any, ...optionalParams: any[]): void; /** - * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`. + * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`. * This function bypasses any custom `inspect()` function defined on `obj`. + * @since v0.1.101 */ dir(obj: any, options?: InspectOptions): void; /** - * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting + * This method calls `console.log()` passing it the arguments received. + * This method does not produce any XML formatting. + * @since v8.0.0 */ dirxml(...data: any[]): void; /** - * Prints to `stderr` with newline. + * Prints to `stderr` with newline. Multiple arguments can be passed, with the + * first used as the primary message and all additional used as substitution + * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`). + * + * ```js + * const code = 5; + * console.error('error #%d', code); + * // Prints: error #5, to stderr + * console.error('error', code); + * // Prints: error 5, to stderr + * ``` + * + * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string + * values are concatenated. See `util.format()` for more information. + * @since v0.1.100 */ error(message?: any, ...optionalParams: any[]): void; /** - * Increases indentation of subsequent lines by two spaces. - * If one or more `label`s are provided, those are printed first without the additional indentation. + * Increases indentation of subsequent lines by spaces for `groupIndentation`length. + * + * If one or more `label`s are provided, those are printed first without the + * additional indentation. + * @since v8.5.0 */ group(...label: any[]): void; /** - * The `console.groupCollapsed()` function is an alias for {@link console.group()}. + * An alias for {@link group}. + * @since v8.5.0 */ groupCollapsed(...label: any[]): void; /** - * Decreases indentation of subsequent lines by two spaces. + * Decreases indentation of subsequent lines by spaces for `groupIndentation`length. + * @since v8.5.0 */ groupEnd(): void; /** - * The {@link console.info()} function is an alias for {@link console.log()}. + * The `console.info()` function is an alias for {@link log}. + * @since v0.1.100 */ info(message?: any, ...optionalParams: any[]): void; /** - * Prints to `stdout` with newline. + * Prints to `stdout` with newline. Multiple arguments can be passed, with the + * first used as the primary message and all additional used as substitution + * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`). + * + * ```js + * const count = 5; + * console.log('count: %d', count); + * // Prints: count: 5, to stdout + * console.log('count:', count); + * // Prints: count: 5, to stdout + * ``` + * + * See `util.format()` for more information. + * @since v0.1.100 */ log(message?: any, ...optionalParams: any[]): void; /** - * This method does not display anything unless used in the inspector. - * Prints to `stdout` the array `array` formatted as a table. + * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just + * logging the argument if it can’t be parsed as tabular. + * + * ```js + * // These can't be parsed as tabular data + * console.table(Symbol()); + * // Symbol() + * + * console.table(undefined); + * // undefined + * + * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]); + * // ┌─────────┬─────┬─────┐ + * // │ (index) │ a │ b │ + * // ├─────────┼─────┼─────┤ + * // │ 0 │ 1 │ 'Y' │ + * // │ 1 │ 'Z' │ 2 │ + * // └─────────┴─────┴─────┘ + * + * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); + * // ┌─────────┬─────┐ + * // │ (index) │ a │ + * // ├─────────┼─────┤ + * // │ 0 │ 1 │ + * // │ 1 │ 'Z' │ + * // └─────────┴─────┘ + * ``` + * @since v10.0.0 + * @param properties Alternate properties for constructing the table. */ table(tabularData: any, properties?: ReadonlyArray): void; /** - * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`. + * Starts a timer that can be used to compute the duration of an operation. Timers + * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in + * suitable time units to `stdout`. For example, if the elapsed + * time is 3869ms, `console.timeEnd()` displays "3.869s". + * @since v0.1.104 */ time(label?: string): void; /** - * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`. + * Stops a timer that was previously started by calling {@link time} and + * prints the result to `stdout`: + * + * ```js + * console.time('100-elements'); + * for (let i = 0; i < 100; i++) {} + * console.timeEnd('100-elements'); + * // prints 100-elements: 225.438ms + * ``` + * @since v0.1.104 */ timeEnd(label?: string): void; /** - * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`. + * For a timer that was previously started by calling {@link time}, prints + * the elapsed time and other `data` arguments to `stdout`: + * + * ```js + * console.time('process'); + * const value = expensiveProcess1(); // Returns 42 + * console.timeLog('process', value); + * // Prints "process: 365.227ms 42". + * doExpensiveProcess2(value); + * console.timeEnd('process'); + * ``` + * @since v10.7.0 */ timeLog(label?: string, ...data: any[]): void; /** - * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code. + * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code. + * + * ```js + * console.trace('Show me'); + * // Prints: (stack trace will vary based on where trace is called) + * // Trace: Show me + * // at repl:2:9 + * // at REPLServer.defaultEval (repl.js:248:27) + * // at bound (domain.js:287:14) + * // at REPLServer.runBound [as eval] (domain.js:300:12) + * // at REPLServer. (repl.js:412:12) + * // at emitOne (events.js:82:20) + * // at REPLServer.emit (events.js:169:7) + * // at REPLServer.Interface._onLine (readline.js:210:10) + * // at REPLServer.Interface._line (readline.js:549:8) + * // at REPLServer.Interface._ttyWrite (readline.js:826:14) + * ``` + * @since v0.1.104 */ trace(message?: any, ...optionalParams: any[]): void; /** - * The {@link console.warn()} function is an alias for {@link console.error()}. + * The `console.warn()` function is an alias for {@link error}. + * @since v0.1.100 */ warn(message?: any, ...optionalParams: any[]): void; - // --- Inspector mode only --- /** * This method does not display anything unless used in the inspector. @@ -109,29 +330,83 @@ declare module 'console' { */ timeStamp(label?: string): void; } - - var console: Console; - - namespace NodeJS { + /** + * The `console` module provides a simple debugging console that is similar to the + * JavaScript console mechanism provided by web browsers. + * + * The module exports two specific components: + * + * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream. + * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`. + * + * _**Warning**_: The global console object's methods are neither consistently + * synchronous like the browser APIs they resemble, nor are they consistently + * asynchronous like all other Node.js streams. See the `note on process I/O` for + * more information. + * + * Example using the global `console`: + * + * ```js + * console.log('hello world'); + * // Prints: hello world, to stdout + * console.log('hello %s', 'world'); + * // Prints: hello world, to stdout + * console.error(new Error('Whoops, something bad happened')); + * // Prints error message and stack trace to stderr: + * // Error: Whoops, something bad happened + * // at [eval]:5:15 + * // at Script.runInThisContext (node:vm:132:18) + * // at Object.runInThisContext (node:vm:309:38) + * // at node:internal/process/execution:77:19 + * // at [eval]-wrapper:6:22 + * // at evalScript (node:internal/process/execution:76:60) + * // at node:internal/main/eval_string:23:3 + * + * const name = 'Will Robinson'; + * console.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to stderr + * ``` + * + * Example using the `Console` class: + * + * ```js + * const out = getStreamSomehow(); + * const err = getStreamSomehow(); + * const myConsole = new console.Console(out, err); + * + * myConsole.log('hello world'); + * // Prints: hello world, to out + * myConsole.log('hello %s', 'world'); + * // Prints: hello world, to out + * myConsole.error(new Error('Whoops, something bad happened')); + * // Prints: [Error: Whoops, something bad happened], to err + * + * const name = 'Will Robinson'; + * myConsole.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to err + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js) + */ + namespace console { interface ConsoleConstructorOptions { - stdout: WritableStream; - stderr?: WritableStream; - ignoreErrors?: boolean; - colorMode?: boolean | 'auto'; - inspectOptions?: InspectOptions; + stdout: NodeJS.WritableStream; + stderr?: NodeJS.WritableStream | undefined; + ignoreErrors?: boolean | undefined; + colorMode?: boolean | 'auto' | undefined; + inspectOptions?: InspectOptions | undefined; + /** + * Set group indentation + * @default 2 + */ + groupIndentation?: number | undefined; } - interface ConsoleConstructor { prototype: Console; - new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console; - new(options: ConsoleConstructorOptions): Console; - } - - interface Global { - console: typeof console; + new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; + new (options: ConsoleConstructorOptions): Console; } } + var console: Console; } - - export = console; + export = globalThis.console; } diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts index 5d0b7a7..208020d 100644 --- a/node_modules/@types/node/constants.d.ts +++ b/node_modules/@types/node/constants.d.ts @@ -1,9 +1,3 @@ -/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ -declare module 'node:constants' { - import exp = require('constants'); - export = exp; -} - /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ declare module 'constants' { import { constants as osConstants, SignalConstants } from 'node:os'; @@ -17,3 +11,8 @@ declare module 'constants' { typeof fsConstants; export = exp; } + +declare module 'node:constants' { + import constants = require('constants'); + export = constants; +} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts index 46762ca..20d960c 100644 --- a/node_modules/@types/node/crypto.d.ts +++ b/node_modules/@types/node/crypto.d.ts @@ -1,18 +1,85 @@ -declare module 'node:crypto' { - export * from 'crypto'; -} - +/** + * The `crypto` module provides cryptographic functionality that includes a set of + * wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions. + * + * ```js + * const { createHmac } = await import('crypto'); + * + * const secret = 'abcdefg'; + * const hash = createHmac('sha256', secret) + * .update('I love cupcakes') + * .digest('hex'); + * console.log(hash); + * // Prints: + * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/crypto.js) + */ declare module 'crypto' { import * as stream from 'node:stream'; - - interface Certificate { + import { PeerCertificate } from 'node:tls'; + /** + * SPKAC is a Certificate Signing Request mechanism originally implemented by + * Netscape and was specified formally as part of [HTML5's `keygen` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen). + * + * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects + * should not use this element anymore. + * + * The `crypto` module provides the `Certificate` class for working with SPKAC + * data. The most common usage is handling output generated by the HTML5`` element. Node.js uses [OpenSSL's SPKAC + * implementation](https://www.openssl.org/docs/man1.1.0/apps/openssl-spkac.html) internally. + * @since v0.11.8 + */ + class Certificate { + /** + * ```js + * const { Certificate } = await import('crypto'); + * const spkac = getSpkacSomehow(); + * const challenge = Certificate.exportChallenge(spkac); + * console.log(challenge.toString('utf8')); + * // Prints: the challenge as a UTF8 string + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportChallenge(spkac: BinaryLike): Buffer; + /** + * ```js + * const { Certificate } = await import('crypto'); + * const spkac = getSpkacSomehow(); + * const publicKey = Certificate.exportPublicKey(spkac); + * console.log(publicKey); + * // Prints: the public key as + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; + /** + * ```js + * import { Buffer } from 'buffer'; + * const { Certificate } = await import('crypto'); + * + * const spkac = getSpkacSomehow(); + * console.log(Certificate.verifySpkac(Buffer.from(spkac))); + * // Prints: true or false + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return `true` if the given `spkac` data structure is valid, `false` otherwise. + */ + static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; /** + * @deprecated * @param spkac * @returns The challenge component of the `spkac` data structure, * which includes a public key and a challenge. */ exportChallenge(spkac: BinaryLike): Buffer; /** + * @deprecated * @param spkac * @param encoding The encoding of the spkac string. * @returns The public key component of the `spkac` data structure, @@ -20,23 +87,16 @@ declare module 'crypto' { */ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; /** + * @deprecated * @param spkac * @returns `true` if the given `spkac` data structure is valid, * `false` otherwise. */ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; } - const Certificate: Certificate & { - /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */ - new (): Certificate; - /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */ - (): Certificate; - }; - namespace constants { // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants const OPENSSL_VERSION_NUMBER: number; - /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ const SSL_OP_ALL: number; /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ @@ -86,7 +146,6 @@ declare module 'crypto' { const SSL_OP_TLS_D5_BUG: number; /** Instructs OpenSSL to disable version rollback attack detection. */ const SSL_OP_TLS_ROLLBACK_BUG: number; - const ENGINE_METHOD_RSA: number; const ENGINE_METHOD_DSA: number; const ENGINE_METHOD_DH: number; @@ -98,14 +157,11 @@ declare module 'crypto' { const ENGINE_METHOD_PKEY_ASN1_METHS: number; const ENGINE_METHOD_ALL: number; const ENGINE_METHOD_NONE: number; - const DH_CHECK_P_NOT_SAFE_PRIME: number; const DH_CHECK_P_NOT_PRIME: number; const DH_UNABLE_TO_CHECK_GENERATOR: number; const DH_NOT_SUITABLE_GENERATOR: number; - const ALPN_ENABLED: number; - const RSA_PKCS1_PADDING: number; const RSA_SSLV23_PADDING: number; const RSA_NO_PADDING: number; @@ -118,215 +174,1129 @@ declare module 'crypto' { const RSA_PSS_SALTLEN_MAX_SIGN: number; /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ const RSA_PSS_SALTLEN_AUTO: number; - const POINT_CONVERSION_COMPRESSED: number; const POINT_CONVERSION_UNCOMPRESSED: number; const POINT_CONVERSION_HYBRID: number; - /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ const defaultCoreCipherList: string; /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ const defaultCipherList: string; } - interface HashOptions extends stream.TransformOptions { /** * For XOF hash functions such as `shake256`, the * outputLength option can be used to specify the desired output length in bytes. */ - outputLength?: number; + outputLength?: number | undefined; } - /** @deprecated since v10.0.0 */ const fips: boolean; - + /** + * Creates and returns a `Hash` object that can be used to generate hash digests + * using the given `algorithm`. Optional `options` argument controls stream + * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option + * can be used to specify the desired output length in bytes. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * Example: generating the sha256 sum of a file + * + * ```js + * import { + * createReadStream + * } from 'fs'; + * import { argv } from 'process'; + * const { + * createHash + * } = await import('crypto'); + * + * const filename = argv[2]; + * + * const hash = createHash('sha256'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hash.update(data); + * else { + * console.log(`${hash.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.92 + * @param options `stream.transform` options + */ function createHash(algorithm: string, options?: HashOptions): Hash; + /** + * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. + * Optional `options` argument controls stream behavior. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is + * a `KeyObject`, its type must be `secret`. + * + * Example: generating the sha256 HMAC of a file + * + * ```js + * import { + * createReadStream + * } from 'fs'; + * import { argv } from 'process'; + * const { + * createHmac + * } = await import('crypto'); + * + * const filename = argv[2]; + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hmac.update(data); + * else { + * console.log(`${hmac.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.94 + * @param options `stream.transform` options + */ function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac; - // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings - type BinaryToTextEncoding = 'base64' | 'hex'; + type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary'; type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1'; type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2'; - type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding; - type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid'; - + /** + * The `Hash` class is a utility for creating hash digests of data. It can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed hash digest on the readable side, or + * * Using the `hash.update()` and `hash.digest()` methods to produce the + * computed hash. + * + * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hash` objects as streams: + * + * ```js + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hash.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * } + * }); + * + * hash.write('some data to hash'); + * hash.end(); + * ``` + * + * Example: Using `Hash` and piped streams: + * + * ```js + * import { createReadStream } from 'fs'; + * import { stdout } from 'process'; + * const { createHash } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * const input = createReadStream('test.js'); + * input.pipe(hash).setEncoding('hex').pipe(stdout); + * ``` + * + * Example: Using the `hash.update()` and `hash.digest()` methods: + * + * ```js + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('some data to hash'); + * console.log(hash.digest('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * ``` + * @since v0.1.92 + */ class Hash extends stream.Transform { private constructor(); - copy(): Hash; + /** + * Creates a new `Hash` object that contains a deep copy of the internal state + * of the current `Hash` object. + * + * The optional `options` argument controls stream behavior. For XOF hash + * functions such as `'shake256'`, the `outputLength` option can be used to + * specify the desired output length in bytes. + * + * An error is thrown when an attempt is made to copy the `Hash` object after + * its `hash.digest()` method has been called. + * + * ```js + * // Calculate a rolling hash. + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('one'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('two'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('three'); + * console.log(hash.copy().digest('hex')); + * + * // Etc. + * ``` + * @since v13.1.0 + * @param options `stream.transform` options + */ + copy(options?: stream.TransformOptions): Hash; + /** + * Updates the hash content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ update(data: BinaryLike): Hash; - update(data: string, input_encoding: Encoding): Hash; + update(data: string, inputEncoding: Encoding): Hash; + /** + * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). + * If `encoding` is provided a string will be returned; otherwise + * a `Buffer` is returned. + * + * The `Hash` object can not be used again after `hash.digest()` method has been + * called. Multiple calls will cause an error to be thrown. + * @since v0.1.92 + * @param encoding The `encoding` of the return value. + */ digest(): Buffer; digest(encoding: BinaryToTextEncoding): string; } + /** + * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can + * be used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed HMAC digest on the readable side, or + * * Using the `hmac.update()` and `hmac.digest()` methods to produce the + * computed HMAC digest. + * + * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hmac` objects as streams: + * + * ```js + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hmac.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * } + * }); + * + * hmac.write('some data to hash'); + * hmac.end(); + * ``` + * + * Example: Using `Hmac` and piped streams: + * + * ```js + * import { createReadStream } from 'fs'; + * import { stdout } from 'process'; + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream('test.js'); + * input.pipe(hmac).pipe(stdout); + * ``` + * + * Example: Using the `hmac.update()` and `hmac.digest()` methods: + * + * ```js + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.update('some data to hash'); + * console.log(hmac.digest('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * ``` + * @since v0.1.94 + */ class Hmac extends stream.Transform { private constructor(); + /** + * Updates the `Hmac` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + */ update(data: BinaryLike): Hmac; - update(data: string, input_encoding: Encoding): Hmac; + update(data: string, inputEncoding: Encoding): Hmac; + /** + * Calculates the HMAC digest of all of the data passed using `hmac.update()`. + * If `encoding` is + * provided a string is returned; otherwise a `Buffer` is returned; + * + * The `Hmac` object can not be used again after `hmac.digest()` has been + * called. Multiple calls to `hmac.digest()` will result in an error being thrown. + * @since v0.1.94 + * @param encoding The `encoding` of the return value. + */ digest(): Buffer; digest(encoding: BinaryToTextEncoding): string; } - type KeyObjectType = 'secret' | 'public' | 'private'; - interface KeyExportOptions { type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1'; format: T; - cipher?: string; - passphrase?: string | Buffer; + cipher?: string | undefined; + passphrase?: string | Buffer | undefined; + } + interface JwkKeyExportOptions { + format: 'jwk'; + } + interface JsonWebKey { + crv?: string | undefined; + d?: string | undefined; + dp?: string | undefined; + dq?: string | undefined; + e?: string | undefined; + k?: string | undefined; + kty?: string | undefined; + n?: string | undefined; + p?: string | undefined; + q?: string | undefined; + qi?: string | undefined; + x?: string | undefined; + y?: string | undefined; + [key: string]: unknown; + } + interface AsymmetricKeyDetails { + /** + * Key size in bits (RSA, DSA). + */ + modulusLength?: number | undefined; + /** + * Public exponent (RSA). + */ + publicExponent?: bigint | undefined; + /** + * Name of the message digest (RSA-PSS). + */ + hashAlgorithm?: string | undefined; + /** + * Name of the message digest used by MGF1 (RSA-PSS). + */ + mgf1HashAlgorithm?: string | undefined; + /** + * Minimal salt length in bytes (RSA-PSS). + */ + saltLength?: number | undefined; + /** + * Size of q in bits (DSA). + */ + divisorLength?: number | undefined; + /** + * Name of the curve (EC). + */ + namedCurve?: string | undefined; } - + /** + * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, + * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` + * objects are not to be created directly using the `new`keyword. + * + * Most applications should consider using the new `KeyObject` API instead of + * passing keys as strings or `Buffer`s due to improved security features. + * + * `KeyObject` instances can be passed to other threads via `postMessage()`. + * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to + * be listed in the `transferList` argument. + * @since v11.6.0 + */ class KeyObject { private constructor(); - asymmetricKeyType?: KeyType; + /** + * Example: Converting a `CryptoKey` instance to a `KeyObject`: + * + * ```js + * const { webcrypto, KeyObject } = await import('crypto'); + * const { subtle } = webcrypto; + * + * const key = await subtle.generateKey({ + * name: 'HMAC', + * hash: 'SHA-256', + * length: 256 + * }, true, ['sign', 'verify']); + * + * const keyObject = KeyObject.from(key); + * console.log(keyObject.symmetricKeySize); + * // Prints: 32 (symmetric key size in bytes) + * ``` + * @since v15.0.0 + */ + static from(key: webcrypto.CryptoKey): KeyObject; + /** + * For asymmetric keys, this property represents the type of the key. Supported key + * types are: + * + * * `'rsa'` (OID 1.2.840.113549.1.1.1) + * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10) + * * `'dsa'` (OID 1.2.840.10040.4.1) + * * `'ec'` (OID 1.2.840.10045.2.1) + * * `'x25519'` (OID 1.3.101.110) + * * `'x448'` (OID 1.3.101.111) + * * `'ed25519'` (OID 1.3.101.112) + * * `'ed448'` (OID 1.3.101.113) + * * `'dh'` (OID 1.2.840.113549.1.3.1) + * + * This property is `undefined` for unrecognized `KeyObject` types and symmetric + * keys. + * @since v11.6.0 + */ + asymmetricKeyType?: KeyType | undefined; /** * For asymmetric keys, this property represents the size of the embedded key in * bytes. This property is `undefined` for symmetric keys. */ - asymmetricKeySize?: number; + asymmetricKeySize?: number | undefined; + /** + * This property exists only on asymmetric keys. Depending on the type of the key, + * this object contains information about the key. None of the information obtained + * through this property can be used to uniquely identify a key or to compromise + * the security of the key. + * + * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, + * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be + * set. + * + * Other key details might be exposed via this API using additional attributes. + * @since v15.7.0 + */ + asymmetricKeyDetails?: AsymmetricKeyDetails | undefined; + /** + * For symmetric keys, the following encoding options can be used: + * + * For public keys, the following encoding options can be used: + * + * For private keys, the following encoding options can be used: + * + * The result type depends on the selected encoding format, when PEM the + * result is a string, when DER it will be a buffer containing the data + * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. + * + * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are + * ignored. + * + * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of + * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be + * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for + * encrypted private keys. Since PKCS#8 defines its own + * encryption mechanism, PEM-level encryption is not supported when encrypting + * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for + * PKCS#1 and SEC1 encryption. + * @since v11.6.0 + */ export(options: KeyExportOptions<'pem'>): string | Buffer; export(options?: KeyExportOptions<'der'>): Buffer; - symmetricKeySize?: number; + export(options?: JwkKeyExportOptions): JsonWebKey; + /** + * For secret keys, this property represents the size of the key in bytes. This + * property is `undefined` for asymmetric keys. + * @since v11.6.0 + */ + symmetricKeySize?: number | undefined; + /** + * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys + * or `'private'` for private (asymmetric) keys. + * @since v11.6.0 + */ type: KeyObjectType; } - type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305'; type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm'; - + type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb'; type BinaryLike = string | NodeJS.ArrayBufferView; - type CipherKey = BinaryLike | KeyObject; - interface CipherCCMOptions extends stream.TransformOptions { authTagLength: number; } interface CipherGCMOptions extends stream.TransformOptions { - authTagLength?: number; + authTagLength?: number | undefined; } - /** @deprecated since v10.0.0 use `createCipheriv()` */ + interface CipherOCBOptions extends stream.TransformOptions { + authTagLength: number; + } + /** + * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`. + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `password` is used to derive the cipher key and initialization vector (IV). + * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`. + * + * The implementation of `crypto.createCipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode + * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when + * they are used in order to avoid the risk of IV reuse that causes + * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead. + * @param options `stream.transform` options + */ function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; /** @deprecated since v10.0.0 use `createCipheriv()` */ function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; /** @deprecated since v10.0.0 use `createCipheriv()` */ function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; - - function createCipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike | null, - options: CipherCCMOptions, - ): CipherCCM; - function createCipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike | null, - options?: CipherGCMOptions, - ): CipherGCM; - function createCipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Cipher; - + /** + * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and + * initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a + * given IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM; + function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB; + function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM; + function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher; + /** + * Instances of the `Cipher` class are used to encrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain unencrypted + * data is written to produce encrypted data on the readable side, or + * * Using the `cipher.update()` and `cipher.final()` methods to produce + * the encrypted data. + * + * The {@link createCipher} or {@link createCipheriv} methods are + * used to create `Cipher` instances. `Cipher` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Cipher` objects as streams: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * // Once we have the key and iv, we can create and use the cipher... + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = ''; + * cipher.setEncoding('hex'); + * + * cipher.on('data', (chunk) => encrypted += chunk); + * cipher.on('end', () => console.log(encrypted)); + * + * cipher.write('some clear text data'); + * cipher.end(); + * }); + * }); + * ``` + * + * Example: Using `Cipher` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'fs'; + * + * import { + * pipeline + * } from 'stream'; + * + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.js'); + * const output = createWriteStream('test.enc'); + * + * pipeline(input, cipher, output, (err) => { + * if (err) throw err; + * }); + * }); + * }); + * ``` + * + * Example: Using the `cipher.update()` and `cipher.final()` methods: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); + * encrypted += cipher.final('hex'); + * console.log(encrypted); + * }); + * }); + * ``` + * @since v0.1.94 + */ class Cipher extends stream.Transform { private constructor(); + /** + * Updates the cipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`, + * `TypedArray`, or `DataView`, then`inputEncoding` is ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being + * thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the data. + * @param outputEncoding The `encoding` of the return value. + */ update(data: BinaryLike): Buffer; - update(data: string, input_encoding: Encoding): Buffer; - update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: BinaryToTextEncoding): string; - update(data: string, input_encoding: Encoding | undefined, output_encoding: BinaryToTextEncoding): string; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; + /** + * Once the `cipher.final()` method has been called, the `Cipher` object can no + * longer be used to encrypt data. Attempts to call `cipher.final()` more than + * once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ final(): Buffer; - final(output_encoding: BufferEncoding): string; - setAutoPadding(auto_padding?: boolean): this; - // getAuthTag(): Buffer; - // setAAD(buffer: NodeJS.ArrayBufferView): this; + final(outputEncoding: BufferEncoding): string; + /** + * When using block encryption algorithms, the `Cipher` class will automatically + * add padding to the input data to the appropriate block size. To disable the + * default padding call `cipher.setAutoPadding(false)`. + * + * When `autoPadding` is `false`, the length of the entire input data must be a + * multiple of the cipher's block size or `cipher.final()` will throw an error. + * Disabling automatic padding is useful for non-standard padding, for instance + * using `0x0` instead of PKCS padding. + * + * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(autoPadding?: boolean): this; } interface CipherCCM extends Cipher { - setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options: { + plaintextLength: number; + } + ): this; getAuthTag(): Buffer; } interface CipherGCM extends Cipher { - setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; getAuthTag(): Buffer; } - /** @deprecated since v10.0.0 use `createDecipheriv()` */ + interface CipherOCB extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; + getAuthTag(): Buffer; + } + /** + * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead. + * @param options `stream.transform` options + */ function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; /** @deprecated since v10.0.0 use `createDecipheriv()` */ function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; /** @deprecated since v10.0.0 use `createDecipheriv()` */ function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; - - function createDecipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike | null, - options: CipherCCMOptions, - ): DecipherCCM; - function createDecipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike | null, - options?: CipherGCMOptions, - ): DecipherGCM; - function createDecipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Decipher; - + /** + * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags + * to those with the specified length. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a given + * IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM; + function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB; + function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher; + /** + * Instances of the `Decipher` class are used to decrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain encrypted + * data is written to produce unencrypted data on the readable side, or + * * Using the `decipher.update()` and `decipher.final()` methods to + * produce the unencrypted data. + * + * The {@link createDecipher} or {@link createDecipheriv} methods are + * used to create `Decipher` instances. `Decipher` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Decipher` objects as streams: + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Key length is dependent on the algorithm. In this case for aes192, it is + * // 24 bytes (192 bits). + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * let decrypted = ''; + * decipher.on('readable', () => { + * while (null !== (chunk = decipher.read())) { + * decrypted += chunk.toString('utf8'); + * } + * }); + * decipher.on('end', () => { + * console.log(decrypted); + * // Prints: some clear text data + * }); + * + * // Encrypted with same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * decipher.write(encrypted, 'hex'); + * decipher.end(); + * ``` + * + * Example: Using `Decipher` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'fs'; + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.enc'); + * const output = createWriteStream('test.js'); + * + * input.pipe(decipher).pipe(output); + * ``` + * + * Example: Using the `decipher.update()` and `decipher.final()` methods: + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * // Encrypted using same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + * decrypted += decipher.final('utf8'); + * console.log(decrypted); + * // Prints: some clear text data + * ``` + * @since v0.1.94 + */ class Decipher extends stream.Transform { private constructor(); + /** + * Updates the decipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is + * ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error + * being thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + * @param outputEncoding The `encoding` of the return value. + */ update(data: NodeJS.ArrayBufferView): Buffer; - update(data: string, input_encoding: BinaryToTextEncoding): Buffer; - update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string; - update(data: string, input_encoding: BinaryToTextEncoding | undefined, output_encoding: Encoding): string; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; + /** + * Once the `decipher.final()` method has been called, the `Decipher` object can + * no longer be used to decrypt data. Attempts to call `decipher.final()` more + * than once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ final(): Buffer; - final(output_encoding: BufferEncoding): string; + final(outputEncoding: BufferEncoding): string; + /** + * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and + * removing padding. + * + * Turning auto padding off will only work if the input data's length is a + * multiple of the ciphers block size. + * + * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ setAutoPadding(auto_padding?: boolean): this; - // setAuthTag(tag: NodeJS.ArrayBufferView): this; - // setAAD(buffer: NodeJS.ArrayBufferView): this; } interface DecipherCCM extends Decipher { setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options: { + plaintextLength: number; + } + ): this; } interface DecipherGCM extends Decipher { setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; + } + interface DecipherOCB extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; } - interface PrivateKeyInput { key: string | Buffer; - format?: KeyFormat; - type?: 'pkcs1' | 'pkcs8' | 'sec1'; - passphrase?: string | Buffer; + format?: KeyFormat | undefined; + type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined; + passphrase?: string | Buffer | undefined; } - interface PublicKeyInput { key: string | Buffer; - format?: KeyFormat; - type?: 'pkcs1' | 'spki'; + format?: KeyFormat | undefined; + type?: 'pkcs1' | 'spki' | undefined; + } + /** + * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKey + * } = await import('crypto'); + * + * generateKey('hmac', { length: 64 }, (err, key) => { + * if (err) throw err; + * console.log(key.export().toString('hex')); // 46e..........620 + * }); + * ``` + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKey( + type: 'hmac' | 'aes', + options: { + length: number; + }, + callback: (err: Error | null, key: KeyObject) => void + ): void; + /** + * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKeySync + * } = await import('crypto'); + * + * const key = generateKeySync('hmac', { length: 64 }); + * console.log(key.export().toString('hex')); // e89..........41e + * ``` + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKeySync( + type: 'hmac' | 'aes', + options: { + length: number; + } + ): KeyObject; + interface JsonWebKeyInput { + key: JsonWebKey; + format: 'jwk'; } - - function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject; - function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject; + /** + * Creates and returns a new key object containing a private key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above. + * + * If the private key is encrypted, a `passphrase` must be specified. The length + * of the passphrase is limited to 1024 bytes. + * @since v11.6.0 + */ + function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject; + /** + * Creates and returns a new key object containing a public key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key; + * otherwise, `key` must be an object with the properties described above. + * + * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. + * + * Because public keys can be derived from private keys, a private key may be + * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the + * returned `KeyObject` will be `'public'` and that the private key cannot be + * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned + * and it will be impossible to extract the private key from the returned object. + * @since v11.6.0 + */ + function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject; + /** + * Creates and returns a new key object containing a secret key for symmetric + * encryption or `Hmac`. + * @since v11.6.0 + * @param encoding The string encoding when `key` is a string. + */ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; - - function createSign(algorithm: string, options?: stream.WritableOptions): Signer; - + function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; + /** + * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. + * Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Sign` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createSign(algorithm: string, options?: stream.WritableOptions): Sign; type DSAEncoding = 'der' | 'ieee-p1363'; - interface SigningOptions { /** * @See crypto.constants.RSA_PKCS1_PADDING */ - padding?: number; - saltLength?: number; - dsaEncoding?: DSAEncoding; + padding?: number | undefined; + saltLength?: number | undefined; + dsaEncoding?: DSAEncoding | undefined; } - interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} interface SignKeyObjectInput extends SigningOptions { key: KeyObject; @@ -335,279 +1305,1132 @@ declare module 'crypto' { interface VerifyKeyObjectInput extends SigningOptions { key: KeyObject; } - type KeyLike = string | Buffer | KeyObject; - - class Signer extends stream.Writable { + /** + * The `Sign` class is a utility for generating signatures. It can be used in one + * of two ways: + * + * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or + * * Using the `sign.update()` and `sign.sign()` methods to produce the + * signature. + * + * The {@link createSign} method is used to create `Sign` instances. The + * argument is the string name of the hash function to use. `Sign` objects are not + * to be created directly using the `new` keyword. + * + * Example: Using `Sign` and `Verify` objects as streams: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify + * } = await import('crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('ec', { + * namedCurve: 'sect239k1' + * }); + * + * const sign = createSign('SHA256'); + * sign.write('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey, 'hex'); + * + * const verify = createVerify('SHA256'); + * verify.write('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature, 'hex')); + * // Prints: true + * ``` + * + * Example: Using the `sign.update()` and `verify.update()` methods: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify + * } = await import('crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('rsa', { + * modulusLength: 2048, + * }); + * + * const sign = createSign('SHA256'); + * sign.update('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey); + * + * const verify = createVerify('SHA256'); + * verify.update('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature)); + * // Prints: true + * ``` + * @since v0.1.92 + */ + class Sign extends stream.Writable { private constructor(); - - update(data: BinaryLike): Signer; - update(data: string, input_encoding: Encoding): Signer; - sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; - sign( - private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, - output_format: BinaryToTextEncoding, - ): string; + /** + * Updates the `Sign` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): this; + update(data: string, inputEncoding: Encoding): this; + /** + * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the following additional properties can be passed: + * + * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * The `Sign` object can not be again used after `sign.sign()` method has been + * called. Multiple calls to `sign.sign()` will result in an error being thrown. + * @since v0.1.92 + */ + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string; } - + /** + * Creates and returns a `Verify` object that uses the given algorithm. + * Use {@link getHashes} to obtain an array of names of the available + * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior. + * + * In some cases, a `Verify` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; + /** + * The `Verify` class is a utility for verifying signatures. It can be used in one + * of two ways: + * + * * As a writable `stream` where written data is used to validate against the + * supplied signature, or + * * Using the `verify.update()` and `verify.verify()` methods to verify + * the signature. + * + * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword. + * + * See `Sign` for examples. + * @since v0.1.92 + */ class Verify extends stream.Writable { private constructor(); - + /** + * Updates the `Verify` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `inputEncoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ update(data: BinaryLike): Verify; - update(data: string, input_encoding: Encoding): Verify; - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, - signature: string, - signature_format?: BinaryToTextEncoding, - ): boolean; - // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format - // The signature field accepts a TypedArray type, but it is only available starting ES2017 + update(data: string, inputEncoding: Encoding): Verify; + /** + * Verifies the provided data using the given `object` and `signature`. + * + * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an + * object, the following additional properties can be passed: + * + * The `signature` argument is the previously calculated signature for the data, in + * the `signatureEncoding`. + * If a `signatureEncoding` is specified, the `signature` is expected to be a + * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * The `verify` object can not be used again after `verify.verify()` has been + * called. Multiple calls to `verify.verify()` will result in an error being + * thrown. + * + * Because public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.1.92 + */ + verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean; + verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean; } - function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman; - function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding): DiffieHellman; - function createDiffieHellman( - prime: string, - prime_encoding: BinaryToTextEncoding, - generator: number | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - prime_encoding: BinaryToTextEncoding, - generator: string, - generator_encoding: BinaryToTextEncoding, - ): DiffieHellman; - class DiffieHellman { - private constructor(); + /** + * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an + * optional specific `generator`. + * + * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used. + * + * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise + * a `Buffer`, `TypedArray`, or `DataView` is expected. + * + * If `generatorEncoding` is specified, `generator` is expected to be a string; + * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. + * @since v0.11.12 + * @param primeEncoding The `encoding` of the `prime` string. + * @param [generator=2] + * @param generatorEncoding The `encoding` of the `generator` string. + */ + function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; + function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman; + /** + * The `DiffieHellman` class is a utility for creating Diffie-Hellman key + * exchanges. + * + * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. + * + * ```js + * import assert from 'assert'; + * + * const { + * createDiffieHellman + * } = await import('crypto'); + * + * // Generate Alice's keys... + * const alice = createDiffieHellman(2048); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * // OK + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * ``` + * @since v0.5.0 + */ + class DiffieHellman { + private constructor(); + /** + * Generates private and public Diffie-Hellman key values, and returns + * the public key in the specified `encoding`. This key should be + * transferred to the other party. + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ generateKeys(): Buffer; generateKeys(encoding: BinaryToTextEncoding): string; - computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer; - computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer; - computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string; - computeSecret( - other_public_key: string, - input_encoding: BinaryToTextEncoding, - output_encoding: BinaryToTextEncoding, - ): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using the specified `inputEncoding`, and secret is + * encoded using specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. + * @since v0.5.0 + * @param inputEncoding The `encoding` of an `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman prime in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ getPrime(): Buffer; getPrime(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman generator in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ getGenerator(): Buffer; getGenerator(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman public key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ getPublicKey(): Buffer; getPublicKey(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman private key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ getPrivateKey(): Buffer; getPrivateKey(encoding: BinaryToTextEncoding): string; - setPublicKey(public_key: NodeJS.ArrayBufferView): void; - setPublicKey(public_key: string, encoding: BufferEncoding): void; - setPrivateKey(private_key: NodeJS.ArrayBufferView): void; - setPrivateKey(private_key: string, encoding: BufferEncoding): void; + /** + * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected + * to be a string. If no `encoding` is provided, `publicKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `publicKey` string. + */ + setPublicKey(publicKey: NodeJS.ArrayBufferView): void; + setPublicKey(publicKey: string, encoding: BufferEncoding): void; + /** + * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected + * to be a string. If no `encoding` is provided, `privateKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BufferEncoding): void; + /** + * A bit field containing any warnings and/or errors resulting from a check + * performed during initialization of the `DiffieHellman` object. + * + * The following values are valid for this property (as defined in `constants`module): + * + * * `DH_CHECK_P_NOT_SAFE_PRIME` + * * `DH_CHECK_P_NOT_PRIME` + * * `DH_UNABLE_TO_CHECK_GENERATOR` + * * `DH_NOT_SUITABLE_GENERATOR` + * @since v0.11.12 + */ verifyError: number; } - function getDiffieHellman(group_name: string): DiffieHellman; - function pbkdf2( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - callback: (err: Error | null, derivedKey: Buffer) => any, - ): void; - function pbkdf2Sync( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - ): Buffer; - + /** + * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. + * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. + * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. + * + * ```js + * const { createDiffieHellmanGroup } = await import('node:crypto'); + * const dh = createDiffieHellmanGroup('modp1'); + * ``` + * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): + * ```bash + * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h + * modp1 # 768 bits + * modp2 # 1024 bits + * modp5 # 1536 bits + * modp14 # 2048 bits + * modp15 # etc. + * modp16 + * modp17 + * modp18 + * ``` + * @since v0.7.5 + */ + const DiffieHellmanGroup: DiffieHellmanGroupConstructor; + interface DiffieHellmanGroupConstructor { + new(name: string): DiffieHellmanGroup; + (name: string): DiffieHellmanGroup; + readonly prototype: DiffieHellmanGroup; + } + type DiffieHellmanGroup = Omit; + /** + * Creates a predefined `DiffieHellmanGroup` key exchange object. The + * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`, + * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The + * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing + * the keys (with `diffieHellman.setPublicKey()`, for example). The + * advantage of using this method is that the parties do not have to + * generate nor exchange a group modulus beforehand, saving both processor + * and communication time. + * + * Example (obtaining a shared secret): + * + * ```js + * const { + * getDiffieHellman + * } = await import('crypto'); + * const alice = getDiffieHellman('modp14'); + * const bob = getDiffieHellman('modp14'); + * + * alice.generateKeys(); + * bob.generateKeys(); + * + * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + * + * // aliceSecret and bobSecret should be the same + * console.log(aliceSecret === bobSecret); + * ``` + * @since v0.7.5 + */ + function getDiffieHellman(groupName: string): DiffieHellmanGroup; + /** + * An alias for {@link getDiffieHellman} + * @since v0.9.3 + */ + function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; + /** + * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`. + * + * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be + * thrown if any of the input arguments specify invalid values or types. + * + * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated, + * please specify a `digest` explicitly. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2 + * } = await import('crypto'); + * + * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * ``` + * + * The `crypto.DEFAULT_ENCODING` property can be used to change the way the`derivedKey` is passed to the callback. This property, however, has been + * deprecated and use should be avoided. + * + * ```js + * import crypto from 'crypto'; + * crypto.DEFAULT_ENCODING = 'hex'; + * crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey); // '3745e48...aa39b34' + * }); + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * @since v0.5.5 + */ + function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void; + /** + * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`. + * + * If an error occurs an `Error` will be thrown, otherwise the derived key will be + * returned as a `Buffer`. + * + * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated, + * please specify a `digest` explicitly. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2Sync + * } = await import('crypto'); + * + * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); + * console.log(key.toString('hex')); // '3745e48...08d59ae' + * ``` + * + * The `crypto.DEFAULT_ENCODING` property may be used to change the way the`derivedKey` is returned. This property, however, is deprecated and use + * should be avoided. + * + * ```js + * import crypto from 'crypto'; + * crypto.DEFAULT_ENCODING = 'hex'; + * const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512'); + * console.log(key); // '3745e48...aa39b34' + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * @since v0.9.3 + */ + function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer; + /** + * Generates cryptographically strong pseudorandom data. The `size` argument + * is a number indicating the number of bytes to generate. + * + * If a `callback` function is provided, the bytes are generated asynchronously + * and the `callback` function is invoked with two arguments: `err` and `buf`. + * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes. + * + * ```js + * // Asynchronous + * const { + * randomBytes + * } = await import('crypto'); + * + * randomBytes(256, (err, buf) => { + * if (err) throw err; + * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); + * }); + * ``` + * + * If the `callback` function is not provided, the random bytes are generated + * synchronously and returned as a `Buffer`. An error will be thrown if + * there is a problem generating the bytes. + * + * ```js + * // Synchronous + * const { + * randomBytes + * } = await import('crypto'); + * + * const buf = randomBytes(256); + * console.log( + * `${buf.length} bytes of random data: ${buf.toString('hex')}`); + * ``` + * + * The `crypto.randomBytes()` method will not complete until there is + * sufficient entropy available. + * This should normally never take longer than a few milliseconds. The only time + * when generating the random bytes may conceivably block for a longer period of + * time is right after boot, when the whole system is still low on entropy. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomBytes()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomBytes` requests when doing so as part of fulfilling a client + * request. + * @since v0.5.8 + * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. + * @return if the `callback` function is not provided. + */ function randomBytes(size: number): Buffer; function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; function pseudoRandomBytes(size: number): Buffer; function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; - + /** + * Return a random integer `n` such that `min <= n < max`. This + * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). + * + * The range (`max - min`) must be less than 2^48. `min` and `max` must + * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + * + * If the `callback` function is not provided, the random integer is + * generated synchronously. + * + * ```js + * // Asynchronous + * const { + * randomInt + * } = await import('crypto'); + * + * randomInt(3, (err, n) => { + * if (err) throw err; + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * }); + * ``` + * + * ```js + * // Synchronous + * const { + * randomInt + * } = await import('crypto'); + * + * const n = randomInt(3); + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * ``` + * + * ```js + * // With `min` argument + * const { + * randomInt + * } = await import('crypto'); + * + * const n = randomInt(1, 7); + * console.log(`The dice rolled: ${n}`); + * ``` + * @since v14.10.0, v12.19.0 + * @param [min=0] Start of random range (inclusive). + * @param max End of random range (exclusive). + * @param callback `function(err, n) {}`. + */ function randomInt(max: number): number; function randomInt(min: number, max: number): number; function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; - + /** + * Synchronous version of {@link randomFill}. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFillSync } = await import('crypto'); + * + * const buf = Buffer.alloc(10); + * console.log(randomFillSync(buf).toString('hex')); + * + * randomFillSync(buf, 5); + * console.log(buf.toString('hex')); + * + * // The above is equivalent to the following: + * randomFillSync(buf, 5, 5); + * console.log(buf.toString('hex')); + * ``` + * + * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFillSync } = await import('crypto'); + * + * const a = new Uint32Array(10); + * console.log(Buffer.from(randomFillSync(a).buffer, + * a.byteOffset, a.byteLength).toString('hex')); + * + * const b = new DataView(new ArrayBuffer(10)); + * console.log(Buffer.from(randomFillSync(b).buffer, + * b.byteOffset, b.byteLength).toString('hex')); + * + * const c = new ArrayBuffer(10); + * console.log(Buffer.from(randomFillSync(c)).toString('hex')); + * ``` + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @return The object passed as `buffer` argument. + */ function randomFillSync(buffer: T, offset?: number, size?: number): T; - function randomFill( - buffer: T, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - size: number, - callback: (err: Error | null, buf: T) => void, - ): void; - + /** + * This function is similar to {@link randomBytes} but requires the first + * argument to be a `Buffer` that will be filled. It also + * requires that a callback is passed in. + * + * If the `callback` function is not provided, an error will be thrown. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFill } = await import('crypto'); + * + * const buf = Buffer.alloc(10); + * randomFill(buf, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * randomFill(buf, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * // The above is equivalent to the following: + * randomFill(buf, 5, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * ``` + * + * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`. + * + * While this includes instances of `Float32Array` and `Float64Array`, this + * function should not be used to generate random floating-point numbers. The + * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array + * contains finite numbers only, they are not drawn from a uniform random + * distribution and have no meaningful lower or upper bounds. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFill } = await import('crypto'); + * + * const a = new Uint32Array(10); + * randomFill(a, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const b = new DataView(new ArrayBuffer(10)); + * randomFill(b, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const c = new ArrayBuffer(10); + * randomFill(c, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf).toString('hex')); + * }); + * ``` + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomFill()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomFill` requests when doing so as part of fulfilling a client + * request. + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @param callback `function(err, buf) {}`. + */ + function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void; interface ScryptOptions { - cost?: number; - blockSize?: number; - parallelization?: number; - N?: number; - r?: number; - p?: number; - maxmem?: number; + cost?: number | undefined; + blockSize?: number | undefined; + parallelization?: number | undefined; + N?: number | undefined; + r?: number | undefined; + p?: number | undefined; + maxmem?: number | undefined; } - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options: ScryptOptions, - callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; + /** + * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the + * callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scrypt + * } = await import('crypto'); + * + * // Using the factory defaults. + * scrypt('password', 'salt', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * // Using a custom N parameter. Must be a power of two. + * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' + * }); + * ``` + * @since v10.5.0 + */ + function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void; + function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void; + /** + * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scryptSync + * } = await import('crypto'); + * // Using the factory defaults. + * + * const key1 = scryptSync('password', 'salt', 64); + * console.log(key1.toString('hex')); // '3745e48...08d59ae' + * // Using a custom N parameter. Must be a power of two. + * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); + * console.log(key2.toString('hex')); // '3745e48...aa39b34' + * ``` + * @since v10.5.0 + */ function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; - interface RsaPublicKey { key: KeyLike; - padding?: number; + padding?: number | undefined; } interface RsaPrivateKey { key: KeyLike; - passphrase?: string; + passphrase?: string | undefined; /** * @default 'sha1' */ - oaepHash?: string; - oaepLabel?: NodeJS.TypedArray; - padding?: number; + oaepHash?: string | undefined; + oaepLabel?: NodeJS.TypedArray | undefined; + padding?: number | undefined; } + /** + * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using + * the corresponding private key, for example using {@link privateDecrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.11.14 + */ function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Decrypts `buffer` with `key`.`buffer` was previously encrypted using + * the corresponding private key, for example using {@link privateEncrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v1.1.0 + */ function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; - function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; - function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using + * the corresponding public key, for example using {@link publicEncrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. + * @since v0.11.14 + */ + function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using + * the corresponding public key, for example using {@link publicDecrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. + * @since v1.1.0 + */ + function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * ```js + * const { + * getCiphers + * } = await import('crypto'); + * + * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] + * ``` + * @since v0.9.3 + * @return An array with the names of the supported cipher algorithms. + */ function getCiphers(): string[]; + /** + * ```js + * const { + * getCurves + * } = await import('crypto'); + * + * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] + * ``` + * @since v2.3.0 + * @return An array with the names of the supported elliptic curves. + */ function getCurves(): string[]; + /** + * @since v10.0.0 + * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. + */ function getFips(): 1 | 0; + /** + * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available. + * @since v10.0.0 + * @param bool `true` to enable FIPS mode. + */ + function setFips(bool: boolean): void; + /** + * ```js + * const { + * getHashes + * } = await import('crypto'); + * + * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] + * ``` + * @since v0.9.3 + * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. + */ function getHashes(): string[]; + /** + * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) + * key exchanges. + * + * Instances of the `ECDH` class can be created using the {@link createECDH} function. + * + * ```js + * import assert from 'assert'; + * + * const { + * createECDH + * } = await import('crypto'); + * + * // Generate Alice's keys... + * const alice = createECDH('secp521r1'); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createECDH('secp521r1'); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * // OK + * ``` + * @since v0.11.14 + */ class ECDH { private constructor(); + /** + * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the + * format specified by `format`. The `format` argument specifies point encoding + * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is + * interpreted using the specified `inputEncoding`, and the returned key is encoded + * using the specified `outputEncoding`. + * + * Use {@link getCurves} to obtain a list of available curve names. + * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display + * the name and description of each available elliptic curve. + * + * If `format` is not specified the point will be returned in `'uncompressed'`format. + * + * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * Example (uncompressing a key): + * + * ```js + * const { + * createECDH, + * ECDH + * } = await import('crypto'); + * + * const ecdh = createECDH('secp256k1'); + * ecdh.generateKeys(); + * + * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); + * + * const uncompressedKey = ECDH.convertKey(compressedKey, + * 'secp256k1', + * 'hex', + * 'hex', + * 'uncompressed'); + * + * // The converted key and the uncompressed public key should be the same + * console.log(uncompressedKey === ecdh.getPublicKey('hex')); + * ``` + * @since v10.0.0 + * @param inputEncoding The `encoding` of the `key` string. + * @param outputEncoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ static convertKey( key: BinaryLike, curve: string, inputEncoding?: BinaryToTextEncoding, - outputEncoding?: 'latin1' | 'hex' | 'base64', - format?: 'uncompressed' | 'compressed' | 'hybrid', + outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url', + format?: 'uncompressed' | 'compressed' | 'hybrid' ): Buffer | string; + /** + * Generates private and public EC Diffie-Hellman key values, and returns + * the public key in the specified `format` and `encoding`. This key should be + * transferred to the other party. + * + * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. + * + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ generateKeys(): Buffer; generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer; - computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer; - computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string; - computeSecret( - other_public_key: string, - input_encoding: BinaryToTextEncoding, - output_encoding: BinaryToTextEncoding, - ): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using specified `inputEncoding`, and the returned secret + * is encoded using the specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`. + * + * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. + * + * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is + * usually supplied from a remote user over an insecure network, + * be sure to handle this exception accordingly. + * @since v0.11.14 + * @param inputEncoding The `encoding` of the `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string; + /** + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @return The EC Diffie-Hellman in the specified `encoding`. + */ getPrivateKey(): Buffer; getPrivateKey(encoding: BinaryToTextEncoding): string; - getPublicKey(): Buffer; + /** + * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. + * + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param [encoding] The `encoding` of the return value. + * @param [format='uncompressed'] + * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. + */ + getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer; getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - setPrivateKey(private_key: NodeJS.ArrayBufferView): void; - setPrivateKey(private_key: string, encoding: BinaryToTextEncoding): void; + /** + * Sets the EC Diffie-Hellman private key. + * If `encoding` is provided, `privateKey` is expected + * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * If `privateKey` is not valid for the curve specified when the `ECDH` object was + * created, an error is thrown. Upon setting the private key, the associated + * public point (key) is also generated and set in the `ECDH` object. + * @since v0.11.14 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; } - function createECDH(curve_name: string): ECDH; + /** + * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a + * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent + * OpenSSL releases, `openssl ecparam -list_curves` will also display the name + * and description of each available elliptic curve. + * @since v0.11.14 + */ + function createECDH(curveName: string): ECDH; + /** + * This function is based on a constant-time algorithm. + * Returns true if `a` is equal to `b`, without leaking timing information that + * would allow an attacker to guess one of the values. This is suitable for + * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). + * + * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they + * must have the same byte length. An error is thrown if `a` and `b` have + * different byte lengths. + * + * If at least one of `a` and `b` is a `TypedArray` with more than one byte per + * entry, such as `Uint16Array`, the result will be computed using the platform + * byte order. + * + * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code + * is timing-safe. Care should be taken to ensure that the surrounding code does + * not introduce timing vulnerabilities. + * @since v6.6.0 + */ function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; /** @deprecated since v10.0.0 */ const DEFAULT_ENCODING: BufferEncoding; - - type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448'; - type KeyFormat = 'pem' | 'der'; - + type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448'; + type KeyFormat = 'pem' | 'der' | 'jwk'; interface BasePrivateKeyEncodingOptions { format: T; - cipher?: string; - passphrase?: string; + cipher?: string | undefined; + passphrase?: string | undefined; } - interface KeyPairKeyObjectResult { publicKey: KeyObject; privateKey: KeyObject; } - - interface ED25519KeyPairKeyObjectOptions { + interface ED25519KeyPairKeyObjectOptions {} + interface ED448KeyPairKeyObjectOptions {} + interface X25519KeyPairKeyObjectOptions {} + interface X448KeyPairKeyObjectOptions {} + interface ECKeyPairKeyObjectOptions { /** - * No options. + * Name of the curve to use */ + namedCurve: string; } - - interface ED448KeyPairKeyObjectOptions { + interface RSAKeyPairKeyObjectOptions { /** - * No options. + * Key size in bits */ - } - - interface X25519KeyPairKeyObjectOptions { + modulusLength: number; /** - * No options. + * Public exponent + * @default 0x10001 */ + publicExponent?: number | undefined; } - - interface X448KeyPairKeyObjectOptions { + interface RSAPSSKeyPairKeyObjectOptions { /** - * No options. + * Key size in bits */ - } - - interface ECKeyPairKeyObjectOptions { + modulusLength: number; /** - * Name of the curve to use. + * Public exponent + * @default 0x10001 */ - namedCurve: string; - } - - interface RSAKeyPairKeyObjectOptions { + publicExponent?: number | undefined; /** - * Key size in bits + * Name of the message digest */ - modulusLength: number; - + hashAlgorithm?: string; /** - * @default 0x10001 + * Name of the message digest used by MGF1 + */ + mgf1HashAlgorithm?: string; + /** + * Minimal salt length in bytes */ - publicExponent?: number; + saltLength?: string; } - interface DSAKeyPairKeyObjectOptions { /** * Key size in bits */ modulusLength: number; - /** * Size of q in bits */ divisorLength: number; } - interface RSAKeyPairOptions { /** * Key size in bits */ modulusLength: number; /** + * Public exponent * @default 0x10001 */ - publicExponent?: number; - + publicExponent?: number | undefined; publicKeyEncoding: { type: 'pkcs1' | 'spki'; format: PubF; @@ -616,7 +2439,36 @@ declare module 'crypto' { type: 'pkcs1' | 'pkcs8'; }; } - + interface RSAPSSKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + /** + * Name of the message digest + */ + hashAlgorithm?: string; + /** + * Name of the message digest used by MGF1 + */ + mgf1HashAlgorithm?: string; + /** + * Minimal salt length in bytes + */ + saltLength?: string; + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } interface DSAKeyPairOptions { /** * Key size in bits @@ -626,7 +2478,6 @@ declare module 'crypto' { * Size of q in bits */ divisorLength: number; - publicKeyEncoding: { type: 'spki'; format: PubF; @@ -635,13 +2486,11 @@ declare module 'crypto' { type: 'pkcs8'; }; } - interface ECKeyPairOptions { /** * Name of the curve to use. */ namedCurve: string; - publicKeyEncoding: { type: 'pkcs1' | 'spki'; format: PubF; @@ -650,7 +2499,6 @@ declare module 'crypto' { type: 'sec1' | 'pkcs8'; }; } - interface ED25519KeyPairOptions { publicKeyEncoding: { type: 'spki'; @@ -660,7 +2508,6 @@ declare module 'crypto' { type: 'pkcs8'; }; } - interface ED448KeyPairOptions { publicKeyEncoding: { type: 'spki'; @@ -670,7 +2517,6 @@ declare module 'crypto' { type: 'pkcs8'; }; } - interface X25519KeyPairOptions { publicKeyEncoding: { type: 'spki'; @@ -680,7 +2526,6 @@ declare module 'crypto' { type: 'pkcs8'; }; } - interface X448KeyPairOptions { publicKeyEncoding: { type: 'spki'; @@ -690,487 +2535,1430 @@ declare module 'crypto' { type: 'pkcs8'; }; } - interface KeyPairSyncResult { publicKey: T1; privateKey: T2; } - - function generateKeyPairSync( - type: 'rsa', - options: RSAKeyPairOptions<'pem', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'rsa', - options: RSAKeyPairOptions<'pem', 'der'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'rsa', - options: RSAKeyPairOptions<'der', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'rsa', - options: RSAKeyPairOptions<'der', 'der'>, - ): KeyPairSyncResult; + /** + * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, + * Ed25519, Ed448, X25519, X448, and DH are currently supported. + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * When encoding public keys, it is recommended to use `'spki'`. When encoding + * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, + * and to keep the passphrase confidential. + * + * ```js + * const { + * generateKeyPairSync + * } = await import('crypto'); + * + * const { + * publicKey, + * privateKey, + * } = generateKeyPairSync('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem' + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret' + * } + * }); + * ``` + * + * The return value `{ publicKey, privateKey }` represents the generated key pair. + * When PEM encoding was selected, the respective key will be a string, otherwise + * it will be a buffer containing the data encoded as DER. + * @since v10.12.0 + * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. + */ + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPairSync( - type: 'dsa', - options: DSAKeyPairOptions<'pem', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'dsa', - options: DSAKeyPairOptions<'pem', 'der'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'dsa', - options: DSAKeyPairOptions<'der', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'dsa', - options: DSAKeyPairOptions<'der', 'der'>, - ): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPairSync( - type: 'ec', - options: ECKeyPairOptions<'pem', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ec', - options: ECKeyPairOptions<'pem', 'der'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ec', - options: ECKeyPairOptions<'der', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ec', - options: ECKeyPairOptions<'der', 'der'>, - ): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult; function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPairSync( - type: 'ed25519', - options: ED25519KeyPairOptions<'pem', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ed25519', - options: ED25519KeyPairOptions<'pem', 'der'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ed25519', - options: ED25519KeyPairOptions<'der', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ed25519', - options: ED25519KeyPairOptions<'der', 'der'>, - ): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult; function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPairSync( - type: 'ed448', - options: ED448KeyPairOptions<'pem', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ed448', - options: ED448KeyPairOptions<'pem', 'der'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ed448', - options: ED448KeyPairOptions<'der', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'ed448', - options: ED448KeyPairOptions<'der', 'der'>, - ): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult; function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPairSync( - type: 'x25519', - options: X25519KeyPairOptions<'pem', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'x25519', - options: X25519KeyPairOptions<'pem', 'der'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'x25519', - options: X25519KeyPairOptions<'der', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'x25519', - options: X25519KeyPairOptions<'der', 'der'>, - ): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult; function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPairSync( - type: 'x448', - options: X448KeyPairOptions<'pem', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'x448', - options: X448KeyPairOptions<'pem', 'der'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'x448', - options: X448KeyPairOptions<'der', 'pem'>, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: 'x448', - options: X448KeyPairOptions<'der', 'der'>, - ): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult; function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPair( - type: 'rsa', - options: RSAKeyPairOptions<'pem', 'pem'>, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'rsa', - options: RSAKeyPairOptions<'pem', 'der'>, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'rsa', - options: RSAKeyPairOptions<'der', 'pem'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'rsa', - options: RSAKeyPairOptions<'der', 'der'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'rsa', - options: RSAKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - - function generateKeyPair( - type: 'dsa', - options: DSAKeyPairOptions<'pem', 'pem'>, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'dsa', - options: DSAKeyPairOptions<'pem', 'der'>, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'dsa', - options: DSAKeyPairOptions<'der', 'pem'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'dsa', - options: DSAKeyPairOptions<'der', 'der'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'dsa', - options: DSAKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - - function generateKeyPair( - type: 'ec', - options: ECKeyPairOptions<'pem', 'pem'>, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'ec', - options: ECKeyPairOptions<'pem', 'der'>, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'ec', - options: ECKeyPairOptions<'der', 'pem'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'ec', - options: ECKeyPairOptions<'der', 'der'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'ec', - options: ECKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - - function generateKeyPair( - type: 'ed25519', - options: ED25519KeyPairOptions<'pem', 'pem'>, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'ed25519', - options: ED25519KeyPairOptions<'pem', 'der'>, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'ed25519', - options: ED25519KeyPairOptions<'der', 'pem'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'ed25519', - options: ED25519KeyPairOptions<'der', 'der'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'ed25519', - options: ED25519KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - - function generateKeyPair( - type: 'ed448', - options: ED448KeyPairOptions<'pem', 'pem'>, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'ed448', - options: ED448KeyPairOptions<'pem', 'der'>, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'ed448', - options: ED448KeyPairOptions<'der', 'pem'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'ed448', - options: ED448KeyPairOptions<'der', 'der'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'ed448', - options: ED448KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - - function generateKeyPair( - type: 'x25519', - options: X25519KeyPairOptions<'pem', 'pem'>, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'x25519', - options: X25519KeyPairOptions<'pem', 'der'>, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'x25519', - options: X25519KeyPairOptions<'der', 'pem'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'x25519', - options: X25519KeyPairOptions<'der', 'der'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'x25519', - options: X25519KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - - function generateKeyPair( - type: 'x448', - options: X448KeyPairOptions<'pem', 'pem'>, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'x448', - options: X448KeyPairOptions<'pem', 'der'>, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'x448', - options: X448KeyPairOptions<'der', 'pem'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: 'x448', - options: X448KeyPairOptions<'der', 'der'>, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: 'x448', - options: X448KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - + /** + * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, + * Ed25519, Ed448, X25519, X448, and DH are currently supported. + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage: + * + * ```js + * const { + * generateKeyPair + * } = await import('crypto'); + * + * generateKeyPair('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem' + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret' + * } + * }, (err, publicKey, privateKey) => { + * // Handle errors and use the generated key pair. + * }); + * ``` + * + * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. + * @since v10.12.0 + * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. + */ + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; namespace generateKeyPair { function __promisify__( type: 'rsa', - options: RSAKeyPairOptions<'pem', 'pem'>, - ): Promise<{ publicKey: string; privateKey: string }>; + options: RSAKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; function __promisify__( type: 'rsa', - options: RSAKeyPairOptions<'pem', 'der'>, - ): Promise<{ publicKey: string; privateKey: Buffer }>; + options: RSAKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; function __promisify__( type: 'rsa', - options: RSAKeyPairOptions<'der', 'pem'>, - ): Promise<{ publicKey: Buffer; privateKey: string }>; + options: RSAKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; function __promisify__( type: 'rsa', - options: RSAKeyPairOptions<'der', 'der'>, - ): Promise<{ publicKey: Buffer; privateKey: Buffer }>; + options: RSAKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise; - + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise; function __promisify__( type: 'dsa', - options: DSAKeyPairOptions<'pem', 'pem'>, - ): Promise<{ publicKey: string; privateKey: string }>; + options: DSAKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; function __promisify__( type: 'dsa', - options: DSAKeyPairOptions<'pem', 'der'>, - ): Promise<{ publicKey: string; privateKey: Buffer }>; + options: DSAKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; function __promisify__( type: 'dsa', - options: DSAKeyPairOptions<'der', 'pem'>, - ): Promise<{ publicKey: Buffer; privateKey: string }>; + options: DSAKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; function __promisify__( type: 'dsa', - options: DSAKeyPairOptions<'der', 'der'>, - ): Promise<{ publicKey: Buffer; privateKey: Buffer }>; + options: DSAKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise; - function __promisify__( type: 'ec', - options: ECKeyPairOptions<'pem', 'pem'>, - ): Promise<{ publicKey: string; privateKey: string }>; + options: ECKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; function __promisify__( type: 'ec', - options: ECKeyPairOptions<'pem', 'der'>, - ): Promise<{ publicKey: string; privateKey: Buffer }>; + options: ECKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; function __promisify__( type: 'ec', - options: ECKeyPairOptions<'der', 'pem'>, - ): Promise<{ publicKey: Buffer; privateKey: string }>; + options: ECKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; function __promisify__( type: 'ec', - options: ECKeyPairOptions<'der', 'der'>, - ): Promise<{ publicKey: Buffer; privateKey: Buffer }>; + options: ECKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise; - - function __promisify__( - type: 'ed25519', - options: ED25519KeyPairOptions<'pem', 'pem'>, - ): Promise<{ publicKey: string; privateKey: string }>; function __promisify__( type: 'ed25519', - options: ED25519KeyPairOptions<'pem', 'der'>, - ): Promise<{ publicKey: string; privateKey: Buffer }>; + options: ED25519KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; function __promisify__( type: 'ed25519', - options: ED25519KeyPairOptions<'der', 'pem'>, - ): Promise<{ publicKey: Buffer; privateKey: string }>; + options: ED25519KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; function __promisify__( type: 'ed25519', - options: ED25519KeyPairOptions<'der', 'der'>, - ): Promise<{ publicKey: Buffer; privateKey: Buffer }>; + options: ED25519KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; function __promisify__( type: 'ed25519', - options?: ED25519KeyPairKeyObjectOptions, - ): Promise; - + options: ED25519KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise; function __promisify__( type: 'ed448', - options: ED448KeyPairOptions<'pem', 'pem'>, - ): Promise<{ publicKey: string; privateKey: string }>; + options: ED448KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; function __promisify__( type: 'ed448', - options: ED448KeyPairOptions<'pem', 'der'>, - ): Promise<{ publicKey: string; privateKey: Buffer }>; + options: ED448KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; function __promisify__( type: 'ed448', - options: ED448KeyPairOptions<'der', 'pem'>, - ): Promise<{ publicKey: Buffer; privateKey: string }>; + options: ED448KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; function __promisify__( type: 'ed448', - options: ED448KeyPairOptions<'der', 'der'>, - ): Promise<{ publicKey: Buffer; privateKey: Buffer }>; + options: ED448KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise; - function __promisify__( type: 'x25519', - options: X25519KeyPairOptions<'pem', 'pem'>, - ): Promise<{ publicKey: string; privateKey: string }>; + options: X25519KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; function __promisify__( type: 'x25519', - options: X25519KeyPairOptions<'pem', 'der'>, - ): Promise<{ publicKey: string; privateKey: Buffer }>; + options: X25519KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; function __promisify__( type: 'x25519', - options: X25519KeyPairOptions<'der', 'pem'>, - ): Promise<{ publicKey: Buffer; privateKey: string }>; + options: X25519KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; function __promisify__( type: 'x25519', - options: X25519KeyPairOptions<'der', 'der'>, - ): Promise<{ publicKey: Buffer; privateKey: Buffer }>; - function __promisify__( - type: 'x25519', - options?: X25519KeyPairKeyObjectOptions, - ): Promise; - + options: X25519KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise; function __promisify__( type: 'x448', - options: X448KeyPairOptions<'pem', 'pem'>, - ): Promise<{ publicKey: string; privateKey: string }>; + options: X448KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; function __promisify__( type: 'x448', - options: X448KeyPairOptions<'pem', 'der'>, - ): Promise<{ publicKey: string; privateKey: Buffer }>; + options: X448KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; function __promisify__( type: 'x448', - options: X448KeyPairOptions<'der', 'pem'>, - ): Promise<{ publicKey: Buffer; privateKey: string }>; + options: X448KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; function __promisify__( type: 'x448', - options: X448KeyPairOptions<'der', 'der'>, - ): Promise<{ publicKey: Buffer; privateKey: Buffer }>; + options: X448KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise; } - /** * Calculates and returns the signature for `data` using the given private key and * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is * dependent upon the key type (especially Ed25519 and Ed448). * - * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been - * passed to [`crypto.createPrivateKey()`][]. + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to {@link createPrivateKey}. If it is an object, the following + * additional properties can be passed: + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 */ + function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; function sign( algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, - ): Buffer; - + callback: (error: Error | null, data: Buffer) => void + ): void; /** - * Calculates and returns the signature for `data` using the given private key and - * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is - * dependent upon the key type (especially Ed25519 and Ed448). + * Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the + * key type (especially Ed25519 and Ed448). + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to {@link createPublicKey}. If it is an object, the following + * additional properties can be passed: * - * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been - * passed to [`crypto.createPublicKey()`][]. + * The `signature` argument is the previously calculated signature for the `data`. + * + * Because public keys can be derived from private keys, a private key or a public + * key may be passed for `key`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 */ + function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean; function verify( algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView, - ): boolean; - + callback: (error: Error | null, result: boolean) => void + ): void; /** - * Computes the Diffie-Hellman secret based on a privateKey and a publicKey. - * Both keys must have the same asymmetricKeyType, which must be one of - * 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES). + * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`. + * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES). + * @since v13.9.0, v12.17.0 */ function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer; + type CipherMode = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts'; + interface CipherInfoOptions { + /** + * A test key length. + */ + keyLength?: number | undefined; + /** + * A test IV length. + */ + ivLength?: number | undefined; + } + interface CipherInfo { + /** + * The name of the cipher. + */ + name: string; + /** + * The nid of the cipher. + */ + nid: number; + /** + * The block size of the cipher in bytes. + * This property is omitted when mode is 'stream'. + */ + blockSize?: number | undefined; + /** + * The expected or default initialization vector length in bytes. + * This property is omitted if the cipher does not use an initialization vector. + */ + ivLength?: number | undefined; + /** + * The expected or default key length in bytes. + */ + keyLength: number; + /** + * The cipher mode. + */ + mode: CipherMode; + } + /** + * Returns information about a given cipher. + * + * Some ciphers accept variable length keys and initialization vectors. By default, + * the `crypto.getCipherInfo()` method will return the default values for these + * ciphers. To test if a given key length or iv length is acceptable for given + * cipher, use the `keyLength` and `ivLength` options. If the given values are + * unacceptable, `undefined` will be returned. + * @since v15.0.0 + * @param nameOrNid The name or nid of the cipher to query. + */ + function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; + /** + * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. The successfully generated `derivedKey` will + * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any + * of the input arguments specify invalid values or types. + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * hkdf + * } = await import('crypto'); + * + * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * }); + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. It must be at least one byte in length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdf(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void; + /** + * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The + * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes. + * + * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). + * + * An error will be thrown if any of the input arguments specify invalid values or + * types, or if the derived key cannot be generated. + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * hkdfSync + * } = await import('crypto'); + * + * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. It must be at least one byte in length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdfSync(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer; + interface SecureHeapUsage { + /** + * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag. + */ + total: number; + /** + * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag. + */ + min: number; + /** + * The total number of bytes currently allocated from the secure heap. + */ + used: number; + /** + * The calculated ratio of `used` to `total` allocated bytes. + */ + utilization: number; + } + /** + * @since v15.6.0 + */ + function secureHeapUsed(): SecureHeapUsage; + interface RandomUUIDOptions { + /** + * By default, to improve performance, + * Node.js will pre-emptively generate and persistently cache enough + * random data to generate up to 128 random UUIDs. To generate a UUID + * without using the cache, set `disableEntropyCache` to `true`. + * + * @default `false` + */ + disableEntropyCache?: boolean | undefined; + } + /** + * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a + * cryptographic pseudorandom number generator. + * @since v15.6.0, v14.17.0 + */ + function randomUUID(options?: RandomUUIDOptions): string; + interface X509CheckOptions { + /** + * @default 'always' + */ + subject?: 'always' | 'default' | 'never'; + /** + * @default true + */ + wildcards?: boolean; + /** + * @default true + */ + partialWildcards?: boolean; + /** + * @default false + */ + multiLabelWildcards?: boolean; + /** + * @default false + */ + singleLabelSubdomains?: boolean; + } + /** + * Encapsulates an X509 certificate and provides read-only access to + * its information. + * + * ```js + * const { X509Certificate } = await import('crypto'); + * + * const x509 = new X509Certificate('{... pem encoded cert ...}'); + * + * console.log(x509.subject); + * ``` + * @since v15.6.0 + */ + class X509Certificate { + /** + * Will be \`true\` if this is a Certificate Authority (CA) certificate. + * @since v15.6.0 + */ + readonly ca: boolean; + /** + * The SHA-1 fingerprint of this certificate. + * + * Because SHA-1 is cryptographically broken and because the security of SHA-1 is + * significantly worse than that of algorithms that are commonly used to sign + * certificates, consider using `x509.fingerprint256` instead. + * @since v15.6.0 + */ + readonly fingerprint: string; + /** + * The SHA-256 fingerprint of this certificate. + * @since v15.6.0 + */ + readonly fingerprint256: string; + /** + * The SHA-512 fingerprint of this certificate. + * @since v16.14.0 + */ + readonly fingerprint512: string; + /** + * The complete subject of this certificate. + * @since v15.6.0 + */ + readonly subject: string; + /** + * The subject alternative name specified for this certificate or `undefined` + * if not available. + * @since v15.6.0 + */ + readonly subjectAltName: string | undefined; + /** + * The information access content of this certificate or `undefined` if not + * available. + * @since v15.6.0 + */ + readonly infoAccess: string | undefined; + /** + * An array detailing the key usages for this certificate. + * @since v15.6.0 + */ + readonly keyUsage: string[]; + /** + * The issuer identification included in this certificate. + * @since v15.6.0 + */ + readonly issuer: string; + /** + * The issuer certificate or `undefined` if the issuer certificate is not + * available. + * @since v15.9.0 + */ + readonly issuerCertificate?: X509Certificate | undefined; + /** + * The public key `KeyObject` for this certificate. + * @since v15.6.0 + */ + readonly publicKey: KeyObject; + /** + * A `Buffer` containing the DER encoding of this certificate. + * @since v15.6.0 + */ + readonly raw: Buffer; + /** + * The serial number of this certificate. + * + * Serial numbers are assigned by certificate authorities and do not uniquely + * identify certificates. Consider using `x509.fingerprint256` as a unique + * identifier instead. + * @since v15.6.0 + */ + readonly serialNumber: string; + /** + * The date/time from which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validFrom: string; + /** + * The date/time until which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validTo: string; + constructor(buffer: BinaryLike); + /** + * Checks whether the certificate matches the given email address. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any email addresses. + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching email + * address, the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns `email` if the certificate matches, `undefined` if it does not. + */ + checkEmail(email: string, options?: Pick): string | undefined; + /** + * Checks whether the certificate matches the given host name. + * + * If the certificate matches the given host name, the matching subject name is + * returned. The returned name might be an exact match (e.g., `foo.example.com`) + * or it might contain wildcards (e.g., `*.example.com`). Because host name + * comparisons are case-insensitive, the returned subject name might also differ + * from the given `name` in capitalization. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching DNS name, + * the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. + */ + checkHost(name: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether the certificate matches the given IP address (IPv4 or IPv6). + * + * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they + * must match the given `ip` address exactly. Other subject alternative names as + * well as the subject field of the certificate are ignored. + * @since v15.6.0 + * @return Returns `ip` if the certificate matches, `undefined` if it does not. + */ + checkIP(ip: string): string | undefined; + /** + * Checks whether this certificate was issued by the given `otherCert`. + * @since v15.6.0 + */ + checkIssued(otherCert: X509Certificate): boolean; + /** + * Checks whether the public key for this certificate is consistent with + * the given private key. + * @since v15.6.0 + * @param privateKey A private key. + */ + checkPrivateKey(privateKey: KeyObject): boolean; + /** + * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded + * certificate. + * @since v15.6.0 + */ + toJSON(): string; + /** + * Returns information about this certificate using the legacy `certificate object` encoding. + * @since v15.6.0 + */ + toLegacyObject(): PeerCertificate; + /** + * Returns the PEM-encoded certificate. + * @since v15.6.0 + */ + toString(): string; + /** + * Verifies that this certificate was signed by the given public key. + * Does not perform any other validation checks on the certificate. + * @since v15.6.0 + * @param publicKey A public key. + */ + verify(publicKey: KeyObject): boolean; + } + type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint; + interface GeneratePrimeOptions { + add?: LargeNumberLike | undefined; + rem?: LargeNumberLike | undefined; + /** + * @default false + */ + safe?: boolean | undefined; + bigint?: boolean | undefined; + } + interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { + bigint: true; + } + interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { + bigint?: false | undefined; + } + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void; + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrimeSync(size: number): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; + interface CheckPrimeOptions { + /** + * The number of Miller-Rabin probabilistic primality iterations to perform. + * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. + * Care must be used when selecting a number of checks. + * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. + * + * @default 0 + */ + checks?: number | undefined; + } + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + */ + function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; + function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void; + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. + */ + function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; + /** + * Load and set the `engine` for some or all OpenSSL functions (selected by flags). + * + * `engine` could be either an id or a path to the engine's shared library. + * + * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. + * The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): + * + * - `crypto.constants.ENGINE_METHOD_RSA` + * - `crypto.constants.ENGINE_METHOD_DSA` + * - `crypto.constants.ENGINE_METHOD_DH` + * - `crypto.constants.ENGINE_METHOD_RAND` + * - `crypto.constants.ENGINE_METHOD_EC` + * - `crypto.constants.ENGINE_METHOD_CIPHERS` + * - `crypto.constants.ENGINE_METHOD_DIGESTS` + * - `crypto.constants.ENGINE_METHOD_PKEY_METHS` + * - `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` + * - `crypto.constants.ENGINE_METHOD_ALL` + * - `crypto.constants.ENGINE_METHOD_NONE` + * + * The flags below are deprecated in OpenSSL-1.1.0. + * + * - `crypto.constants.ENGINE_METHOD_ECDH` + * - `crypto.constants.ENGINE_METHOD_ECDSA` + * - `crypto.constants.ENGINE_METHOD_STORE` + * @since v0.11.11 + * @param [flags=crypto.constants.ENGINE_METHOD_ALL] + */ + function setEngine(engine: string, flags?: number): void; + /** + * A convenient alias for `crypto.webcrypto.getRandomValues()`. + * This implementation is not compliant with the Web Crypto spec, + * to write web-compatible code use `crypto.webcrypto.getRandomValues()` instead. + * @since v17.4.0 + * @returns Returns `typedArray`. + */ + function getRandomValues(typedArray: T): T; + /** + * A convenient alias for `crypto.webcrypto.subtle`. + * @since v17.4.0 + */ + const subtle: webcrypto.SubtleCrypto; + /** + * An implementation of the Web Crypto API standard. + * + * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. + * @since v15.0.0 + */ + const webcrypto: webcrypto.Crypto; + namespace webcrypto { + type BufferSource = ArrayBufferView | ArrayBuffer; + type KeyFormat = 'jwk' | 'pkcs8' | 'raw' | 'spki'; + type KeyType = 'private' | 'public' | 'secret'; + type KeyUsage = 'decrypt' | 'deriveBits' | 'deriveKey' | 'encrypt' | 'sign' | 'unwrapKey' | 'verify' | 'wrapKey'; + type AlgorithmIdentifier = Algorithm | string; + type HashAlgorithmIdentifier = AlgorithmIdentifier; + type NamedCurve = string; + type BigInteger = Uint8Array; + interface AesCbcParams extends Algorithm { + iv: BufferSource; + } + interface AesCtrParams extends Algorithm { + counter: BufferSource; + length: number; + } + interface AesDerivedKeyParams extends Algorithm { + length: number; + } + interface AesGcmParams extends Algorithm { + additionalData?: BufferSource; + iv: BufferSource; + tagLength?: number; + } + interface AesKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface AesKeyGenParams extends Algorithm { + length: number; + } + interface Algorithm { + name: string; + } + interface EcKeyAlgorithm extends KeyAlgorithm { + namedCurve: NamedCurve; + } + interface EcKeyGenParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcKeyImportParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcdhKeyDeriveParams extends Algorithm { + public: CryptoKey; + } + interface EcdsaParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface Ed448Params extends Algorithm { + context?: BufferSource; + } + interface HkdfParams extends Algorithm { + hash: HashAlgorithmIdentifier; + info: BufferSource; + salt: BufferSource; + } + interface HmacImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface HmacKeyAlgorithm extends KeyAlgorithm { + hash: KeyAlgorithm; + length: number; + } + interface HmacKeyGenParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface JsonWebKey { + alg?: string; + crv?: string; + d?: string; + dp?: string; + dq?: string; + e?: string; + ext?: boolean; + k?: string; + key_ops?: string[]; + kty?: string; + n?: string; + oth?: RsaOtherPrimesInfo[]; + p?: string; + q?: string; + qi?: string; + use?: string; + x?: string; + y?: string; + } + interface KeyAlgorithm { + name: string; + } + interface Pbkdf2Params extends Algorithm { + hash: HashAlgorithmIdentifier; + iterations: number; + salt: BufferSource; + } + interface RsaHashedImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { + hash: KeyAlgorithm; + } + interface RsaHashedKeyGenParams extends RsaKeyGenParams { + hash: HashAlgorithmIdentifier; + } + interface RsaKeyAlgorithm extends KeyAlgorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaKeyGenParams extends Algorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaOaepParams extends Algorithm { + label?: BufferSource; + } + interface RsaOtherPrimesInfo { + d?: string; + r?: string; + t?: string; + } + interface RsaPssParams extends Algorithm { + saltLength: number; + } + /** + * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class. + * `Crypto` is a singleton that provides access to the remainder of the crypto API. + * @since v15.0.0 + */ + interface Crypto { + /** + * Provides access to the `SubtleCrypto` API. + * @since v15.0.0 + */ + readonly subtle: SubtleCrypto; + /** + * Generates cryptographically strong random values. + * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned. + * + * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted. + * + * An error will be thrown if the given `typedArray` is larger than 65,536 bytes. + * @since v15.0.0 + */ + getRandomValues>(typedArray: T): T; + /** + * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID. + * The UUID is generated using a cryptographic pseudorandom number generator. + * @since v16.7.0 + */ + randomUUID(): string; + CryptoKey: CryptoKeyConstructor; + } + // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable. + interface CryptoKeyConstructor { + /** Illegal constructor */ + (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user. + readonly length: 0; + readonly name: 'CryptoKey'; + readonly prototype: CryptoKey; + } + /** + * @since v15.0.0 + */ + interface CryptoKey { + /** + * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters. + * @since v15.0.0 + */ + readonly algorithm: KeyAlgorithm; + /** + * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`. + * @since v15.0.0 + */ + readonly extractable: boolean; + /** + * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key. + * @since v15.0.0 + */ + readonly type: KeyType; + /** + * An array of strings identifying the operations for which the key may be used. + * + * The possible usages are: + * - `'encrypt'` - The key may be used to encrypt data. + * - `'decrypt'` - The key may be used to decrypt data. + * - `'sign'` - The key may be used to generate digital signatures. + * - `'verify'` - The key may be used to verify digital signatures. + * - `'deriveKey'` - The key may be used to derive a new key. + * - `'deriveBits'` - The key may be used to derive bits. + * - `'wrapKey'` - The key may be used to wrap another key. + * - `'unwrapKey'` - The key may be used to unwrap another key. + * + * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`). + * @since v15.0.0 + */ + readonly usages: KeyUsage[]; + } + /** + * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair. + * @since v15.0.0 + */ + interface CryptoKeyPair { + /** + * A {@link CryptoKey} whose type will be `'private'`. + * @since v15.0.0 + */ + privateKey: CryptoKey; + /** + * A {@link CryptoKey} whose type will be `'public'`. + * @since v15.0.0 + */ + publicKey: CryptoKey; + } + /** + * @since v15.0.0 + */ + interface SubtleCrypto { + /** + * Using the method and parameters specified in `algorithm` and the keying material provided by `key`, + * `subtle.decrypt()` attempts to decipher the provided `data`. If successful, + * the returned promise will be resolved with an `` containing the plaintext result. + * + * The algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * @since v15.0.0 + */ + decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; + /** + * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`, + * `subtle.deriveBits()` attempts to generate `length` bits. + * The Node.js implementation requires that when `length` is a number it must be multiple of `8`. + * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed + * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms. + * If successful, the returned promise will be resolved with an `` containing the generated data. + * + * The algorithms currently supported include: + * + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HKDF'` + * - `'PBKDF2'` + * @since v15.0.0 + */ + deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise; + deriveBits(algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + /** + * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`, + * `subtle.deriveKey()` attempts to generate a new ` based on the method and parameters in `derivedKeyAlgorithm`. + * + * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material, + * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input. + * + * The algorithms currently supported include: + * + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HKDF'` + * - `'PBKDF2'` + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + deriveKey( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, + baseKey: CryptoKey, + derivedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, + extractable: boolean, + keyUsages: ReadonlyArray + ): Promise; + /** + * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`. + * If successful, the returned promise is resolved with an `` containing the computed digest. + * + * If `algorithm` is provided as a ``, it must be one of: + * + * - `'SHA-1'` + * - `'SHA-256'` + * - `'SHA-384'` + * - `'SHA-512'` + * + * If `algorithm` is provided as an ``, it must have a `name` property whose value is one of the above. + * @since v15.0.0 + */ + digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise; + /** + * Using the method and parameters specified by `algorithm` and the keying material provided by `key`, + * `subtle.encrypt()` attempts to encipher `data`. If successful, + * the returned promise is resolved with an `` containing the encrypted result. + * + * The algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * @since v15.0.0 + */ + encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; + /** + * Exports the given key into the specified format, if supported. + * + * If the `` is not extractable, the returned promise will reject. + * + * When `format` is either `'pkcs8'` or `'spki'` and the export is successful, + * the returned promise will be resolved with an `` containing the exported key data. + * + * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a + * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification. + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @returns `` containing ``. + * @since v15.0.0 + */ + exportKey(format: 'jwk', key: CryptoKey): Promise; + exportKey(format: Exclude, key: CryptoKey): Promise; + /** + * Using the method and parameters provided in `algorithm`, + * `subtle.generateKey()` attempts to generate new keying material. + * Depending the method used, the method may generate either a single `` or a ``. + * + * The `` (public and private key) generating algorithms supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'RSA-OAEP'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * The `` (secret key) generating algorithms supported include: + * + * - `'HMAC'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; + generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; + /** + * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format` + * to create a `` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments. + * If the import is successful, the returned promise will be resolved with the created ``. + * + * If importing a `'PBKDF2'` key, `extractable` must be `false`. + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + importKey( + format: 'jwk', + keyData: JsonWebKey, + algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, + extractable: boolean, + keyUsages: ReadonlyArray + ): Promise; + importKey( + format: Exclude, + keyData: BufferSource, + algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, + extractable: boolean, + keyUsages: KeyUsage[] + ): Promise; + /** + * Using the method and parameters given by `algorithm` and the keying material provided by `key`, + * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful, + * the returned promise is resolved with an `` containing the generated signature. + * + * The algorithms currently supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'HMAC'` + * @since v15.0.0 + */ + sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, data: BufferSource): Promise; + /** + * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. + * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `` instance. + * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input) + * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs. + * If successful, the returned promise is resolved with a `` object. + * + * The wrapping algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * + * The unwrapped key algorithms supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'RSA-OAEP'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HMAC'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + unwrapKey( + format: KeyFormat, + wrappedKey: BufferSource, + unwrappingKey: CryptoKey, + unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, + unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, + extractable: boolean, + keyUsages: KeyUsage[] + ): Promise; + /** + * Using the method and parameters given in `algorithm` and the keying material provided by `key`, + * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`. + * The returned promise is resolved with either `true` or `false`. + * + * The algorithms currently supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'HMAC'` + * @since v15.0.0 + */ + verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise; + /** + * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. + * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`, + * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`. + * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments, + * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs. + * If successful, the returned promise will be resolved with an `` containing the encrypted key data. + * + * The wrapping algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @since v15.0.0 + */ + wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise; + } + } +} +declare module 'node:crypto' { + export * from 'crypto'; } diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts index d84a1ee..247328d 100644 --- a/node_modules/@types/node/dgram.d.ts +++ b/node_modules/@types/node/dgram.d.ts @@ -1,97 +1,499 @@ -declare module 'node:dgram' { - export * from 'dgram'; -} - +/** + * The `dgram` module provides an implementation of UDP datagram sockets. + * + * ```js + * import dgram from 'dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.log(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dgram.js) + */ declare module 'dgram' { import { AddressInfo } from 'node:net'; import * as dns from 'node:dns'; - import EventEmitter = require('node:events'); - + import { EventEmitter, Abortable } from 'node:events'; interface RemoteInfo { address: string; family: 'IPv4' | 'IPv6'; port: number; size: number; } - interface BindOptions { - port?: number; - address?: string; - exclusive?: boolean; - fd?: number; + port?: number | undefined; + address?: string | undefined; + exclusive?: boolean | undefined; + fd?: number | undefined; } - - type SocketType = "udp4" | "udp6"; - - interface SocketOptions { + type SocketType = 'udp4' | 'udp6'; + interface SocketOptions extends Abortable { type: SocketType; - reuseAddr?: boolean; + reuseAddr?: boolean | undefined; /** * @default false */ - ipv6Only?: boolean; - recvBufferSize?: number; - sendBufferSize?: number; - lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + ipv6Only?: boolean | undefined; + recvBufferSize?: number | undefined; + sendBufferSize?: number | undefined; + lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined; } - + /** + * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram + * messages. When `address` and `port` are not passed to `socket.bind()` the + * method will bind the socket to the "all interfaces" address on a random port + * (it does the right thing for both `udp4` and `udp6` sockets). The bound address + * and port can be retrieved using `socket.address().address` and `socket.address().port`. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket: + * + * ```js + * const controller = new AbortController(); + * const { signal } = controller; + * const server = dgram.createSocket({ type: 'udp4', signal }); + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * // Later, when you want to close the server. + * controller.abort(); + * ``` + * @since v0.11.13 + * @param options Available options are: + * @param callback Attached as a listener for `'message'` events. Optional. + */ function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - + /** + * Encapsulates the datagram functionality. + * + * New instances of `dgram.Socket` are created using {@link createSocket}. + * The `new` keyword is not to be used to create `dgram.Socket` instances. + * @since v0.1.99 + */ class Socket extends EventEmitter { + /** + * Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not + * specified, the operating system will choose + * one interface and will add membership to it. To add membership to every + * available interface, call `addMembership` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * + * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: + * + * ```js + * import cluster from 'cluster'; + * import dgram from 'dgram'; + * + * if (cluster.isPrimary) { + * cluster.fork(); // Works ok. + * cluster.fork(); // Fails with EADDRINUSE. + * } else { + * const s = dgram.createSocket('udp4'); + * s.bind(1234, () => { + * s.addMembership('224.0.0.114'); + * }); + * } + * ``` + * @since v0.6.9 + */ addMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * Returns an object containing the address information for a socket. + * For UDP sockets, this object will contain `address`, `family` and `port`properties. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.99 + */ address(): AddressInfo; - bind(port?: number, address?: string, callback?: () => void): void; - bind(port?: number, callback?: () => void): void; - bind(callback?: () => void): void; - bind(options: BindOptions, callback?: () => void): void; - close(callback?: () => void): void; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address`. If `port` is not + * specified or is `0`, the operating system will attempt to bind to a + * random port. If `address` is not specified, the operating system will + * attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is + * called. + * + * Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * Example of a UDP server listening on port 41234: + * + * ```js + * import dgram from 'dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.log(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @since v0.1.99 + * @param callback with no parameters. Called when binding is complete. + */ + bind(port?: number, address?: string, callback?: () => void): this; + bind(port?: number, callback?: () => void): this; + bind(callback?: () => void): this; + bind(options: BindOptions, callback?: () => void): this; + /** + * Close the underlying socket and stop listening for data on it. If a callback is + * provided, it is added as a listener for the `'close'` event. + * @since v0.1.99 + * @param callback Called when the socket has been closed. + */ + close(callback?: () => void): this; + /** + * Associates the `dgram.Socket` to a remote address and port. Every + * message sent by this handle is automatically sent to that destination. Also, + * the socket will only receive messages from that remote peer. + * Trying to call `connect()` on an already connected socket will result + * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not + * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) + * will be used by default. Once the connection is complete, a `'connect'` event + * is emitted and the optional `callback` function is called. In case of failure, + * the `callback` is called or, failing this, an `'error'` event is emitted. + * @since v12.0.0 + * @param callback Called when the connection is completed or on error. + */ connect(port: number, address?: string, callback?: () => void): void; connect(port: number, callback: () => void): void; + /** + * A synchronous function that disassociates a connected `dgram.Socket` from + * its remote address. Trying to call `disconnect()` on an unbound or already + * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. + * @since v12.0.0 + */ disconnect(): void; + /** + * Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the + * kernel when the socket is closed or the process terminates, so most apps will + * never have reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v0.6.9 + */ dropMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_RCVBUF` socket receive buffer size in bytes. + */ getRecvBufferSize(): number; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_SNDBUF` socket send buffer size in bytes. + */ getSendBufferSize(): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active. The `socket.ref()` method adds the socket back to the reference + * counting and restores the default behavior. + * + * Calling `socket.ref()` multiples times will have no additional effect. + * + * The `socket.ref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ ref(): this; + /** + * Returns an object containing the `address`, `family`, and `port` of the remote + * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception + * if the socket is not connected. + * @since v12.0.0 + */ remoteAddress(): AddressInfo; + /** + * Broadcasts a datagram on the socket. + * For connectionless sockets, the destination `port` and `address` must be + * specified. Connected sockets, on the other hand, will use their associated + * remote endpoint, so the `port` and `address` arguments must not be set. + * + * The `msg` argument contains the message to be sent. + * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, + * any `TypedArray` or a `DataView`, + * the `offset` and `length` specify the offset within the `Buffer` where the + * message begins and the number of bytes in the message, respectively. + * If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that + * contain multi-byte characters, `offset` and `length` will be calculated with + * respect to `byte length` and not the character position. + * If `msg` is an array, `offset` and `length` must not be specified. + * + * The `address` argument is a string. If the value of `address` is a host name, + * DNS will be used to resolve the address of the host. If `address` is not + * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default. + * + * If the socket has not been previously bound with a call to `bind`, the socket + * is assigned a random port number and is bound to the "all interfaces" address + * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) + * + * An optional `callback` function may be specified to as a way of reporting + * DNS errors or for determining when it is safe to reuse the `buf` object. + * DNS lookups delay the time to send for at least one tick of the + * Node.js event loop. + * + * The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be + * passed as the first argument to the `callback`. If a `callback` is not given, + * the error is emitted as an `'error'` event on the `socket` object. + * + * Offset and length are optional but both _must_ be set if either are used. + * They are supported only when the first argument is a `Buffer`, a `TypedArray`, + * or a `DataView`. + * + * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. + * + * Example of sending a UDP packet to a port on `localhost`; + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.send(message, 41234, 'localhost', (err) => { + * client.close(); + * }); + * ``` + * + * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('Some '); + * const buf2 = Buffer.from('bytes'); + * const client = dgram.createSocket('udp4'); + * client.send([buf1, buf2], 41234, (err) => { + * client.close(); + * }); + * ``` + * + * Sending multiple buffers might be faster or slower depending on the + * application and operating system. Run benchmarks to + * determine the optimal strategy on a case-by-case basis. Generally speaking, + * however, sending multiple buffers is faster. + * + * Example of sending a UDP packet using a socket connected to a port on`localhost`: + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.connect(41234, 'localhost', (err) => { + * client.send(message, (err) => { + * client.close(); + * }); + * }); + * ``` + * @since v0.1.99 + * @param msg Message to be sent. + * @param offset Offset in the buffer where the message starts. + * @param length Number of bytes in the message. + * @param port Destination port. + * @param address Destination host name or IP address. + * @param callback Called when the message has been sent. + */ send(msg: string | Uint8Array | ReadonlyArray, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; send(msg: string | Uint8Array | ReadonlyArray, port?: number, callback?: (error: Error | null, bytes: number) => void): void; send(msg: string | Uint8Array | ReadonlyArray, callback?: (error: Error | null, bytes: number) => void): void; send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void; send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void; + /** + * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP + * packets may be sent to a local interface's broadcast address. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.6.9 + */ setBroadcast(flag: boolean): void; + /** + * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC + * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ + * _with a scope index is written as `'IP%scope'` where scope is an interface name_ + * _or interface number._ + * + * Sets the default outgoing multicast interface of the socket to a chosen + * interface or back to system interface selection. The `multicastInterface` must + * be a valid string representation of an IP from the socket's family. + * + * For IPv4 sockets, this should be the IP configured for the desired physical + * interface. All packets sent to multicast on the socket will be sent on the + * interface determined by the most recent successful use of this call. + * + * For IPv6 sockets, `multicastInterface` should include a scope to indicate the + * interface as in the examples that follow. In IPv6, individual `send` calls can + * also use explicit scope in addresses, so only packets sent to a multicast + * address without specifying an explicit scope are affected by the most recent + * successful use of this call. + * + * This method throws `EBADF` if called on an unbound socket. + * + * #### Example: IPv6 outgoing multicast interface + * + * On most systems, where scope format uses the interface name: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%eth1'); + * }); + * ``` + * + * On Windows, where scope format uses an interface number: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%2'); + * }); + * ``` + * + * #### Example: IPv4 outgoing multicast interface + * + * All systems use an IP of the host on the desired physical interface: + * + * ```js + * const socket = dgram.createSocket('udp4'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('10.0.0.2'); + * }); + * ``` + * @since v8.6.0 + */ setMulticastInterface(multicastInterface: string): void; - setMulticastLoopback(flag: boolean): void; - setMulticastTTL(ttl: number): void; + /** + * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, + * multicast packets will also be received on the local interface. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastLoopback(flag: boolean): boolean; + /** + * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for + * "Time to Live", in this context it specifies the number of IP hops that a + * packet is allowed to travel through, specifically for multicast traffic. Each + * router or gateway that forwards a packet decrements the TTL. If the TTL is + * decremented to 0 by a router, it will not be forwarded. + * + * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastTTL(ttl: number): number; + /** + * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ setRecvBufferSize(size: number): void; + /** + * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ setSendBufferSize(size: number): void; - setTTL(ttl: number): void; + /** + * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", + * in this context it specifies the number of IP hops that a packet is allowed to + * travel through. Each router or gateway that forwards a packet decrements the + * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. + * Changing TTL values is typically done for network probes or when multicasting. + * + * The `ttl` argument may be between 1 and 255\. The default on most systems + * is 64. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.101 + */ + setTTL(ttl: number): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active, allowing the process to exit even if the socket is still + * listening. + * + * Calling `socket.unref()` multiple times will have no addition effect. + * + * The `socket.unref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ unref(): this; /** - * Tells the kernel to join a source-specific multicast channel at the given - * `sourceAddress` and `groupAddress`, using the `multicastInterface` with the - * `IP_ADD_SOURCE_MEMBERSHIP` socket option. - * If the `multicastInterface` argument + * Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket + * option. If the `multicastInterface` argument * is not specified, the operating system will choose one interface and will add - * membership to it. - * To add membership to every available interface, call - * `socket.addSourceSpecificMembership()` multiple times, once per interface. + * membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * @since v13.1.0, v12.16.0 */ addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * Instructs the kernel to leave a source-specific multicast channel at the given - * `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` - * socket option. This method is automatically called by the kernel when the + * Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is + * automatically called by the kernel when the * socket is closed or the process terminates, so most apps will never have * reason to call this. * * If `multicastInterface` is not specified, the operating system will attempt to * drop membership on all valid interfaces. + * @since v13.1.0, v12.16.0 */ dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** * events.EventEmitter * 1. close @@ -101,45 +503,43 @@ declare module 'dgram' { * 5. message */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connect', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connect"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean; - + emit(event: 'close'): boolean; + emit(event: 'connect'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit(event: 'message', msg: Buffer, rinfo: RemoteInfo): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connect", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - + on(event: 'close', listener: () => void): this; + on(event: 'connect', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connect", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - + once(event: 'close', listener: () => void): this; + once(event: 'connect', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connect', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; } } +declare module 'node:dgram' { + export * from 'dgram'; +} diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts new file mode 100644 index 0000000..3dcaa03 --- /dev/null +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -0,0 +1,153 @@ +/** + * The `diagnostics_channel` module provides an API to create named channels + * to report arbitrary message data for diagnostics purposes. + * + * It can be accessed using: + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * ``` + * + * It is intended that a module writer wanting to report diagnostics messages + * will create one or many top-level channels to report messages through. + * Channels may also be acquired at runtime but it is not encouraged + * due to the additional overhead of doing so. Channels may be exported for + * convenience, but as long as the name is known it can be acquired anywhere. + * + * If you intend for your module to produce diagnostics data for others to + * consume it is recommended that you include documentation of what named + * channels are used along with the shape of the message data. Channel names + * should generally include the module name to avoid collisions with data from + * other modules. + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js) + */ +declare module 'diagnostics_channel' { + /** + * Check if there are active subscribers to the named channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * if (diagnostics_channel.hasSubscribers('my-channel')) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return If there are active subscribers + */ + function hasSubscribers(name: string | symbol): boolean; + /** + * This is the primary entry-point for anyone wanting to interact with a named + * channel. It produces a channel object which is optimized to reduce overhead at + * publish time as much as possible. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return The named channel object + */ + function channel(name: string | symbol): Channel; + type ChannelListener = (message: unknown, name: string | symbol) => void; + /** + * The class `Channel` represents an individual named channel within the data + * pipeline. It is use to track subscribers and to publish messages when there + * are subscribers present. It exists as a separate object to avoid channel + * lookups at publish time, enabling very fast publish speeds and allowing + * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly + * with `new Channel(name)` is not supported. + * @since v15.1.0, v14.17.0 + */ + class Channel { + readonly name: string | symbol; + /** + * Check if there are active subscribers to this channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * if (channel.hasSubscribers) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + */ + readonly hasSubscribers: boolean; + private constructor(name: string | symbol); + /** + * Publish a message to any subscribers to the channel. This will + * trigger message handlers synchronously so they will execute within + * the same context. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.publish({ + * some: 'message' + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param message The message to send to the channel subscribers + */ + publish(message: unknown): void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.subscribe((message, name) => { + * // Received data + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The handler to receive channel messages + */ + subscribe(onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * function onMessage(message, name) { + * // Received data + * } + * + * channel.subscribe(onMessage); + * + * channel.unsubscribe(onMessage); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + unsubscribe(onMessage: ChannelListener): void; + } +} +declare module 'node:diagnostics_channel' { + export * from 'diagnostics_channel'; +} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts index 4152a34..305367b 100644 --- a/node_modules/@types/node/dns.d.ts +++ b/node_modules/@types/node/dns.d.ts @@ -1,90 +1,194 @@ -declare module 'node:dns' { - export * from 'dns'; -} - +/** + * The `dns` module enables name resolution. For example, use it to look up IP + * addresses of host names. + * + * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the + * DNS protocol for lookups. {@link lookup} uses the operating system + * facilities to perform name resolution. It may not need to perform any network + * communication. To perform name resolution the way other applications on the same + * system do, use {@link lookup}. + * + * ```js + * const dns = require('dns'); + * + * dns.lookup('example.org', (err, address, family) => { + * console.log('address: %j family: IPv%s', address, family); + * }); + * // address: "93.184.216.34" family: IPv4 + * ``` + * + * All other functions in the `dns` module connect to an actual DNS server to + * perform name resolution. They will always use the network to perform DNS + * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform + * DNS queries, bypassing other name-resolution facilities. + * + * ```js + * const dns = require('dns'); + * + * dns.resolve4('archive.org', (err, addresses) => { + * if (err) throw err; + * + * console.log(`addresses: ${JSON.stringify(addresses)}`); + * + * addresses.forEach((a) => { + * dns.reverse(a, (err, hostnames) => { + * if (err) { + * throw err; + * } + * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); + * }); + * }); + * }); + * ``` + * + * See the `Implementation considerations section` for more information. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js) + */ declare module 'dns' { + import * as dnsPromises from 'node:dns/promises'; // Supported getaddrinfo flags. - const ADDRCONFIG: number; - const V4MAPPED: number; + export const ADDRCONFIG: number; + export const V4MAPPED: number; /** * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as * well as IPv4 mapped IPv6 addresses. */ - const ALL: number; - - interface LookupOptions { - family?: number; - hints?: number; - all?: boolean; - verbatim?: boolean; - } - - interface LookupOneOptions extends LookupOptions { - all?: false; - } - - interface LookupAllOptions extends LookupOptions { + export const ALL: number; + export interface LookupOptions { + family?: number | undefined; + hints?: number | undefined; + all?: boolean | undefined; + /** + * @default true + */ + verbatim?: boolean | undefined; + } + export interface LookupOneOptions extends LookupOptions { + all?: false | undefined; + } + export interface LookupAllOptions extends LookupOptions { all: true; } - - interface LookupAddress { + export interface LookupAddress { address: string; family: number; } - - function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; - function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; - function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void; - function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void; - function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace lookup { + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the + * properties `address` and `family`. + * + * On error, `err` is an `Error` object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. + * The implementation uses an operating system facility that can associate names + * with addresses, and vice versa. This implementation can have subtle but + * important consequences on the behavior of any Node.js program. Please take some + * time to consult the `Implementation considerations section` before using`dns.lookup()`. + * + * Example usage: + * + * ```js + * const dns = require('dns'); + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * dns.lookup('example.com', options, (err, address, family) => + * console.log('address: %j family: IPv%s', address, family)); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dns.lookup('example.com', options, (err, addresses) => + * console.log('addresses: %j', addresses)); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * ``` + * + * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties. + * @since v0.1.90 + */ + export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void; + export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void; + export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export namespace lookup { function __promisify__(hostname: string, options: LookupAllOptions): Promise; function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; function __promisify__(hostname: string, options: LookupOptions): Promise; } - - function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void; - - namespace lookupService { - function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>; - } - - interface ResolveOptions { + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown. + * + * On an error, `err` is an `Error` object, where `err.code` is the error code. + * + * ```js + * const dns = require('dns'); + * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { + * console.log(hostname, service); + * // Prints: localhost ssh + * }); + * ``` + * + * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties. + * @since v0.11.14 + */ + export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void; + export namespace lookupService { + function __promisify__( + address: string, + port: number + ): Promise<{ + hostname: string; + service: string; + }>; + } + export interface ResolveOptions { ttl: boolean; } - - interface ResolveWithTtlOptions extends ResolveOptions { + export interface ResolveWithTtlOptions extends ResolveOptions { ttl: true; } - - interface RecordWithTtl { + export interface RecordWithTtl { address: string; ttl: number; } - /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */ - type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; - - interface AnyARecord extends RecordWithTtl { - type: "A"; - } - - interface AnyAaaaRecord extends RecordWithTtl { - type: "AAAA"; - } - - interface MxRecord { + export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; + export interface AnyARecord extends RecordWithTtl { + type: 'A'; + } + export interface AnyAaaaRecord extends RecordWithTtl { + type: 'AAAA'; + } + export interface CaaRecord { + critial: number; + issue?: string | undefined; + issuewild?: string | undefined; + iodef?: string | undefined; + contactemail?: string | undefined; + contactphone?: string | undefined; + } + export interface MxRecord { priority: number; exchange: string; } - - interface AnyMxRecord extends MxRecord { - type: "MX"; + export interface AnyMxRecord extends MxRecord { + type: 'MX'; } - - interface NaptrRecord { + export interface NaptrRecord { flags: string; service: string; regexp: string; @@ -92,12 +196,10 @@ declare module 'dns' { order: number; preference: number; } - - interface AnyNaptrRecord extends NaptrRecord { - type: "NAPTR"; + export interface AnyNaptrRecord extends NaptrRecord { + type: 'NAPTR'; } - - interface SoaRecord { + export interface SoaRecord { nsname: string; hostmaster: string; serial: number; @@ -106,186 +208,417 @@ declare module 'dns' { expire: number; minttl: number; } - - interface AnySoaRecord extends SoaRecord { - type: "SOA"; + export interface AnySoaRecord extends SoaRecord { + type: 'SOA'; } - - interface SrvRecord { + export interface SrvRecord { priority: number; weight: number; port: number; name: string; } - - interface AnySrvRecord extends SrvRecord { - type: "SRV"; + export interface AnySrvRecord extends SrvRecord { + type: 'SRV'; } - - interface AnyTxtRecord { - type: "TXT"; + export interface AnyTxtRecord { + type: 'TXT'; entries: string[]; } - - interface AnyNsRecord { - type: "NS"; + export interface AnyNsRecord { + type: 'NS'; value: string; } - - interface AnyPtrRecord { - type: "PTR"; + export interface AnyPtrRecord { + type: 'PTR'; value: string; } - - interface AnyCnameRecord { - type: "CNAME"; + export interface AnyCnameRecord { + type: 'CNAME'; value: string; } - - type AnyRecord = AnyARecord | - AnyAaaaRecord | - AnyCnameRecord | - AnyMxRecord | - AnyNaptrRecord | - AnyNsRecord | - AnyPtrRecord | - AnySoaRecord | - AnySrvRecord | - AnyTxtRecord; - - function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; - function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; - function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; - function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void; - function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; - function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; - function resolve( + export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource + * records. The type and structure of individual results varies based on `rrtype`: + * + * + * + * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`. + * @since v0.1.27 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void; + export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + export function resolve( hostname: string, rrtype: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void ): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace resolve { - function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function __promisify__(hostname: string, rrtype: "ANY"): Promise; - function __promisify__(hostname: string, rrtype: "MX"): Promise; - function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; - function __promisify__(hostname: string, rrtype: "SOA"): Promise; - function __promisify__(hostname: string, rrtype: "SRV"): Promise; - function __promisify__(hostname: string, rrtype: "TXT"): Promise; + export namespace resolve { + function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise; + function __promisify__(hostname: string, rrtype: 'ANY'): Promise; + function __promisify__(hostname: string, rrtype: 'MX'): Promise; + function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise; + function __promisify__(hostname: string, rrtype: 'SOA'): Promise; + function __promisify__(hostname: string, rrtype: 'SRV'): Promise; + function __promisify__(hostname: string, rrtype: 'TXT'): Promise; function __promisify__(hostname: string, rrtype: string): Promise; } - - function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; - function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace resolve4 { + /** + * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + export namespace resolve4 { function __promisify__(hostname: string): Promise; function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; function __promisify__(hostname: string, options?: ResolveOptions): Promise; } - - function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; - function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace resolve6 { + /** + * Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv6 addresses. + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + export namespace resolve6 { function __promisify__(hostname: string): Promise; function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; function __promisify__(hostname: string, options?: ResolveOptions): Promise; } - - function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - namespace resolveCname { + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function + * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`). + * @since v0.3.2 + */ + export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolveCname { function __promisify__(hostname: string): Promise; } - - function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; - namespace resolveMx { + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function + * will contain an array of certification authority authorization records + * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void; + export namespace resolveCaa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v0.1.27 + */ + export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + export namespace resolveMx { function __promisify__(hostname: string): Promise; } - - function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; - namespace resolveNaptr { + /** + * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of + * objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100 + * } + * ``` + * @since v0.9.12 + */ + export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + export namespace resolveNaptr { function __promisify__(hostname: string): Promise; } - - function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - namespace resolveNs { + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`). + * @since v0.1.90 + */ + export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolveNs { function __promisify__(hostname: string): Promise; } - - function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - namespace resolvePtr { + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * be an array of strings containing the reply records. + * @since v6.0.0 + */ + export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolvePtr { function __promisify__(hostname: string): Promise; } - - function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void; - namespace resolveSoa { + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. The `address` argument passed to the `callback` function will + * be an object with the following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600 + * } + * ``` + * @since v0.11.10 + */ + export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void; + export namespace resolveSoa { function __promisify__(hostname: string): Promise; } - - function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; - namespace resolveSrv { + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * be an array of objects with the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com' + * } + * ``` + * @since v0.1.27 + */ + export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + export namespace resolveSrv { function __promisify__(hostname: string): Promise; } - - function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; - namespace resolveTxt { + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a + * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v0.1.27 + */ + export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + export namespace resolveTxt { function __promisify__(hostname: string): Promise; } - - function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; - namespace resolveAny { + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * The `ret` argument passed to the `callback` function will be an array containing + * various types of records. Each object has a property `type` that indicates the + * type of the current record. And depending on the `type`, additional properties + * will be present on the object: + * + * + * + * Here is an example of the `ret` object passed to the callback: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ] + * ``` + * + * DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC + * 8482](https://tools.ietf.org/html/rfc8482). + */ + export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + export namespace resolveAny { function __promisify__(hostname: string): Promise; } - - function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void; - function setServers(servers: ReadonlyArray): void; - function getServers(): string[]; - + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, `err` is an `Error` object, where `err.code` is + * one of the `DNS error codes`. + * @since v0.1.16 + */ + export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dns.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dns.setServers()` method must not be called while a DNS query is in + * progress. + * + * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v0.11.3 + * @param servers array of `RFC 5952` formatted addresses + */ + export function setServers(servers: ReadonlyArray): void; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v0.11.3 + */ + export function getServers(): string[]; + /** + * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be: + * + * * `ipv4first`: sets default `verbatim` `false`. + * * `verbatim`: sets default `verbatim` `true`. + * + * The default is `ipv4first` and {@link setDefaultResultOrder} have higher + * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default + * dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'` or `'verbatim'`. + */ + export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void; // Error codes - const NODATA: string; - const FORMERR: string; - const SERVFAIL: string; - const NOTFOUND: string; - const NOTIMP: string; - const REFUSED: string; - const BADQUERY: string; - const BADNAME: string; - const BADFAMILY: string; - const BADRESP: string; - const CONNREFUSED: string; - const TIMEOUT: string; - const EOF: string; - const FILE: string; - const NOMEM: string; - const DESTRUCTION: string; - const BADSTR: string; - const BADFLAGS: string; - const NONAME: string; - const BADHINTS: string; - const NOTINITIALIZED: string; - const LOADIPHLPAPI: string; - const ADDRGETNETWORKPARAMS: string; - const CANCELLED: string; - - interface ResolverOptions { - timeout?: number; - } - - class Resolver { + export const NODATA: string; + export const FORMERR: string; + export const SERVFAIL: string; + export const NOTFOUND: string; + export const NOTIMP: string; + export const REFUSED: string; + export const BADQUERY: string; + export const BADNAME: string; + export const BADFAMILY: string; + export const BADRESP: string; + export const CONNREFUSED: string; + export const TIMEOUT: string; + export const EOF: string; + export const FILE: string; + export const NOMEM: string; + export const DESTRUCTION: string; + export const BADSTR: string; + export const BADFLAGS: string; + export const NONAME: string; + export const BADHINTS: string; + export const NOTINITIALIZED: string; + export const LOADIPHLPAPI: string; + export const ADDRGETNETWORKPARAMS: string; + export const CANCELLED: string; + export interface ResolverOptions { + timeout?: number | undefined; + /** + * @default 4 + */ + tries?: number; + } + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using `resolver.setServers()` does not affect + * other resolvers: + * + * ```js + * const { Resolver } = require('dns'); + * const resolver = new Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org', (err, addresses) => { + * // ... + * }); + * ``` + * + * The following methods from the `dns` module are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v8.3.0 + */ + export class Resolver { constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ cancel(): void; getServers: typeof getServers; resolve: typeof resolve; @@ -301,84 +634,26 @@ declare module 'dns' { resolveSrv: typeof resolveSrv; resolveTxt: typeof resolveTxt; reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default, and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ setLocalAddress(ipv4?: string, ipv6?: string): void; setServers: typeof setServers; } - - namespace promises { - function getServers(): string[]; - - function lookup(hostname: string, family: number): Promise; - function lookup(hostname: string, options: LookupOneOptions): Promise; - function lookup(hostname: string, options: LookupAllOptions): Promise; - function lookup(hostname: string, options: LookupOptions): Promise; - function lookup(hostname: string): Promise; - - function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>; - - function resolve(hostname: string): Promise; - function resolve(hostname: string, rrtype: "A"): Promise; - function resolve(hostname: string, rrtype: "AAAA"): Promise; - function resolve(hostname: string, rrtype: "ANY"): Promise; - function resolve(hostname: string, rrtype: "CNAME"): Promise; - function resolve(hostname: string, rrtype: "MX"): Promise; - function resolve(hostname: string, rrtype: "NAPTR"): Promise; - function resolve(hostname: string, rrtype: "NS"): Promise; - function resolve(hostname: string, rrtype: "PTR"): Promise; - function resolve(hostname: string, rrtype: "SOA"): Promise; - function resolve(hostname: string, rrtype: "SRV"): Promise; - function resolve(hostname: string, rrtype: "TXT"): Promise; - function resolve(hostname: string, rrtype: string): Promise; - - function resolve4(hostname: string): Promise; - function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve4(hostname: string, options: ResolveOptions): Promise; - - function resolve6(hostname: string): Promise; - function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve6(hostname: string, options: ResolveOptions): Promise; - - function resolveAny(hostname: string): Promise; - - function resolveCname(hostname: string): Promise; - - function resolveMx(hostname: string): Promise; - - function resolveNaptr(hostname: string): Promise; - - function resolveNs(hostname: string): Promise; - - function resolvePtr(hostname: string): Promise; - - function resolveSoa(hostname: string): Promise; - - function resolveSrv(hostname: string): Promise; - - function resolveTxt(hostname: string): Promise; - - function reverse(ip: string): Promise; - - function setServers(servers: ReadonlyArray): void; - - class Resolver { - constructor(options?: ResolverOptions); - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } - } + export { dnsPromises as promises }; +} +declare module 'node:dns' { + export * from 'dns'; } diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts new file mode 100644 index 0000000..77cd807 --- /dev/null +++ b/node_modules/@types/node/dns/promises.d.ts @@ -0,0 +1,370 @@ +/** + * The `dns.promises` API provides an alternative set of asynchronous DNS methods + * that return `Promise` objects rather than using callbacks. The API is accessible + * via `require('dns').promises` or `require('dns/promises')`. + * @since v10.6.0 + */ +declare module 'dns/promises' { + import { + LookupAddress, + LookupOneOptions, + LookupAllOptions, + LookupOptions, + AnyRecord, + CaaRecord, + MxRecord, + NaptrRecord, + SoaRecord, + SrvRecord, + ResolveWithTtlOptions, + RecordWithTtl, + ResolveOptions, + ResolverOptions, + } from 'node:dns'; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v10.6.0 + */ + function getServers(): string[]; + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dnsPromises.lookup()` does not necessarily have anything to do with the DNS + * protocol. The implementation uses an operating system facility that can + * associate names with addresses, and vice versa. This implementation can have + * subtle but important consequences on the behavior of any Node.js program. Please + * take some time to consult the `Implementation considerations section` before + * using `dnsPromises.lookup()`. + * + * Example usage: + * + * ```js + * const dns = require('dns'); + * const dnsPromises = dns.promises; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('address: %j family: IPv%s', result.address, result.family); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * }); + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('addresses: %j', result); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * }); + * ``` + * @since v10.6.0 + */ + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code. + * + * ```js + * const dnsPromises = require('dns').promises; + * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { + * console.log(result.hostname, result.service); + * // Prints: localhost ssh + * }); + * ``` + * @since v10.6.0 + */ + function lookupService( + address: string, + port: number + ): Promise<{ + hostname: string; + service: string; + }>; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. When successful, the `Promise` is resolved with an + * array of resource records. The type and structure of individual results vary + * based on `rrtype`: + * + * + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`. + * @since v10.6.0 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: 'A'): Promise; + function resolve(hostname: string, rrtype: 'AAAA'): Promise; + function resolve(hostname: string, rrtype: 'ANY'): Promise; + function resolve(hostname: string, rrtype: 'CAA'): Promise; + function resolve(hostname: string, rrtype: 'CNAME'): Promise; + function resolve(hostname: string, rrtype: 'MX'): Promise; + function resolve(hostname: string, rrtype: 'NAPTR'): Promise; + function resolve(hostname: string, rrtype: 'NS'): Promise; + function resolve(hostname: string, rrtype: 'PTR'): Promise; + function resolve(hostname: string, rrtype: 'SOA'): Promise; + function resolve(hostname: string, rrtype: 'SRV'): Promise; + function resolve(hostname: string, rrtype: 'TXT'): Promise; + function resolve(hostname: string, rrtype: string): Promise; + /** + * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4 + * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6 + * addresses. + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * On success, the `Promise` is resolved with an array containing various types of + * records. Each object has a property `type` that indicates the type of the + * current record. And depending on the `type`, additional properties will be + * present on the object: + * + * + * + * Here is an example of the result object: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ] + * ``` + * @since v10.6.0 + */ + function resolveAny(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, + * the `Promise` is resolved with an array of objects containing available + * certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, + * the `Promise` is resolved with an array of canonical name records available for + * the `hostname` (e.g. `['bar.example.com']`). + * @since v10.6.0 + */ + function resolveCname(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects + * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v10.6.0 + */ + function resolveMx(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array + * of objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100 + * } + * ``` + * @since v10.6.0 + */ + function resolveNaptr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server + * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). + * @since v10.6.0 + */ + function resolveNs(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings + * containing the reply records. + * @since v10.6.0 + */ + function resolvePtr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. On success, the `Promise` is resolved with an object with the + * following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600 + * } + * ``` + * @since v10.6.0 + */ + function resolveSoa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with + * the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com' + * } + * ``` + * @since v10.6.0 + */ + function resolveSrv(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. On success, the `Promise` is resolved with a two-dimensional array + * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v10.6.0 + */ + function resolveTxt(hostname: string): Promise; + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`. + * @since v10.6.0 + */ + function reverse(ip: string): Promise; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dnsPromises.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dnsPromises.setServers()` method must not be called while a DNS query is in + * progress. + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v10.6.0 + * @param servers array of `RFC 5952` formatted addresses + */ + function setServers(servers: ReadonlyArray): void; + /** + * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be: + * + * * `ipv4first`: sets default `verbatim` `false`. + * * `verbatim`: sets default `verbatim` `true`. + * + * The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have + * higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the + * default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void; + class Resolver { + constructor(options?: ResolverOptions); + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module 'node:dns/promises' { + export * from 'dns/promises'; +} diff --git a/node_modules/@types/node/dom-events.d.ts b/node_modules/@types/node/dom-events.d.ts new file mode 100644 index 0000000..b9c1c3a --- /dev/null +++ b/node_modules/@types/node/dom-events.d.ts @@ -0,0 +1,126 @@ +export {}; // Don't export anything! + +//// DOM-like Events +// NB: The Event / EventTarget / EventListener implementations below were copied +// from lib.dom.d.ts, then edited to reflect Node's documentation at +// https://nodejs.org/api/events.html#class-eventtarget. +// Please read that link to understand important implementation differences. + +// This conditional type will be the existing global Event in a browser, or +// the copy below in a Node environment. +type __Event = typeof globalThis extends { onmessage: any, Event: any } +? {} +: { + /** This is not used in Node.js and is provided purely for completeness. */ + readonly bubbles: boolean; + /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */ + cancelBubble: () => void; + /** True if the event was created with the cancelable option */ + readonly cancelable: boolean; + /** This is not used in Node.js and is provided purely for completeness. */ + readonly composed: boolean; + /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */ + composedPath(): [EventTarget?] + /** Alias for event.target. */ + readonly currentTarget: EventTarget | null; + /** Is true if cancelable is true and event.preventDefault() has been called. */ + readonly defaultPrevented: boolean; + /** This is not used in Node.js and is provided purely for completeness. */ + readonly eventPhase: 0 | 2; + /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */ + readonly isTrusted: boolean; + /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */ + preventDefault(): void; + /** This is not used in Node.js and is provided purely for completeness. */ + returnValue: boolean; + /** Alias for event.target. */ + readonly srcElement: EventTarget | null; + /** Stops the invocation of event listeners after the current one completes. */ + stopImmediatePropagation(): void; + /** This is not used in Node.js and is provided purely for completeness. */ + stopPropagation(): void; + /** The `EventTarget` dispatching the event */ + readonly target: EventTarget | null; + /** The millisecond timestamp when the Event object was created. */ + readonly timeStamp: number; + /** Returns the type of event, e.g. "click", "hashchange", or "submit". */ + readonly type: string; +}; + +// See comment above explaining conditional type +type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any } +? {} +: { + /** + * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value. + * + * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched. + * + * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification. + * Specifically, the `capture` option is used as part of the key when registering a `listener`. + * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`. + */ + addEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: AddEventListenerOptions | boolean, + ): void; + /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ + dispatchEvent(event: Event): boolean; + /** Removes the event listener in target's event listener list with the same type, callback, and options. */ + removeEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: EventListenerOptions | boolean, + ): void; +}; + +interface EventInit { + bubbles?: boolean; + cancelable?: boolean; + composed?: boolean; +} + +interface EventListenerOptions { + /** Not directly used by Node.js. Added for API completeness. Default: `false`. */ + capture?: boolean; +} + +interface AddEventListenerOptions extends EventListenerOptions { + /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */ + once?: boolean; + /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */ + passive?: boolean; +} + +interface EventListener { + (evt: Event): void; +} + +interface EventListenerObject { + handleEvent(object: Event): void; +} + +import {} from 'events'; // Make this an ambient declaration +declare global { + /** An event which takes place in the DOM. */ + interface Event extends __Event {} + var Event: typeof globalThis extends { onmessage: any, Event: infer T } + ? T + : { + prototype: __Event; + new (type: string, eventInitDict?: EventInit): __Event; + }; + + /** + * EventTarget is a DOM interface implemented by objects that can + * receive events and may have listeners for them. + */ + interface EventTarget extends __EventTarget {} + var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T } + ? T + : { + prototype: __EventTarget; + new (): __EventTarget; + }; +} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts index 4d5f153..fafe68a 100644 --- a/node_modules/@types/node/domain.d.ts +++ b/node_modules/@types/node/domain.d.ts @@ -1,28 +1,170 @@ -declare module 'node:domain' { - export * from 'domain'; -} - +/** + * **This module is pending deprecation.** Once a replacement API has been + * finalized, this module will be fully deprecated. Most developers should + * **not** have cause to use this module. Users who absolutely must have + * the functionality that domains provide may rely on it for the time being + * but should expect to have to migrate to a different solution + * in the future. + * + * Domains provide a way to handle multiple different IO operations as a + * single group. If any of the event emitters or callbacks registered to a + * domain emit an `'error'` event, or throw an error, then the domain object + * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to + * exit immediately with an error code. + * @deprecated Since v1.4.2 - Deprecated + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js) + */ declare module 'domain' { import EventEmitter = require('node:events'); - - global { - namespace NodeJS { - interface Domain extends EventEmitter { - run(fn: (...args: any[]) => T, ...args: any[]): T; - add(emitter: EventEmitter | Timer): void; - remove(emitter: EventEmitter | Timer): void; - bind(cb: T): T; - intercept(cb: T): T; - } - } - } - - interface Domain extends NodeJS.Domain {} + /** + * The `Domain` class encapsulates the functionality of routing errors and + * uncaught exceptions to the active `Domain` object. + * + * To handle the errors that it catches, listen to its `'error'` event. + */ class Domain extends EventEmitter { + /** + * An array of timers and event emitters that have been explicitly added + * to the domain. + */ members: Array; + /** + * The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly + * pushes the domain onto the domain + * stack managed by the domain module (see {@link exit} for details on the + * domain stack). The call to `enter()` delimits the beginning of a chain of + * asynchronous calls and I/O operations bound to a domain. + * + * Calling `enter()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ enter(): void; + /** + * The `exit()` method exits the current domain, popping it off the domain stack. + * Any time execution is going to switch to the context of a different chain of + * asynchronous calls, it's important to ensure that the current domain is exited. + * The call to `exit()` delimits either the end of or an interruption to the chain + * of asynchronous calls and I/O operations bound to a domain. + * + * If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain. + * + * Calling `exit()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ exit(): void; + /** + * Run the supplied function in the context of the domain, implicitly + * binding all event emitters, timers, and lowlevel requests that are + * created in that context. Optionally, arguments can be passed to + * the function. + * + * This is the most basic way to use a domain. + * + * ```js + * const domain = require('domain'); + * const fs = require('fs'); + * const d = domain.create(); + * d.on('error', (er) => { + * console.error('Caught error!', er); + * }); + * d.run(() => { + * process.nextTick(() => { + * setTimeout(() => { // Simulating some various async stuff + * fs.open('non-existent file', 'r', (er, fd) => { + * if (er) throw er; + * // proceed... + * }); + * }, 100); + * }); + * }); + * ``` + * + * In this example, the `d.on('error')` handler will be triggered, rather + * than crashing the program. + */ + run(fn: (...args: any[]) => T, ...args: any[]): T; + /** + * Explicitly adds an emitter to the domain. If any event handlers called by + * the emitter throw an error, or if the emitter emits an `'error'` event, it + * will be routed to the domain's `'error'` event, just like with implicit + * binding. + * + * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by + * the domain `'error'` handler. + * + * If the Timer or `EventEmitter` was already bound to a domain, it is removed + * from that one, and bound to this one instead. + * @param emitter emitter or timer to be added to the domain + */ + add(emitter: EventEmitter | NodeJS.Timer): void; + /** + * The opposite of {@link add}. Removes domain handling from the + * specified emitter. + * @param emitter emitter or timer to be removed from the domain + */ + remove(emitter: EventEmitter | NodeJS.Timer): void; + /** + * The returned function will be a wrapper around the supplied callback + * function. When the returned function is called, any errors that are + * thrown will be routed to the domain's `'error'` event. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.bind((er, data) => { + * // If this throws, it will also be passed to the domain. + * return cb(er, data ? JSON.parse(data) : null); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The bound function + */ + bind(callback: T): T; + /** + * This method is almost identical to {@link bind}. However, in + * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. + * + * In this way, the common `if (err) return callback(err);` pattern can be replaced + * with a single error handler in a single place. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.intercept((data) => { + * // Note, the first argument is never passed to the + * // callback since it is assumed to be the 'Error' argument + * // and thus intercepted by the domain. + * + * // If this throws, it will also be passed to the domain + * // so the error-handling logic can be moved to the 'error' + * // event on the domain instead of being repeated throughout + * // the program. + * return cb(null, JSON.parse(data)); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The intercepted function + */ + intercept(callback: T): T; } - function create(): Domain; } +declare module 'node:domain' { + export * from 'domain'; +} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts index d12c132..4633df1 100644 --- a/node_modules/@types/node/events.d.ts +++ b/node_modules/@types/node/events.d.ts @@ -1,35 +1,320 @@ -declare module 'node:events' { - import EventEmitter = require('events'); - export = EventEmitter; -} - +/** + * Much of the Node.js core API is built around an idiomatic asynchronous + * event-driven architecture in which certain kinds of objects (called "emitters") + * emit named events that cause `Function` objects ("listeners") to be called. + * + * For instance: a `net.Server` object emits an event each time a peer + * connects to it; a `fs.ReadStream` emits an event when the file is opened; + * a `stream` emits an event whenever data is available to be read. + * + * All objects that emit events are instances of the `EventEmitter` class. These + * objects expose an `eventEmitter.on()` function that allows one or more + * functions to be attached to named events emitted by the object. Typically, + * event names are camel-cased strings but any valid JavaScript property key + * can be used. + * + * When the `EventEmitter` object emits an event, all of the functions attached + * to that specific event are called _synchronously_. Any values returned by the + * called listeners are _ignored_ and discarded. + * + * The following example shows a simple `EventEmitter` instance with a single + * listener. The `eventEmitter.on()` method is used to register listeners, while + * the `eventEmitter.emit()` method is used to trigger the event. + * + * ```js + * const EventEmitter = require('events'); + * + * class MyEmitter extends EventEmitter {} + * + * const myEmitter = new MyEmitter(); + * myEmitter.on('event', () => { + * console.log('an event occurred!'); + * }); + * myEmitter.emit('event'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js) + */ declare module 'events' { + // NOTE: This class is in the docs but is **not actually exported** by Node. + // If https://github.com/nodejs/node/issues/39903 gets resolved and Node + // actually starts exporting the class, uncomment below. + + // import { EventListener, EventListenerObject } from '__dom-events'; + // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */ + // interface NodeEventTarget extends EventTarget { + // /** + // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API. + // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget. + // */ + // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this; + // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */ + // eventNames(): string[]; + // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */ + // listenerCount(type: string): number; + // /** Node.js-specific alias for `eventTarget.removeListener()`. */ + // off(type: string, listener: EventListener | EventListenerObject): this; + // /** Node.js-specific alias for `eventTarget.addListener()`. */ + // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this; + // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */ + // once(type: string, listener: EventListener | EventListenerObject): this; + // /** + // * Node.js-specific extension to the `EventTarget` class. + // * If `type` is specified, removes all registered listeners for `type`, + // * otherwise removes all registered listeners. + // */ + // removeAllListeners(type: string): this; + // /** + // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`. + // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`. + // */ + // removeListener(type: string, listener: EventListener | EventListenerObject): this; + // } + interface EventEmitterOptions { /** * Enables automatic capturing of promise rejection. */ - captureRejections?: boolean; + captureRejections?: boolean | undefined; } - - interface NodeEventTarget { - once(event: string | symbol, listener: (...args: any[]) => void): this; + // Any EventTarget with a Node-style `once` function + interface _NodeEventTarget { + once(eventName: string | symbol, listener: (...args: any[]) => void): this; } - - interface DOMEventTarget { - addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any; + // Any EventTarget with a DOM-style `addEventListener` + interface _DOMEventTarget { + addEventListener( + eventName: string, + listener: (...args: any[]) => void, + opts?: { + once: boolean; + } + ): any; + } + interface StaticEventEmitterOptions { + signal?: AbortSignal | undefined; } - interface EventEmitter extends NodeJS.EventEmitter {} + /** + * The `EventEmitter` class is defined and exposed by the `events` module: + * + * ```js + * const EventEmitter = require('events'); + * ``` + * + * All `EventEmitter`s emit the event `'newListener'` when new listeners are + * added and `'removeListener'` when existing listeners are removed. + * + * It supports the following option: + * @since v0.1.26 + */ class EventEmitter { constructor(options?: EventEmitterOptions); - - static once(emitter: NodeEventTarget, event: string | symbol): Promise; - static once(emitter: DOMEventTarget, event: string): Promise; - static on(emitter: NodeJS.EventEmitter, event: string): AsyncIterableIterator; - - /** @deprecated since v4.0.0 */ - static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number; - + /** + * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given + * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. + * The `Promise` will resolve with an array of all the arguments emitted to the + * given event. + * + * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event + * semantics and does not listen to the `'error'` event. + * + * ```js + * const { once, EventEmitter } = require('events'); + * + * async function run() { + * const ee = new EventEmitter(); + * + * process.nextTick(() => { + * ee.emit('myevent', 42); + * }); + * + * const [value] = await once(ee, 'myevent'); + * console.log(value); + * + * const err = new Error('kaboom'); + * process.nextTick(() => { + * ee.emit('error', err); + * }); + * + * try { + * await once(ee, 'myevent'); + * } catch (err) { + * console.log('error happened', err); + * } + * } + * + * run(); + * ``` + * + * The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the + * '`error'` event itself, then it is treated as any other kind of event without + * special handling: + * + * ```js + * const { EventEmitter, once } = require('events'); + * + * const ee = new EventEmitter(); + * + * once(ee, 'error') + * .then(([err]) => console.log('ok', err.message)) + * .catch((err) => console.log('error', err.message)); + * + * ee.emit('error', new Error('boom')); + * + * // Prints: ok boom + * ``` + * + * An `AbortSignal` can be used to cancel waiting for the event: + * + * ```js + * const { EventEmitter, once } = require('events'); + * + * const ee = new EventEmitter(); + * const ac = new AbortController(); + * + * async function foo(emitter, event, signal) { + * try { + * await once(emitter, event, { signal }); + * console.log('event emitted!'); + * } catch (error) { + * if (error.name === 'AbortError') { + * console.error('Waiting for the event was canceled!'); + * } else { + * console.error('There was an error', error.message); + * } + * } + * } + * + * foo(ee, 'foo', ac.signal); + * ac.abort(); // Abort waiting for the event + * ee.emit('foo'); // Prints: Waiting for the event was canceled! + * ``` + * @since v11.13.0, v10.16.0 + */ + static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise; + static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise; + /** + * ```js + * const { on, EventEmitter } = require('events'); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo')) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * ``` + * + * Returns an `AsyncIterator` that iterates `eventName` events. It will throw + * if the `EventEmitter` emits `'error'`. It removes all listeners when + * exiting the loop. The `value` returned by each iteration is an array + * composed of the emitted event arguments. + * + * An `AbortSignal` can be used to cancel waiting on events: + * + * ```js + * const { on, EventEmitter } = require('events'); + * const ac = new AbortController(); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo', { signal: ac.signal })) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * + * process.nextTick(() => ac.abort()); + * ``` + * @since v13.6.0, v12.16.0 + * @param eventName The name of the event being listened for + * @return that iterates `eventName` events emitted by the `emitter` + */ + static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator; + /** + * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`. + * + * ```js + * const { EventEmitter, listenerCount } = require('events'); + * const myEmitter = new EventEmitter(); + * myEmitter.on('event', () => {}); + * myEmitter.on('event', () => {}); + * console.log(listenerCount(myEmitter, 'event')); + * // Prints: 2 + * ``` + * @since v0.9.12 + * @deprecated Since v3.2.0 - Use `listenerCount` instead. + * @param emitter The emitter to query + * @param eventName The event name + */ + static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the event listeners for the + * event target. This is useful for debugging and diagnostic purposes. + * + * ```js + * const { getEventListeners, EventEmitter } = require('events'); + * + * { + * const ee = new EventEmitter(); + * const listener = () => console.log('Events are fun'); + * ee.on('foo', listener); + * getEventListeners(ee, 'foo'); // [listener] + * } + * { + * const et = new EventTarget(); + * const listener = () => console.log('Events are fun'); + * et.addEventListener('foo', listener); + * getEventListeners(et, 'foo'); // [listener] + * } + * ``` + * @since v15.2.0, v14.17.0 + */ + static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[]; + /** + * ```js + * const { + * setMaxListeners, + * EventEmitter + * } = require('events'); + * + * const target = new EventTarget(); + * const emitter = new EventEmitter(); + * + * setMaxListeners(5, target, emitter); + * ``` + * @since v15.4.0 + * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. + * @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} + * objects. + */ + static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void; /** * This symbol shall be used to install a listener for only monitoring `'error'` * events. Listeners installed using this symbol are called before the regular @@ -41,7 +326,6 @@ declare module 'events' { */ static readonly errorMonitor: unique symbol; static readonly captureRejectionSymbol: unique symbol; - /** * Sets or gets the default captureRejection value for all emitters. */ @@ -49,35 +333,346 @@ declare module 'events' { static captureRejections: boolean; static defaultMaxListeners: number; } - - import internal = require('events'); + import internal = require('node:events'); namespace EventEmitter { // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4 export { internal as EventEmitter }; + export interface Abortable { + /** + * When provided the corresponding `AbortController` can be used to cancel an asynchronous action. + */ + signal?: AbortSignal | undefined; + } } - global { namespace NodeJS { interface EventEmitter { - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - off(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * Alias for `emitter.on(eventName, listener)`. + * @since v0.1.26 + */ + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds the `listener` function to the end of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * const myEE = new EventEmitter(); + * myEE.on('foo', () => console.log('a')); + * myEE.prependListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.1.101 + * @param eventName The name of the event. + * @param listener The callback function + */ + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds a **one-time**`listener` function for the event named `eventName`. The + * next time `eventName` is triggered, this listener is removed and then invoked. + * + * ```js + * server.once('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * const myEE = new EventEmitter(); + * myEE.once('foo', () => console.log('a')); + * myEE.prependOnceListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.3.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Removes the specified `listener` from the listener array for the event named`eventName`. + * + * ```js + * const callback = (stream) => { + * console.log('someone connected!'); + * }; + * server.on('connection', callback); + * // ... + * server.removeListener('connection', callback); + * ``` + * + * `removeListener()` will remove, at most, one instance of a listener from the + * listener array. If any single listener has been added multiple times to the + * listener array for the specified `eventName`, then `removeListener()` must be + * called multiple times to remove each instance. + * + * Once an event is emitted, all listeners attached to it at the + * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution + * will not remove them from`emit()` in progress. Subsequent events behave as expected. + * + * ```js + * const myEmitter = new MyEmitter(); + * + * const callbackA = () => { + * console.log('A'); + * myEmitter.removeListener('event', callbackB); + * }; + * + * const callbackB = () => { + * console.log('B'); + * }; + * + * myEmitter.on('event', callbackA); + * + * myEmitter.on('event', callbackB); + * + * // callbackA removes listener callbackB but it will still be called. + * // Internal listener array at time of emit [callbackA, callbackB] + * myEmitter.emit('event'); + * // Prints: + * // A + * // B + * + * // callbackB is now removed. + * // Internal listener array [callbackA] + * myEmitter.emit('event'); + * // Prints: + * // A + * ``` + * + * Because listeners are managed using an internal array, calling this will + * change the position indices of any listener registered _after_ the listener + * being removed. This will not impact the order in which listeners are called, + * but it means that any copies of the listener array as returned by + * the `emitter.listeners()` method will need to be recreated. + * + * When a single function has been added as a handler multiple times for a single + * event (as in the example below), `removeListener()` will remove the most + * recently added instance. In the example the `once('ping')`listener is removed: + * + * ```js + * const ee = new EventEmitter(); + * + * function pong() { + * console.log('pong'); + * } + * + * ee.on('ping', pong); + * ee.once('ping', pong); + * ee.removeListener('ping', pong); + * + * ee.emit('ping'); + * ee.emit('ping'); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Alias for `emitter.removeListener()`. + * @since v10.0.0 + */ + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Removes all listeners, or those of the specified `eventName`. + * + * It is bad practice to remove listeners added elsewhere in the code, + * particularly when the `EventEmitter` instance was created by some other + * component or module (e.g. sockets or file streams). + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ removeAllListeners(event?: string | symbol): this; + /** + * By default `EventEmitter`s will print a warning if more than `10` listeners are + * added for a particular event. This is a useful default that helps finding + * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be + * modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners. + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.3.5 + */ setMaxListeners(n: number): this; + /** + * Returns the current max listener value for the `EventEmitter` which is either + * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}. + * @since v1.0.0 + */ getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - rawListeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - listenerCount(event: string | symbol): number; - // Added in Node 6... - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * console.log(util.inspect(server.listeners('connection'))); + * // Prints: [ [Function] ] + * ``` + * @since v0.1.26 + */ + listeners(eventName: string | symbol): Function[]; + /** + * Returns a copy of the array of listeners for the event named `eventName`, + * including any wrappers (such as those created by `.once()`). + * + * ```js + * const emitter = new EventEmitter(); + * emitter.once('log', () => console.log('log once')); + * + * // Returns a new Array with a function `onceWrapper` which has a property + * // `listener` which contains the original listener bound above + * const listeners = emitter.rawListeners('log'); + * const logFnWrapper = listeners[0]; + * + * // Logs "log once" to the console and does not unbind the `once` event + * logFnWrapper.listener(); + * + * // Logs "log once" to the console and removes the listener + * logFnWrapper(); + * + * emitter.on('log', () => console.log('log persistently')); + * // Will return a new Array with a single function bound by `.on()` above + * const newListeners = emitter.rawListeners('log'); + * + * // Logs "log persistently" twice + * newListeners[0](); + * emitter.emit('log'); + * ``` + * @since v9.4.0 + */ + rawListeners(eventName: string | symbol): Function[]; + /** + * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments + * to each. + * + * Returns `true` if the event had listeners, `false` otherwise. + * + * ```js + * const EventEmitter = require('events'); + * const myEmitter = new EventEmitter(); + * + * // First listener + * myEmitter.on('event', function firstListener() { + * console.log('Helloooo! first listener'); + * }); + * // Second listener + * myEmitter.on('event', function secondListener(arg1, arg2) { + * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); + * }); + * // Third listener + * myEmitter.on('event', function thirdListener(...args) { + * const parameters = args.join(', '); + * console.log(`event with parameters ${parameters} in third listener`); + * }); + * + * console.log(myEmitter.listeners('event')); + * + * myEmitter.emit('event', 1, 2, 3, 4, 5); + * + * // Prints: + * // [ + * // [Function: firstListener], + * // [Function: secondListener], + * // [Function: thirdListener] + * // ] + * // Helloooo! first listener + * // event with parameters 1, 2 in second listener + * // event with parameters 1, 2, 3, 4, 5 in third listener + * ``` + * @since v0.1.26 + */ + emit(eventName: string | symbol, ...args: any[]): boolean; + /** + * Returns the number of listeners listening to the event named `eventName`. + * @since v3.2.0 + * @param eventName The name of the event being listened for + */ + listenerCount(eventName: string | symbol): number; + /** + * Adds the `listener` function to the _beginning_ of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.prependListener('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this + * listener is removed, and then invoked. + * + * ```js + * server.prependOnceListener('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Returns an array listing the events for which the emitter has registered + * listeners. The values in the array are strings or `Symbol`s. + * + * ```js + * const EventEmitter = require('events'); + * const myEE = new EventEmitter(); + * myEE.on('foo', () => {}); + * myEE.on('bar', () => {}); + * + * const sym = Symbol('symbol'); + * myEE.on(sym, () => {}); + * + * console.log(myEE.eventNames()); + * // Prints: [ 'foo', 'bar', Symbol(symbol) ] + * ``` + * @since v6.0.0 + */ eventNames(): Array; } } } - export = EventEmitter; } +declare module 'node:events' { + import events = require('events'); + export = events; +} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts index d7258fa..75c53fb 100644 --- a/node_modules/@types/node/fs.d.ts +++ b/node_modules/@types/node/fs.d.ts @@ -1,31 +1,47 @@ -declare module 'node:fs' { - export * from 'fs'; -} - +/** + * The `fs` module enables interacting with the file system in a + * way modeled on standard POSIX functions. + * + * To use the promise-based APIs: + * + * ```js + * import * as fs from 'fs/promises'; + * ``` + * + * To use the callback and sync APIs: + * + * ```js + * import * as fs from 'fs'; + * ``` + * + * All file system operations have synchronous, callback, and promise-based + * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/fs.js) + */ declare module 'fs' { import * as stream from 'node:stream'; - import EventEmitter = require('node:events'); + import { Abortable, EventEmitter } from 'node:events'; import { URL } from 'node:url'; import * as promises from 'node:fs/promises'; - export { promises }; /** * Valid types for path values in "fs". */ export type PathLike = string | Buffer | URL; - + export type PathOrFileDescriptor = PathLike | number; + export type TimeLike = string | number | Date; export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; - - export type BufferEncodingOption = 'buffer' | { encoding: 'buffer' }; - - export interface BaseEncodingOptions { - encoding?: BufferEncoding | null; + export type BufferEncodingOption = + | 'buffer' + | { + encoding: 'buffer'; + }; + export interface ObjectEncodingOptions { + encoding?: BufferEncoding | null | undefined; } - + export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; export type OpenMode = number | string; - export type Mode = number | string; - export interface StatsBase { isFile(): boolean; isDirectory(): boolean; @@ -34,7 +50,6 @@ declare module 'fs' { isSymbolicLink(): boolean; isFIFO(): boolean; isSocket(): boolean; - dev: T; ino: T; mode: T; @@ -54,239 +69,441 @@ declare module 'fs' { ctime: Date; birthtime: Date; } - - export interface Stats extends StatsBase { - } - - export class Stats { - } - + export interface Stats extends StatsBase {} + /** + * A `fs.Stats` object provides information about a file. + * + * Objects returned from {@link stat}, {@link lstat} and {@link fstat} and + * their synchronous counterparts are of this type. + * If `bigint` in the `options` passed to those methods is true, the numeric values + * will be `bigint` instead of `number`, and the object will contain additional + * nanosecond-precision properties suffixed with `Ns`. + * + * ```console + * Stats { + * dev: 2114, + * ino: 48064969, + * mode: 33188, + * nlink: 1, + * uid: 85, + * gid: 100, + * rdev: 0, + * size: 527, + * blksize: 4096, + * blocks: 8, + * atimeMs: 1318289051000.1, + * mtimeMs: 1318289051000.1, + * ctimeMs: 1318289051000.1, + * birthtimeMs: 1318289051000.1, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * + * `bigint` version: + * + * ```console + * BigIntStats { + * dev: 2114n, + * ino: 48064969n, + * mode: 33188n, + * nlink: 1n, + * uid: 85n, + * gid: 100n, + * rdev: 0n, + * size: 527n, + * blksize: 4096n, + * blocks: 8n, + * atimeMs: 1318289051000n, + * mtimeMs: 1318289051000n, + * ctimeMs: 1318289051000n, + * birthtimeMs: 1318289051000n, + * atimeNs: 1318289051000000000n, + * mtimeNs: 1318289051000000000n, + * ctimeNs: 1318289051000000000n, + * birthtimeNs: 1318289051000000000n, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * @since v0.1.21 + */ + export class Stats {} + /** + * A representation of a directory entry, which can be a file or a subdirectory + * within the directory, as returned by reading from an `fs.Dir`. The + * directory entry is a combination of the file name and file type pairs. + * + * Additionally, when {@link readdir} or {@link readdirSync} is called with + * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. + * @since v10.10.0 + */ export class Dirent { + /** + * Returns `true` if the `fs.Dirent` object describes a regular file. + * @since v10.10.0 + */ isFile(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a file system + * directory. + * @since v10.10.0 + */ isDirectory(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a block device. + * @since v10.10.0 + */ isBlockDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a character device. + * @since v10.10.0 + */ isCharacterDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a symbolic link. + * @since v10.10.0 + */ isSymbolicLink(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a first-in-first-out + * (FIFO) pipe. + * @since v10.10.0 + */ isFIFO(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a socket. + * @since v10.10.0 + */ isSocket(): boolean; + /** + * The file name that this `fs.Dirent` object refers to. The type of this + * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. + * @since v10.10.0 + */ name: string; } - /** * A class representing a directory stream. - */ - export class Dir { + * + * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. + * + * ```js + * import { opendir } from 'fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + */ + export class Dir implements AsyncIterable { + /** + * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. + * @since v12.12.0 + */ readonly path: string; - /** * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. */ [Symbol.asyncIterator](): AsyncIterableIterator; - /** * Asynchronously close the directory's underlying resource handle. * Subsequent reads will result in errors. + * + * A promise is returned that will be resolved after the resource has been + * closed. + * @since v12.12.0 */ close(): Promise; close(cb: NoParamCallback): void; - /** * Synchronously close the directory's underlying resource handle. * Subsequent reads will result in errors. + * @since v12.12.0 */ closeSync(): void; - /** - * Asynchronously read the next directory entry via `readdir(3)` as an `Dirent`. - * After the read is completed, a value is returned that will be resolved with an `Dirent`, or `null` if there are no more directory entries to read. - * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms. + * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. + * + * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + * @return containing {fs.Dirent|null} */ read(): Promise; read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; - /** - * Synchronously read the next directory entry via `readdir(3)` as a `Dirent`. - * If there are no more directory entries to read, null will be returned. - * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms. + * Synchronously read the next directory entry as an `fs.Dirent`. See the + * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. + * + * If there are no more directory entries to read, `null` will be returned. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 */ readSync(): Dirent | null; } - + /** + * Class: fs.StatWatcher + * @since v14.3.0, v12.20.0 + * Extends `EventEmitter` + * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. + */ + export interface StatWatcher extends EventEmitter { + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.StatWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.StatWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } export interface FSWatcher extends EventEmitter { + /** + * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. + * @since v0.5.8 + */ close(): void; - /** * events.EventEmitter * 1. change * 2. error */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "close", listener: () => void): this; - + addListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'close', listener: () => void): this; on(event: string, listener: (...args: any[]) => void): this; - on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "close", listener: () => void): this; - + on(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'close', listener: () => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "close", listener: () => void): this; - + once(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'close', listener: () => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "close", listener: () => void): this; - + prependListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'close', listener: () => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; } - + /** + * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function. + * @since v0.1.93 + */ export class ReadStream extends stream.Readable { - close(): void; + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes that have been read so far. + * @since v6.4.0 + */ bytesRead: number; + /** + * The path to the file the stream is reading from as specified in the first + * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a + * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. + * @since v0.1.93 + */ path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0, v10.16.0 + */ pending: boolean; - /** * events.EventEmitter * 1. open * 2. close * 3. ready */ - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "ready", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'open', listener: (fd: number) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "ready", listener: () => void): this; - on(event: "resume", listener: () => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'open', listener: (fd: number) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'resume', listener: () => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "ready", listener: () => void): this; - once(event: "resume", listener: () => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'open', listener: (fd: number) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'resume', listener: () => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "ready", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'open', listener: (fd: number) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "ready", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'open', listener: (fd: number) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - + /** + * * Extends `stream.Writable` + * + * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function. + * @since v0.1.93 + */ export class WriteStream extends stream.Writable { - close(): void; + /** + * Closes `writeStream`. Optionally accepts a + * callback that will be executed once the `writeStream`is closed. + * @since v0.9.4 + */ + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes written so far. Does not include data that is still queued + * for writing. + * @since v0.4.7 + */ bytesWritten: number; + /** + * The path to the file the stream is writing to as specified in the first + * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a + * `Buffer`. + * @since v0.1.93 + */ path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0 + */ pending: boolean; - /** * events.EventEmitter * 1. open * 2. close * 3. ready */ - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "ready", listener: () => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'open', listener: (fd: number) => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "ready", listener: () => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'open', listener: (fd: number) => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "ready", listener: () => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'open', listener: (fd: number) => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "ready", listener: () => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'open', listener: (fd: number) => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "ready", listener: () => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'open', listener: (fd: number) => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + * Asynchronously rename file at `oldPath` to the pathname provided + * as `newPath`. In the case that `newPath` already exists, it will + * be overwritten. If there is a directory at `newPath`, an error will + * be raised instead. No arguments other than a possible exception are + * given to the completion callback. + * + * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). + * + * ```js + * import { rename } from 'fs'; + * + * rename('oldFile.txt', 'newFile.txt', (err) => { + * if (err) throw err; + * console.log('Rename complete!'); + * }); + * ``` + * @since v0.0.2 */ export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace rename { /** * Asynchronous rename(2) - Change the name or location of a file or directory. @@ -297,31 +514,40 @@ declare module 'fs' { */ function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; } - /** - * Synchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + * Renames the file from `oldPath` to `newPath`. Returns `undefined`. + * + * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. + * @since v0.1.21 */ export function renameSync(oldPath: PathLike, newPath: PathLike): void; - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. + * Truncates the file. No arguments other than a possible exception are + * given to the completion callback. A file descriptor can also be passed as the + * first argument. In this case, `fs.ftruncate()` is called. + * + * ```js + * import { truncate } from 'fs'; + * // Assuming that 'path/file.txt' is a regular file. + * truncate('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was truncated'); + * }); + * ``` + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * + * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. + * @since v0.8.6 + * @param [len=0] */ export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void; - /** * Asynchronous truncate(2) - Truncate a file to a specified length. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. */ export function truncate(path: PathLike, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace truncate { /** * Asynchronous truncate(2) - Truncate a file to a specified length. @@ -330,28 +556,65 @@ declare module 'fs' { */ function __promisify__(path: PathLike, len?: number | null): Promise; } - /** - * Synchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. + * Truncates the file. Returns `undefined`. A file descriptor can also be + * passed as the first argument. In this case, `fs.ftruncateSync()` is called. + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * @since v0.8.6 + * @param [len=0] */ export function truncateSync(path: PathLike, len?: number | null): void; - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. + * Truncates the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. + * + * If the file referred to by the file descriptor was larger than `len` bytes, only + * the first `len` bytes will be retained in the file. + * + * For example, the following program retains only the first four bytes of the + * file: + * + * ```js + * import { open, close, ftruncate } from 'fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('temp.txt', 'r+', (err, fd) => { + * if (err) throw err; + * + * try { + * ftruncate(fd, 4, (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * if (err) throw err; + * } + * }); + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v0.8.6 + * @param [len=0] */ export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void; - /** * Asynchronous ftruncate(2) - Truncate a file to a specified length. * @param fd A file descriptor. */ export function ftruncate(fd: number, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace ftruncate { /** * Asynchronous ftruncate(2) - Truncate a file to a specified length. @@ -360,21 +623,23 @@ declare module 'fs' { */ function __promisify__(fd: number, len?: number | null): Promise; } - /** - * Synchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. + * Truncates the file descriptor. Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link ftruncate}. + * @since v0.8.6 + * @param [len=0] */ export function ftruncateSync(fd: number, len?: number | null): void; - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Asynchronously changes owner and group of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 */ export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace chown { /** * Asynchronous chown(2) - Change ownership of a file. @@ -382,20 +647,22 @@ declare module 'fs' { */ function __promisify__(path: PathLike, uid: number, gid: number): Promise; } - /** - * Synchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Synchronously changes owner and group of a file. Returns `undefined`. + * This is the synchronous version of {@link chown}. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 */ export function chownSync(path: PathLike, uid: number, gid: number): void; - /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. + * Sets the owner of the file. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 */ export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace fchown { /** * Asynchronous fchown(2) - Change ownership of a file. @@ -403,20 +670,22 @@ declare module 'fs' { */ function __promisify__(fd: number, uid: number, gid: number): Promise; } - /** - * Synchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. + * Sets the owner of the file. Returns `undefined`. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. */ export function fchownSync(fd: number, uid: number, gid: number): void; - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Set the owner of the symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. */ export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace lchown { /** * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. @@ -424,24 +693,24 @@ declare module 'fs' { */ function __promisify__(path: PathLike, uid: number, gid: number): Promise; } - /** - * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Set the owner for the path. Returns `undefined`. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. */ export function lchownSync(path: PathLike, uid: number, gid: number): void; - /** - * Changes the access and modification times of a file in the same way as `fs.utimes()`, - * with the difference that if the path refers to a symbolic link, then the link is not - * dereferenced: instead, the timestamps of the symbolic link itself are changed. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. + * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic + * link, then the link is not dereferenced: instead, the timestamps of the + * symbolic link itself are changed. + * + * No arguments other than a possible exception are given to the completion + * callback. + * @since v14.5.0, v12.19.0 */ - export function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; export namespace lutimes { /** * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, @@ -451,27 +720,32 @@ declare module 'fs' { * @param atime The last access time. If a string is provided, it will be coerced to number. * @param mtime The last modified time. If a string is provided, it will be coerced to number. */ - function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; } - - /** - * Change the file system timestamps of the symbolic link referenced by `path`. Returns `undefined`, - * or throws an exception when parameters are incorrect or the operation fails. - * This is the synchronous version of `fs.lutimes()`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - export function lutimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void; - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * Change the file system timestamps of the symbolic link referenced by `path`. + * Returns `undefined`, or throws an exception when parameters are incorrect or + * the operation fails. This is the synchronous version of {@link lutimes}. + * @since v14.5.0, v12.19.0 + */ + export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Asynchronously changes the permissions of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * + * ```js + * import { chmod } from 'fs'; + * + * chmod('my_file.txt', 0o775, (err) => { + * if (err) throw err; + * console.log('The permissions for file "my_file.txt" have been changed!'); + * }); + * ``` + * @since v0.1.30 */ export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace chmod { /** * Asynchronous chmod(2) - Change permissions of a file. @@ -480,22 +754,22 @@ declare module 'fs' { */ function __promisify__(path: PathLike, mode: Mode): Promise; } - /** - * Synchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link chmod}. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * @since v0.6.7 */ export function chmodSync(path: PathLike, mode: Mode): void; - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * Sets the permissions on the file. No arguments other than a possible exception + * are given to the completion callback. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 */ export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace fchmod { /** * Asynchronous fchmod(2) - Change permissions of a file. @@ -504,22 +778,24 @@ declare module 'fs' { */ function __promisify__(fd: number, mode: Mode): Promise; } - /** - * Synchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * Sets the permissions on the file. Returns `undefined`. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 */ export function fchmodSync(fd: number, mode: Mode): void; - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * Changes the permissions on a symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 */ export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + /** @deprecated */ export namespace lchmod { /** * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. @@ -528,106 +804,295 @@ declare module 'fs' { */ function __promisify__(path: PathLike, mode: Mode): Promise; } - /** - * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * Changes the permissions on a symbolic link. Returns `undefined`. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 */ export function lchmodSync(path: PathLike, mode: Mode): void; - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * + * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. + * Instead, user code should open/read/write the file directly and handle the + * error raised if the file is not available. + * + * To check if a file exists without manipulating it afterwards, {@link access} is recommended. + * + * For example, given the following directory structure: + * + * ```text + * - txtDir + * -- file.txt + * - app.js + * ``` + * + * The next program will check for the stats of the given paths: + * + * ```js + * import { stat } from 'fs'; + * + * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + * + * for (let i = 0; i < pathsToCheck.length; i++) { + * stat(pathsToCheck[i], (err, stats) => { + * console.log(stats.isDirectory()); + * console.log(stats); + * }); + * } + * ``` + * + * The resulting output will resemble: + * + * ```console + * true + * Stats { + * dev: 16777220, + * mode: 16877, + * nlink: 3, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214262, + * size: 96, + * blocks: 0, + * atimeMs: 1561174653071.963, + * mtimeMs: 1561174614583.3518, + * ctimeMs: 1561174626623.5366, + * birthtimeMs: 1561174126937.2893, + * atime: 2019-06-22T03:37:33.072Z, + * mtime: 2019-06-22T03:36:54.583Z, + * ctime: 2019-06-22T03:37:06.624Z, + * birthtime: 2019-06-22T03:28:46.937Z + * } + * false + * Stats { + * dev: 16777220, + * mode: 33188, + * nlink: 1, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214074, + * size: 8, + * blocks: 8, + * atimeMs: 1561174616618.8555, + * mtimeMs: 1561174614584, + * ctimeMs: 1561174614583.8145, + * birthtimeMs: 1561174007710.7478, + * atime: 2019-06-22T03:36:56.619Z, + * mtime: 2019-06-22T03:36:54.584Z, + * ctime: 2019-06-22T03:36:54.584Z, + * birthtime: 2019-06-22T03:26:47.711Z + * } + * ``` + * @since v0.0.2 */ export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function stat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function stat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void; + export function stat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace stat { /** * Asynchronous stat(2) - Get file status. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise; - function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise; + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + } + ): Promise; function __promisify__(path: PathLike, options?: StatOptions): Promise; } - + export interface StatSyncFn extends Function { + (path: PathLike, options?: undefined): Stats; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + } + ): Stats | undefined; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + throwIfNoEntry: false; + } + ): BigIntStats | undefined; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + } + ): Stats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + } + ): BigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: boolean; + throwIfNoEntry?: false | undefined; + } + ): Stats | BigIntStats; + (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; + } /** * Synchronous stat(2) - Get file status. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - export function statSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats; - export function statSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats; - export function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats; - + export const statSync: StatSyncFn; /** - * Asynchronous fstat(2) - Get file status. - * @param fd A file descriptor. + * Invokes the callback with the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 */ export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function fstat(fd: number, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function fstat(fd: number, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void; + export function fstat( + fd: number, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function fstat( + fd: number, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace fstat { /** * Asynchronous fstat(2) - Get file status. * @param fd A file descriptor. */ - function __promisify__(fd: number, options?: StatOptions & { bigint?: false }): Promise; - function __promisify__(fd: number, options: StatOptions & { bigint: true }): Promise; + function __promisify__( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + fd: number, + options: StatOptions & { + bigint: true; + } + ): Promise; function __promisify__(fd: number, options?: StatOptions): Promise; } - /** - * Synchronous fstat(2) - Get file status. - * @param fd A file descriptor. + * Retrieves the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 */ - export function fstatSync(fd: number, options?: StatOptions & { bigint?: false }): Stats; - export function fstatSync(fd: number, options: StatOptions & { bigint: true }): BigIntStats; + export function fstatSync( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Stats; + export function fstatSync( + fd: number, + options: StatOptions & { + bigint: true; + } + ): BigIntStats; export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Retrieves the `fs.Stats` for the symbolic link referred to by the path. + * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic + * link, then the link itself is stat-ed, not the file that it refers to. + * + * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. + * @since v0.1.30 */ export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function lstat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function lstat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void; + export function lstat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function lstat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace lstat { /** * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise; - function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise; + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + } + ): Promise; function __promisify__(path: PathLike, options?: StatOptions): Promise; } - /** * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - export function lstatSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats; - export function lstatSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats; - export function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats; - + export const lstatSync: StatSyncFn; /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than + * a possible + * exception are given to the completion callback. + * @since v0.1.31 */ export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace link { /** * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. @@ -636,31 +1101,49 @@ declare module 'fs' { */ function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; } - /** - * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.31 */ export function linkSync(existingPath: PathLike, newPath: PathLike): void; - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + * Creates the link called `path` pointing to `target`. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. + * + * The `type` argument is only available on Windows and ignored on other platforms. + * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is + * not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If + * the `target` does not exist, `'file'` will be used. Windows junction points + * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. + * + * Relative targets are relative to the link’s parent directory. + * + * ```js + * import { symlink } from 'fs'; + * + * symlink('./mew', './mewtwo', callback); + * ``` + * + * The above example creates a symbolic link `mewtwo` which points to `mew` in the + * same directory: + * + * ```bash + * $ tree . + * . + * ├── mew + * └── mewtwo -> ./mew + * ``` + * @since v0.1.31 */ export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void; - /** * Asynchronous symlink(2) - Create a new symbolic link to an existing file. * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. */ export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace symlink { /** * Asynchronous symlink(2) - Create a new symbolic link to an existing file. @@ -670,193 +1153,220 @@ declare module 'fs' { * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; - - type Type = "dir" | "file" | "junction"; + type Type = 'dir' | 'file' | 'junction'; } - /** - * Synchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link symlink}. + * @since v0.1.31 */ export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Reads the contents of the symbolic link referred to by `path`. The callback gets + * two arguments `(err, linkString)`. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path passed to the callback. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 */ - export function readlink( - path: PathLike, - options: BaseEncodingOptions | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void - ): void; - + export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; /** * Asynchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void; - /** * Asynchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readlink(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void; - + export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void; /** * Asynchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace readlink { /** * Asynchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise; - + function __promisify__(path: PathLike, options?: EncodingOption): Promise; /** * Asynchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** * Asynchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(path: PathLike, options?: BaseEncodingOptions | string | null): Promise; + function __promisify__(path: PathLike, options?: EncodingOption): Promise; } - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Returns the symbolic link's string value. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 */ - export function readlinkSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string; - + export function readlinkSync(path: PathLike, options?: EncodingOption): string; /** * Synchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer; - /** * Synchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readlinkSync(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpath( - path: PathLike, - options: BaseEncodingOptions | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void - ): void; - + export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer; + /** + * Asynchronously computes the canonical pathname by resolving `.`, `..` and + * symbolic links. + * + * A canonical pathname is not necessarily unique. Hard links and bind mounts can + * expose a file system entity through many pathnames. + * + * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: + * + * 1. No case conversion is performed on case-insensitive file systems. + * 2. The maximum number of symbolic links is platform-independent and generally + * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. + * + * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd`to resolve relative paths. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * If `path` resolves to a socket or a pipe, the function will return a system + * dependent name for that object. + * @since v0.1.31 + */ + export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; /** * Asynchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; - /** * Asynchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function realpath(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; - + export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; /** * Asynchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace realpath { /** * Asynchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise; - + function __promisify__(path: PathLike, options?: EncodingOption): Promise; /** * Asynchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** * Asynchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(path: PathLike, options?: BaseEncodingOptions | string | null): Promise; - - function native( - path: PathLike, - options: BaseEncodingOptions | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void - ): void; + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). + * + * The `callback` gets two arguments `(err, resolvedPath)`. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v9.2.0 + */ + function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; - function native(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; } - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Returns the resolved pathname. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link realpath}. + * @since v0.1.31 */ - export function realpathSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string; - + export function realpathSync(path: PathLike, options?: EncodingOption): string; /** * Synchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer; - /** * Synchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function realpathSync(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer; - + export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer; export namespace realpathSync { - function native(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string; + function native(path: PathLike, options?: EncodingOption): string; function native(path: PathLike, options: BufferEncodingOption): Buffer; - function native(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer; + function native(path: PathLike, options?: EncodingOption): string | Buffer; } - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Asynchronously removes a file or symbolic link. No arguments other than a + * possible exception are given to the completion callback. + * + * ```js + * import { unlink } from 'fs'; + * // Assuming that 'path/file.txt' is a regular file. + * unlink('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was deleted'); + * }); + * ``` + * + * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a + * directory, use {@link rmdir}. + * + * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. + * @since v0.0.2 */ export function unlink(path: PathLike, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace unlink { /** * Asynchronous unlink(2) - delete a name and possibly the file it refers to. @@ -864,13 +1374,11 @@ declare module 'fs' { */ function __promisify__(path: PathLike): Promise; } - /** - * Synchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. + * @since v0.1.21 */ export function unlinkSync(path: PathLike): void; - export interface RmDirOptions { /** * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or @@ -880,35 +1388,36 @@ declare module 'fs' { * `true`. * @default 0 */ - maxRetries?: number; + maxRetries?: number | undefined; /** - * @deprecated since v14.14.0 In future versions of Node.js, - * `fs.rmdir(path, { recursive: true })` will throw on nonexistent - * paths, or when given a file as a target. + * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning + * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file. * Use `fs.rm(path, { recursive: true, force: true })` instead. * * If `true`, perform a recursive directory removal. In - * recursive mode, errors are not reported if `path` does not exist, and - * operations are retried on failure. + * recursive mode, operations are retried on failure. * @default false */ - recursive?: boolean; + recursive?: boolean | undefined; /** * The amount of time in milliseconds to wait between retries. * This option is ignored if the `recursive` option is not `true`. * @default 100 */ - retryDelay?: number; + retryDelay?: number | undefined; } - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given + * to the completion callback. + * + * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on + * Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. + * @since v0.0.2 */ export function rmdir(path: PathLike, callback: NoParamCallback): void; export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace rmdir { /** * Asynchronous rmdir(2) - delete a directory. @@ -916,19 +1425,22 @@ declare module 'fs' { */ function __promisify__(path: PathLike, options?: RmDirOptions): Promise; } - /** - * Synchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. + * + * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error + * on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. + * @since v0.1.21 */ export function rmdirSync(path: PathLike, options?: RmDirOptions): void; - export interface RmOptions { /** * When `true`, exceptions will be ignored if `path` does not exist. * @default false */ - force?: boolean; + force?: boolean | undefined; /** * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or * `EPERM` error is encountered, Node.js will retry the operation with a linear @@ -937,71 +1449,110 @@ declare module 'fs' { * `true`. * @default 0 */ - maxRetries?: number; + maxRetries?: number | undefined; /** * If `true`, perform a recursive directory removal. In - * recursive mode, errors are not reported if `path` does not exist, and - * operations are retried on failure. + * recursive mode, operations are retried on failure. * @default false */ - recursive?: boolean; + recursive?: boolean | undefined; /** * The amount of time in milliseconds to wait between retries. * This option is ignored if the `recursive` option is not `true`. * @default 100 */ - retryDelay?: number; + retryDelay?: number | undefined; } - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). + * Asynchronously removes files and directories (modeled on the standard POSIX `rm`utility). No arguments other than a possible exception are given to the + * completion callback. + * @since v14.14.0 */ export function rm(path: PathLike, callback: NoParamCallback): void; export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace rm { /** * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). */ function __promisify__(path: PathLike, options?: RmOptions): Promise; } - /** - * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). + * Synchronously removes files and directories (modeled on the standard POSIX `rm`utility). Returns `undefined`. + * @since v14.14.0 */ export function rmSync(path: PathLike, options?: RmOptions): void; - export interface MakeDirectoryOptions { /** * Indicates whether parent folders should be created. * If a folder was created, the path to the first created folder will be returned. * @default false */ - recursive?: boolean; + recursive?: boolean | undefined; /** * A file mode. If a string is passed, it is parsed as an octal integer. If not specified * @default 0o777 */ - mode?: Mode; + mode?: Mode | undefined; } - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true }, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void; - + * Asynchronously creates a directory. + * + * The callback is given a possible exception and, if `recursive` is `true`, the + * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was + * created. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fs.mkdir()` when `path` is a directory that + * exists results in an error only + * when `recursive` is false. + * + * ```js + * import { mkdir } from 'fs'; + * + * // Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist. + * mkdir('/tmp/a/apple', { recursive: true }, (err) => { + * if (err) throw err; + * }); + * ``` + * + * On Windows, using `fs.mkdir()` on the root directory even with recursion will + * result in an error: + * + * ```js + * import { mkdir } from 'fs'; + * + * mkdir('/', { recursive: true }, (err) => { + * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] + * }); + * ``` + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.8 + */ + export function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void + ): void; /** * Asynchronous mkdir(2) - create a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. */ - export function mkdir(path: PathLike, options: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null | undefined, callback: NoParamCallback): void; - + export function mkdir( + path: PathLike, + options: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + | undefined, + callback: NoParamCallback + ): void; /** * Asynchronous mkdir(2) - create a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -1009,14 +1560,11 @@ declare module 'fs' { * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. */ export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void; - /** * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ export function mkdir(path: PathLike, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace mkdir { /** * Asynchronous mkdir(2) - create a directory. @@ -1024,16 +1572,27 @@ declare module 'fs' { * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. */ - function __promisify__(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise; - + function __promisify__( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): Promise; /** * Asynchronous mkdir(2) - create a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. */ - function __promisify__(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise; - + function __promisify__( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): Promise; /** * Asynchronous mkdir(2) - create a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -1042,23 +1601,34 @@ declare module 'fs' { */ function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; } - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + * Synchronously creates a directory. Returns `undefined`, or if `recursive` is`true`, the first directory path created. + * This is the synchronous version of {@link mkdir}. + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.21 */ - export function mkdirSync(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): string | undefined; - + export function mkdirSync( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): string | undefined; /** * Synchronous mkdir(2) - create a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. */ - export function mkdirSync(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): void; - + export function mkdirSync( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): void; /** * Synchronous mkdir(2) - create a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -1066,97 +1636,172 @@ declare module 'fs' { * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. */ export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtemp(prefix: string, options: BaseEncodingOptions | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; - + * Creates a unique temporary directory. + * + * Generates six random characters to be appended behind a required`prefix` to create a unique temporary directory. Due to platform + * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, + * notably the BSDs, can return more than six random characters, and replace + * trailing `X` characters in `prefix` with random characters. + * + * The created directory path is passed as a string to the callback's second + * parameter. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'fs'; + * + * mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 + * }); + * ``` + * + * The `fs.mkdtemp()` method will append the six randomly selected characters + * directly to the `prefix` string. For instance, given a directory `/tmp`, if the + * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator + * (`require('path').sep`). + * + * ```js + * import { tmpdir } from 'os'; + * import { mkdtemp } from 'fs'; + * + * // The parent directory for the new temporary directory + * const tmpDir = tmpdir(); + * + * // This method is *INCORRECT*: + * mkdtemp(tmpDir, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmpabc123`. + * // A new temporary directory is created at the file system root + * // rather than *within* the /tmp directory. + * }); + * + * // This method is *CORRECT*: + * import { sep } from 'path'; + * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmp/abc123`. + * // A new temporary directory is created within + * // the /tmp directory. + * }); + * ``` + * @since v5.10.0 + */ + export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; /** * Asynchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void; - + export function mkdtemp( + prefix: string, + options: + | 'buffer' + | { + encoding: 'buffer'; + }, + callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void + ): void; /** * Asynchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function mkdtemp(prefix: string, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void; - + export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void; /** * Asynchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. */ export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace mkdtemp { /** * Asynchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise; - + function __promisify__(prefix: string, options?: EncodingOption): Promise; /** * Asynchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ function __promisify__(prefix: string, options: BufferEncodingOption): Promise; - /** * Asynchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(prefix: string, options?: BaseEncodingOptions | string | null): Promise; + function __promisify__(prefix: string, options?: EncodingOption): Promise; } - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Returns the created directory path. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link mkdtemp}. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v5.10.0 */ - export function mkdtempSync(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): string; - + export function mkdtempSync(prefix: string, options?: EncodingOption): string; /** * Synchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer; - /** * Synchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function mkdtempSync(prefix: string, options?: BaseEncodingOptions | string | null): string | Buffer; - + export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer; /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Reads the contents of a directory. The callback gets two arguments `(err, files)`where `files` is an array of the names of the files in the directory excluding`'.'` and `'..'`. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. + * @since v0.1.8 */ export function readdir( path: PathLike, - options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + options: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void ): void; - /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void; - + export function readdir( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer', + callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void + ): void; /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -1164,89 +1809,161 @@ declare module 'fs' { */ export function readdir( path: PathLike, - options: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void, + options: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void ): void; - /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void; - /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. */ - export function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void + ): void; export namespace readdir { /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; - + function __promisify__( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | null + ): Promise; /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise; - + function __promisify__( + path: PathLike, + options: + | 'buffer' + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + ): Promise; /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function __promisify__(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise; - + function __promisify__( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options If called with `withFileTypes: true` the result data will be an array of Dirent */ - function __promisify__(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise; + function __promisify__( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Promise; } - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[]; - + * Reads the contents of the directory. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames returned. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. + * @since v0.1.21 + */ + export function readdirSync( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | null + ): string[]; /** * Synchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[]; - + export function readdirSync( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer' + ): Buffer[]; /** * Synchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - export function readdirSync(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): string[] | Buffer[]; - + export function readdirSync( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): string[] | Buffer[]; /** * Synchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. */ - export function readdirSync(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Dirent[]; - - /** - * Asynchronous close(2) - close a file descriptor. - * @param fd A file descriptor. - */ - export function close(fd: number, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function readdirSync( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Dirent[]; + /** + * Closes the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.0.2 + */ + export function close(fd: number, callback?: NoParamCallback): void; export namespace close { /** * Asynchronous close(2) - close a file descriptor. @@ -1254,27 +1971,46 @@ declare module 'fs' { */ function __promisify__(fd: number): Promise; } - /** - * Synchronous close(2) - close a file descriptor. - * @param fd A file descriptor. + * Closes the file descriptor. Returns `undefined`. + * + * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.1.21 */ export function closeSync(fd: number): void; - /** - * Asynchronous open(2) - open and possibly create a file. + * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. + * + * `mode` sets the file mode (permission and sticky bits), but only if the file was + * created. On Windows, only the write permission can be manipulated; see {@link chmod}. + * + * The callback gets two arguments `(err, fd)`. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * + * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. + * @since v0.0.2 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] + */ + export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + * @param [flags='r'] See `support of file system `flags``. */ - export function open(path: PathLike, flags: OpenMode, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; - + export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; /** * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - export function open(path: PathLike, flags: OpenMode, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace open { /** * Asynchronous open(2) - open and possibly create a file. @@ -1283,23 +2019,26 @@ declare module 'fs' { */ function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; } - /** - * Synchronous open(2) - open and possibly create a file, returning a file descriptor.. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + * Returns an integer representing the file descriptor. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link open}. + * @since v0.1.21 + * @param [flags='r'] + * @param [mode=0o666] */ export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time in seconds,`Date`s, or a numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown. + * @since v0.4.2 */ - export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; export namespace utimes { /** * Asynchronously change file timestamps of the file referenced by the supplied path. @@ -1307,26 +2046,22 @@ declare module 'fs' { * @param atime The last access time. If a string is provided, it will be coerced to number. * @param mtime The last modified time. If a string is provided, it will be coerced to number. */ - function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; } - /** - * Synchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link utimes}. + * @since v0.4.2 */ - export function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void; - + export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; /** - * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. + * Change the file system timestamps of the object referenced by the supplied file + * descriptor. See {@link utimes}. + * @since v0.4.2 */ - export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; export namespace futimes { /** * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. @@ -1334,24 +2069,21 @@ declare module 'fs' { * @param atime The last access time. If a string is provided, it will be coerced to number. * @param mtime The last modified time. If a string is provided, it will be coerced to number. */ - function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise; + function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; } - /** - * Synchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. + * Synchronous version of {@link futimes}. Returns `undefined`. + * @since v0.4.2 */ - export function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void; - + export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other + * than a possible exception are given to the completion callback. + * @since v0.1.96 */ export function fsync(fd: number, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace fsync { /** * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. @@ -1359,19 +2091,36 @@ declare module 'fs' { */ function __promisify__(fd: number): Promise; } - /** - * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.96 */ export function fsyncSync(fd: number): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * Write `buffer` to the file specified by `fd`. + * + * `offset` determines the part of the buffer to be written, and `length` is + * an integer specifying the number of bytes to write. + * + * `position` refers to the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). + * + * The callback will be given three arguments `(err, bytesWritten, buffer)` where`bytesWritten` specifies how many _bytes_ were written from `buffer`. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesWritten` and `buffer` properties. + * + * It is unsafe to use `fs.write()` multiple times on the same file without waiting + * for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v0.0.2 */ export function write( fd: number, @@ -1379,9 +2128,8 @@ declare module 'fs' { offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void ): void; - /** * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. * @param fd A file descriptor. @@ -1393,9 +2141,8 @@ declare module 'fs' { buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void ): void; - /** * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. * @param fd A file descriptor. @@ -1407,13 +2154,11 @@ declare module 'fs' { offset: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void ): void; - /** * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. * @param fd A file descriptor. */ export function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void; - /** * Asynchronously writes `string` to the file referenced by the supplied file descriptor. * @param fd A file descriptor. @@ -1426,9 +2171,8 @@ declare module 'fs' { string: string, position: number | undefined | null, encoding: BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void ): void; - /** * Asynchronously writes `string` to the file referenced by the supplied file descriptor. * @param fd A file descriptor. @@ -1436,15 +2180,12 @@ declare module 'fs' { * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. */ export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; - /** * Asynchronously writes `string` to the file referenced by the supplied file descriptor. * @param fd A file descriptor. * @param string A string to write. */ export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace write { /** * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. @@ -1458,9 +2199,11 @@ declare module 'fs' { buffer?: TBuffer, offset?: number, length?: number, - position?: number | null, - ): Promise<{ bytesWritten: number, buffer: TBuffer }>; - + position?: number | null + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; /** * Asynchronously writes `string` to the file referenced by the supplied file descriptor. * @param fd A file descriptor. @@ -1468,18 +2211,23 @@ declare module 'fs' { * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. * @param encoding The expected string encoding. */ - function __promisify__(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>; + function __promisify__( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; } - /** - * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link write}. + * @since v0.1.21 + * @return The number of bytes written. */ export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number; - /** * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. * @param fd A file descriptor. @@ -1488,25 +2236,64 @@ declare module 'fs' { * @param encoding The expected string encoding. */ export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number; - + export type ReadPosition = number | bigint; + export interface ReadSyncOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `length of buffer` + */ + length?: number | undefined; + /** + * @default null + */ + position?: ReadPosition | null | undefined; + } + export interface ReadAsyncOptions extends ReadSyncOptions { + buffer?: TBuffer; + } /** - * Asynchronously reads data from the file referenced by the supplied file descriptor. - * @param fd A file descriptor. + * Read data from the file specified by `fd`. + * + * The callback is given the three arguments, `(err, bytesRead, buffer)`. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffer` properties. + * @since v0.0.2 * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. + * @param offset The position in `buffer` to write the data to. * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If + * `position` is an integer, the file position will be unchanged. */ export function read( fd: number, buffer: TBuffer, offset: number, length: number, - position: number | null, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + position: ReadPosition | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void ): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + /** + * Similar to the above `fs.read` function, this version takes an optional `options` object. + * If not otherwise specified in an `options` object, + * `buffer` defaults to `Buffer.alloc(16384)`, + * `offset` defaults to `0`, + * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 + * `position` defaults to `null` + * @since v12.17.0, 13.11.0 + */ + export function read( + fd: number, + options: ReadAsyncOptions, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void + ): void; + export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void; export namespace read { /** * @param fd A file descriptor. @@ -1521,81 +2308,153 @@ declare module 'fs' { offset: number, length: number, position: number | null - ): Promise<{ bytesRead: number, buffer: TBuffer }>; - } - - export interface ReadSyncOptions { - /** - * @default 0 - */ - offset?: number; - /** - * @default `length of buffer` - */ - length?: number; - /** - * @default null - */ - position?: number | null; + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__( + fd: number, + options: ReadAsyncOptions + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__(fd: number): Promise<{ + bytesRead: number; + buffer: NodeJS.ArrayBufferView; + }>; } - /** - * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read. - * @param fd A file descriptor. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + * Returns the number of `bytesRead`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link read}. + * @since v0.1.21 */ - export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: number | null): number; - + export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number; /** * Similar to the above `fs.readSync` function, this version takes an optional `options` object. * If no `options` object is specified, it will default with the above values. */ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number; - /** * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. + * + * ```js + * import { readFile } from 'fs'; + * + * readFile('/etc/passwd', (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * + * The callback is passed two arguments `(err, data)`, where `data` is the + * contents of the file. + * + * If no encoding is specified, then the raw buffer is returned. + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { readFile } from 'fs'; + * + * readFile('/etc/passwd', 'utf8', callback); + * ``` + * + * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an + * error will be returned. On FreeBSD, a representation of the directory's contents + * will be returned. + * + * ```js + * import { readFile } from 'fs'; + * + * // macOS, Linux, and Windows + * readFile('', (err, data) => { + * // => [Error: EISDIR: illegal operation on a directory, read ] + * }); + * + * // FreeBSD + * readFile('', (err, data) => { + * // => null, + * }); + * ``` + * + * It is possible to abort an ongoing request using an `AbortSignal`. If a + * request is aborted the callback is called with an `AbortError`: + * + * ```js + * import { readFile } from 'fs'; + * + * const controller = new AbortController(); + * const signal = controller.signal; + * readFile(fileInfo[0].name, { signal }, (err, buf) => { + * // ... + * }); + * // When you want to abort the request + * controller.abort(); + * ``` + * + * The `fs.readFile()` function buffers the entire file. To minimize memory costs, + * when possible prefer streaming via `fs.createReadStream()`. + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * @since v0.1.29 + * @param path filename or file descriptor */ - export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; - + export function readFile( + path: PathOrFileDescriptor, + options: + | ({ + encoding?: null | undefined; + flag?: string | undefined; + } & Abortable) + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void + ): void; /** * Asynchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. * If a file descriptor is provided, the underlying file will _not_ be closed automatically. * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - export function readFile(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void; - + export function readFile( + path: PathOrFileDescriptor, + options: + | ({ + encoding: BufferEncoding; + flag?: string | undefined; + } & Abortable) + | BufferEncoding, + callback: (err: NodeJS.ErrnoException | null, data: string) => void + ): void; /** * Asynchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. * If a file descriptor is provided, the underlying file will _not_ be closed automatically. * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. * If a flag is not provided, it defaults to `'r'`. */ export function readFile( - path: PathLike | number, - options: BaseEncodingOptions & { flag?: string; } | string | undefined | null, - callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void, + path: PathOrFileDescriptor, + options: + | (ObjectEncodingOptions & { + flag?: string | undefined; + } & Abortable) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void ): void; - /** * Asynchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * If a file descriptor is provided, the underlying file will _not_ be closed automatically. */ - export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function readFile(path: PathOrFileDescriptor, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; export namespace readFile { /** * Asynchronously reads the entire contents of a file. @@ -1604,8 +2463,13 @@ declare module 'fs' { * @param options An object that may contain an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise; - + function __promisify__( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null + ): Promise; /** * Asynchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -1614,8 +2478,15 @@ declare module 'fs' { * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - function __promisify__(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | string): Promise; - + function __promisify__( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding + ): Promise; /** * Asynchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -1624,64 +2495,156 @@ declare module 'fs' { * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - function __promisify__(path: PathLike | number, options?: BaseEncodingOptions & { flag?: string; } | string | null): Promise; + function __promisify__( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null + ): Promise; } - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`. - */ - export function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer; - + * Returns the contents of the `path`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readFile}. + * + * If the `encoding` option is specified then this function returns a + * string. Otherwise it returns a buffer. + * + * Similar to {@link readFile}, when the path is a directory, the behavior of`fs.readFileSync()` is platform-specific. + * + * ```js + * import { readFileSync } from 'fs'; + * + * // macOS, Linux, and Windows + * readFileSync(''); + * // => [Error: EISDIR: illegal operation on a directory, read ] + * + * // FreeBSD + * readFileSync(''); // => + * ``` + * @since v0.1.8 + * @param path filename or file descriptor + */ + export function readFileSync( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null + ): Buffer; /** * Synchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. * If a file descriptor is provided, the underlying file will _not_ be closed automatically. * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - export function readFileSync(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | BufferEncoding): string; - + export function readFileSync( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding + ): string; /** * Synchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. * If a file descriptor is provided, the underlying file will _not_ be closed automatically. * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - export function readFileSync(path: PathLike | number, options?: BaseEncodingOptions & { flag?: string; } | BufferEncoding | null): string | Buffer; - - export type WriteFileOptions = BaseEncodingOptions & { mode?: Mode; flag?: string; } | string | null; - + export function readFileSync( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null + ): string | Buffer; + export type WriteFileOptions = + | (ObjectEncodingOptions & + Abortable & { + mode?: Mode | undefined; + flag?: string | undefined; + }) + | BufferEncoding + | null; + /** + * When `file` is a filename, asynchronously writes data to the file, replacing the + * file if it already exists. `data` can be a string or a buffer. + * + * When `file` is a file descriptor, the behavior is similar to calling`fs.write()` directly (which is recommended). See the notes below on using + * a file descriptor. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { writeFile } from 'fs'; + * import { Buffer } from 'buffer'; + * + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, (err) => { + * if (err) throw err; + * console.log('The file has been saved!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { writeFile } from 'fs'; + * + * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); + * ``` + * + * It is unsafe to use `fs.writeFile()` multiple times on the same file without + * waiting for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that + * performs multiple `write` calls internally to write the buffer passed to it. + * For performance sensitive code consider using {@link createWriteStream}. + * + * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'fs'; + * import { Buffer } from 'buffer'; + * + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, { signal }, (err) => { + * // When a request is aborted - the callback is called with an AbortError + * }); + * // When the request should be aborted + * controller.abort(); + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v0.1.29 + * @param file filename or file descriptor + */ + export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void; /** * Asynchronously writes data to a file, replacing the file if it already exists. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. * If a file descriptor is provided, the underlying file will _not_ be closed automatically. * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. */ - export function writeFile(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void; - - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - export function writeFile(path: PathLike | number, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void; export namespace writeFile { /** * Asynchronously writes data to a file, replacing the file if it already exists. @@ -1695,47 +2658,80 @@ declare module 'fs' { * If `mode` is a string, it is parsed as an octal integer. * If `flag` is not supplied, the default of `'w'` is used. */ - function __promisify__(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise; + function __promisify__(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise; } - - /** - * Synchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - export function writeFileSync(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void; - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - export function appendFile(file: PathLike | number, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void; - + * Returns `undefined`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writeFile}. + * @since v0.1.29 + * @param file filename or file descriptor + */ + export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFile } from 'fs'; + * + * appendFile('message.txt', 'data to append', (err) => { + * if (err) throw err; + * console.log('The "data to append" was appended to file!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFile } from 'fs'; + * + * appendFile('message.txt', 'data to append', 'utf8', callback); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { open, close, appendFile } from 'fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('message.txt', 'a', (err, fd) => { + * if (err) throw err; + * + * try { + * appendFile(fd, 'data to append', 'utf8', (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * throw err; + * } + * }); + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void; /** * Asynchronously append data to a file, creating the file if it does not exist. * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. * If a file descriptor is provided, the underlying file will _not_ be closed automatically. * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. */ - export function appendFile(file: PathLike | number, data: string | Uint8Array, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; export namespace appendFile { /** * Asynchronously append data to a file, creating the file if it does not exist. @@ -1749,103 +2745,379 @@ declare module 'fs' { * If `mode` is a string, it is parsed as an octal integer. * If `flag` is not supplied, the default of `'a'` is used. */ - function __promisify__(file: PathLike | number, data: string | Uint8Array, options?: WriteFileOptions): Promise; + function __promisify__(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): Promise; } - /** - * Synchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - export function appendFileSync(file: PathLike | number, data: string | Uint8Array, options?: WriteFileOptions): void; - + * Synchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFileSync } from 'fs'; + * + * try { + * appendFileSync('message.txt', 'data to append'); + * console.log('The "data to append" was appended to file!'); + * } catch (err) { + * // Handle the error + * } + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFileSync } from 'fs'; + * + * appendFileSync('message.txt', 'data to append', 'utf8'); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { openSync, closeSync, appendFileSync } from 'fs'; + * + * let fd; + * + * try { + * fd = openSync('message.txt', 'a'); + * appendFileSync(fd, 'data to append', 'utf8'); + * } catch (err) { + * // Handle the error + * } finally { + * if (fd !== undefined) + * closeSync(fd); + * } + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void; + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + export interface WatchFileOptions { + bigint?: boolean | undefined; + persistent?: boolean | undefined; + interval?: number | undefined; + } /** - * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. - */ - export function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void; - + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + export function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint?: false | undefined; + }) + | undefined, + listener: (curr: Stats, prev: Stats) => void + ): StatWatcher; + export function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint: true; + }) + | undefined, + listener: (curr: BigIntStats, prev: BigIntStats) => void + ): StatWatcher; /** * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. */ - export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void; - + export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): StatWatcher; /** - * Stop watching for changes on `filename`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + * Stop watching for changes on `filename`. If `listener` is specified, only that + * particular listener is removed. Otherwise, _all_ listeners are removed, + * effectively stopping watching of `filename`. + * + * Calling `fs.unwatchFile()` with a filename that is not being watched is a + * no-op, not an error. + * + * Using {@link watch} is more efficient than `fs.watchFile()` and`fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()`and `fs.unwatchFile()` when possible. + * @since v0.1.31 + * @param listener Optional, a listener previously attached using `fs.watchFile()` */ export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void; - - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. + export interface WatchOptions extends Abortable { + encoding?: BufferEncoding | 'buffer' | undefined; + persistent?: boolean | undefined; + recursive?: boolean | undefined; + } + export type WatchEventType = 'rename' | 'change'; + export type WatchListener = (event: WatchEventType, filename: T) => void; + /** + * Watch for changes on `filename`, where `filename` is either a file or a + * directory. + * + * The second argument is optional. If `options` is provided as a string, it + * specifies the `encoding`. Otherwise `options` should be passed as an object. + * + * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file + * which triggered the event. + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of`eventType`. + * + * If a `signal` is passed, aborting the corresponding AbortController will close + * the returned `fs.FSWatcher`. + * @since v0.5.10 + * @param listener */ export function watch( filename: PathLike, - options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null, - listener?: (event: "rename" | "change", filename: string) => void, + options: + | (WatchOptions & { + encoding: 'buffer'; + }) + | 'buffer', + listener?: WatchListener ): FSWatcher; - /** * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. * If `encoding` is not supplied, the default of `'utf8'` is used. * If `persistent` is not supplied, the default of `true` is used. * If `recursive` is not supplied, the default of `false` is used. */ - export function watch( - filename: PathLike, - options: { encoding: "buffer", persistent?: boolean, recursive?: boolean; } | "buffer", - listener?: (event: "rename" | "change", filename: Buffer) => void - ): FSWatcher; - + export function watch(filename: PathLike, options?: WatchOptions | BufferEncoding | null, listener?: WatchListener): FSWatcher; /** * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. * If `encoding` is not supplied, the default of `'utf8'` is used. * If `persistent` is not supplied, the default of `true` is used. * If `recursive` is not supplied, the default of `false` is used. */ - export function watch( - filename: PathLike, - options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | string | null, - listener?: (event: "rename" | "change", filename: string | Buffer) => void, - ): FSWatcher; - + export function watch(filename: PathLike, options: WatchOptions | string, listener?: WatchListener): FSWatcher; /** * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. */ - export function watch(filename: PathLike, listener?: (event: "rename" | "change", filename: string) => any): FSWatcher; - - /** - * Asynchronously tests whether or not the given path exists by checking with the file system. - * @deprecated since v1.0.0 Use `fs.stat()` or `fs.access()` instead - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + export function watch(filename: PathLike, listener?: WatchListener): FSWatcher; + /** + * Test whether or not the given path exists by checking with the file system. + * Then call the `callback` argument with either true or false: + * + * ```js + * import { exists } from 'fs'; + * + * exists('/etc/passwd', (e) => { + * console.log(e ? 'it exists' : 'no passwd!'); + * }); + * ``` + * + * **The parameters for this callback are not consistent with other Node.js** + * **callbacks.** Normally, the first parameter to a Node.js callback is an `err`parameter, optionally followed by other parameters. The `fs.exists()` callback + * has only one boolean parameter. This is one reason `fs.access()` is recommended + * instead of `fs.exists()`. + * + * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file does not exist. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { exists, open, close } from 'fs'; + * + * exists('myfile', (e) => { + * if (e) { + * console.error('myfile already exists'); + * } else { + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { open, close, exists } from 'fs'; + * + * exists('myfile', (e) => { + * if (e) { + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } else { + * console.error('myfile does not exist'); + * } + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for existence and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the existence of a file only if the file won’t be + * used directly, for example when its existence is a signal from another + * process. + * @since v0.0.2 + * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. */ export function exists(path: PathLike, callback: (exists: boolean) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + /** @deprecated */ export namespace exists { /** * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. @@ -1853,79 +3125,70 @@ declare module 'fs' { */ function __promisify__(path: PathLike): Promise; } - /** - * Synchronously tests whether or not the given path exists by checking with the file system. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + * Returns `true` if the path exists, `false` otherwise. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link exists}. + * + * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback`parameter to `fs.exists()` accepts parameters that are inconsistent with other + * Node.js callbacks. `fs.existsSync()` does not use a callback. + * + * ```js + * import { existsSync } from 'fs'; + * + * if (existsSync('/etc/passwd')) + * console.log('The path exists.'); + * ``` + * @since v0.1.21 */ export function existsSync(path: PathLike): boolean; - export namespace constants { // File Access Constants - /** Constant for fs.access(). File is visible to the calling process. */ const F_OK: number; - /** Constant for fs.access(). File can be read by the calling process. */ const R_OK: number; - /** Constant for fs.access(). File can be written by the calling process. */ const W_OK: number; - /** Constant for fs.access(). File can be executed by the calling process. */ const X_OK: number; - // File Copy Constants - /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ const COPYFILE_EXCL: number; - /** * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. */ const COPYFILE_FICLONE: number; - /** * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. * If the underlying platform does not support copy-on-write, then the operation will fail with an error. */ const COPYFILE_FICLONE_FORCE: number; - // File Open Constants - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ const O_RDONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ const O_WRONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ const O_RDWR: number; - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ const O_CREAT: number; - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ const O_EXCL: number; - /** * Constant for fs.open(). Flag indicating that if path identifies a terminal device, * opening the path shall not cause that terminal to become the controlling terminal for the process * (if the process does not already have one). */ const O_NOCTTY: number; - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ const O_TRUNC: number; - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ const O_APPEND: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ const O_DIRECTORY: number; - /** * constant for fs.open(). * Flag indicating reading accesses to the file system will no longer result in @@ -1933,89 +3196,60 @@ declare module 'fs' { * This flag is available on Linux operating systems only. */ const O_NOATIME: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ const O_NOFOLLOW: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ const O_SYNC: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ const O_DSYNC: number; - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ const O_SYMLINK: number; - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ const O_DIRECT: number; - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ const O_NONBLOCK: number; - // File Type Constants - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ const S_IFMT: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ const S_IFREG: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ const S_IFDIR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ const S_IFCHR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ const S_IFBLK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ const S_IFIFO: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ const S_IFLNK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ const S_IFSOCK: number; - // File Mode Constants - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ const S_IRWXU: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ const S_IRUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ const S_IWUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ const S_IXUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ const S_IRWXG: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ const S_IRGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ const S_IWGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ const S_IXGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ const S_IRWXO: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ const S_IROTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ const S_IWOTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ const S_IXOTH: number; - /** * When set, a memory file mapping is used to access the file. This flag * is available on Windows operating systems only. On other operating systems, @@ -2023,22 +3257,172 @@ declare module 'fs' { */ const UV_FS_O_FILEMAP: number; } - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * The final argument, `callback`, is a callback function that is invoked with + * a possible error argument. If any of the accessibility checks fail, the error + * argument will be an `Error` object. The following examples check if`package.json` exists, and if it is readable or writable. + * + * ```js + * import { access, constants } from 'fs'; + * + * const file = 'package.json'; + * + * // Check if the file exists in the current directory. + * access(file, constants.F_OK, (err) => { + * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); + * }); + * + * // Check if the file is readable. + * access(file, constants.R_OK, (err) => { + * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); + * }); + * + * // Check if the file is writable. + * access(file, constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); + * }); + * + * // Check if the file is readable and writable. + * access(file, constants.R_OK | constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); + * }); + * ``` + * + * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file is not accessible. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'fs'; + * + * access('myfile', (err) => { + * if (!err) { + * console.error('myfile already exists'); + * return; + * } + * + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'fs'; + * access('myfile', (err) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for accessibility and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the accessibility of a file only if the file will not be + * used directly, for example when its accessibility is a signal from another + * process. + * + * On Windows, access-control policies (ACLs) on a directory may limit access to + * a file or directory. The `fs.access()` function, however, does not check the + * ACL and therefore may report that a path is accessible even if the ACL restricts + * the user from reading or writing to it. + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] */ export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; - /** * Asynchronously tests a user's permissions for the file specified by path. * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. */ export function access(path: PathLike, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace access { /** * Asynchronously tests a user's permissions for the file specified by path. @@ -2047,57 +3431,147 @@ declare module 'fs' { */ function __promisify__(path: PathLike, mode?: number): Promise; } - /** - * Synchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + * Synchronously tests a user's permissions for the file or directory specified + * by `path`. The `mode` argument is an optional integer that specifies the + * accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and + * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, + * the method will return `undefined`. + * + * ```js + * import { accessSync, constants } from 'fs'; + * + * try { + * accessSync('etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can read/write'); + * } catch (err) { + * console.error('no access!'); + * } + * ``` + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] */ export function accessSync(path: PathLike, mode?: number): void; - - /** - * Returns a new `ReadStream` object. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - export function createReadStream(path: PathLike, options?: string | { - flags?: string; - encoding?: BufferEncoding; - fd?: number; - mode?: number; - autoClose?: boolean; + interface StreamOptions { + flags?: string | undefined; + encoding?: BufferEncoding | undefined; + fd?: number | promises.FileHandle | undefined; + mode?: number | undefined; + autoClose?: boolean | undefined; /** * @default false */ - emitClose?: boolean; - start?: number; - end?: number; - highWaterMark?: number; - }): ReadStream; - - /** - * Returns a new `WriteStream` object. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - export function createWriteStream(path: PathLike, options?: string | { - flags?: string; - encoding?: BufferEncoding; - fd?: number; - mode?: number; - autoClose?: boolean; - emitClose?: boolean; - start?: number; - highWaterMark?: number; - }): WriteStream; - + emitClose?: boolean | undefined; + start?: number | undefined; + highWaterMark?: number | undefined; + } + interface ReadStreamOptions extends StreamOptions { + end?: number | undefined; + } /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. + * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 kb. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is + * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the + * current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use + * the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. + * + * If `fd` points to a character device that only supports blocking reads + * (such as keyboard or sound card), read operations do not finish until data is + * available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option, it is possible to override the corresponding `fs`implementations for `open`, `read`, and `close`. When providing the `fs` option, + * an override for `read` is required. If no `fd` is provided, an override for`open` is also required. If `autoClose` is `true`, an override for `close` is + * also required. + * + * ```js + * import { createReadStream } from 'fs'; + * + * // Create a stream from some character device. + * const stream = createReadStream('/dev/input/event0'); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * `mode` sets the file mode (permission and sticky bits), but only if the + * file was created. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { createReadStream } from 'fs'; + * + * createReadStream('sample.txt', { start: 90, end: 99 }); + * ``` + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` option to be set to `r+` rather than the + * default `w`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev` and `close`. Overriding `write()`without `writev()` can reduce + * performance as some optimizations (`_writev()`) + * will be disabled. When providing the `fs` option, overrides for at least one of`write` and `writev` are required. If no `fd` option is supplied, an override + * for `open` is also required. If `autoClose` is `true`, an override for `close`is also required. + * + * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s + * should be passed to `net.Socket`. + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other + * than a possible + * exception are given to the completion callback. + * @since v0.1.96 */ export function fdatasync(fd: number, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace fdatasync { /** * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. @@ -2105,158 +3579,294 @@ declare module 'fs' { */ function __promisify__(fd: number): Promise; } - /** - * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. + * @since v0.1.96 */ export function fdatasyncSync(fd: number): void; - /** - * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. - * No arguments other than a possible exception are given to the callback function. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. No arguments other than a possible exception are given to the + * callback function. Node.js makes no guarantees about the atomicity of the copy + * operation. If an error occurs after the destination file has been opened for + * writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFile, constants } from 'fs'; + * + * function callback(err) { + * if (err) throw err; + * console.log('source.txt was copied to destination.txt'); + * } + * + * // destination.txt will be created or overwritten by default. + * copyFile('source.txt', 'destination.txt', callback); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. */ export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; - /** - * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. - * No arguments other than a possible exception are given to the callback function. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. - */ - export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: NoParamCallback): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; export namespace copyFile { - /** - * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. - * No arguments other than a possible exception are given to the callback function. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An optional integer that specifies the behavior of the copy operation. - * The only supported flag is fs.constants.COPYFILE_EXCL, - * which causes the copy operation to fail if dest already exists. - */ - function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise; + function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; } - - /** - * Synchronously copies src to dest. By default, dest is overwritten if it already exists. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An optional integer that specifies the behavior of the copy operation. - * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. - */ - export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void; - /** - * Write an array of ArrayBufferViews to the file specified by fd using writev(). - * position is the offset from the beginning of the file where this data should be written. - * It is unsafe to use fs.writev() multiple times on the same file without waiting for the callback. For this scenario, use fs.createWriteStream(). + * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. Returns `undefined`. Node.js makes no guarantees about the + * atomicity of the copy operation. If an error occurs after the destination file + * has been opened for writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFileSync, constants } from 'fs'; + * + * // destination.txt will be created or overwritten by default. + * copyFileSync('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; + /** + * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`. + * + * `position` is the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. + * + * The callback will be given three arguments: `err`, `bytesWritten`, and`buffers`. `bytesWritten` is how many bytes were written from `buffers`. + * + * If this method is `util.promisify()` ed, it returns a promise for an`Object` with `bytesWritten` and `buffers` properties. + * + * It is unsafe to use `fs.writev()` multiple times on the same file without + * waiting for the callback. For this scenario, use {@link createWriteStream}. + * * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to the end of the file. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 */ - export function writev( - fd: number, - buffers: ReadonlyArray, - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void - ): void; + export function writev(fd: number, buffers: ReadonlyArray, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void; export function writev( fd: number, buffers: ReadonlyArray, position: number, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void ): void; - export interface WriteVResult { bytesWritten: number; buffers: NodeJS.ArrayBufferView[]; } - export namespace writev { function __promisify__(fd: number, buffers: ReadonlyArray, position?: number): Promise; } - /** - * See `writev`. + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writev}. + * @since v12.9.0 + * @return The number of bytes written. */ export function writevSync(fd: number, buffers: ReadonlyArray, position?: number): number; - - export function readv( - fd: number, - buffers: ReadonlyArray, - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void - ): void; + /** + * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s + * using `readv()`. + * + * `position` is the offset from the beginning of the file from where data + * should be read. If `typeof position !== 'number'`, the data will be read + * from the current position. + * + * The callback will be given three arguments: `err`, `bytesRead`, and`buffers`. `bytesRead` is how many bytes were read from the file. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffers` properties. + * @since v13.13.0, v12.17.0 + */ + export function readv(fd: number, buffers: ReadonlyArray, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void): void; export function readv( fd: number, buffers: ReadonlyArray, position: number, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void ): void; - export interface ReadVResult { bytesRead: number; buffers: NodeJS.ArrayBufferView[]; } - export namespace readv { function __promisify__(fd: number, buffers: ReadonlyArray, position?: number): Promise; } - /** - * See `readv`. + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readv}. + * @since v13.13.0, v12.17.0 + * @return The number of bytes read. */ export function readvSync(fd: number, buffers: ReadonlyArray, position?: number): number; - export interface OpenDirOptions { - encoding?: BufferEncoding; + encoding?: BufferEncoding | undefined; /** * Number of directory entries that are buffered * internally when reading from the directory. Higher values lead to better * performance but higher memory usage. * @default 32 */ - bufferSize?: number; + bufferSize?: number | undefined; } - - export function opendirSync(path: string, options?: OpenDirOptions): Dir; - - export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; - export function opendir(path: string, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; - + /** + * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; + /** + * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for + * more details. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + export function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; export namespace opendir { - function __promisify__(path: string, options?: OpenDirOptions): Promise; + function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; } - export interface BigIntStats extends StatsBase { - } - - export class BigIntStats { atimeNs: bigint; mtimeNs: bigint; ctimeNs: bigint; birthtimeNs: bigint; } - export interface BigIntOptions { bigint: true; } - export interface StatOptions { - bigint?: boolean; + bigint?: boolean | undefined; } + export interface StatSyncOptions extends StatOptions { + throwIfNoEntry?: boolean | undefined; + } + interface CopyOptionsBase { + /** + * Dereference symlinks + * @default false + */ + dereference?: boolean; + /** + * When `force` is `false`, and the destination + * exists, throw an error. + * @default false + */ + errorOnExist?: boolean; + /** + * Overwrite existing file or directory. _The copy + * operation will ignore errors if you set this to false and the destination + * exists. Use the `errorOnExist` option to change this behavior. + * @default true + */ + force?: boolean; + /** + * When `true` timestamps from `src` will + * be preserved. + * @default false + */ + preserveTimestamps?: boolean; + /** + * Copy directories recursively. + * @default false + */ + recursive?: boolean; + /** + * When true, path resolution for symlinks will be skipped + * @default false + */ + verbatimSymlinks?: boolean; + } + export interface CopyOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?(source: string, destination: string): boolean | Promise; + } + export interface CopySyncOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?(source: string, destination: string): boolean; + } + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + export function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void; + export function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; + /** + * Synchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; +} +declare module 'node:fs' { + export * from 'fs'; } diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts index 8d12c89..aca2fd5 100644 --- a/node_modules/@types/node/fs/promises.d.ts +++ b/node_modules/@types/node/fs/promises.d.ts @@ -1,304 +1,599 @@ +/** + * The `fs/promises` API provides asynchronous file system methods that return + * promises. + * + * The promise APIs use the underlying Node.js threadpool to perform file + * system operations off the event loop thread. These operations are not + * synchronized or threadsafe. Care must be taken when performing multiple + * concurrent modifications on the same file or data corruption may occur. + * @since v10.0.0 + */ declare module 'fs/promises' { - export * from 'node:fs/promises'; -} - -declare module 'node:fs/promises' { + import { Abortable } from 'node:events'; + import { Stream } from 'node:stream'; + import { ReadableStream } from 'node:stream/web'; import { - Stats, BigIntStats, - StatOptions, - WriteVResult, - ReadVResult, - PathLike, - RmDirOptions, - RmOptions, - MakeDirectoryOptions, + BufferEncodingOption, + constants as fsConstants, + CopyOptions, + Dir, Dirent, + MakeDirectoryOptions, + Mode, + ObjectEncodingOptions, OpenDirOptions, - Dir, - BaseEncodingOptions, - BufferEncodingOption, OpenMode, - Mode, + PathLike, + ReadStream, + ReadVResult, + RmDirOptions, + RmOptions, + StatOptions, + Stats, + TimeLike, + WatchEventType, + WatchOptions, + WriteStream, + WriteVResult, } from 'node:fs'; + import { Interface as ReadlineInterface } from 'node:readline'; + interface FileChangeInfo { + eventType: WatchEventType; + filename: T; + } + interface FlagAndOpenMode { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } + interface FileReadResult { + bytesRead: number; + buffer: T; + } + interface FileReadOptions { + /** + * @default `Buffer.alloc(0xffff)` + */ + buffer?: T; + /** + * @default 0 + */ + offset?: number | null; + /** + * @default `buffer.byteLength` + */ + length?: number | null; + position?: number | null; + } + interface CreateReadStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + end?: number | undefined; + highWaterMark?: number | undefined; + } + interface CreateWriteStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + } + // TODO: Add `EventEmitter` close interface FileHandle { /** - * Gets the file descriptor for this file handle. + * The numeric file descriptor managed by the {FileHandle} object. + * @since v10.0.0 */ readonly fd: number; - /** - * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for appending. - * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. + * Alias of `filehandle.writeFile()`. + * + * When operating on file handles, the mode cannot be changed from what it was set + * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ - appendFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise; - + appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise; /** - * Asynchronous fchown(2) - Change ownership of a file. + * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). + * @since v10.0.0 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + * @return Fulfills with `undefined` upon success. */ chown(uid: number, gid: number): Promise; - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). + * @since v10.0.0 + * @param mode the file mode bit mask. + * @return Fulfills with `undefined` upon success. */ chmod(mode: Mode): Promise; - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 kb. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is + * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from + * the current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If the `FileHandle` points to a character device that only supports blocking + * reads (such as keyboard or sound card), read operations do not finish until data + * is available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * ```js + * import { open } from 'fs/promises'; + * + * const fd = await open('/dev/input/event0'); + * // Create a stream from some character device. + * const stream = fd.createReadStream(); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { open } from 'fs/promises'; + * + * const fd = await open('sample.txt'); + * fd.createReadStream({ start: 90, end: 99 }); + * ``` + * @since v16.11.0 + */ + createReadStream(options?: CreateReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` `open` option to be set to `r+` rather than + * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * @since v16.11.0 + */ + createWriteStream(options?: CreateWriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. + * + * Unlike `filehandle.sync` this method does not flush modified metadata. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ datasync(): Promise; - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fufills with `undefined` upon success. */ sync(): Promise; - /** - * Asynchronously reads data from the file. - * The `FileHandle` must have been opened for reading. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. + * Reads data from the file and stores that in the given buffer. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * @since v10.0.0 + * @param buffer A buffer that will be filled with the file data read. + * @param offset The location in the buffer at which to start filling. * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an + * integer, the current file position will remain unchanged. + * @return Fulfills upon success with an object with two properties: */ - read(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; - + read(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise>; + read(options?: FileReadOptions): Promise>; /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. + * Returns a `ReadableStream` that may be used to read the files data. + * + * An error will be thrown if this method is called more than once or is called after the `FileHandle` is closed + * or closing. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const chunk of file.readableWebStream()) + * console.log(chunk); + * + * await file.close(); + * ``` + * + * While the `ReadableStream` will read the file to completion, it will not close the `FileHandle` automatically. User code must still call the `fileHandle.close()` method. + * + * @since v17.0.0 + * @experimental */ - readFile(options?: { encoding?: null, flag?: OpenMode } | null): Promise; - + readableWebStream(): ReadableStream; + /** + * Asynchronously reads the entire contents of a file. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support reading. + * + * If one or more `filehandle.read()` calls are made on a file handle and then a`filehandle.readFile()` call is made, the data will be read from the current + * position till the end of the file. It doesn't always read from the beginning + * of the file. + * @since v10.0.0 + * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the + * data will be a string. + */ + readFile( + options?: { + encoding?: null | undefined; + flag?: OpenMode | undefined; + } | null + ): Promise; /** * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. * The `FileHandle` must have been opened for reading. * @param options An object that may contain an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - readFile(options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise; - + readFile( + options: + | { + encoding: BufferEncoding; + flag?: OpenMode | undefined; + } + | BufferEncoding + ): Promise; /** * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. * The `FileHandle` must have been opened for reading. * @param options An object that may contain an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - readFile(options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise; - + readFile( + options?: + | (ObjectEncodingOptions & { + flag?: OpenMode | undefined; + }) + | BufferEncoding + | null + ): Promise; /** - * Asynchronous fstat(2) - Get file status. + * Convenience method to create a `readline` interface and stream over the file. For example: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const line of file.readLines()) { + * console.log(line); + * } + * ``` + * + * @since v18.11.0 + * @param options See `filehandle.createReadStream()` for the options. */ - stat(opts?: StatOptions & { bigint?: false }): Promise; - stat(opts: StatOptions & { bigint: true }): Promise; - stat(opts?: StatOptions): Promise; - + readLines(options?: CreateReadStreamOptions): ReadlineInterface; /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param len If not specified, defaults to `0`. + * @since v10.0.0 + * @return Fulfills with an {fs.Stats} for the file. */ - truncate(len?: number): Promise; - + stat( + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + stat( + opts: StatOptions & { + bigint: true; + } + ): Promise; + stat(opts?: StatOptions): Promise; /** - * Asynchronously change file timestamps of the file. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. + * Truncates the file. + * + * If the file was larger than `len` bytes, only the first `len` bytes will be + * retained in the file. + * + * The following example retains only the first four bytes of the file: + * + * ```js + * import { open } from 'fs/promises'; + * + * let filehandle = null; + * try { + * filehandle = await open('temp.txt', 'r+'); + * await filehandle.truncate(4); + * } finally { + * await filehandle?.close(); + * } + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. */ - utimes(atime: string | number | Date, mtime: string | number | Date): Promise; - + truncate(len?: number): Promise; /** - * Asynchronously writes `buffer` to the file. - * The `FileHandle` must have been opened for writing. - * @param buffer The buffer that the data will be written to. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success. + * @since v10.0.0 */ - write(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; - + utimes(atime: TimeLike, mtime: TimeLike): Promise; /** - * Asynchronously writes `string` to the file. - * The `FileHandle` must have been opened for writing. - * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise` - * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. + * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * The promise is resolved with no arguments upon success. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support writing. + * + * It is unsafe to use `filehandle.writeFile()` multiple times on the same file + * without waiting for the promise to be resolved (or rejected). + * + * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the + * current position till the end of the file. It doesn't always write from the + * beginning of the file. + * @since v10.0.0 */ - write(data: string | Uint8Array, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>; - + writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise; /** - * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for writing. - * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). - * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. + * Write `buffer` to the file. + * + * The promise is resolved with an object containing two properties: + * + * It is unsafe to use `filehandle.write()` multiple times on the same file + * without waiting for the promise to be resolved (or rejected). For this + * scenario, use `filehandle.createWriteStream()`. + * + * On Linux, positional writes do not work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v10.0.0 + * @param [offset=0] The start position from within `buffer` where the data to write begins. + * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. + * @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position. + * See the POSIX pwrite(2) documentation for more detail. */ - writeFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise; - + write( + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + data: string, + position?: number | null, + encoding?: BufferEncoding | null + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; /** - * See `fs.writev` promisified version. + * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. + * + * The promise is resolved with an object containing a two properties: + * + * It is unsafe to call `writev()` multiple times on the same file without waiting + * for the promise to be resolved (or rejected). + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param position The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current + * position. */ writev(buffers: ReadonlyArray, position?: number): Promise; - /** - * See `fs.readv` promisified version. + * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s + * @since v13.13.0, v12.17.0 + * @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. + * @return Fulfills upon success an object containing two properties: */ readv(buffers: ReadonlyArray, position?: number): Promise; - /** - * Asynchronous close(2) - close a `FileHandle`. + * Closes the file handle after waiting for any pending operation on the handle to + * complete. + * + * ```js + * import { open } from 'fs/promises'; + * + * let filehandle; + * try { + * filehandle = await open('thefile.txt', 'r'); + * } finally { + * await filehandle?.close(); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ close(): Promise; } + const constants: typeof fsConstants; + /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If the accessibility check is successful, the promise is resolved with no + * value. If any of the accessibility checks fail, the promise is rejected + * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and + * written by the current process. + * + * ```js + * import { access } from 'fs/promises'; + * import { constants } from 'fs'; + * + * try { + * await access('/etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can access'); + * } catch { + * console.error('cannot access'); + * } + * ``` + * + * Using `fsPromises.access()` to check for the accessibility of a file before + * calling `fsPromises.open()` is not recommended. Doing so introduces a race + * condition, since other processes may change the file's state between the two + * calls. Instead, user code should open/read/write the file directly and handle + * the error raised if the file is not accessible. + * @since v10.0.0 + * @param [mode=fs.constants.F_OK] + * @return Fulfills with `undefined` upon success. */ function access(path: PathLike, mode?: number): Promise; - - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An optional integer that specifies the behavior of the copy operation. The only - * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if - * `dest` already exists. - */ - function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise; - /** - * Asynchronous open(2) - open and possibly create a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not - * supplied, defaults to `0o666`. + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. + * + * No guarantees are made about the atomicity of the copy operation. If an + * error occurs after the destination file has been opened for writing, an attempt + * will be made to remove the destination. + * + * ```js + * import { constants } from 'fs'; + * import { copyFile } from 'fs/promises'; + * + * try { + * await copyFile('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.log('The file could not be copied'); + * } + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * try { + * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.log('The file could not be copied'); + * } + * ``` + * @since v10.0.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. + * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) + * @return Fulfills with `undefined` upon success. */ - function open(path: PathLike, flags: string | number, mode?: Mode): Promise; - + function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; /** - * Asynchronously reads data from the file referenced by the supplied `FileHandle`. - * @param handle A `FileHandle`. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If - * `null`, data will be read from the current position. - */ - function read( - handle: FileHandle, - buffer: TBuffer, - offset?: number | null, - length?: number | null, - position?: number | null, - ): Promise<{ bytesRead: number, buffer: TBuffer }>; - - /** - * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`. - * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` - * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. - * @param handle A `FileHandle`. - * @param buffer The buffer that the data will be written to. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function write( - handle: FileHandle, - buffer: TBuffer, - offset?: number | null, - length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; - - /** - * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`. - * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` - * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. - * @param handle A `FileHandle`. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. + * Opens a `FileHandle`. + * + * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * @since v10.0.0 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. + * @return Fulfills with a {FileHandle} object. */ - function write(handle: FileHandle, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>; - + function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. + * Renames `oldPath` to `newPath`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ function rename(oldPath: PathLike, newPath: PathLike): Promise; - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. + * Truncates (shortens or extends the length) of the content at `path` to `len`bytes. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. */ function truncate(path: PathLike, len?: number): Promise; - - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param handle A `FileHandle`. - * @param len If not specified, defaults to `0`. - */ - function ftruncate(handle: FileHandle, len?: number): Promise; - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Removes the directory identified by `path`. + * + * Using `fsPromises.rmdir()` on a file (not a directory) results in the + * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR`error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ function rmdir(path: PathLike, options?: RmDirOptions): Promise; - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). + * Removes files and directories (modeled on the standard POSIX `rm` utility). + * @since v14.14.0 + * @return Fulfills with `undefined` upon success. */ function rm(path: PathLike, options?: RmOptions): Promise; - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param handle A `FileHandle`. + * Asynchronously creates a directory. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fsPromises.mkdir()` when `path` is a directory + * that exists results in a + * rejection only when `recursive` is false. + * @since v10.0.0 + * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. */ - function fdatasync(handle: FileHandle): Promise; - - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param handle A `FileHandle`. - */ - function fsync(handle: FileHandle): Promise; - - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise; - + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): Promise; /** * Asynchronous mkdir(2) - create a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. */ - function mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise; - + function mkdir( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): Promise; /** * Asynchronous mkdir(2) - create a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -306,239 +601,406 @@ declare module 'node:fs/promises' { * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. */ function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Reads the contents of a directory. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned + * will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects. + * + * ```js + * import { readdir } from 'fs/promises'; + * + * try { + * const files = await readdir(path); + * for (const file of files) + * console.log(file); + * } catch (err) { + * console.error(err); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. */ - function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise; - + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise; - + function readdir( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer' + ): Promise; /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise; - + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; /** * Asynchronous readdir(3) - read a directory. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. */ - function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise; - + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Promise; /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is + * resolved with the`linkString` upon success. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, the link path + * returned will be passed as a `Buffer` object. + * @since v10.0.0 + * @return Fulfills with the `linkString` upon success. */ - function readlink(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise; - + function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; /** * Asynchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ function readlink(path: PathLike, options: BufferEncodingOption): Promise; - /** * Asynchronous readlink(2) - read value of a symbolic link. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function readlink(path: PathLike, options?: BaseEncodingOptions | string | null): Promise; - + function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise; /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + * Creates a symbolic link. + * + * The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. Windows junction points require the destination path + * to be absolute. When using `'junction'`, the `target` argument will + * automatically be normalized to absolute path. + * @since v10.0.0 + * @param [type='file'] + * @return Fulfills with `undefined` upon success. */ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, + * in which case the link itself is stat-ed, not the file that it refers to. + * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. */ - function lstat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise; - function lstat(path: PathLike, opts: StatOptions & { bigint: true }): Promise; + function lstat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function lstat( + path: PathLike, + opts: StatOptions & { + bigint: true; + } + ): Promise; function lstat(path: PathLike, opts?: StatOptions): Promise; - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given `path`. */ - function stat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise; - function stat(path: PathLike, opts: StatOptions & { bigint: true }): Promise; + function stat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + } + ): Promise; function stat(path: PathLike, opts?: StatOptions): Promise; - /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ function link(existingPath: PathLike, newPath: PathLike): Promise; - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If `path` refers to a symbolic link, then the link is removed without affecting + * the file or directory to which that link refers. If the `path` refers to a file + * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ function unlink(path: PathLike): Promise; - - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param handle A `FileHandle`. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function fchmod(handle: FileHandle, mode: Mode): Promise; - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * Changes the permissions of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ function chmod(path: PathLike, mode: Mode): Promise; - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + * Changes the permissions on a symbolic link. + * + * This method is only implemented on macOS. + * @deprecated Since v10.0.0 + * @return Fulfills with `undefined` upon success. */ function lchmod(path: PathLike, mode: Mode): Promise; - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Changes the ownership on a symbolic link. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ function lchown(path: PathLike, uid: number, gid: number): Promise; - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, - * with the difference that if the path refers to a symbolic link, then the link is not - * dereferenced: instead, the timestamps of the symbolic link itself are changed. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a + * symbolic link, then the link is not dereferenced: instead, the timestamps of + * the symbolic link itself are changed. + * @since v14.5.0, v12.19.0 + * @return Fulfills with `undefined` upon success. */ - function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; - + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param handle A `FileHandle`. - */ - function fchown(handle: FileHandle, uid: number, gid: number): Promise; - - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * Changes the ownership of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ function chown(path: PathLike, uid: number, gid: number): Promise; - - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; - /** - * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`. - * @param handle A `FileHandle`. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time, `Date`s, or a + * numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. */ - function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise; - + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path. If the `encoding` is set to `'buffer'`, the path returned will be + * passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v10.0.0 + * @return Fulfills with the resolved path upon success. */ - function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise; - + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; /** * Asynchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ function realpath(path: PathLike, options: BufferEncodingOption): Promise; - /** * Asynchronous realpath(3) - return the canonicalized absolute pathname. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise; - + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + * Creates a unique temporary directory. A unique directory name is generated by + * appending six random characters to the end of the provided `prefix`. Due to + * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some + * platforms, notably the BSDs, can return more than six random characters, and + * replace trailing `X` characters in `prefix` with random characters. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'fs/promises'; + * + * try { + * await mkdtemp(path.join(os.tmpdir(), 'foo-')); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * The `fsPromises.mkdtemp()` method will append the six randomly selected + * characters directly to the `prefix` string. For instance, given a directory`/tmp`, if the intention is to create a temporary directory _within_`/tmp`, the`prefix` must end with a trailing + * platform-specific path separator + * (`require('path').sep`). + * @since v10.0.0 + * @return Fulfills with a string containing the filesystem path of the newly created temporary directory. */ - function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise; - + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; /** * Asynchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; - /** * Asynchronously creates a unique temporary directory. * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. */ - function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise; - + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. + * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * If `options` is a string, then it specifies the encoding. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * Any specified `FileHandle` has to support writing. + * + * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file + * without waiting for the promise to be settled. + * + * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience + * method that performs multiple `write` calls internally to write the buffer + * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. + * + * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'fs/promises'; + * import { Buffer } from 'buffer'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * const promise = writeFile('message.txt', data, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v10.0.0 + * @param file filename or `FileHandle` + * @return Fulfills with `undefined` upon success. */ - function writeFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise; - + function writeFile( + file: PathLike | FileHandle, + data: string | NodeJS.ArrayBufferView | Iterable | AsyncIterable | Stream, + options?: + | (ObjectEncodingOptions & { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } & Abortable) + | BufferEncoding + | null + ): Promise; /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * The `path` may be specified as a `FileHandle` that has been opened + * for appending (using `fsPromises.open()`). + * @since v10.0.0 + * @param path filename or {FileHandle} + * @return Fulfills with `undefined` upon success. */ - function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise; - + function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise; /** * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. + * + * If no encoding is specified (using `options.encoding`), the data is returned + * as a `Buffer` object. Otherwise, the data will be a string. + * + * If `options` is a string, then it specifies the encoding. + * + * When the `path` is a directory, the behavior of `fsPromises.readFile()` is + * platform-specific. On macOS, Linux, and Windows, the promise will be rejected + * with an error. On FreeBSD, a representation of the directory's contents will be + * returned. + * + * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a + * request is aborted the promise returned is rejected with an `AbortError`: + * + * ```js + * import { readFile } from 'fs/promises'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const promise = readFile(fileName, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * Any specified `FileHandle` has to support reading. + * @since v10.0.0 + * @param path filename or `FileHandle` + * @return Fulfills with the contents of the file. */ - function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: OpenMode } | null): Promise; - + function readFile( + path: PathLike | FileHandle, + options?: + | ({ + encoding?: null | undefined; + flag?: OpenMode | undefined; + } & Abortable) + | null + ): Promise; /** * Asynchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -546,8 +1008,15 @@ declare module 'node:fs/promises' { * @param options An object that may contain an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise; - + function readFile( + path: PathLike | FileHandle, + options: + | ({ + encoding: BufferEncoding; + flag?: OpenMode | undefined; + } & Abortable) + | BufferEncoding + ): Promise; /** * Asynchronously reads the entire contents of a file. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -555,7 +1024,115 @@ declare module 'node:fs/promises' { * @param options An object that may contain an optional flag. * If a flag is not provided, it defaults to `'r'`. */ - function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise; - - function opendir(path: string, options?: OpenDirOptions): Promise; + function readFile( + path: PathLike | FileHandle, + options?: + | (ObjectEncodingOptions & + Abortable & { + flag?: OpenMode | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * + * Example using async iteration: + * + * ```js + * import { opendir } from 'fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + * @return Fulfills with an {fs.Dir}. + */ + function opendir(path: PathLike, options?: OpenDirOptions): Promise; + /** + * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. + * + * ```js + * const { watch } = require('fs/promises'); + * + * const ac = new AbortController(); + * const { signal } = ac; + * setTimeout(() => ac.abort(), 10000); + * + * (async () => { + * try { + * const watcher = watch(__filename, { signal }); + * for await (const event of watcher) + * console.log(event); + * } catch (err) { + * if (err.name === 'AbortError') + * return; + * throw err; + * } + * })(); + * ``` + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. + * @since v15.9.0, v14.18.0 + * @return of objects with the properties: + */ + function watch( + filename: PathLike, + options: + | (WatchOptions & { + encoding: 'buffer'; + }) + | 'buffer' + ): AsyncIterable>; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable>; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable> | AsyncIterable>; + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + * @return Fulfills with `undefined` upon success. + */ + function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; +} +declare module 'node:fs/promises' { + export * from 'fs/promises'; } diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts index 844f22e..80fd4cf 100644 --- a/node_modules/@types/node/globals.d.ts +++ b/node_modules/@types/node/globals.d.ts @@ -6,30 +6,13 @@ interface ErrorConstructor { /** * Optional override for formatting stack traces * - * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces + * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces */ - prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any; + prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; stackTraceLimit: number; } -// Node.js ESNEXT support -interface String { - /** Removes whitespace from the left end of a string. */ - trimLeft(): string; - /** Removes whitespace from the right end of a string. */ - trimRight(): string; - - /** Returns a copy with leading whitespace removed. */ - trimStart(): string; - /** Returns a copy with trailing whitespace removed. */ - trimEnd(): string; -} - -interface ImportMeta { - url: string; -} - /*-----------------------------------------------* * * * GLOBAL * @@ -37,9 +20,9 @@ interface ImportMeta { ------------------------------------------------*/ // For backwards compability -interface NodeRequire extends NodeJS.Require {} -interface RequireResolve extends NodeJS.RequireResolve {} -interface NodeModule extends NodeJS.Module {} +interface NodeRequire extends NodeJS.Require { } +interface RequireResolve extends NodeJS.RequireResolve { } +interface NodeModule extends NodeJS.Module { } declare var process: NodeJS.Process; declare var console: Console; @@ -47,269 +30,91 @@ declare var console: Console; declare var __filename: string; declare var __dirname: string; -declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; -declare namespace setTimeout { - function __promisify__(ms: number): Promise; - function __promisify__(ms: number, value: T): Promise; -} -declare function clearTimeout(timeoutId: NodeJS.Timeout): void; -declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; -declare function clearInterval(intervalId: NodeJS.Timeout): void; -declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; -declare namespace setImmediate { - function __promisify__(): Promise; - function __promisify__(value: T): Promise; -} -declare function clearImmediate(immediateId: NodeJS.Immediate): void; - -declare function queueMicrotask(callback: () => void): void; - declare var require: NodeRequire; declare var module: NodeModule; // Same as module.exports declare var exports: any; -// Buffer class -type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"; - -type WithImplicitCoercion = T | { valueOf(): T }; - /** - * Raw data is stored in instances of the Buffer class. - * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. - * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * Only available if `--expose-gc` is passed to the process. */ -declare class Buffer extends Uint8Array { - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - constructor(str: string, encoding?: BufferEncoding); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - constructor(size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - constructor(array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - constructor(array: ReadonlyArray); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. - */ - constructor(buffer: Buffer); - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer() - */ - static from(arrayBuffer: WithImplicitCoercion, byteOffset?: number, length?: number): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param data data to create a new Buffer - */ - static from(data: Uint8Array | ReadonlyArray): Buffer; - static from(data: WithImplicitCoercion | string>): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - */ - static from(str: WithImplicitCoercion | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - static of(...items: number[]): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): encoding is BufferEncoding; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength( - string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, - encoding?: BufferEncoding - ): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: ReadonlyArray, totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Uint8Array, buf2: Uint8Array): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; +declare var gc: undefined | (() => void); + +//#region borrowed +// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib +/** A controller object that allows you to abort one or more DOM requests as and when desired. */ +interface AbortController { /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate + * Returns the AbortSignal object associated with this object. */ - static allocUnsafeSlow(size: number): Buffer; + + readonly signal: AbortSignal; /** - * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified. + * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */ - static poolSize: number; - - write(string: string, encoding?: BufferEncoding): number; - write(string: string, offset: number, encoding?: BufferEncoding): number; - write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; - toString(encoding?: BufferEncoding, start?: number, end?: number): string; - toJSON(): { type: 'Buffer'; data: number[] }; - equals(otherBuffer: Uint8Array): boolean; - compare( - otherBuffer: Uint8Array, - targetStart?: number, - targetEnd?: number, - sourceStart?: number, - sourceEnd?: number - ): number; - copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + abort(): void; +} + +/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */ +interface AbortSignal extends EventTarget { /** - * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. - * - * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory. - * - * @param begin Where the new `Buffer` will start. Default: `0`. - * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. + * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */ - slice(begin?: number, end?: number): Buffer; + readonly aborted: boolean; +} + +declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T} + ? T + : { + prototype: AbortController; + new(): AbortController; + }; + +declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T} + ? T + : { + prototype: AbortSignal; + new(): AbortSignal; + abort(reason?: any): AbortSignal; + timeout(milliseconds: number): AbortSignal; + }; +//#endregion borrowed + +//#region ArrayLike.at() +interface RelativeIndexable { /** - * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. - * - * This method is compatible with `Uint8Array#subarray()`. - * - * @param begin Where the new `Buffer` will start. Default: `0`. - * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. + * Takes an integer value and returns the item at that index, + * allowing for positive and negative integers. + * Negative integers count back from the last item in the array. */ - subarray(begin?: number, end?: number): Buffer; - writeBigInt64BE(value: bigint, offset?: number): number; - writeBigInt64LE(value: bigint, offset?: number): number; - writeBigUInt64BE(value: bigint, offset?: number): number; - writeBigUInt64LE(value: bigint, offset?: number): number; - writeUIntLE(value: number, offset: number, byteLength: number): number; - writeUIntBE(value: number, offset: number, byteLength: number): number; - writeIntLE(value: number, offset: number, byteLength: number): number; - writeIntBE(value: number, offset: number, byteLength: number): number; - readBigUInt64BE(offset?: number): bigint; - readBigUInt64LE(offset?: number): bigint; - readBigInt64BE(offset?: number): bigint; - readBigInt64LE(offset?: number): bigint; - readUIntLE(offset: number, byteLength: number): number; - readUIntBE(offset: number, byteLength: number): number; - readIntLE(offset: number, byteLength: number): number; - readIntBE(offset: number, byteLength: number): number; - readUInt8(offset?: number): number; - readUInt16LE(offset?: number): number; - readUInt16BE(offset?: number): number; - readUInt32LE(offset?: number): number; - readUInt32BE(offset?: number): number; - readInt8(offset?: number): number; - readInt16LE(offset?: number): number; - readInt16BE(offset?: number): number; - readInt32LE(offset?: number): number; - readInt32BE(offset?: number): number; - readFloatLE(offset?: number): number; - readFloatBE(offset?: number): number; - readDoubleLE(offset?: number): number; - readDoubleBE(offset?: number): number; - reverse(): this; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset?: number): number; - writeUInt16LE(value: number, offset?: number): number; - writeUInt16BE(value: number, offset?: number): number; - writeUInt32LE(value: number, offset?: number): number; - writeUInt32BE(value: number, offset?: number): number; - writeInt8(value: number, offset?: number): number; - writeInt16LE(value: number, offset?: number): number; - writeInt16BE(value: number, offset?: number): number; - writeInt32LE(value: number, offset?: number): number; - writeInt32BE(value: number, offset?: number): number; - writeFloatLE(value: number, offset?: number): number; - writeFloatBE(value: number, offset?: number): number; - writeDoubleLE(value: number, offset?: number): number; - writeDoubleBE(value: number, offset?: number): number; - - fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; - - indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - entries(): IterableIterator<[number, number]>; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; - keys(): IterableIterator; - values(): IterableIterator; + at(index: number): T | undefined; } +interface String extends RelativeIndexable {} +interface Array extends RelativeIndexable {} +interface ReadonlyArray extends RelativeIndexable {} +interface Int8Array extends RelativeIndexable {} +interface Uint8Array extends RelativeIndexable {} +interface Uint8ClampedArray extends RelativeIndexable {} +interface Int16Array extends RelativeIndexable {} +interface Uint16Array extends RelativeIndexable {} +interface Int32Array extends RelativeIndexable {} +interface Uint32Array extends RelativeIndexable {} +interface Float32Array extends RelativeIndexable {} +interface Float64Array extends RelativeIndexable {} +interface BigInt64Array extends RelativeIndexable {} +interface BigUint64Array extends RelativeIndexable {} +//#endregion ArrayLike.at() end + +/** + * @since v17.0.0 + * + * Creates a deep clone of an object. + */ +declare function structuredClone( + value: T, + transfer?: { transfer: ReadonlyArray }, +): T; /*----------------------------------------------* * * @@ -317,52 +122,11 @@ declare class Buffer extends Uint8Array { * * *-----------------------------------------------*/ declare namespace NodeJS { - interface InspectOptions { - /** - * If set to `true`, getters are going to be - * inspected as well. If set to `'get'` only getters without setter are going - * to be inspected. If set to `'set'` only getters having a corresponding - * setter are going to be inspected. This might cause side effects depending on - * the getter function. - * @default `false` - */ - getters?: 'get' | 'set' | boolean; - showHidden?: boolean; - /** - * @default 2 - */ - depth?: number | null; - colors?: boolean; - customInspect?: boolean; - showProxy?: boolean; - maxArrayLength?: number | null; - /** - * Specifies the maximum number of characters to - * include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no characters. - * @default Infinity - */ - maxStringLength?: number | null; - breakLength?: number; - /** - * Setting this to `false` causes each object key - * to be displayed on a new line. It will also add new lines to text that is - * longer than `breakLength`. If set to a number, the most `n` inner elements - * are united on a single line as long as all properties fit into - * `breakLength`. Short array elements are also grouped together. Note that no - * text will be reduced below 16 characters, no matter the `breakLength` size. - * For more information, see the example below. - * @default `true` - */ - compact?: boolean | number; - sorted?: boolean | ((a: string, b: string) => number); - } - interface CallSite { /** * Value of "this" */ - getThis(): any; + getThis(): unknown; /** * Type of "this" as a string. @@ -433,11 +197,10 @@ declare namespace NodeJS { } interface ErrnoException extends Error { - errno?: number; - code?: string; - path?: string; - syscall?: string; - stack?: string; + errno?: number | undefined; + code?: string | undefined; + path?: string | undefined; + syscall?: string | undefined; } interface ReadableStream extends EventEmitter { @@ -447,7 +210,7 @@ declare namespace NodeJS { pause(): this; resume(): this; isPaused(): boolean; - pipe(destination: T, options?: { end?: boolean; }): T; + pipe(destination: T, options?: { end?: boolean | undefined; }): T; unpipe(destination?: WritableStream): this; unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; wrap(oldStream: ReadableStream): this; @@ -458,99 +221,18 @@ declare namespace NodeJS { writable: boolean; write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; - end(cb?: () => void): void; - end(data: string | Uint8Array, cb?: () => void): void; - end(str: string, encoding?: BufferEncoding, cb?: () => void): void; + end(cb?: () => void): this; + end(data: string | Uint8Array, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; } interface ReadWriteStream extends ReadableStream, WritableStream { } - interface Global { - Array: typeof Array; - ArrayBuffer: typeof ArrayBuffer; - Boolean: typeof Boolean; - Buffer: typeof Buffer; - DataView: typeof DataView; - Date: typeof Date; - Error: typeof Error; - EvalError: typeof EvalError; - Float32Array: typeof Float32Array; - Float64Array: typeof Float64Array; - Function: typeof Function; - Infinity: typeof Infinity; - Int16Array: typeof Int16Array; - Int32Array: typeof Int32Array; - Int8Array: typeof Int8Array; - Intl: typeof Intl; - JSON: typeof JSON; - Map: MapConstructor; - Math: typeof Math; - NaN: typeof NaN; - Number: typeof Number; - Object: typeof Object; - Promise: typeof Promise; - RangeError: typeof RangeError; - ReferenceError: typeof ReferenceError; - RegExp: typeof RegExp; - Set: SetConstructor; - String: typeof String; - Symbol: Function; - SyntaxError: typeof SyntaxError; - TypeError: typeof TypeError; - URIError: typeof URIError; - Uint16Array: typeof Uint16Array; - Uint32Array: typeof Uint32Array; - Uint8Array: typeof Uint8Array; - Uint8ClampedArray: typeof Uint8ClampedArray; - WeakMap: WeakMapConstructor; - WeakSet: WeakSetConstructor; - clearImmediate: (immediateId: Immediate) => void; - clearInterval: (intervalId: Timeout) => void; - clearTimeout: (timeoutId: Timeout) => void; - decodeURI: typeof decodeURI; - decodeURIComponent: typeof decodeURIComponent; - encodeURI: typeof encodeURI; - encodeURIComponent: typeof encodeURIComponent; - escape: (str: string) => string; - eval: typeof eval; - global: Global; - isFinite: typeof isFinite; - isNaN: typeof isNaN; - parseFloat: typeof parseFloat; - parseInt: typeof parseInt; - setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate; - setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; - setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; - queueMicrotask: typeof queueMicrotask; - undefined: typeof undefined; - unescape: (str: string) => string; - gc: () => void; - v8debug?: any; - } - interface RefCounted { ref(): this; unref(): this; } - // compatibility with older typings - interface Timer extends RefCounted { - hasRef(): boolean; - refresh(): this; - [Symbol.toPrimitive](): number; - } - - interface Immediate extends RefCounted { - hasRef(): boolean; - _onImmediate: Function; // to distinguish it from the Timeout class - } - - interface Timeout extends Timer { - hasRef(): boolean; - refresh(): this; - [Symbol.toPrimitive](): number; - } - type TypedArray = | Uint8Array | Uint8ClampedArray @@ -577,7 +259,7 @@ declare namespace NodeJS { } interface RequireResolve { - (id: string, options?: { paths?: string[]; }): string; + (id: string, options?: { paths?: string[] | undefined; }): string; paths(request: string): string[] | null; } @@ -587,16 +269,20 @@ declare namespace NodeJS { '.node': (m: Module, filename: string) => any; } interface Module { + /** + * `true` if the module is running during the Node.js preload + */ + isPreloading: boolean; exports: any; require: Require; id: string; filename: string; loaded: boolean; - /** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */ + /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */ parent: Module | null | undefined; children: Module[]; /** - * @since 11.14.0 + * @since v11.14.0 * * The directory name of the module. This is usually the same as the path.dirname() of the module.id. */ diff --git a/node_modules/@types/node/globals.global.d.ts b/node_modules/@types/node/globals.global.d.ts index d66acba..ef1198c 100644 --- a/node_modules/@types/node/globals.global.d.ts +++ b/node_modules/@types/node/globals.global.d.ts @@ -1 +1 @@ -declare var global: NodeJS.Global & typeof globalThis; +declare var global: typeof globalThis; diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts index 7e24449..e14de6c 100644 --- a/node_modules/@types/node/http.d.ts +++ b/node_modules/@types/node/http.d.ts @@ -1,164 +1,441 @@ -declare module 'node:http' { - export * from 'http'; -} - +/** + * To use the HTTP server and client one must `require('http')`. + * + * The HTTP interfaces in Node.js are designed to support many features + * of the protocol which have been traditionally difficult to use. + * In particular, large, possibly chunk-encoded, messages. The interface is + * careful to never buffer entire requests or responses, so the + * user is able to stream data. + * + * HTTP message headers are represented by an object like this: + * + * ```js + * { 'content-length': '123', + * 'content-type': 'text/plain', + * 'connection': 'keep-alive', + * 'host': 'example.com', + * 'accept': '*' } + * ``` + * + * Keys are lowercased. Values are not modified. + * + * In order to support the full spectrum of possible HTTP applications, the Node.js + * HTTP API is very low-level. It deals with stream handling and message + * parsing only. It parses a message into headers and body but it does not + * parse the actual headers or the body. + * + * See `message.headers` for details on how duplicate headers are handled. + * + * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For + * example, the previous message header object might have a `rawHeaders`list like the following: + * + * ```js + * [ 'ConTent-Length', '123456', + * 'content-LENGTH', '123', + * 'content-type', 'text/plain', + * 'CONNECTION', 'keep-alive', + * 'Host', 'example.com', + * 'accepT', '*' ] + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http.js) + */ declare module 'http' { import * as stream from 'node:stream'; import { URL } from 'node:url'; - import { Socket, Server as NetServer } from 'node:net'; - + import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net'; + import { LookupOptions } from 'node:dns'; // incoming headers will never contain number interface IncomingHttpHeaders extends NodeJS.Dict { - 'accept'?: string; - 'accept-language'?: string; - 'accept-patch'?: string; - 'accept-ranges'?: string; - 'access-control-allow-credentials'?: string; - 'access-control-allow-headers'?: string; - 'access-control-allow-methods'?: string; - 'access-control-allow-origin'?: string; - 'access-control-expose-headers'?: string; - 'access-control-max-age'?: string; - 'access-control-request-headers'?: string; - 'access-control-request-method'?: string; - 'age'?: string; - 'allow'?: string; - 'alt-svc'?: string; - 'authorization'?: string; - 'cache-control'?: string; - 'connection'?: string; - 'content-disposition'?: string; - 'content-encoding'?: string; - 'content-language'?: string; - 'content-length'?: string; - 'content-location'?: string; - 'content-range'?: string; - 'content-type'?: string; - 'cookie'?: string; - 'date'?: string; - 'expect'?: string; - 'expires'?: string; - 'forwarded'?: string; - 'from'?: string; - 'host'?: string; - 'if-match'?: string; - 'if-modified-since'?: string; - 'if-none-match'?: string; - 'if-unmodified-since'?: string; - 'last-modified'?: string; - 'location'?: string; - 'origin'?: string; - 'pragma'?: string; - 'proxy-authenticate'?: string; - 'proxy-authorization'?: string; - 'public-key-pins'?: string; - 'range'?: string; - 'referer'?: string; - 'retry-after'?: string; - 'sec-websocket-accept'?: string; - 'sec-websocket-extensions'?: string; - 'sec-websocket-key'?: string; - 'sec-websocket-protocol'?: string; - 'sec-websocket-version'?: string; - 'set-cookie'?: string[]; - 'strict-transport-security'?: string; - 'tk'?: string; - 'trailer'?: string; - 'transfer-encoding'?: string; - 'upgrade'?: string; - 'user-agent'?: string; - 'vary'?: string; - 'via'?: string; - 'warning'?: string; - 'www-authenticate'?: string; + accept?: string | undefined; + 'accept-language'?: string | undefined; + 'accept-patch'?: string | undefined; + 'accept-ranges'?: string | undefined; + 'access-control-allow-credentials'?: string | undefined; + 'access-control-allow-headers'?: string | undefined; + 'access-control-allow-methods'?: string | undefined; + 'access-control-allow-origin'?: string | undefined; + 'access-control-expose-headers'?: string | undefined; + 'access-control-max-age'?: string | undefined; + 'access-control-request-headers'?: string | undefined; + 'access-control-request-method'?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + 'alt-svc'?: string | undefined; + authorization?: string | undefined; + 'cache-control'?: string | undefined; + connection?: string | undefined; + 'content-disposition'?: string | undefined; + 'content-encoding'?: string | undefined; + 'content-language'?: string | undefined; + 'content-length'?: string | undefined; + 'content-location'?: string | undefined; + 'content-range'?: string | undefined; + 'content-type'?: string | undefined; + cookie?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + 'if-match'?: string | undefined; + 'if-modified-since'?: string | undefined; + 'if-none-match'?: string | undefined; + 'if-unmodified-since'?: string | undefined; + 'last-modified'?: string | undefined; + location?: string | undefined; + origin?: string | undefined; + pragma?: string | undefined; + 'proxy-authenticate'?: string | undefined; + 'proxy-authorization'?: string | undefined; + 'public-key-pins'?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + 'retry-after'?: string | undefined; + 'sec-websocket-accept'?: string | undefined; + 'sec-websocket-extensions'?: string | undefined; + 'sec-websocket-key'?: string | undefined; + 'sec-websocket-protocol'?: string | undefined; + 'sec-websocket-version'?: string | undefined; + 'set-cookie'?: string[] | undefined; + 'strict-transport-security'?: string | undefined; + tk?: string | undefined; + trailer?: string | undefined; + 'transfer-encoding'?: string | undefined; + upgrade?: string | undefined; + 'user-agent'?: string | undefined; + vary?: string | undefined; + via?: string | undefined; + warning?: string | undefined; + 'www-authenticate'?: string | undefined; } - // outgoing headers allows numbers (as they are converted internally to strings) type OutgoingHttpHeader = number | string | string[]; - - interface OutgoingHttpHeaders extends NodeJS.Dict { - } - + interface OutgoingHttpHeaders extends NodeJS.Dict {} interface ClientRequestArgs { - protocol?: string | null; - host?: string | null; - hostname?: string | null; - family?: number; - port?: number | string | null; - defaultPort?: number | string; - localAddress?: string; - socketPath?: string; - /** - * @default 8192 - */ - maxHeaderSize?: number; - method?: string; - path?: string | null; - headers?: OutgoingHttpHeaders; - auth?: string | null; - agent?: Agent | boolean; - _defaultAgent?: Agent; - timeout?: number; - setHost?: boolean; + _defaultAgent?: Agent | undefined; + agent?: Agent | boolean | undefined; + auth?: string | null | undefined; // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 - createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket; + createConnection?: + | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket) + | undefined; + defaultPort?: number | string | undefined; + family?: number | undefined; + headers?: OutgoingHttpHeaders | undefined; + hints?: LookupOptions['hints']; + host?: string | null | undefined; + hostname?: string | null | undefined; + insecureHTTPParser?: boolean | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + lookup?: LookupFunction | undefined; + /** + * @default 16384 + */ + maxHeaderSize?: number | undefined; + method?: string | undefined; + path?: string | null | undefined; + port?: number | string | null | undefined; + protocol?: string | null | undefined; + setHost?: boolean | undefined; + signal?: AbortSignal | undefined; + socketPath?: string | undefined; + timeout?: number | undefined; + uniqueHeaders?: Array | undefined; } - - interface ServerOptions { - IncomingMessage?: typeof IncomingMessage; - ServerResponse?: typeof ServerResponse; + interface ServerOptions< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > { /** - * Optionally overrides the value of - * [`--max-http-header-size`][] for requests received by this server, i.e. - * the maximum length of request headers in bytes. - * @default 8192 + * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. */ - maxHeaderSize?: number; + IncomingMessage?: Request | undefined; /** - * Use an insecure HTTP parser that accepts invalid HTTP headers when true. + * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. + */ + ServerResponse?: Response | undefined; + /** + * Sets the timeout value in milliseconds for receiving the entire request from the client. + * @see Server.requestTimeout for more information. + * @default 300000 + * @since v18.0.0 + */ + requestTimeout?: number | undefined; + /** + * The number of milliseconds of inactivity a server needs to wait for additional incoming data, + * after it has finished writing the last response, before a socket will be destroyed. + * @see Server.keepAliveTimeout for more information. + * @default 5000 + * @since v18.0.0 + */ + keepAliveTimeout?: number | undefined; + /** + * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. + * @default 30000 + */ + connectionsCheckingInterval?: number | undefined; + /** + * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. * Using the insecure parser should be avoided. * See --insecure-http-parser for more information. * @default false */ - insecureHTTPParser?: boolean; + insecureHTTPParser?: boolean | undefined; + /** + * Optionally overrides the value of + * `--max-http-header-size` for requests received by this server, i.e. + * the maximum length of request headers in bytes. + * @default 16384 + * @since v13.3.0 + */ + maxHeaderSize?: number | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default true + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * A list of response headers that should be sent only once. + * If the header's value is an array, the items will be joined using `; `. + */ + uniqueHeaders?: Array | undefined; } - - type RequestListener = (req: IncomingMessage, res: ServerResponse) => void; - - interface HttpBase { + type RequestListener< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > = (req: InstanceType, res: InstanceType & { req: InstanceType }) => void; + /** + * @since v0.1.17 + */ + class Server< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > extends NetServer { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + /** + * Sets the timeout value for sockets, and emits a `'timeout'` event on + * the Server object, passing the socket as an argument, if a timeout + * occurs. + * + * If there is a `'timeout'` event listener on the Server object, then it + * will be called with the timed-out socket as an argument. + * + * By default, the Server does not timeout sockets. However, if a callback + * is assigned to the Server's `'timeout'` event, timeouts must be handled + * explicitly. + * @since v0.9.12 + * @param [msecs=0 (no timeout)] + */ setTimeout(msecs?: number, callback?: () => void): this; setTimeout(callback: () => void): this; /** * Limits maximum incoming headers count. If set to 0, no limit will be applied. - * @default 2000 - * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} + * @since v0.7.0 */ maxHeadersCount: number | null; + /** + * The maximum number of requests socket can handle + * before closing keep alive connection. + * + * A value of `0` will disable the limit. + * + * When the limit is reached it will set the `Connection` header value to `close`, + * but will not actually close the connection, subsequent requests sent + * after the limit is reached will get `503 Service Unavailable` as a response. + * @since v16.10.0 + */ + maxRequestsPerSocket: number | null; + /** + * The number of milliseconds of inactivity before a socket is presumed + * to have timed out. + * + * A value of `0` will disable the timeout behavior on incoming connections. + * + * The socket timeout logic is set up on connection, so changing this + * value only affects new connections to the server, not any existing connections. + * @since v0.9.12 + */ timeout: number; /** - * Limit the amount of time the parser will wait to receive the complete HTTP headers. - * @default 60000 - * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} + * Limit the amount of time the parser will wait to receive the complete HTTP + * headers. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v11.3.0, v10.14.0 */ headersTimeout: number; + /** + * The number of milliseconds of inactivity a server needs to wait for additional + * incoming data, after it has finished writing the last response, before a socket + * will be destroyed. If the server receives new data before the keep-alive + * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`. + * + * A value of `0` will disable the keep-alive timeout behavior on incoming + * connections. + * A value of `0` makes the http server behave similarly to Node.js versions prior + * to 8.0.0, which did not have a keep-alive timeout. + * + * The socket timeout logic is set up on connection, so changing this value only + * affects new connections to the server, not any existing connections. + * @since v8.0.0 + */ keepAliveTimeout: number; /** - * Sets the timeout value in milliseconds for receiving the entire request from the client. - * @default 0 - * {@link https://nodejs.org/api/http.html#http_server_requesttimeout} + * Sets the timeout value in milliseconds for receiving the entire request from + * the client. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v14.11.0 */ requestTimeout: number; + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Socket) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'checkContinue', listener: RequestListener): this; + addListener(event: 'checkExpectation', listener: RequestListener): this; + addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + addListener( + event: 'connect', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + addListener(event: 'request', listener: RequestListener): this; + addListener( + event: 'upgrade', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + emit(event: string, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Socket): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit( + event: 'checkContinue', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit( + event: 'checkExpectation', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean; + emit(event: 'connect', req: InstanceType, socket: stream.Duplex, head: Buffer): boolean; + emit( + event: 'request', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: 'upgrade', req: InstanceType, socket: stream.Duplex, head: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Socket) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'checkContinue', listener: RequestListener): this; + on(event: 'checkExpectation', listener: RequestListener): this; + on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + on(event: 'connect', listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void): this; + on(event: 'request', listener: RequestListener): this; + on(event: 'upgrade', listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Socket) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'checkContinue', listener: RequestListener): this; + once(event: 'checkExpectation', listener: RequestListener): this; + once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + once( + event: 'connect', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + once(event: 'request', listener: RequestListener): this; + once( + event: 'upgrade', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Socket) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'checkContinue', listener: RequestListener): this; + prependListener(event: 'checkExpectation', listener: RequestListener): this; + prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + prependListener( + event: 'connect', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependListener(event: 'request', listener: RequestListener): this; + prependListener( + event: 'upgrade', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'checkContinue', listener: RequestListener): this; + prependOnceListener(event: 'checkExpectation', listener: RequestListener): this; + prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + prependOnceListener( + event: 'connect', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: 'request', listener: RequestListener): this; + prependOnceListener( + event: 'upgrade', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; } - - interface Server extends HttpBase {} - class Server extends NetServer { - constructor(requestListener?: RequestListener); - constructor(options: ServerOptions, requestListener?: RequestListener); - } - - // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js - class OutgoingMessage extends stream.Writable { - upgrading: boolean; + /** + * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract of outgoing message from + * the perspective of the participants of HTTP transaction. + * @since v0.1.17 + */ + class OutgoingMessage extends stream.Writable { + readonly req: Request; chunkedEncoding: boolean; shouldKeepAlive: boolean; useChunkedEncodingByDefault: boolean; @@ -167,43 +444,279 @@ declare module 'http' { * @deprecated Use `writableEnded` instead. */ finished: boolean; - headersSent: boolean; /** - * @deprecate Use `socket` instead. + * Read-only. `true` if the headers were sent, otherwise `false`. + * @since v0.9.3 */ - connection: Socket | null; - socket: Socket | null; - + readonly headersSent: boolean; + /** + * Aliases of `outgoingMessage.socket` + * @since v0.3.0 + * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. + */ + readonly connection: Socket | null; + /** + * Reference to the underlying socket. Usually, users will not want to access + * this property. + * + * After calling `outgoingMessage.end()`, this property will be nulled. + * @since v0.3.0 + */ + readonly socket: Socket | null; constructor(); - + /** + * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter. + * @since v0.9.12 + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. + */ setTimeout(msecs: number, callback?: () => void): this; - setHeader(name: string, value: number | string | ReadonlyArray): void; + /** + * Sets a single header value for the header object. + * @since v0.4.0 + * @param name Header name + * @param value Header value + */ + setHeader(name: string, value: number | string | ReadonlyArray): this; + /** + * Gets the value of HTTP header with the given name. If such a name doesn't + * exist in message, it will be `undefined`. + * @since v0.4.0 + * @param name Name of header + */ getHeader(name: string): number | string | string[] | undefined; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow + * copy is used, array values may be mutated without additional calls to + * various header-related HTTP module methods. The keys of the returned + * object are the header names and the values are the respective header + * values. All header names are lowercase. + * + * The object returned by the `outgoingMessage.getHeaders()` method does + * not prototypically inherit from the JavaScript Object. This means that + * typical Object methods such as `obj.toString()`, `obj.hasOwnProperty()`, + * and others are not defined and will not work. + * + * ```js + * outgoingMessage.setHeader('Foo', 'bar'); + * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = outgoingMessage.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v7.7.0 + */ getHeaders(): OutgoingHttpHeaders; + /** + * Returns an array of names of headers of the outgoing outgoingMessage. All + * names are lowercase. + * @since v7.7.0 + */ getHeaderNames(): string[]; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name is case-insensitive. + * + * ```js + * const hasContentType = outgoingMessage.hasHeader('content-type'); + * ``` + * @since v7.7.0 + */ hasHeader(name: string): boolean; + /** + * Removes a header that is queued for implicit sending. + * + * ```js + * outgoingMessage.removeHeader('Content-Encoding'); + * ``` + * @since v0.4.0 + * @param name Header name + */ removeHeader(name: string): void; + /** + * Adds HTTP trailers (headers but at the end of the message) to the message. + * + * Trailers are **only** be emitted if the message is chunked encoded. If not, + * the trailer will be silently discarded. + * + * HTTP requires the `Trailer` header to be sent to emit trailers, + * with a list of header fields in its value, e.g. + * + * ```js + * message.writeHead(200, { 'Content-Type': 'text/plain', + * 'Trailer': 'Content-MD5' }); + * message.write(fileData); + * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); + * message.end(); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.3.0 + */ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; + /** + * Compulsorily flushes the message headers + * + * For efficiency reason, Node.js normally buffers the message headers + * until `outgoingMessage.end()` is called or the first chunk of message data + * is written. It then tries to pack the headers and data into a single TCP + * packet. + * + * It is usually desired (it saves a TCP round-trip), but not when the first + * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the request. + * @since v1.6.0 + */ flushHeaders(): void; } - - // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256 - class ServerResponse extends OutgoingMessage { + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v0.1.17 + */ + class ServerResponse extends OutgoingMessage { + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v0.4.0 + */ statusCode: number; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status message that will be sent to the client when + * the headers get flushed. If this is left as `undefined` then the standard + * message for the status code will be used. + * + * ```js + * response.statusMessage = 'Not found'; + * ``` + * + * After response header was sent to the client, this property indicates the + * status message which was sent out. + * @since v0.11.8 + */ statusMessage: string; - - constructor(req: IncomingMessage); - + constructor(req: Request); assignSocket(socket: Socket): void; detachSocket(socket: Socket): void; - // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53 - // no args in writeContinue callback + /** + * Sends an HTTP/1.1 100 Continue message to the client, indicating that + * the request body should be sent. See the `'checkContinue'` event on`Server`. + * @since v0.3.0 + */ writeContinue(callback?: () => void): void; - writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + /** + * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. The optional `callback` argument will be called when + * the response message has been written. + * + * Example: + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * 'x-trace-id': 'id for diagnostics' + * }); + * + * const earlyHintsCallback = () => console.log('early hints message sent'); + * response.writeEarlyHints({ + * 'link': earlyHintsLinks + * }, earlyHintsCallback); + * ``` + * + * @since v18.11.0 + * @param hints An object containing the values of headers + * @param callback Will be called when the response message has been written + */ + writeEarlyHints(hints: Record, callback?: () => void): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * Optionally one can give a human-readable `statusMessage` as the second + * argument. + * + * `headers` may be an `Array` where the keys and values are in the same list. + * It is _not_ a list of tuples. So, the even-numbered offsets are key values, + * and the odd-numbered offsets are the associated values. The array is in the same + * format as `request.rawHeaders`. + * + * Returns a reference to the `ServerResponse`, so that calls can be chained. + * + * ```js + * const body = 'hello world'; + * response + * .writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain' + * }) + * .end(body); + * ``` + * + * This method must only be called once on a message and it must + * be called before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * If this method is called and `response.setHeader()` has not been called, + * it will directly write the supplied header values onto the network channel + * without caching internally, and the `response.getHeader()` on the header + * will not yield the expected result. If progressive population of headers is + * desired with potential future retrieval and modification, use `response.setHeader()` instead. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * `Content-Length` is given in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js + * does not check whether `Content-Length` and the length of the body which has + * been transmitted are equal or not. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.1.30 + */ + writeHead( + statusCode: number, + statusMessage?: string, + headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], + ): this; writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + /** + * Sends an HTTP/1.1 102 Processing message to the client, indicating that + * the request body should be sent. + * @since v10.0.0 + */ writeProcessing(): void; } - interface InformationEvent { statusCode: number; statusMessage: string; @@ -213,32 +726,174 @@ declare module 'http' { headers: IncomingHttpHeaders; rawHeaders: string[]; } - - // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77 + /** + * This object is created internally and returned from {@link request}. It + * represents an _in-progress_ request whose header has already been queued. The + * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will + * be sent along with the first data chunk or when calling `request.end()`. + * + * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response + * headers have been received. The `'response'` event is executed with one + * argument which is an instance of {@link IncomingMessage}. + * + * During the `'response'` event, one can add listeners to the + * response object; particularly to listen for the `'data'` event. + * + * If no `'response'` handler is added, then the response will be + * entirely discarded. However, if a `'response'` event handler is added, + * then the data from the response object **must** be consumed, either by + * calling `response.read()` whenever there is a `'readable'` event, or + * by adding a `'data'` handler, or by calling the `.resume()` method. + * Until the data is consumed, the `'end'` event will not fire. Also, until + * the data is read it will consume memory that can eventually lead to a + * 'process out of memory' error. + * + * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered. + * + * Node.js does not check whether Content-Length and the length of the + * body which has been transmitted are equal or not. + * @since v0.1.17 + */ class ClientRequest extends OutgoingMessage { + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v0.11.14 + * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead. + */ aborted: boolean; + /** + * The request host. + * @since v14.5.0, v12.19.0 + */ host: string; + /** + * The request protocol. + * @since v14.5.0, v12.19.0 + */ protocol: string; - + /** + * When sending request through a keep-alive enabled agent, the underlying socket + * might be reused. But if server closes connection at unfortunate time, client + * may run into a 'ECONNRESET' error. + * + * ```js + * const http = require('http'); + * + * // Server has a 5 seconds keep-alive timeout by default + * http + * .createServer((req, res) => { + * res.write('hello\n'); + * res.end(); + * }) + * .listen(3000); + * + * setInterval(() => { + * // Adapting a keep-alive agent + * http.get('http://localhost:3000', { agent }, (res) => { + * res.on('data', (data) => { + * // Do nothing + * }); + * }); + * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout + * ``` + * + * By marking a request whether it reused socket or not, we can do + * automatic error retry base on it. + * + * ```js + * const http = require('http'); + * const agent = new http.Agent({ keepAlive: true }); + * + * function retriableRequest() { + * const req = http + * .get('http://localhost:3000', { agent }, (res) => { + * // ... + * }) + * .on('error', (err) => { + * // Check if retry is needed + * if (req.reusedSocket && err.code === 'ECONNRESET') { + * retriableRequest(); + * } + * }); + * } + * + * retriableRequest(); + * ``` + * @since v13.0.0, v12.16.0 + */ + reusedSocket: boolean; + /** + * Limits maximum response headers count. If set to 0, no limit will be applied. + */ + maxHeadersCount: number; constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); - + /** + * The request method. + * @since v0.1.97 + */ method: string; + /** + * The request path. + * @since v0.4.0 + */ path: string; - /** @deprecated since v14.1.0 Use `request.destroy()` instead. */ + /** + * Marks the request as aborting. Calling this will cause remaining data + * in the response to be dropped and the socket to be destroyed. + * @since v0.3.8 + * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. + */ abort(): void; onSocket(socket: Socket): void; + /** + * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. + * @since v0.5.9 + * @param timeout Milliseconds before a request times out. + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. + */ setTimeout(timeout: number, callback?: () => void): this; + /** + * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. + * @since v0.5.9 + */ setNoDelay(noDelay?: boolean): void; + /** + * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. + * @since v0.5.9 + */ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - + /** + * Returns an array containing the unique names of the current outgoing raw + * headers. Header names are returned with their exact casing being set. + * + * ```js + * request.setHeader('Foo', 'bar'); + * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = request.getRawHeaderNames(); + * // headerNames === ['Foo', 'Set-Cookie'] + * ``` + * @since v15.13.0, v14.17.0 + */ + getRawHeaderNames(): string[]; + /** + * @deprecated + */ addListener(event: 'abort', listener: () => void): this; - addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + addListener( + event: 'connect', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; addListener(event: 'continue', listener: () => void): this; addListener(event: 'information', listener: (info: InformationEvent) => void): this; addListener(event: 'response', listener: (response: IncomingMessage) => void): this; addListener(event: 'socket', listener: (socket: Socket) => void): this; addListener(event: 'timeout', listener: () => void): this; - addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + addListener( + event: 'upgrade', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; addListener(event: 'close', listener: () => void): this; addListener(event: 'drain', listener: () => void): this; addListener(event: 'error', listener: (err: Error) => void): this; @@ -246,7 +901,9 @@ declare module 'http' { addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - + /** + * @deprecated + */ on(event: 'abort', listener: () => void): this; on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; on(event: 'continue', listener: () => void): this; @@ -262,7 +919,9 @@ declare module 'http' { on(event: 'pipe', listener: (src: stream.Readable) => void): this; on(event: 'unpipe', listener: (src: stream.Readable) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - + /** + * @deprecated + */ once(event: 'abort', listener: () => void): this; once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; once(event: 'continue', listener: () => void): this; @@ -278,15 +937,23 @@ declare module 'http' { once(event: 'pipe', listener: (src: stream.Readable) => void): this; once(event: 'unpipe', listener: (src: stream.Readable) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - + /** + * @deprecated + */ prependListener(event: 'abort', listener: () => void): this; - prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependListener( + event: 'connect', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; prependListener(event: 'continue', listener: () => void): this; prependListener(event: 'information', listener: (info: InformationEvent) => void): this; prependListener(event: 'response', listener: (response: IncomingMessage) => void): this; prependListener(event: 'socket', listener: (socket: Socket) => void): this; prependListener(event: 'timeout', listener: () => void): this; - prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependListener( + event: 'upgrade', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; prependListener(event: 'close', listener: () => void): this; prependListener(event: 'drain', listener: () => void): this; prependListener(event: 'error', listener: (err: Error) => void): this; @@ -294,15 +961,23 @@ declare module 'http' { prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - + /** + * @deprecated + */ prependOnceListener(event: 'abort', listener: () => void): this; - prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependOnceListener( + event: 'connect', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; prependOnceListener(event: 'continue', listener: () => void): this; prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this; prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this; prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this; prependOnceListener(event: 'timeout', listener: () => void): this; - prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependOnceListener( + event: 'upgrade', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; prependOnceListener(event: 'close', listener: () => void): this; prependOnceListener(event: 'drain', listener: () => void): this; prependOnceListener(event: 'error', listener: (err: Error) => void): this; @@ -311,117 +986,666 @@ declare module 'http' { prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - + /** + * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to + * access response + * status, headers and data. + * + * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to + * parse and emit the incoming HTTP headers and payload, as the underlying socket + * may be reused multiple times in case of keep-alive. + * @since v0.1.17 + */ class IncomingMessage extends stream.Readable { constructor(socket: Socket); - + /** + * The `message.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. + */ aborted: boolean; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. + * Probably either `'1.1'` or `'1.0'`. + * + * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second. + * @since v0.1.1 + */ httpVersion: string; httpVersionMajor: number; httpVersionMinor: number; + /** + * The `message.complete` property will be `true` if a complete HTTP message has + * been received and successfully parsed. + * + * This property is particularly useful as a means of determining if a client or + * server fully transmitted a message before a connection was terminated: + * + * ```js + * const req = http.request({ + * host: '127.0.0.1', + * port: 8080, + * method: 'POST' + * }, (res) => { + * res.resume(); + * res.on('end', () => { + * if (!res.complete) + * console.error( + * 'The connection was terminated while the message was still being sent'); + * }); + * }); + * ``` + * @since v0.3.0 + */ complete: boolean; /** - * @deprecated since v13.0.0 - Use `socket` instead. + * Alias for `message.socket`. + * @since v0.1.90 + * @deprecated Since v16.0.0 - Use `socket`. */ connection: Socket; + /** + * The `net.Socket` object associated with the connection. + * + * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the + * client's authentication details. + * + * This property is guaranteed to be an instance of the `net.Socket` class, + * a subclass of `stream.Duplex`, unless the user specified a socket + * type other than `net.Socket` or internally nulled. + * @since v0.3.0 + */ socket: Socket; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.getHeaders()); + * ``` + * + * Duplicates in raw headers are handled in the following ways, depending on the + * header name: + * + * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`, + * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded. + * * `set-cookie` is always an array. Duplicates are added to the array. + * * For duplicate `cookie` headers, the values are joined together with '; '. + * * For all other headers, the values are joined together with ', '. + * @since v0.1.5 + */ headers: IncomingHttpHeaders; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v0.11.6 + */ rawHeaders: string[]; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v0.3.0 + */ trailers: NodeJS.Dict; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v0.11.6 + */ rawTrailers: string[]; + /** + * Calls `message.socket.setTimeout(msecs, callback)`. + * @since v0.5.9 + */ setTimeout(msecs: number, callback?: () => void): this; /** - * Only valid for request obtained from http.Server. + * **Only valid for request obtained from {@link Server}.** + * + * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. + * @since v0.1.1 + */ + method?: string | undefined; + /** + * **Only valid for request obtained from {@link Server}.** + * + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. Take the following request: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * To parse the URL into its parts: + * + * ```js + * new URL(request.url, `http://${request.getHeaders().host}`); + * ``` + * + * When `request.url` is `'/status?name=ryan'` and`request.getHeaders().host` is `'localhost:3000'`: + * + * ```console + * $ node + * > new URL(request.url, `http://${request.getHeaders().host}`) + * URL { + * href: 'http://localhost:3000/status?name=ryan', + * origin: 'http://localhost:3000', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'localhost:3000', + * hostname: 'localhost', + * port: '3000', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v0.1.90 */ - method?: string; + url?: string | undefined; /** - * Only valid for request obtained from http.Server. + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The 3-digit HTTP response status code. E.G. `404`. + * @since v0.1.1 */ - url?: string; + statusCode?: number | undefined; /** - * Only valid for response obtained from http.ClientRequest. + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. + * @since v0.11.10 */ - statusCode?: number; + statusMessage?: string | undefined; /** - * Only valid for response obtained from http.ClientRequest. + * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed + * as an argument to any listeners on the event. + * @since v0.3.0 */ - statusMessage?: string; - destroy(error?: Error): void; + destroy(error?: Error): this; } - - interface AgentOptions { + interface AgentOptions extends Partial { /** * Keep sockets around in a pool to be used by other requests in the future. Default = false */ - keepAlive?: boolean; + keepAlive?: boolean | undefined; /** * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. * Only relevant if keepAlive is set to true. */ - keepAliveMsecs?: number; + keepAliveMsecs?: number | undefined; /** * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity */ - maxSockets?: number; + maxSockets?: number | undefined; /** * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. */ - maxTotalSockets?: number; + maxTotalSockets?: number | undefined; /** * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. */ - maxFreeSockets?: number; + maxFreeSockets?: number | undefined; /** * Socket timeout in milliseconds. This will set the timeout after the socket is connected. */ - timeout?: number; + timeout?: number | undefined; /** - * Scheduling strategy to apply when picking the next free socket to use. Default: 'fifo'. + * Scheduling strategy to apply when picking the next free socket to use. + * @default `lifo` */ - scheduling?: 'fifo' | 'lifo'; + scheduling?: 'fifo' | 'lifo' | undefined; } - + /** + * An `Agent` is responsible for managing connection persistence + * and reuse for HTTP clients. It maintains a queue of pending requests + * for a given host and port, reusing a single socket connection for each + * until the queue is empty, at which time the socket is either destroyed + * or put into a pool where it is kept to be used again for requests to the + * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`. + * + * Pooled connections have TCP Keep-Alive enabled for them, but servers may + * still close idle connections, in which case they will be removed from the + * pool and a new connection will be made when a new HTTP request is made for + * that host and port. Servers may also refuse to allow multiple requests + * over the same connection, in which case the connection will have to be + * remade for every request and cannot be pooled. The `Agent` will still make + * the requests to that server, but each one will occur over a new connection. + * + * When a connection is closed by the client or the server, it is removed + * from the pool. Any unused sockets in the pool will be unrefed so as not + * to keep the Node.js process running when there are no outstanding requests. + * (see `socket.unref()`). + * + * It is good practice, to `destroy()` an `Agent` instance when it is no + * longer in use, because unused sockets consume OS resources. + * + * Sockets are removed from an agent when the socket emits either + * a `'close'` event or an `'agentRemove'` event. When intending to keep one + * HTTP request open for a long time without keeping it in the agent, something + * like the following may be done: + * + * ```js + * http.get(options, (res) => { + * // Do stuff + * }).on('socket', (socket) => { + * socket.emit('agentRemove'); + * }); + * ``` + * + * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options + * will be used + * for the client connection. + * + * `agent:false`: + * + * ```js + * http.get({ + * hostname: 'localhost', + * port: 80, + * path: '/', + * agent: false // Create a new agent just for this one request + * }, (res) => { + * // Do stuff with response + * }); + * ``` + * @since v0.3.4 + */ class Agent { + /** + * By default set to 256\. For agents with `keepAlive` enabled, this + * sets the maximum number of sockets that will be left open in the free + * state. + * @since v0.11.7 + */ maxFreeSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open per origin. Origin is the returned value of `agent.getName()`. + * @since v0.3.6 + */ maxSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open. Unlike `maxSockets`, this parameter applies across all origins. + * @since v14.5.0, v12.19.0 + */ maxTotalSockets: number; + /** + * An object which contains arrays of sockets currently awaiting use by + * the agent when `keepAlive` is enabled. Do not modify. + * + * Sockets in the `freeSockets` list will be automatically destroyed and + * removed from the array on `'timeout'`. + * @since v0.11.4 + */ readonly freeSockets: NodeJS.ReadOnlyDict; + /** + * An object which contains arrays of sockets currently in use by the + * agent. Do not modify. + * @since v0.3.6 + */ readonly sockets: NodeJS.ReadOnlyDict; + /** + * An object which contains queues of requests that have not yet been assigned to + * sockets. Do not modify. + * @since v0.5.9 + */ readonly requests: NodeJS.ReadOnlyDict; - constructor(opts?: AgentOptions); - /** * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. + * + * It is usually not necessary to do this. However, if using an + * agent with `keepAlive` enabled, then it is best to explicitly shut down + * the agent when it is no longer needed. Otherwise, + * sockets might stay open for quite a long time before the server + * terminates them. + * @since v0.11.4 */ destroy(): void; } - const METHODS: string[]; - const STATUS_CODES: { [errorCode: number]: string | undefined; [errorCode: string]: string | undefined; }; - - function createServer(requestListener?: RequestListener): Server; - function createServer(options: ServerOptions, requestListener?: RequestListener): Server; - + /** + * Returns a new instance of {@link Server}. + * + * The `requestListener` is a function which is automatically + * added to the `'request'` event. + * @since v0.1.13 + */ + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + >(requestListener?: RequestListener): Server; + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + >( + options: ServerOptions, + requestListener?: RequestListener, + ): Server; // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, // create interface RequestOptions would make the naming more clear to developers - interface RequestOptions extends ClientRequestArgs { } + interface RequestOptions extends ClientRequestArgs {} + /** + * `options` in `socket.connect()` are also supported. + * + * Node.js maintains several connections per server to make HTTP requests. + * This function allows one to transparently issue requests. + * + * `url` can be a string or a `URL` object. If `url` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence. + * + * The optional `callback` parameter will be added as a one-time listener for + * the `'response'` event. + * + * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * const http = require('http'); + * + * const postData = JSON.stringify({ + * 'msg': 'Hello World!' + * }); + * + * const options = { + * hostname: 'www.google.com', + * port: 80, + * path: '/upload', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'Content-Length': Buffer.byteLength(postData) + * } + * }; + * + * const req = http.request(options, (res) => { + * console.log(`STATUS: ${res.statusCode}`); + * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); + * res.setEncoding('utf8'); + * res.on('data', (chunk) => { + * console.log(`BODY: ${chunk}`); + * }); + * res.on('end', () => { + * console.log('No more data in response.'); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(`problem with request: ${e.message}`); + * }); + * + * // Write data to request body + * req.write(postData); + * req.end(); + * ``` + * + * In the example `req.end()` was called. With `http.request()` one + * must always call `req.end()` to signify the end of the request - + * even if there is no data being written to the request body. + * + * If any error is encountered during the request (be that with DNS resolution, + * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted + * on the returned request object. As with all `'error'` events, if no listeners + * are registered the error will be thrown. + * + * There are a few special headers that should be noted. + * + * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to + * the server should be persisted until the next request. + * * Sending a 'Content-Length' header will disable the default chunked encoding. + * * Sending an 'Expect' header will immediately send the request headers. + * Usually, when sending 'Expect: 100-continue', both a timeout and a listener + * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more + * information. + * * Sending an Authorization header will override using the `auth` option + * to compute basic authentication. + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('http://abc:xyz@example.com'); + * + * const req = http.request(options, (res) => { + * // ... + * }); + * ``` + * + * In a successful request, the following events will be emitted in the following + * order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * (`'data'` will not be emitted at all if the response body is empty, for + * instance, in most redirects) + * * `'end'` on the `res` object + * * `'close'` + * + * In the case of a connection error, the following events will be emitted: + * + * * `'socket'` + * * `'error'` + * * `'close'` + * + * In the case of a premature connection close before the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * In the case of a premature connection close after the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (connection closed here) + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * If `req.destroy()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.destroy()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.destroy()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.destroy()` called here) + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * If `req.abort()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.abort()` called here) + * * `'abort'` + * * `'close'` + * + * If `req.abort()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.abort()` called here) + * * `'abort'` + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.abort()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.abort()` called here) + * * `'abort'` + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * Setting the `timeout` option or using the `setTimeout()` function will + * not abort the request or do anything besides add a `'timeout'` event. + * + * Passing an `AbortSignal` and then calling `abort` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the + * request itself. + * @since v0.3.6 + */ function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: IncomingMessage) => void, + ): ClientRequest; + /** + * Since most requests are GET requests without bodies, Node.js provides this + * convenience method. The only difference between this method and {@link request} is that it sets the method to GET and calls `req.end()`automatically. The callback must take care to consume the + * response + * data for reasons stated in {@link ClientRequest} section. + * + * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. + * + * JSON fetching example: + * + * ```js + * http.get('http://localhost:8000/', (res) => { + * const { statusCode } = res; + * const contentType = res.headers['content-type']; + * + * let error; + * // Any 2xx status code signals a successful response but + * // here we're only checking for 200. + * if (statusCode !== 200) { + * error = new Error('Request Failed.\n' + + * `Status Code: ${statusCode}`); + * } else if (!/^application\/json/.test(contentType)) { + * error = new Error('Invalid content-type.\n' + + * `Expected application/json but received ${contentType}`); + * } + * if (error) { + * console.error(error.message); + * // Consume response data to free up memory + * res.resume(); + * return; + * } + * + * res.setEncoding('utf8'); + * let rawData = ''; + * res.on('data', (chunk) => { rawData += chunk; }); + * res.on('end', () => { + * try { + * const parsedData = JSON.parse(rawData); + * console.log(parsedData); + * } catch (e) { + * console.error(e.message); + * } + * }); + * }).on('error', (e) => { + * console.error(`Got error: ${e.message}`); + * }); + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!' + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. Properties that are inherited from the prototype are ignored. + */ function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - let globalAgent: Agent; + /** + * Performs the low-level validations on the provided name that are done when `res.setHeader(name, value)` is called. + * Passing illegal value as name will result in a TypeError being thrown, identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. + * @param name Header name + * @since v14.3.0 + */ + function validateHeaderName(name: string): void; + /** + * Performs the low-level validations on the provided value that are done when `res.setHeader(name, value)` is called. + * Passing illegal value as value will result in a TypeError being thrown. + * - Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. + * - Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. + * @param name Header name + * @param value Header value + * @since v14.3.0 + */ + function validateHeaderValue(name: string, value: string): void; + + /** + * Set the maximum number of idle HTTP parsers. Default: 1000. + * @param count + * @since v18.8.0, v16.18.0 + */ + function setMaxIdleHTTPParsers(count: number): void; + + let globalAgent: Agent; /** * Read-only property specifying the maximum allowed size of HTTP headers in bytes. - * Defaults to 16KB. Configurable using the [`--max-http-header-size`][] CLI option. + * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. */ const maxHeaderSize: number; } +declare module 'node:http' { + export * from 'http'; +} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts index 25b144f..0e36826 100644 --- a/node_modules/@types/node/http2.d.ts +++ b/node_modules/@types/node/http2.d.ts @@ -1,7 +1,13 @@ -declare module 'node:http2' { - export * from 'http2'; -} - +/** + * The `http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. It + * can be accessed using: + * + * ```js + * const http2 = require('http2'); + * ``` + * @since v8.4.0 + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http2.js) + */ declare module 'http2' { import EventEmitter = require('node:events'); import * as fs from 'node:fs'; @@ -9,729 +15,1792 @@ declare module 'http2' { import * as stream from 'node:stream'; import * as tls from 'node:tls'; import * as url from 'node:url'; - - import { - IncomingHttpHeaders as Http1IncomingHttpHeaders, - OutgoingHttpHeaders, - IncomingMessage, - ServerResponse, - } from 'node:http'; + import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http'; export { OutgoingHttpHeaders } from 'node:http'; - export interface IncomingHttpStatusHeader { - ":status"?: number; + ':status'?: number | undefined; } - export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { - ":path"?: string; - ":method"?: string; - ":authority"?: string; - ":scheme"?: string; + ':path'?: string | undefined; + ':method'?: string | undefined; + ':authority'?: string | undefined; + ':scheme'?: string | undefined; } - // Http2Stream - export interface StreamPriorityOptions { - exclusive?: boolean; - parent?: number; - weight?: number; - silent?: boolean; + exclusive?: boolean | undefined; + parent?: number | undefined; + weight?: number | undefined; + silent?: boolean | undefined; } - export interface StreamState { - localWindowSize?: number; - state?: number; - localClose?: number; - remoteClose?: number; - sumDependencyWeight?: number; - weight?: number; + localWindowSize?: number | undefined; + state?: number | undefined; + localClose?: number | undefined; + remoteClose?: number | undefined; + sumDependencyWeight?: number | undefined; + weight?: number | undefined; } - export interface ServerStreamResponseOptions { - endStream?: boolean; - waitForTrailers?: boolean; + endStream?: boolean | undefined; + waitForTrailers?: boolean | undefined; } - export interface StatOptions { offset: number; length: number; } - export interface ServerStreamFileResponseOptions { statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean; - waitForTrailers?: boolean; - offset?: number; - length?: number; + waitForTrailers?: boolean | undefined; + offset?: number | undefined; + length?: number | undefined; } - export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { onError?(err: NodeJS.ErrnoException): void; } - export interface Http2Stream extends stream.Duplex { + /** + * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, + * the `'aborted'` event will have been emitted. + * @since v8.4.0 + */ readonly aborted: boolean; + /** + * This property shows the number of characters currently buffered to be written. + * See `net.Socket.bufferSize` for details. + * @since v11.2.0, v10.16.0 + */ readonly bufferSize: number; + /** + * Set to `true` if the `Http2Stream` instance has been closed. + * @since v9.4.0 + */ readonly closed: boolean; + /** + * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer + * usable. + * @since v8.4.0 + */ readonly destroyed: boolean; /** - * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received, - * indicating that no additional data should be received and the readable side of the Http2Stream will be closed. + * Set to `true` if the `END_STREAM` flag was set in the request or response + * HEADERS frame received, indicating that no additional data should be received + * and the readable side of the `Http2Stream` will be closed. + * @since v10.11.0 */ readonly endAfterHeaders: boolean; - readonly id?: number; + /** + * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined`if the stream identifier has not yet been assigned. + * @since v8.4.0 + */ + readonly id?: number | undefined; + /** + * Set to `true` if the `Http2Stream` instance has not yet been assigned a + * numeric stream identifier. + * @since v9.4.0 + */ readonly pending: boolean; + /** + * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is + * destroyed after either receiving an `RST_STREAM` frame from the connected peer, + * calling `http2stream.close()`, or `http2stream.destroy()`. Will be`undefined` if the `Http2Stream` has not been closed. + * @since v8.4.0 + */ readonly rstCode: number; + /** + * An object containing the outbound headers sent for this `Http2Stream`. + * @since v9.5.0 + */ readonly sentHeaders: OutgoingHttpHeaders; - readonly sentInfoHeaders?: OutgoingHttpHeaders[]; - readonly sentTrailers?: OutgoingHttpHeaders; + /** + * An array of objects containing the outbound informational (additional) headers + * sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; + /** + * An object containing the outbound trailers sent for this `HttpStream`. + * @since v9.5.0 + */ + readonly sentTrailers?: OutgoingHttpHeaders | undefined; + /** + * A reference to the `Http2Session` instance that owns this `Http2Stream`. The + * value will be `undefined` after the `Http2Stream` instance is destroyed. + * @since v8.4.0 + */ readonly session: Http2Session; + /** + * Provides miscellaneous information about the current state of the`Http2Stream`. + * + * A current state of this `Http2Stream`. + * @since v8.4.0 + */ readonly state: StreamState; - + /** + * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the + * connected HTTP/2 peer. + * @since v8.4.0 + * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. + * @param callback An optional function registered to listen for the `'close'` event. + */ close(code?: number, callback?: () => void): void; + /** + * Updates the priority for this `Http2Stream` instance. + * @since v8.4.0 + */ priority(options: StreamPriorityOptions): void; + /** + * ```js + * const http2 = require('http2'); + * const client = http2.connect('http://example.org:8000'); + * const { NGHTTP2_CANCEL } = http2.constants; + * const req = client.request({ ':path': '/' }); + * + * // Cancel the stream if there's no activity after 5 seconds + * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); + * ``` + * @since v8.4.0 + */ setTimeout(msecs: number, callback?: () => void): void; + /** + * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method + * will cause the `Http2Stream` to be immediately closed and must only be + * called after the `'wantTrailers'` event has been emitted. When sending a + * request or sending a response, the `options.waitForTrailers` option must be set + * in order to keep the `Http2Stream` open after the final `DATA` frame so that + * trailers can be sent. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond(undefined, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ xyz: 'abc' }); + * }); + * stream.end('Hello World'); + * }); + * ``` + * + * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header + * fields (e.g. `':method'`, `':path'`, etc). + * @since v10.0.0 + */ sendTrailers(headers: OutgoingHttpHeaders): void; - - addListener(event: "aborted", listener: () => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: "streamClosed", listener: (code: number) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "wantTrailers", listener: () => void): this; + addListener(event: 'aborted', listener: () => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'streamClosed', listener: (code: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'wantTrailers', listener: () => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "aborted"): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "frameError", frameType: number, errorCode: number): boolean; - emit(event: "pipe", src: stream.Readable): boolean; - emit(event: "unpipe", src: stream.Readable): boolean; - emit(event: "streamClosed", code: number): boolean; - emit(event: "timeout"): boolean; - emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "wantTrailers"): boolean; + emit(event: 'aborted'): boolean; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: Buffer | string): boolean; + emit(event: 'drain'): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'frameError', frameType: number, errorCode: number): boolean; + emit(event: 'pipe', src: stream.Readable): boolean; + emit(event: 'unpipe', src: stream.Readable): boolean; + emit(event: 'streamClosed', code: number): boolean; + emit(event: 'timeout'): boolean; + emit(event: 'trailers', trailers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'wantTrailers'): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "aborted", listener: () => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: "streamClosed", listener: (code: number) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "wantTrailers", listener: () => void): this; + on(event: 'aborted', listener: () => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: 'streamClosed', listener: (code: number) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'wantTrailers', listener: () => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "aborted", listener: () => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: "streamClosed", listener: (code: number) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "wantTrailers", listener: () => void): this; + once(event: 'aborted', listener: () => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: 'streamClosed', listener: (code: number) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'wantTrailers', listener: () => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "aborted", listener: () => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "streamClosed", listener: (code: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "wantTrailers", listener: () => void): this; + prependListener(event: 'aborted', listener: () => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'streamClosed', listener: (code: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'wantTrailers', listener: () => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "aborted", listener: () => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "wantTrailers", listener: () => void): this; + prependOnceListener(event: 'aborted', listener: () => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'streamClosed', listener: (code: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'wantTrailers', listener: () => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - export interface ClientHttp2Stream extends Http2Stream { - addListener(event: "continue", listener: () => {}): this; - addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: 'continue', listener: () => {}): this; + addListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "continue"): boolean; - emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: 'continue'): boolean; + emit(event: 'headers', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: 'push', headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'response', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "continue", listener: () => {}): this; - on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: 'continue', listener: () => {}): this; + on(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "continue", listener: () => {}): this; - once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: 'continue', listener: () => {}): this; + once(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "continue", listener: () => {}): this; - prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: 'continue', listener: () => {}): this; + prependListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "continue", listener: () => {}): this; - prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: 'continue', listener: () => {}): this; + prependOnceListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - export interface ServerHttp2Stream extends Http2Stream { + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ readonly headersSent: boolean; + /** + * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote + * client's most recent `SETTINGS` frame. Will be `true` if the remote peer + * accepts push streams, `false` otherwise. Settings are the same for every`Http2Stream` in the same `Http2Session`. + * @since v8.4.0 + */ readonly pushAllowed: boolean; + /** + * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. + * @since v8.4.0 + */ additionalHeaders(headers: OutgoingHttpHeaders): void; + /** + * Initiates a push stream. The callback is invoked with the new `Http2Stream`instance created for the push stream passed as the second argument, or an`Error` passed as the first argument. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { + * if (err) throw err; + * pushStream.respond({ ':status': 200 }); + * pushStream.end('some pushed data'); + * }); + * stream.end('some data'); + * }); + * ``` + * + * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass + * a `weight` value to `http2stream.priority` with the `silent` option set to`true` to enable server-side bandwidth balancing between concurrent streams. + * + * Calling `http2stream.pushStream()` from within a pushed stream is not permitted + * and will throw an error. + * @since v8.4.0 + * @param callback Callback that is called once the push stream has been initiated. + */ pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + /** + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.end('some data'); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * stream.end('some data'); + * }); + * ``` + * @since v8.4.0 + */ respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; + /** + * Initiates a response whose data is read from the given file descriptor. No + * validation is performed on the given file descriptor. If an error occurs while + * attempting to read data using the file descriptor, the `Http2Stream` will be + * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8' + * }; + * stream.respondWithFD(fd, headers); + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given fd. If the `statCheck` function is provided, the`http2stream.respondWithFD()` method will perform an `fs.fstat()` call to + * collect details on the provided file descriptor. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The file descriptor or `FileHandle` is not closed when the stream is closed, + * so it will need to be closed manually once it is no longer needed. + * Using the same file descriptor concurrently for multiple streams + * is not supported and may result in data loss. Re-using a file descriptor + * after a stream has finished is supported. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code _must_ call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8' + * }; + * stream.respondWithFD(fd, headers, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * @since v8.4.0 + * @param fd A readable file descriptor. + */ respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void; + /** + * Sends a regular file as the response. The `path` must specify a regular file + * or an `'error'` event will be emitted on the `Http2Stream` object. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given file: + * + * If an error occurs while attempting to read the file data, the `Http2Stream`will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR`code. If the `onError` callback is + * defined, then it will be called. Otherwise + * the stream will be destroyed. + * + * Example using a file path: + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * headers['last-modified'] = stat.mtime.toUTCString(); + * } + * + * function onError(err) { + * // stream.respond() can throw if the stream has been destroyed by + * // the other side. + * try { + * if (err.code === 'ENOENT') { + * stream.respond({ ':status': 404 }); + * } else { + * stream.respond({ ':status': 500 }); + * } + * } catch (err) { + * // Perform actual error handling. + * console.log(err); + * } + * stream.end(); + * } + * + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck, onError }); + * }); + * ``` + * + * The `options.statCheck` function may also be used to cancel the send operation + * by returning `false`. For instance, a conditional request may check the stat + * results to determine if the file has been modified to return an appropriate`304` response: + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * // Check the stat here... + * stream.respond({ ':status': 304 }); + * return false; // Cancel the send operation + * } + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck }); + * }); + * ``` + * + * The `content-length` header field will be automatically set. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The `options.onError` function may also be used to handle all the errors + * that could happen before the delivery of the file is initiated. The + * default behavior is to destroy the stream. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * }); + * ``` + * @since v8.4.0 + */ respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void; } - // Http2Session - export interface Settings { - headerTableSize?: number; - enablePush?: boolean; - initialWindowSize?: number; - maxFrameSize?: number; - maxConcurrentStreams?: number; - maxHeaderListSize?: number; - enableConnectProtocol?: boolean; + headerTableSize?: number | undefined; + enablePush?: boolean | undefined; + initialWindowSize?: number | undefined; + maxFrameSize?: number | undefined; + maxConcurrentStreams?: number | undefined; + maxHeaderListSize?: number | undefined; + enableConnectProtocol?: boolean | undefined; } - export interface ClientSessionRequestOptions { - endStream?: boolean; - exclusive?: boolean; - parent?: number; - weight?: number; - waitForTrailers?: boolean; + endStream?: boolean | undefined; + exclusive?: boolean | undefined; + parent?: number | undefined; + weight?: number | undefined; + waitForTrailers?: boolean | undefined; + signal?: AbortSignal | undefined; } - export interface SessionState { - effectiveLocalWindowSize?: number; - effectiveRecvDataLength?: number; - nextStreamID?: number; - localWindowSize?: number; - lastProcStreamID?: number; - remoteWindowSize?: number; - outboundQueueSize?: number; - deflateDynamicTableSize?: number; - inflateDynamicTableSize?: number; + effectiveLocalWindowSize?: number | undefined; + effectiveRecvDataLength?: number | undefined; + nextStreamID?: number | undefined; + localWindowSize?: number | undefined; + lastProcStreamID?: number | undefined; + remoteWindowSize?: number | undefined; + outboundQueueSize?: number | undefined; + deflateDynamicTableSize?: number | undefined; + inflateDynamicTableSize?: number | undefined; } - export interface Http2Session extends EventEmitter { - readonly alpnProtocol?: string; + /** + * Value will be `undefined` if the `Http2Session` is not yet connected to a + * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or + * will return the value of the connected `TLSSocket`'s own `alpnProtocol`property. + * @since v9.4.0 + */ + readonly alpnProtocol?: string | undefined; + /** + * Will be `true` if this `Http2Session` instance has been closed, otherwise`false`. + * @since v9.4.0 + */ readonly closed: boolean; + /** + * Will be `true` if this `Http2Session` instance is still connecting, will be set + * to `false` before emitting `connect` event and/or calling the `http2.connect`callback. + * @since v10.0.0 + */ readonly connecting: boolean; + /** + * Will be `true` if this `Http2Session` instance has been destroyed and must no + * longer be used, otherwise `false`. + * @since v8.4.0 + */ readonly destroyed: boolean; - readonly encrypted?: boolean; + /** + * Value is `undefined` if the `Http2Session` session socket has not yet been + * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, + * and `false` if the `Http2Session` is connected to any other kind of socket + * or stream. + * @since v9.4.0 + */ + readonly encrypted?: boolean | undefined; + /** + * A prototype-less object describing the current local settings of this`Http2Session`. The local settings are local to _this_`Http2Session` instance. + * @since v8.4.0 + */ readonly localSettings: Settings; - readonly originSet?: string[]; + /** + * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property + * will return an `Array` of origins for which the `Http2Session` may be + * considered authoritative. + * + * The `originSet` property is only available when using a secure TLS connection. + * @since v9.4.0 + */ + readonly originSet?: string[] | undefined; + /** + * Indicates whether the `Http2Session` is currently waiting for acknowledgment of + * a sent `SETTINGS` frame. Will be `true` after calling the`http2session.settings()` method. Will be `false` once all sent `SETTINGS`frames have been acknowledged. + * @since v8.4.0 + */ readonly pendingSettingsAck: boolean; + /** + * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer. + * @since v8.4.0 + */ readonly remoteSettings: Settings; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * limits available methods to ones safe to use with HTTP/2. + * + * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw + * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. + * + * `setTimeout` method will be called on this `Http2Session`. + * + * All other interactions will be routed directly to the socket. + * @since v8.4.0 + */ readonly socket: net.Socket | tls.TLSSocket; + /** + * Provides miscellaneous information about the current state of the`Http2Session`. + * + * An object describing the current status of this `Http2Session`. + * @since v8.4.0 + */ readonly state: SessionState; + /** + * The `http2session.type` will be equal to`http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a + * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a + * client. + * @since v8.4.0 + */ readonly type: number; - + /** + * Gracefully closes the `Http2Session`, allowing any existing streams to + * complete on their own and preventing new `Http2Stream` instances from being + * created. Once closed, `http2session.destroy()`_might_ be called if there + * are no open `Http2Stream` instances. + * + * If specified, the `callback` function is registered as a handler for the`'close'` event. + * @since v9.4.0 + */ close(callback?: () => void): void; + /** + * Immediately terminates the `Http2Session` and the associated `net.Socket` or`tls.TLSSocket`. + * + * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error`is not undefined, an `'error'` event will be emitted immediately before the`'close'` event. + * + * If there are any remaining open `Http2Streams` associated with the`Http2Session`, those will also be destroyed. + * @since v8.4.0 + * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. + * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. + */ destroy(error?: Error, code?: number): void; + /** + * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. + * @since v9.4.0 + * @param code An HTTP/2 error code + * @param lastStreamID The numeric ID of the last processed `Http2Stream` + * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. + */ goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; + /** + * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must + * be provided. The method will return `true` if the `PING` was sent, `false`otherwise. + * + * The maximum number of outstanding (unacknowledged) pings is determined by the`maxOutstandingPings` configuration option. The default maximum is 10. + * + * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView`containing 8 bytes of data that will be transmitted with the `PING` and + * returned with the ping acknowledgment. + * + * The callback will be invoked with three arguments: an error argument that will + * be `null` if the `PING` was successfully acknowledged, a `duration` argument + * that reports the number of milliseconds elapsed since the ping was sent and the + * acknowledgment was received, and a `Buffer` containing the 8-byte `PING`payload. + * + * ```js + * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { + * if (!err) { + * console.log(`Ping acknowledged in ${duration} milliseconds`); + * console.log(`With payload '${payload.toString()}'`); + * } + * }); + * ``` + * + * If the `payload` argument is not specified, the default payload will be the + * 64-bit timestamp (little endian) marking the start of the `PING` duration. + * @since v8.9.3 + * @param payload Optional ping payload. + */ ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + /** + * Calls `ref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ ref(): void; + /** + * Sets the local endpoint's window size. + * The `windowSize` is the total window size to set, not + * the delta. + * + * ```js + * const http2 = require('http2'); + * + * const server = http2.createServer(); + * const expectedWindowSize = 2 ** 20; + * server.on('connect', (session) => { + * + * // Set local window size to be 2 ** 20 + * session.setLocalWindowSize(expectedWindowSize); + * }); + * ``` + * @since v15.3.0, v14.18.0 + */ setLocalWindowSize(windowSize: number): void; + /** + * Used to set a callback function that is called when there is no activity on + * the `Http2Session` after `msecs` milliseconds. The given `callback` is + * registered as a listener on the `'timeout'` event. + * @since v8.4.0 + */ setTimeout(msecs: number, callback?: () => void): void; - settings(settings: Settings): void; + /** + * Updates the current local settings for this `Http2Session` and sends a new`SETTINGS` frame to the connected HTTP/2 peer. + * + * Once called, the `http2session.pendingSettingsAck` property will be `true`while the session is waiting for the remote peer to acknowledge the new + * settings. + * + * The new settings will not become effective until the `SETTINGS` acknowledgment + * is received and the `'localSettings'` event is emitted. It is possible to send + * multiple `SETTINGS` frames while acknowledgment is still pending. + * @since v8.4.0 + * @param callback Callback that is called once the session is connected or right away if the session is already connected. + */ + settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void; + /** + * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ unref(): void; - - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - addListener(event: "localSettings", listener: (settings: Settings) => void): this; - addListener(event: "ping", listener: () => void): this; - addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - addListener(event: "timeout", listener: () => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + addListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + addListener(event: 'localSettings', listener: (settings: Settings) => void): this; + addListener(event: 'ping', listener: () => void): this; + addListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + addListener(event: 'timeout', listener: () => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; - emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; - emit(event: "localSettings", settings: Settings): boolean; - emit(event: "ping"): boolean; - emit(event: "remoteSettings", settings: Settings): boolean; - emit(event: "timeout"): boolean; + emit(event: 'close'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'frameError', frameType: number, errorCode: number, streamID: number): boolean; + emit(event: 'goaway', errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; + emit(event: 'localSettings', settings: Settings): boolean; + emit(event: 'ping'): boolean; + emit(event: 'remoteSettings', settings: Settings): boolean; + emit(event: 'timeout'): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - on(event: "localSettings", listener: (settings: Settings) => void): this; - on(event: "ping", listener: () => void): this; - on(event: "remoteSettings", listener: (settings: Settings) => void): this; - on(event: "timeout", listener: () => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + on(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + on(event: 'localSettings', listener: (settings: Settings) => void): this; + on(event: 'ping', listener: () => void): this; + on(event: 'remoteSettings', listener: (settings: Settings) => void): this; + on(event: 'timeout', listener: () => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - once(event: "localSettings", listener: (settings: Settings) => void): this; - once(event: "ping", listener: () => void): this; - once(event: "remoteSettings", listener: (settings: Settings) => void): this; - once(event: "timeout", listener: () => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + once(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + once(event: 'localSettings', listener: (settings: Settings) => void): this; + once(event: 'ping', listener: () => void): this; + once(event: 'remoteSettings', listener: (settings: Settings) => void): this; + once(event: 'timeout', listener: () => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - prependListener(event: "localSettings", listener: (settings: Settings) => void): this; - prependListener(event: "ping", listener: () => void): this; - prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - prependListener(event: "timeout", listener: () => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependListener(event: 'localSettings', listener: (settings: Settings) => void): this; + prependListener(event: 'ping', listener: () => void): this; + prependListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + prependListener(event: 'timeout', listener: () => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "ping", listener: () => void): this; - prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependOnceListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependOnceListener(event: 'localSettings', listener: (settings: Settings) => void): this; + prependOnceListener(event: 'ping', listener: () => void): this; + prependOnceListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - export interface ClientHttp2Session extends Http2Session { + /** + * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an + * HTTP/2 request to the connected server. + * + * When a `ClientHttp2Session` is first created, the socket may not yet be + * connected. if `clienthttp2session.request()` is called during this time, the + * actual request will be deferred until the socket is ready to go. + * If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown. + * + * This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`. + * + * ```js + * const http2 = require('http2'); + * const clientSession = http2.connect('https://localhost:1234'); + * const { + * HTTP2_HEADER_PATH, + * HTTP2_HEADER_STATUS + * } = http2.constants; + * + * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); + * req.on('response', (headers) => { + * console.log(headers[HTTP2_HEADER_STATUS]); + * req.on('data', (chunk) => { // .. }); + * req.on('end', () => { // .. }); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * is emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be called to send trailing + * headers to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * When `options.signal` is set with an `AbortSignal` and then `abort` on the + * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. + * + * The `:method` and `:path` pseudo-headers are not specified within `headers`, + * they respectively default to: + * + * * `:method` \= `'GET'` + * * `:path` \= `/` + * @since v8.4.0 + */ request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; - - addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - addListener(event: "origin", listener: (origins: string[]) => void): this; - addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + addListener(event: 'origin', listener: (origins: string[]) => void): this; + addListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; - emit(event: "origin", origins: ReadonlyArray): boolean; - emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; - emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: 'altsvc', alt: string, origin: string, stream: number): boolean; + emit(event: 'origin', origins: ReadonlyArray): boolean; + emit(event: 'connect', session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: 'stream', stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - on(event: "origin", listener: (origins: string[]) => void): this; - on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + on(event: 'origin', listener: (origins: string[]) => void): this; + on(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - once(event: "origin", listener: (origins: string[]) => void): this; - once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + once(event: 'origin', listener: (origins: string[]) => void): this; + once(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - prependListener(event: "origin", listener: (origins: string[]) => void): this; - prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + prependListener(event: 'origin', listener: (origins: string[]) => void): this; + prependListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - prependOnceListener(event: "origin", listener: (origins: string[]) => void): this; - prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + prependOnceListener(event: 'origin', listener: (origins: string[]) => void): this; + prependOnceListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - export interface AlternativeServiceOptions { origin: number | string | url.URL; } - export interface ServerHttp2Session extends Http2Session { readonly server: Http2Server | Http2SecureServer; - + /** + * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. + * + * ```js + * const http2 = require('http2'); + * + * const server = http2.createServer(); + * server.on('session', (session) => { + * // Set altsvc for origin https://example.org:80 + * session.altsvc('h2=":8000"', 'https://example.org:80'); + * }); + * + * server.on('stream', (stream) => { + * // Set altsvc for a specific stream + * stream.session.altsvc('h2=":8000"', stream.id); + * }); + * ``` + * + * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate + * service is associated with the origin of the given `Http2Stream`. + * + * The `alt` and origin string _must_ contain only ASCII bytes and are + * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given + * domain. + * + * When a string is passed for the `originOrStream` argument, it will be parsed as + * a URL and the origin will be derived. For instance, the origin for the + * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * @since v9.4.0 + * @param alt A description of the alternative service configuration as defined by `RFC 7838`. + * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the + * `http2stream.id` property. + */ altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; - origin(...args: Array): void; - - addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + /** + * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client + * to advertise the set of origins for which the server is capable of providing + * authoritative responses. + * + * ```js + * const http2 = require('http2'); + * const options = getSecureOptionsSomehow(); + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * server.on('session', (session) => { + * session.origin('https://example.com', 'https://example.org'); + * }); + * ``` + * + * When a string is passed as an `origin`, it will be parsed as a URL and the + * origin will be derived. For instance, the origin for the HTTP URL`'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given + * string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as + * an `origin`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * + * Alternatively, the `origins` option may be used when creating a new HTTP/2 + * server using the `http2.createSecureServer()` method: + * + * ```js + * const http2 = require('http2'); + * const options = getSecureOptionsSomehow(); + * options.origins = ['https://example.com', 'https://example.org']; + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * ``` + * @since v10.12.0 + * @param origins One or more URL Strings passed as separate arguments. + */ + origin( + ...origins: Array< + | string + | url.URL + | { + origin: string; + } + > + ): void; + addListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'connect', session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - // Http2Server - export interface SessionOptions { - maxDeflateDynamicTableSize?: number; - maxSessionMemory?: number; - maxHeaderListPairs?: number; - maxOutstandingPings?: number; - maxSendHeaderBlockLength?: number; - paddingStrategy?: number; - peerMaxConcurrentStreams?: number; - settings?: Settings; - + maxDeflateDynamicTableSize?: number | undefined; + maxSessionMemory?: number | undefined; + maxHeaderListPairs?: number | undefined; + maxOutstandingPings?: number | undefined; + maxSendHeaderBlockLength?: number | undefined; + paddingStrategy?: number | undefined; + peerMaxConcurrentStreams?: number | undefined; + settings?: Settings | undefined; + /** + * Specifies a timeout in milliseconds that + * a server should wait when an [`'unknownProtocol'`][] is emitted. If the + * socket has not been destroyed by that time the server will destroy it. + * @default 100000 + */ + unknownProtocolTimeout?: number | undefined; selectPadding?(frameLen: number, maxFrameLen: number): number; createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex; } - export interface ClientSessionOptions extends SessionOptions { - maxReservedRemoteStreams?: number; - createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; - protocol?: 'http:' | 'https:'; + maxReservedRemoteStreams?: number | undefined; + createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; + protocol?: 'http:' | 'https:' | undefined; } - export interface ServerSessionOptions extends SessionOptions { - Http1IncomingMessage?: typeof IncomingMessage; - Http1ServerResponse?: typeof ServerResponse; - Http2ServerRequest?: typeof Http2ServerRequest; - Http2ServerResponse?: typeof Http2ServerResponse; + Http1IncomingMessage?: typeof IncomingMessage | undefined; + Http1ServerResponse?: typeof ServerResponse | undefined; + Http2ServerRequest?: typeof Http2ServerRequest | undefined; + Http2ServerResponse?: typeof Http2ServerResponse | undefined; } - - export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { } - export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { } - - export interface ServerOptions extends ServerSessionOptions { } - + export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} + export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {} + export interface ServerOptions extends ServerSessionOptions {} export interface SecureServerOptions extends SecureServerSessionOptions { - allowHTTP1?: boolean; - origins?: string[]; + allowHTTP1?: boolean | undefined; + origins?: string[] | undefined; + } + interface HTTP2ServerCommon { + setTimeout(msec?: number, callback?: () => void): this; + /** + * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. + * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. + */ + updateSettings(settings: Settings): void; } - - export interface Http2Server extends net.Server { - addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - addListener(event: "sessionError", listener: (err: Error) => void): this; - addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "timeout", listener: () => void): this; + export interface Http2Server extends net.Server, HTTP2ServerCommon { + addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + addListener(event: 'sessionError', listener: (err: Error) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "session", session: ServerHttp2Session): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; + emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'session', session: ServerHttp2Session): boolean; + emit(event: 'sessionError', err: Error): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'timeout'): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "session", listener: (session: ServerHttp2Session) => void): this; - on(event: "sessionError", listener: (err: Error) => void): this; - on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "timeout", listener: () => void): this; + on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'session', listener: (session: ServerHttp2Session) => void): this; + on(event: 'sessionError', listener: (err: Error) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'timeout', listener: () => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "session", listener: (session: ServerHttp2Session) => void): this; - once(event: "sessionError", listener: (err: Error) => void): this; - once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "timeout", listener: () => void): this; + once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'session', listener: (session: ServerHttp2Session) => void): this; + once(event: 'sessionError', listener: (err: Error) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'timeout', listener: () => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - prependListener(event: "sessionError", listener: (err: Error) => void): this; - prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; + prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependListener(event: 'sessionError', listener: (err: Error) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; - prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - setTimeout(msec?: number, callback?: () => void): this; } - - export interface Http2SecureServer extends tls.Server { - addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - addListener(event: "sessionError", listener: (err: Error) => void): this; - addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon { + addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + addListener(event: 'sessionError', listener: (err: Error) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "session", session: ServerHttp2Session): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; - emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; + emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'session', session: ServerHttp2Session): boolean; + emit(event: 'sessionError', err: Error): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'timeout'): boolean; + emit(event: 'unknownProtocol', socket: tls.TLSSocket): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "session", listener: (session: ServerHttp2Session) => void): this; - on(event: "sessionError", listener: (err: Error) => void): this; - on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'session', listener: (session: ServerHttp2Session) => void): this; + on(event: 'sessionError', listener: (err: Error) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "session", listener: (session: ServerHttp2Session) => void): this; - once(event: "sessionError", listener: (err: Error) => void): this; - once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'session', listener: (session: ServerHttp2Session) => void): this; + once(event: 'sessionError', listener: (err: Error) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - prependListener(event: "sessionError", listener: (err: Error) => void): this; - prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependListener(event: 'sessionError', listener: (err: Error) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; - prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - setTimeout(msec?: number, callback?: () => void): this; } - + /** + * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, + * headers, and + * data. + * @since v8.4.0 + */ export class Http2ServerRequest extends stream.Readable { constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray); - + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + */ readonly aborted: boolean; + /** + * The request authority pseudo header field. Because HTTP/2 allows requests + * to set either `:authority` or `host`, this value is derived from`req.headers[':authority']` if present. Otherwise, it is derived from`req.headers['host']`. + * @since v8.4.0 + */ readonly authority: string; + /** + * See `request.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ readonly connection: net.Socket | tls.TLSSocket; + /** + * The `request.complete` property will be `true` if the request has + * been completed, aborted, or destroyed. + * @since v12.10.0 + */ readonly complete: boolean; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * See `HTTP/2 Headers Object`. + * + * In HTTP/2, the request path, host name, protocol, and method are represented as + * special headers prefixed with the `:` character (e.g. `':path'`). These special + * headers will be included in the `request.headers` object. Care must be taken not + * to inadvertently modify these special headers or errors may occur. For instance, + * removing all headers from the request will cause errors to occur: + * + * ```js + * removeAllHeaders(request.headers); + * assert(request.url); // Fails because the :path header has been removed + * ``` + * @since v8.4.0 + */ readonly headers: IncomingHttpHeaders; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. Returns`'2.0'`. + * + * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second. + * @since v8.4.0 + */ readonly httpVersion: string; readonly httpVersionMinor: number; readonly httpVersionMajor: number; + /** + * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. + * @since v8.4.0 + */ readonly method: string; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v8.4.0 + */ readonly rawHeaders: string[]; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v8.4.0 + */ readonly rawTrailers: string[]; + /** + * The request scheme pseudo header field indicating the scheme + * portion of the target URL. + * @since v8.4.0 + */ readonly scheme: string; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `request.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`request.stream`. + * + * `setTimeout` method will be called on `request.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. With TLS support, + * use `request.socket.getPeerCertificate()` to obtain the client's + * authentication details. + * @since v8.4.0 + */ readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the request. + * @since v8.4.0 + */ readonly stream: ServerHttp2Stream; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v8.4.0 + */ readonly trailers: IncomingHttpHeaders; - readonly url: string; - + /** + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. If the request is: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * Then `request.url` will be: + * + * ```js + * '/status?name=ryan' + * ``` + * + * To parse the url into its parts, `new URL()` can be used: + * + * ```console + * $ node + * > new URL('/status?name=ryan', 'http://example.com') + * URL { + * href: 'http://example.com/status?name=ryan', + * origin: 'http://example.com', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'example.com', + * hostname: 'example.com', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v8.4.0 + */ + url: string; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ setTimeout(msecs: number, callback?: () => void): void; read(size?: number): Buffer | string | null; - - addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "aborted", hadError: boolean, code: number): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "end"): boolean; - emit(event: "readable"): boolean; - emit(event: "error", err: Error): boolean; + emit(event: 'aborted', hadError: boolean, code: number): boolean; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: Buffer | string): boolean; + emit(event: 'end'): boolean; + emit(event: 'readable'): boolean; + emit(event: 'error', err: Error): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; + on(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; + once(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - - export class Http2ServerResponse extends stream.Stream { + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v8.4.0 + */ + export class Http2ServerResponse extends stream.Writable { constructor(stream: ServerHttp2Stream); - + /** + * See `response.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ readonly connection: net.Socket | tls.TLSSocket; + /** + * Boolean value that indicates whether the response has completed. Starts + * as `false`. After `response.end()` executes, the value will be `true`. + * @since v8.4.0 + * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. + */ readonly finished: boolean; + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ readonly headersSent: boolean; + /** + * A reference to the original HTTP2 request object. + * @since v15.7.0 + */ + readonly req: Http2ServerRequest; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `response.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`response.stream`. + * + * `setTimeout` method will be called on `response.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer((req, res) => { + * const ip = req.socket.remoteAddress; + * const port = req.socket.remotePort; + * res.end(`Your IP address is ${ip} and your source port is ${port}.`); + * }).listen(3000); + * ``` + * @since v8.4.0 + */ readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the response. + * @since v8.4.0 + */ readonly stream: ServerHttp2Stream; + /** + * When true, the Date header will be automatically generated and sent in + * the response if it is not already present in the headers. Defaults to true. + * + * This should only be disabled for testing; HTTP requires the Date header + * in responses. + * @since v8.4.0 + */ sendDate: boolean; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v8.4.0 + */ statusCode: number; + /** + * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns + * an empty string. + * @since v8.4.0 + */ statusMessage: ''; + /** + * This method adds HTTP trailing headers (a header but at the end of the + * message) to the response. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ addTrailers(trailers: OutgoingHttpHeaders): void; - end(callback?: () => void): void; - end(data: string | Uint8Array, callback?: () => void): void; - end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): void; + /** + * This method signals to the server that all of the response headers and body + * have been sent; that server should consider this message complete. + * The method, `response.end()`, MUST be called on each response. + * + * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. + * + * If `callback` is specified, it will be called when the response stream + * is finished. + * @since v8.4.0 + */ + end(callback?: () => void): this; + end(data: string | Uint8Array, callback?: () => void): this; + end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; + /** + * Reads out a header that has already been queued but not sent to the client. + * The name is case-insensitive. + * + * ```js + * const contentType = response.getHeader('content-type'); + * ``` + * @since v8.4.0 + */ getHeader(name: string): string; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All header names are lowercase. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = response.getHeaderNames(); + * // headerNames === ['foo', 'set-cookie'] + * ``` + * @since v8.4.0 + */ getHeaderNames(): string[]; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow copy + * is used, array values may be mutated without additional calls to various + * header-related http module methods. The keys of the returned object are the + * header names and the values are the respective header values. All header names + * are lowercase. + * + * The object returned by the `response.getHeaders()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = response.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v8.4.0 + */ getHeaders(): OutgoingHttpHeaders; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name matching is case-insensitive. + * + * ```js + * const hasContentType = response.hasHeader('content-type'); + * ``` + * @since v8.4.0 + */ hasHeader(name: string): boolean; + /** + * Removes a header that has been queued for implicit sending. + * + * ```js + * response.removeHeader('Content-Encoding'); + * ``` + * @since v8.4.0 + */ removeHeader(name: string): void; + /** + * Sets a single header value for implicit headers. If this header already exists + * in the to-be-sent headers, its value will be replaced. Use an array of strings + * here to send multiple headers with the same name. + * + * ```js + * response.setHeader('Content-Type', 'text/html; charset=utf-8'); + * ``` + * + * or + * + * ```js + * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * @since v8.4.0 + */ setHeader(name: string, value: number | string | ReadonlyArray): void; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ setTimeout(msecs: number, callback?: () => void): void; + /** + * If this method is called and `response.writeHead()` has not been called, + * it will switch to implicit header mode and flush the implicit headers. + * + * This sends a chunk of the response body. This method may + * be called multiple times to provide successive parts of the body. + * + * In the `http` module, the response body is omitted when the + * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. + * + * `chunk` can be a string or a buffer. If `chunk` is a string, + * the second parameter specifies how to encode it into a byte stream. + * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk + * of data is flushed. + * + * This is the raw HTTP body and has nothing to do with higher-level multi-part + * body encodings that may be used. + * + * The first time `response.write()` is called, it will send the buffered + * header information and the first chunk of the body to the client. The second + * time `response.write()` is called, Node.js assumes data will be streamed, + * and sends the new data separately. That is, the response is buffered up to the + * first chunk of the body. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. + * @since v8.4.0 + */ write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; + /** + * Sends a status `100 Continue` to the client, indicating that the request body + * should be sent. See the `'checkContinue'` event on `Http2Server` and`Http2SecureServer`. + * @since v8.4.0 + */ writeContinue(): void; + /** + * Sends a status `103 Early Hints` to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. + * + * Example: + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * 'x-trace-id': 'id for diagnostics' + * }); + * ``` + * + * @since v18.11.0 + * @param hints An object containing the values of headers + */ + writeEarlyHints(hints: Record): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * + * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. + * + * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be + * passed as the second argument. However, because the `statusMessage` has no + * meaning within HTTP/2, the argument will have no effect and a process warning + * will be emitted. + * + * ```js + * const body = 'hello world'; + * response.writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain; charset=utf-8', + * }); + * ``` + * + * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a + * given encoding. On outbound messages, Node.js does not check if Content-Length + * and the length of the body being transmitted are equal or not. However, when + * receiving messages, Node.js will automatically reject messages when the`Content-Length` does not match the actual payload size. + * + * This method may be called at most one time on a message before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; + /** + * Call `http2stream.pushStream()` with the given headers, and wrap the + * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback + * parameter if successful. When `Http2ServerRequest` is closed, the callback is + * called with an error `ERR_HTTP2_INVALID_STREAM`. + * @since v8.4.0 + * @param headers An object describing the headers + * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of + * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method + */ createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; - - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: stream.Readable): boolean; - emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: 'close'): boolean; + emit(event: 'drain'): boolean; + emit(event: 'error', error: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'pipe', src: stream.Readable): boolean; + emit(event: 'unpipe', src: stream.Readable): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - - // Public API - export namespace constants { const NGHTTP2_SESSION_SERVER: number; const NGHTTP2_SESSION_CLIENT: number; @@ -942,17 +2011,117 @@ declare module 'http2' { const HTTP_STATUS_NOT_EXTENDED: number; const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; } - + /** + * This symbol can be set as a property on the HTTP/2 headers object with + * an array value in order to provide a list of headers considered sensitive. + */ + export const sensitiveHeaders: symbol; + /** + * Returns an object containing the default settings for an `Http2Session`instance. This method returns a new object instance every time it is called + * so instances returned may be safely modified for use. + * @since v8.4.0 + */ export function getDefaultSettings(): Settings; + /** + * Returns a `Buffer` instance containing serialized representation of the given + * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended + * for use with the `HTTP2-Settings` header field. + * + * ```js + * const http2 = require('http2'); + * + * const packed = http2.getPackedSettings({ enablePush: false }); + * + * console.log(packed.toString('base64')); + * // Prints: AAIAAAAA + * ``` + * @since v8.4.0 + */ export function getPackedSettings(settings: Settings): Buffer; + /** + * Returns a `HTTP/2 Settings Object` containing the deserialized settings from + * the given `Buffer` as generated by `http2.getPackedSettings()`. + * @since v8.4.0 + * @param buf The packed settings. + */ export function getUnpackedSettings(buf: Uint8Array): Settings; - + /** + * Returns a `net.Server` instance that creates and manages `Http2Session`instances. + * + * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when + * communicating + * with browser clients. + * + * ```js + * const http2 = require('http2'); + * + * // Create an unencrypted HTTP/2 server. + * // Since there are no browsers known that support + * // unencrypted HTTP/2, the use of `http2.createSecureServer()` + * // is necessary when communicating with browser clients. + * const server = http2.createServer(); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200 + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(80); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; - + /** + * Returns a `tls.Server` instance that creates and manages `Http2Session`instances. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem') + * }; + * + * // Create a secure HTTP/2 server + * const server = http2.createSecureServer(options); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200 + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(80); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; - + /** + * Returns a `ClientHttp2Session` instance. + * + * ```js + * const http2 = require('http2'); + * const client = http2.connect('https://localhost:1234'); + * + * // Use the client + * + * client.close(); + * ``` + * @since v8.4.0 + * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port + * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. + * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. + */ export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; export function connect( authority: string | url.URL, @@ -960,3 +2129,6 @@ declare module 'http2' { listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void ): ClientHttp2Session; } +declare module 'node:http2' { + export * from 'http2'; +} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts index 87f352d..bda367d 100644 --- a/node_modules/@types/node/https.d.ts +++ b/node_modules/@types/node/https.d.ts @@ -1,40 +1,542 @@ -declare module 'node:https' { - export * from 'https'; -} - +/** + * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a + * separate module. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js) + */ declare module 'https' { + import { Duplex } from 'node:stream'; import * as tls from 'node:tls'; import * as http from 'node:http'; import { URL } from 'node:url'; - - type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; - - type RequestOptions = http.RequestOptions & tls.SecureContextOptions & { - rejectUnauthorized?: boolean; // Defaults to true - servername?: string; // SNI TLS Extension - }; - + type ServerOptions< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; + type RequestOptions = http.RequestOptions & + tls.SecureContextOptions & { + checkServerIdentity?: typeof tls.checkServerIdentity | undefined; + rejectUnauthorized?: boolean | undefined; // Defaults to true + servername?: string | undefined; // SNI TLS Extension + }; interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { - rejectUnauthorized?: boolean; - maxCachedSessions?: number; + rejectUnauthorized?: boolean | undefined; + maxCachedSessions?: number | undefined; } - + /** + * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. + * @since v0.4.5 + */ class Agent extends http.Agent { constructor(options?: AgentOptions); options: AgentOptions; } - - interface Server extends http.HttpBase {} - class Server extends tls.Server { - constructor(requestListener?: http.RequestListener); - constructor(options: ServerOptions, requestListener?: http.RequestListener); + interface Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > extends http.Server {} + /** + * See `http.Server` for more information. + * @since v0.3.4 + */ + class Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor( + options: ServerOptions, + requestListener?: http.RequestListener, + ); + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + addListener( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + addListener( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + addListener( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Duplex) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'checkContinue', listener: http.RequestListener): this; + addListener(event: 'checkExpectation', listener: http.RequestListener): this; + addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + addListener( + event: 'connect', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + addListener(event: 'request', listener: http.RequestListener): this; + addListener( + event: 'upgrade', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + emit(event: string, ...args: any[]): boolean; + emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean; + emit( + event: 'newSession', + sessionId: Buffer, + sessionData: Buffer, + callback: (err: Error, resp: Buffer) => void, + ): boolean; + emit( + event: 'OCSPRequest', + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ): boolean; + emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; + emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean; + emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean; + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Duplex): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit( + event: 'checkContinue', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit( + event: 'checkExpectation', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: 'clientError', err: Error, socket: Duplex): boolean; + emit(event: 'connect', req: InstanceType, socket: Duplex, head: Buffer): boolean; + emit( + event: 'request', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: 'upgrade', req: InstanceType, socket: Duplex, head: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + on( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + on( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + on( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Duplex) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'checkContinue', listener: http.RequestListener): this; + on(event: 'checkExpectation', listener: http.RequestListener): this; + on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + on(event: 'connect', listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + on(event: 'request', listener: http.RequestListener): this; + on(event: 'upgrade', listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + once( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + once( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + once( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Duplex) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'checkContinue', listener: http.RequestListener): this; + once(event: 'checkExpectation', listener: http.RequestListener): this; + once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + once(event: 'connect', listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + once(event: 'request', listener: http.RequestListener): this; + once(event: 'upgrade', listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + prependListener( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + prependListener( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + prependListener( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Duplex) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'checkContinue', listener: http.RequestListener): this; + prependListener(event: 'checkExpectation', listener: http.RequestListener): this; + prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + prependListener( + event: 'connect', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependListener(event: 'request', listener: http.RequestListener): this; + prependListener( + event: 'upgrade', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + prependOnceListener( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + prependOnceListener( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'checkContinue', listener: http.RequestListener): this; + prependOnceListener(event: 'checkExpectation', listener: http.RequestListener): this; + prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + prependOnceListener( + event: 'connect', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: 'request', listener: http.RequestListener): this; + prependOnceListener( + event: 'upgrade', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; } - - function createServer(requestListener?: http.RequestListener): Server; - function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server; - function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + /** + * ```js + * // curl -k https://localhost:8000/ + * const https = require('https'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * + * Or + * + * ```js + * const https = require('https'); + * const fs = require('fs'); + * + * const options = { + * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), + * passphrase: 'sample' + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * @since v0.3.4 + * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. + * @param requestListener A listener to be added to the `'request'` event. + */ + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + >(requestListener?: http.RequestListener): Server; + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + >( + options: ServerOptions, + requestListener?: http.RequestListener, + ): Server; + /** + * Makes a request to a secure web server. + * + * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`, + * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * const https = require('https'); + * + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET' + * }; + * + * const req = https.request(options, (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(e); + * }); + * req.end(); + * ``` + * + * Example using options from `tls.connect()`: + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') + * }; + * options.agent = new https.Agent(options); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Alternatively, opt out of connection pooling by not using an `Agent`. + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * agent: false + * }; + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('https://abc:xyz@example.com'); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): + * + * ```js + * const tls = require('tls'); + * const https = require('https'); + * const crypto = require('crypto'); + * + * function sha256(s) { + * return crypto.createHash('sha256').update(s).digest('base64'); + * } + * const options = { + * hostname: 'github.com', + * port: 443, + * path: '/', + * method: 'GET', + * checkServerIdentity: function(host, cert) { + * // Make sure the certificate is issued to the host we are connected to + * const err = tls.checkServerIdentity(host, cert); + * if (err) { + * return err; + * } + * + * // Pin the public key, similar to HPKP pin-sha25 pinning + * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; + * if (sha256(cert.pubkey) !== pubkey256) { + * const msg = 'Certificate verification error: ' + + * `The public key of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // Pin the exact certificate, rather than the pub key + * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + + * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; + * if (cert.fingerprint256 !== cert256) { + * const msg = 'Certificate verification error: ' + + * `The certificate of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // This loop is informational only. + * // Print the certificate and public key fingerprints of all certs in the + * // chain. Its common to pin the public key of the issuer on the public + * // internet, while pinning the public key of the service in sensitive + * // environments. + * do { + * console.log('Subject Common Name:', cert.subject.CN); + * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); + * + * hash = crypto.createHash('sha256'); + * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); + * + * lastprint256 = cert.fingerprint256; + * cert = cert.issuerCertificate; + * } while (cert.fingerprint256 !== lastprint256); + * + * }, + * }; + * + * options.agent = new https.Agent(options); + * const req = https.request(options, (res) => { + * console.log('All OK. Server matched our pinned cert or public key'); + * console.log('statusCode:', res.statusCode); + * // Print the HPKP values + * console.log('headers:', res.headers['public-key-pins']); + * + * res.on('data', (d) => {}); + * }); + * + * req.on('error', (e) => { + * console.error(e.message); + * }); + * req.end(); + * ``` + * + * Outputs for example: + * + * ```text + * Subject Common Name: github.com + * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 + * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= + * Subject Common Name: DigiCert SHA2 Extended Validation Server CA + * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A + * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= + * Subject Common Name: DigiCert High Assurance EV Root CA + * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF + * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= + * All OK. Server matched our pinned cert or public key + * statusCode: 200 + * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; + * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; + * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains + * ``` + * @since v0.3.6 + * @param options Accepts all `options` from `request`, with some differences in default values: + */ + function request( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + /** + * Like `http.get()` but for HTTPS. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * ```js + * const https = require('https'); + * + * https.get('https://encrypted.google.com/', (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * + * }).on('error', (e) => { + * console.error(e); + * }); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. + */ + function get( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function get( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; let globalAgent: Agent; } +declare module 'node:https' { + export * from 'https'; +} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts index 5edaa16..9db5f47 100644 --- a/node_modules/@types/node/index.d.ts +++ b/node_modules/@types/node/index.d.ts @@ -1,19 +1,16 @@ -// Type definitions for non-npm package Node.js 14.14 -// Project: http://nodejs.org/ +// Type definitions for non-npm package Node.js 18.11 +// Project: https://nodejs.org/ // Definitions by: Microsoft TypeScript // DefinitelyTyped // Alberto Schiabel -// Alexander T. // Alvis HT Tang // Andrew Makarov // Benjamin Toueg -// Bruno Scheufler // Chigozirim C. // David Junger // Deividas Bakanas // Eugene Y. Q. Shen // Hannes Magnusson -// Hoàng Văn Khải // Huw // Kelvin Jin // Klaus Meinhardt @@ -30,32 +27,108 @@ // wwwy3y3 // Samuel Ainsworth // Kyle Uehlein -// Jordi Oliveras Rovira // Thanik Bhongbhibhat // Marcin Kopacz // Trivikram Kamat -// Minh Son Nguyen // Junxiao Shi // Ilia Baryshnikov // ExE Boss -// Surasak Chaisurin // Piotr Błażejewicz // Anna Henningsen -// Jason Kwok // Victor Perin // Yongsheng Zhang +// NodeJS Contributors +// Linus Unnebäck +// wafuwafu13 +// Matteo Collina +// Dmitry Semigradsky // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// NOTE: These definitions support NodeJS and TypeScript 3.7. -// Typically type modifications should be made in base.d.ts instead of here +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * 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. + */ -/// +// NOTE: These definitions support NodeJS and TypeScript 4.9+. -// NOTE: TypeScript version-specific augmentations can be found in the following paths: -// - ~/base.d.ts - Shared definitions common to all TypeScript versions -// - ~/index.d.ts - Definitions specific to TypeScript 2.8 -// - ~/ts3.5/index.d.ts - Definitions specific to TypeScript 3.5 +// Reference required types from the default lib: +/// +/// +/// +/// -// NOTE: Augmentations for TypeScript 3.5 and later should use individual files for overrides -// within the respective ~/ts3.5 (or later) folder. However, this is disallowed for versions -// prior to TypeScript 3.5, so the older definitions will be found here. +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + +/// diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts index ee0e2e7..eba0b55 100644 --- a/node_modules/@types/node/inspector.d.ts +++ b/node_modules/@types/node/inspector.d.ts @@ -1,4 +1,4 @@ -// tslint:disable-next-line:dt-header +// eslint-disable-next-line dt-header // Type definitions for inspector // These definitions are auto-generated. @@ -8,23 +8,21 @@ // tslint:disable:max-line-length /** - * The inspector module provides an API for interacting with the V8 inspector. - */ -declare module 'node:inspector' { - export * from 'inspector'; -} - -/** - * The inspector module provides an API for interacting with the V8 inspector. + * The `inspector` module provides an API for interacting with the V8 inspector. + * + * It can be accessed using: + * + * ```js + * const inspector = require('inspector'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/inspector.js) */ declare module 'inspector' { import EventEmitter = require('node:events'); - interface InspectorNotification { method: string; params: T; } - namespace Schema { /** * Description of the protocol domain. @@ -39,7 +37,6 @@ declare module 'inspector' { */ version: string; } - interface GetDomainsReturnType { /** * List of supported domains. @@ -47,23 +44,19 @@ declare module 'inspector' { domains: Domain[]; } } - namespace Runtime { /** * Unique script identifier. */ type ScriptId = string; - /** * Unique object identifier. */ type RemoteObjectId = string; - /** * Primitive value which cannot be JSON-stringified. */ type UnserializableValue = string; - /** * Mirror object referencing original JavaScript object. */ @@ -75,11 +68,11 @@ declare module 'inspector' { /** * Object subtype hint. Specified for object type values only. */ - subtype?: string; + subtype?: string | undefined; /** * Object class (constructor) name. Specified for object type values only. */ - className?: string; + className?: string | undefined; /** * Remote object value in case of primitive values or JSON values (if it was requested). */ @@ -87,26 +80,25 @@ declare module 'inspector' { /** * Primitive value which can not be JSON-stringified does not have value, but gets this property. */ - unserializableValue?: UnserializableValue; + unserializableValue?: UnserializableValue | undefined; /** * String representation of the object. */ - description?: string; + description?: string | undefined; /** * Unique object identifier (for non-primitive values). */ - objectId?: RemoteObjectId; + objectId?: RemoteObjectId | undefined; /** * Preview containing abbreviated property values. Specified for object type values only. * @experimental */ - preview?: ObjectPreview; + preview?: ObjectPreview | undefined; /** * @experimental */ - customPreview?: CustomPreview; + customPreview?: CustomPreview | undefined; } - /** * @experimental */ @@ -115,9 +107,8 @@ declare module 'inspector' { hasBody: boolean; formatterObjectId: RemoteObjectId; bindRemoteObjectFunctionId: RemoteObjectId; - configObjectId?: RemoteObjectId; + configObjectId?: RemoteObjectId | undefined; } - /** * Object containing abbreviated remote object value. * @experimental @@ -130,11 +121,11 @@ declare module 'inspector' { /** * Object subtype hint. Specified for object type values only. */ - subtype?: string; + subtype?: string | undefined; /** * String representation of the object. */ - description?: string; + description?: string | undefined; /** * True iff some of the properties or entries of the original object did not fit. */ @@ -146,9 +137,8 @@ declare module 'inspector' { /** * List of the entries. Specified for map and set subtype values only. */ - entries?: EntryPreview[]; + entries?: EntryPreview[] | undefined; } - /** * @experimental */ @@ -164,17 +154,16 @@ declare module 'inspector' { /** * User-friendly property value string. */ - value?: string; + value?: string | undefined; /** * Nested value preview. */ - valuePreview?: ObjectPreview; + valuePreview?: ObjectPreview | undefined; /** * Object subtype hint. Specified for object type values only. */ - subtype?: string; + subtype?: string | undefined; } - /** * @experimental */ @@ -182,13 +171,12 @@ declare module 'inspector' { /** * Preview of the key. Specified for map-like collection entries. */ - key?: ObjectPreview; + key?: ObjectPreview | undefined; /** * Preview of the value. */ value: ObjectPreview; } - /** * Object property descriptor. */ @@ -200,19 +188,19 @@ declare module 'inspector' { /** * The value associated with the property. */ - value?: RemoteObject; + value?: RemoteObject | undefined; /** * True if the value associated with the property may be changed (data descriptors only). */ - writable?: boolean; + writable?: boolean | undefined; /** * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). */ - get?: RemoteObject; + get?: RemoteObject | undefined; /** * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). */ - set?: RemoteObject; + set?: RemoteObject | undefined; /** * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. */ @@ -224,17 +212,16 @@ declare module 'inspector' { /** * True if the result was thrown during the evaluation. */ - wasThrown?: boolean; + wasThrown?: boolean | undefined; /** * True if the property is owned for the object. */ - isOwn?: boolean; + isOwn?: boolean | undefined; /** * Property symbol object, if the property is of the symbol type. */ - symbol?: RemoteObject; + symbol?: RemoteObject | undefined; } - /** * Object internal property descriptor. This property isn't normally visible in JavaScript code. */ @@ -246,9 +233,8 @@ declare module 'inspector' { /** * The value associated with the property. */ - value?: RemoteObject; + value?: RemoteObject | undefined; } - /** * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. */ @@ -260,18 +246,16 @@ declare module 'inspector' { /** * Primitive value which can not be JSON-stringified. */ - unserializableValue?: UnserializableValue; + unserializableValue?: UnserializableValue | undefined; /** * Remote object handle. */ - objectId?: RemoteObjectId; + objectId?: RemoteObjectId | undefined; } - /** * Id of an execution context. */ type ExecutionContextId = number; - /** * Description of an isolated world. */ @@ -291,9 +275,8 @@ declare module 'inspector' { /** * Embedder-specific auxiliary data. */ - auxData?: {}; + auxData?: {} | undefined; } - /** * Detailed information about exception (or error) that was thrown during script compilation or execution. */ @@ -317,30 +300,28 @@ declare module 'inspector' { /** * Script ID of the exception location. */ - scriptId?: ScriptId; + scriptId?: ScriptId | undefined; /** * URL of the exception location, to be used when the script was not reported. */ - url?: string; + url?: string | undefined; /** * JavaScript stack trace if available. */ - stackTrace?: StackTrace; + stackTrace?: StackTrace | undefined; /** * Exception object if available. */ - exception?: RemoteObject; + exception?: RemoteObject | undefined; /** * Identifier of the context where exception happened. */ - executionContextId?: ExecutionContextId; + executionContextId?: ExecutionContextId | undefined; } - /** * Number of milliseconds since epoch. */ type Timestamp = number; - /** * Stack entry for runtime errors and assertions. */ @@ -366,7 +347,6 @@ declare module 'inspector' { */ columnNumber: number; } - /** * Call frames for assertions or error messages. */ @@ -374,7 +354,7 @@ declare module 'inspector' { /** * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. */ - description?: string; + description?: string | undefined; /** * JavaScript function name. */ @@ -382,29 +362,26 @@ declare module 'inspector' { /** * Asynchronous JavaScript stack trace that preceded this stack, if available. */ - parent?: StackTrace; + parent?: StackTrace | undefined; /** * Asynchronous JavaScript stack trace that preceded this stack, if available. * @experimental */ - parentId?: StackTraceId; + parentId?: StackTraceId | undefined; } - /** * Unique identifier of current debugger. * @experimental */ type UniqueDebuggerId = string; - /** * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. * @experimental */ interface StackTraceId { id: string; - debuggerId?: UniqueDebuggerId; + debuggerId?: UniqueDebuggerId | undefined; } - interface EvaluateParameterType { /** * Expression to evaluate. @@ -413,38 +390,37 @@ declare module 'inspector' { /** * Symbolic group name that can be used to release multiple objects. */ - objectGroup?: string; + objectGroup?: string | undefined; /** * Determines whether Command Line API should be available during the evaluation. */ - includeCommandLineAPI?: boolean; + includeCommandLineAPI?: boolean | undefined; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. */ - silent?: boolean; + silent?: boolean | undefined; /** * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. */ - contextId?: ExecutionContextId; + contextId?: ExecutionContextId | undefined; /** * Whether the result is expected to be a JSON object that should be sent by value. */ - returnByValue?: boolean; + returnByValue?: boolean | undefined; /** * Whether preview should be generated for the result. * @experimental */ - generatePreview?: boolean; + generatePreview?: boolean | undefined; /** * Whether execution should be treated as initiated by user in the UI. */ - userGesture?: boolean; + userGesture?: boolean | undefined; /** * Whether execution should await for resulting value and return once awaited promise is resolved. */ - awaitPromise?: boolean; + awaitPromise?: boolean | undefined; } - interface AwaitPromiseParameterType { /** * Identifier of the promise. @@ -453,13 +429,12 @@ declare module 'inspector' { /** * Whether the result is expected to be a JSON object that should be sent by value. */ - returnByValue?: boolean; + returnByValue?: boolean | undefined; /** * Whether preview should be generated for the result. */ - generatePreview?: boolean; + generatePreview?: boolean | undefined; } - interface CallFunctionOnParameterType { /** * Declaration of the function to call. @@ -468,42 +443,41 @@ declare module 'inspector' { /** * Identifier of the object to call function on. Either objectId or executionContextId should be specified. */ - objectId?: RemoteObjectId; + objectId?: RemoteObjectId | undefined; /** * Call arguments. All call arguments must belong to the same JavaScript world as the target object. */ - arguments?: CallArgument[]; + arguments?: CallArgument[] | undefined; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. */ - silent?: boolean; + silent?: boolean | undefined; /** * Whether the result is expected to be a JSON object which should be sent by value. */ - returnByValue?: boolean; + returnByValue?: boolean | undefined; /** * Whether preview should be generated for the result. * @experimental */ - generatePreview?: boolean; + generatePreview?: boolean | undefined; /** * Whether execution should be treated as initiated by user in the UI. */ - userGesture?: boolean; + userGesture?: boolean | undefined; /** * Whether execution should await for resulting value and return once awaited promise is resolved. */ - awaitPromise?: boolean; + awaitPromise?: boolean | undefined; /** * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. */ - executionContextId?: ExecutionContextId; + executionContextId?: ExecutionContextId | undefined; /** * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. */ - objectGroup?: string; + objectGroup?: string | undefined; } - interface GetPropertiesParameterType { /** * Identifier of the object to return properties for. @@ -512,37 +486,33 @@ declare module 'inspector' { /** * If true, returns properties belonging only to the element itself, not to its prototype chain. */ - ownProperties?: boolean; + ownProperties?: boolean | undefined; /** * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. * @experimental */ - accessorPropertiesOnly?: boolean; + accessorPropertiesOnly?: boolean | undefined; /** * Whether preview should be generated for the results. * @experimental */ - generatePreview?: boolean; + generatePreview?: boolean | undefined; } - interface ReleaseObjectParameterType { /** * Identifier of the object to release. */ objectId: RemoteObjectId; } - interface ReleaseObjectGroupParameterType { /** * Symbolic object group name. */ objectGroup: string; } - interface SetCustomObjectFormatterEnabledParameterType { enabled: boolean; } - interface CompileScriptParameterType { /** * Expression to compile. @@ -559,9 +529,8 @@ declare module 'inspector' { /** * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. */ - executionContextId?: ExecutionContextId; + executionContextId?: ExecutionContextId | undefined; } - interface RunScriptParameterType { /** * Id of the script to run. @@ -570,47 +539,44 @@ declare module 'inspector' { /** * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. */ - executionContextId?: ExecutionContextId; + executionContextId?: ExecutionContextId | undefined; /** * Symbolic group name that can be used to release multiple objects. */ - objectGroup?: string; + objectGroup?: string | undefined; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. */ - silent?: boolean; + silent?: boolean | undefined; /** * Determines whether Command Line API should be available during the evaluation. */ - includeCommandLineAPI?: boolean; + includeCommandLineAPI?: boolean | undefined; /** * Whether the result is expected to be a JSON object which should be sent by value. */ - returnByValue?: boolean; + returnByValue?: boolean | undefined; /** * Whether preview should be generated for the result. */ - generatePreview?: boolean; + generatePreview?: boolean | undefined; /** * Whether execution should await for resulting value and return once awaited promise is resolved. */ - awaitPromise?: boolean; + awaitPromise?: boolean | undefined; } - interface QueryObjectsParameterType { /** * Identifier of the prototype to return objects for. */ prototypeObjectId: RemoteObjectId; } - interface GlobalLexicalScopeNamesParameterType { /** * Specifies in which execution context to lookup global scope variables. */ - executionContextId?: ExecutionContextId; + executionContextId?: ExecutionContextId | undefined; } - interface EvaluateReturnType { /** * Evaluation result. @@ -619,9 +585,8 @@ declare module 'inspector' { /** * Exception details. */ - exceptionDetails?: ExceptionDetails; + exceptionDetails?: ExceptionDetails | undefined; } - interface AwaitPromiseReturnType { /** * Promise result. Will contain rejected value if promise was rejected. @@ -630,9 +595,8 @@ declare module 'inspector' { /** * Exception details if stack strace is available. */ - exceptionDetails?: ExceptionDetails; + exceptionDetails?: ExceptionDetails | undefined; } - interface CallFunctionOnReturnType { /** * Call result. @@ -641,9 +605,8 @@ declare module 'inspector' { /** * Exception details. */ - exceptionDetails?: ExceptionDetails; + exceptionDetails?: ExceptionDetails | undefined; } - interface GetPropertiesReturnType { /** * Object properties. @@ -652,24 +615,22 @@ declare module 'inspector' { /** * Internal object properties (only of the element itself). */ - internalProperties?: InternalPropertyDescriptor[]; + internalProperties?: InternalPropertyDescriptor[] | undefined; /** * Exception details. */ - exceptionDetails?: ExceptionDetails; + exceptionDetails?: ExceptionDetails | undefined; } - interface CompileScriptReturnType { /** * Id of the script. */ - scriptId?: ScriptId; + scriptId?: ScriptId | undefined; /** * Exception details. */ - exceptionDetails?: ExceptionDetails; + exceptionDetails?: ExceptionDetails | undefined; } - interface RunScriptReturnType { /** * Run result. @@ -678,34 +639,29 @@ declare module 'inspector' { /** * Exception details. */ - exceptionDetails?: ExceptionDetails; + exceptionDetails?: ExceptionDetails | undefined; } - interface QueryObjectsReturnType { /** * Array with objects. */ objects: RemoteObject; } - interface GlobalLexicalScopeNamesReturnType { names: string[]; } - interface ExecutionContextCreatedEventDataType { /** * A newly created execution context. */ context: ExecutionContextDescription; } - interface ExecutionContextDestroyedEventDataType { /** * Id of the destroyed context */ executionContextId: ExecutionContextId; } - interface ExceptionThrownEventDataType { /** * Timestamp of the exception. @@ -713,7 +669,6 @@ declare module 'inspector' { timestamp: Timestamp; exceptionDetails: ExceptionDetails; } - interface ExceptionRevokedEventDataType { /** * Reason describing why exception was revoked. @@ -724,7 +679,6 @@ declare module 'inspector' { */ exceptionId: number; } - interface ConsoleAPICalledEventDataType { /** * Type of the call. @@ -745,31 +699,27 @@ declare module 'inspector' { /** * Stack trace captured when the call was made. */ - stackTrace?: StackTrace; + stackTrace?: StackTrace | undefined; /** * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. * @experimental */ - context?: string; + context?: string | undefined; } - interface InspectRequestedEventDataType { object: RemoteObject; hints: {}; } } - namespace Debugger { /** * Breakpoint identifier. */ type BreakpointId = string; - /** * Call frame identifier. */ type CallFrameId = string; - /** * Location in the source code. */ @@ -785,9 +735,8 @@ declare module 'inspector' { /** * Column number in the script (0-based). */ - columnNumber?: number; + columnNumber?: number | undefined; } - /** * Location in the source code. * @experimental @@ -796,7 +745,6 @@ declare module 'inspector' { lineNumber: number; columnNumber: number; } - /** * JavaScript call frame. Array of call frames form the call stack. */ @@ -812,7 +760,7 @@ declare module 'inspector' { /** * Location in the source code. */ - functionLocation?: Location; + functionLocation?: Location | undefined; /** * Location in the source code. */ @@ -832,9 +780,8 @@ declare module 'inspector' { /** * The value being returned, if the function is at return point. */ - returnValue?: Runtime.RemoteObject; + returnValue?: Runtime.RemoteObject | undefined; } - /** * Scope description. */ @@ -847,17 +794,16 @@ declare module 'inspector' { * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. */ object: Runtime.RemoteObject; - name?: string; + name?: string | undefined; /** * Location in the source code where scope starts */ - startLocation?: Location; + startLocation?: Location | undefined; /** * Location in the source code where scope ends */ - endLocation?: Location; + endLocation?: Location | undefined; } - /** * Search match for resource. */ @@ -871,7 +817,6 @@ declare module 'inspector' { */ lineContent: string; } - interface BreakLocation { /** * Script identifier as reported in the Debugger.scriptParsed. @@ -884,24 +829,21 @@ declare module 'inspector' { /** * Column number in the script (0-based). */ - columnNumber?: number; - type?: string; + columnNumber?: number | undefined; + type?: string | undefined; } - interface SetBreakpointsActiveParameterType { /** * New value for breakpoints active state. */ active: boolean; } - interface SetSkipAllPausesParameterType { /** * New value for skip pauses state. */ skip: boolean; } - interface SetBreakpointByUrlParameterType { /** * Line number to set breakpoint at. @@ -910,25 +852,24 @@ declare module 'inspector' { /** * URL of the resources to set breakpoint on. */ - url?: string; + url?: string | undefined; /** * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. */ - urlRegex?: string; + urlRegex?: string | undefined; /** * Script hash of the resources to set breakpoint on. */ - scriptHash?: string; + scriptHash?: string | undefined; /** * Offset in the line to set breakpoint at. */ - columnNumber?: number; + columnNumber?: number | undefined; /** * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. */ - condition?: string; + condition?: string | undefined; } - interface SetBreakpointParameterType { /** * Location to set breakpoint in. @@ -937,13 +878,11 @@ declare module 'inspector' { /** * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. */ - condition?: string; + condition?: string | undefined; } - interface RemoveBreakpointParameterType { breakpointId: BreakpointId; } - interface GetPossibleBreakpointsParameterType { /** * Start of range to search possible breakpoint locations in. @@ -952,40 +891,35 @@ declare module 'inspector' { /** * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. */ - end?: Location; + end?: Location | undefined; /** * Only consider locations which are in the same (non-nested) function as start. */ - restrictToFunction?: boolean; + restrictToFunction?: boolean | undefined; } - interface ContinueToLocationParameterType { /** * Location to continue to. */ location: Location; - targetCallFrames?: string; + targetCallFrames?: string | undefined; } - interface PauseOnAsyncCallParameterType { /** * Debugger will pause when async call with given stack trace is started. */ parentStackTraceId: Runtime.StackTraceId; } - interface StepIntoParameterType { /** * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. * @experimental */ - breakOnAsyncCall?: boolean; + breakOnAsyncCall?: boolean | undefined; } - interface GetStackTraceParameterType { stackTraceId: Runtime.StackTraceId; } - interface SearchInContentParameterType { /** * Id of the script to search in. @@ -998,13 +932,12 @@ declare module 'inspector' { /** * If true, search is case sensitive. */ - caseSensitive?: boolean; + caseSensitive?: boolean | undefined; /** * If true, treats string parameter as regex. */ - isRegex?: boolean; + isRegex?: boolean | undefined; } - interface SetScriptSourceParameterType { /** * Id of the script to edit. @@ -1017,30 +950,26 @@ declare module 'inspector' { /** * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. */ - dryRun?: boolean; + dryRun?: boolean | undefined; } - interface RestartFrameParameterType { /** * Call frame identifier to evaluate on. */ callFrameId: CallFrameId; } - interface GetScriptSourceParameterType { /** * Id of the script to get source for. */ scriptId: Runtime.ScriptId; } - interface SetPauseOnExceptionsParameterType { /** * Pause on exceptions mode. */ state: string; } - interface EvaluateOnCallFrameParameterType { /** * Call frame identifier to evaluate on. @@ -1053,30 +982,29 @@ declare module 'inspector' { /** * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). */ - objectGroup?: string; + objectGroup?: string | undefined; /** * Specifies whether command line API should be available to the evaluated expression, defaults to false. */ - includeCommandLineAPI?: boolean; + includeCommandLineAPI?: boolean | undefined; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. */ - silent?: boolean; + silent?: boolean | undefined; /** * Whether the result is expected to be a JSON object that should be sent by value. */ - returnByValue?: boolean; + returnByValue?: boolean | undefined; /** * Whether preview should be generated for the result. * @experimental */ - generatePreview?: boolean; + generatePreview?: boolean | undefined; /** * Whether to throw an exception if side effect cannot be ruled out during evaluation. */ - throwOnSideEffect?: boolean; + throwOnSideEffect?: boolean | undefined; } - interface SetVariableValueParameterType { /** * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. @@ -1095,28 +1023,24 @@ declare module 'inspector' { */ callFrameId: CallFrameId; } - interface SetReturnValueParameterType { /** * New return value. */ newValue: Runtime.CallArgument; } - interface SetAsyncCallStackDepthParameterType { /** * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). */ maxDepth: number; } - interface SetBlackboxPatternsParameterType { /** * Array of regexps that will be used to check script url for blackbox state. */ patterns: string[]; } - interface SetBlackboxedRangesParameterType { /** * Id of the script. @@ -1124,7 +1048,6 @@ declare module 'inspector' { scriptId: Runtime.ScriptId; positions: ScriptPosition[]; } - interface EnableReturnType { /** * Unique identifier of the debugger. @@ -1132,7 +1055,6 @@ declare module 'inspector' { */ debuggerId: Runtime.UniqueDebuggerId; } - interface SetBreakpointByUrlReturnType { /** * Id of the created breakpoint for further reference. @@ -1143,7 +1065,6 @@ declare module 'inspector' { */ locations: Location[]; } - interface SetBreakpointReturnType { /** * Id of the created breakpoint for further reference. @@ -1154,49 +1075,44 @@ declare module 'inspector' { */ actualLocation: Location; } - interface GetPossibleBreakpointsReturnType { /** * List of the possible breakpoint locations. */ locations: BreakLocation[]; } - interface GetStackTraceReturnType { stackTrace: Runtime.StackTrace; } - interface SearchInContentReturnType { /** * List of search matches. */ result: SearchMatch[]; } - interface SetScriptSourceReturnType { /** * New stack trace in case editing has happened while VM was stopped. */ - callFrames?: CallFrame[]; + callFrames?: CallFrame[] | undefined; /** * Whether current call stack was modified after applying the changes. */ - stackChanged?: boolean; + stackChanged?: boolean | undefined; /** * Async stack trace, if any. */ - asyncStackTrace?: Runtime.StackTrace; + asyncStackTrace?: Runtime.StackTrace | undefined; /** * Async stack trace, if any. * @experimental */ - asyncStackTraceId?: Runtime.StackTraceId; + asyncStackTraceId?: Runtime.StackTraceId | undefined; /** * Exception details if any. */ - exceptionDetails?: Runtime.ExceptionDetails; + exceptionDetails?: Runtime.ExceptionDetails | undefined; } - interface RestartFrameReturnType { /** * New stack trace. @@ -1205,21 +1121,19 @@ declare module 'inspector' { /** * Async stack trace, if any. */ - asyncStackTrace?: Runtime.StackTrace; + asyncStackTrace?: Runtime.StackTrace | undefined; /** * Async stack trace, if any. * @experimental */ - asyncStackTraceId?: Runtime.StackTraceId; + asyncStackTraceId?: Runtime.StackTraceId | undefined; } - interface GetScriptSourceReturnType { /** * Script source. */ scriptSource: string; } - interface EvaluateOnCallFrameReturnType { /** * Object wrapper for the evaluation result. @@ -1228,9 +1142,8 @@ declare module 'inspector' { /** * Exception details. */ - exceptionDetails?: Runtime.ExceptionDetails; + exceptionDetails?: Runtime.ExceptionDetails | undefined; } - interface ScriptParsedEventDataType { /** * Identifier of the script parsed. @@ -1267,35 +1180,34 @@ declare module 'inspector' { /** * Embedder-specific auxiliary data. */ - executionContextAuxData?: {}; + executionContextAuxData?: {} | undefined; /** * True, if this script is generated as a result of the live edit operation. * @experimental */ - isLiveEdit?: boolean; + isLiveEdit?: boolean | undefined; /** * URL of source map associated with script (if any). */ - sourceMapURL?: string; + sourceMapURL?: string | undefined; /** * True, if this script has sourceURL. */ - hasSourceURL?: boolean; + hasSourceURL?: boolean | undefined; /** * True, if this script is ES6 module. */ - isModule?: boolean; + isModule?: boolean | undefined; /** * This script length. */ - length?: number; + length?: number | undefined; /** * JavaScript top stack frame of where the script parsed event was triggered if available. * @experimental */ - stackTrace?: Runtime.StackTrace; + stackTrace?: Runtime.StackTrace | undefined; } - interface ScriptFailedToParseEventDataType { /** * Identifier of the script parsed. @@ -1332,30 +1244,29 @@ declare module 'inspector' { /** * Embedder-specific auxiliary data. */ - executionContextAuxData?: {}; + executionContextAuxData?: {} | undefined; /** * URL of source map associated with script (if any). */ - sourceMapURL?: string; + sourceMapURL?: string | undefined; /** * True, if this script has sourceURL. */ - hasSourceURL?: boolean; + hasSourceURL?: boolean | undefined; /** * True, if this script is ES6 module. */ - isModule?: boolean; + isModule?: boolean | undefined; /** * This script length. */ - length?: number; + length?: number | undefined; /** * JavaScript top stack frame of where the script parsed event was triggered if available. * @experimental */ - stackTrace?: Runtime.StackTrace; + stackTrace?: Runtime.StackTrace | undefined; } - interface BreakpointResolvedEventDataType { /** * Breakpoint unique identifier. @@ -1366,7 +1277,6 @@ declare module 'inspector' { */ location: Location; } - interface PausedEventDataType { /** * Call stack the virtual machine stopped on. @@ -1379,28 +1289,27 @@ declare module 'inspector' { /** * Object containing break-specific auxiliary properties. */ - data?: {}; + data?: {} | undefined; /** * Hit breakpoints IDs */ - hitBreakpoints?: string[]; + hitBreakpoints?: string[] | undefined; /** * Async stack trace, if any. */ - asyncStackTrace?: Runtime.StackTrace; + asyncStackTrace?: Runtime.StackTrace | undefined; /** * Async stack trace, if any. * @experimental */ - asyncStackTraceId?: Runtime.StackTraceId; + asyncStackTraceId?: Runtime.StackTraceId | undefined; /** * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. * @experimental */ - asyncCallStackTraceId?: Runtime.StackTraceId; + asyncCallStackTraceId?: Runtime.StackTraceId | undefined; } } - namespace Console { /** * Console message. @@ -1421,17 +1330,16 @@ declare module 'inspector' { /** * URL of the message origin. */ - url?: string; + url?: string | undefined; /** * Line number in the resource that generated this message (1-based). */ - line?: number; + line?: number | undefined; /** * Column number in the resource that generated this message (1-based). */ - column?: number; + column?: number | undefined; } - interface MessageAddedEventDataType { /** * Console message that has been added. @@ -1439,7 +1347,6 @@ declare module 'inspector' { message: ConsoleMessage; } } - namespace Profiler { /** * Profile node. Holds callsite information, execution statistics and child nodes. @@ -1456,21 +1363,20 @@ declare module 'inspector' { /** * Number of samples where this node was on top of the call stack. */ - hitCount?: number; + hitCount?: number | undefined; /** * Child node ids. */ - children?: number[]; + children?: number[] | undefined; /** * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. */ - deoptReason?: string; + deoptReason?: string | undefined; /** * An array of source position ticks. */ - positionTicks?: PositionTickInfo[]; + positionTicks?: PositionTickInfo[] | undefined; } - /** * Profile. */ @@ -1490,13 +1396,12 @@ declare module 'inspector' { /** * Ids of samples top nodes. */ - samples?: number[]; + samples?: number[] | undefined; /** * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. */ - timeDeltas?: number[]; + timeDeltas?: number[] | undefined; } - /** * Specifies a number of samples attributed to a certain source position. */ @@ -1510,7 +1415,6 @@ declare module 'inspector' { */ ticks: number; } - /** * Coverage data for a source range. */ @@ -1528,7 +1432,6 @@ declare module 'inspector' { */ count: number; } - /** * Coverage data for a JavaScript function. */ @@ -1546,7 +1449,6 @@ declare module 'inspector' { */ isBlockCoverage: boolean; } - /** * Coverage data for a JavaScript script. */ @@ -1564,7 +1466,6 @@ declare module 'inspector' { */ functions: FunctionCoverage[]; } - /** * Describes a type collected during runtime. * @experimental @@ -1575,7 +1476,6 @@ declare module 'inspector' { */ name: string; } - /** * Source offset and types for a parameter or return value. * @experimental @@ -1590,7 +1490,6 @@ declare module 'inspector' { */ types: TypeObject[]; } - /** * Type profile data collected during runtime for a JavaScript script. * @experimental @@ -1609,53 +1508,46 @@ declare module 'inspector' { */ entries: TypeProfileEntry[]; } - interface SetSamplingIntervalParameterType { /** * New sampling interval in microseconds. */ interval: number; } - interface StartPreciseCoverageParameterType { /** * Collect accurate call counts beyond simple 'covered' or 'not covered'. */ - callCount?: boolean; + callCount?: boolean | undefined; /** * Collect block-based coverage. */ - detailed?: boolean; + detailed?: boolean | undefined; } - interface StopReturnType { /** * Recorded profile. */ profile: Profile; } - interface TakePreciseCoverageReturnType { /** * Coverage data for the current isolate. */ result: ScriptCoverage[]; } - interface GetBestEffortCoverageReturnType { /** * Coverage data for the current isolate. */ result: ScriptCoverage[]; } - interface TakeTypeProfileReturnType { /** * Type profile for all scripts since startTypeProfile() was turned on. */ result: ScriptTypeProfile[]; } - interface ConsoleProfileStartedEventDataType { id: string; /** @@ -1665,9 +1557,8 @@ declare module 'inspector' { /** * Profile title passed as an argument to console.profile(). */ - title?: string; + title?: string | undefined; } - interface ConsoleProfileFinishedEventDataType { id: string; /** @@ -1678,16 +1569,14 @@ declare module 'inspector' { /** * Profile title passed as an argument to console.profile(). */ - title?: string; + title?: string | undefined; } } - namespace HeapProfiler { /** * Heap snapshot object id. */ type HeapSnapshotObjectId = string; - /** * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. */ @@ -1705,104 +1594,88 @@ declare module 'inspector' { */ children: SamplingHeapProfileNode[]; } - /** * Profile. */ interface SamplingHeapProfile { head: SamplingHeapProfileNode; } - interface StartTrackingHeapObjectsParameterType { - trackAllocations?: boolean; + trackAllocations?: boolean | undefined; } - interface StopTrackingHeapObjectsParameterType { /** * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. */ - reportProgress?: boolean; + reportProgress?: boolean | undefined; } - interface TakeHeapSnapshotParameterType { /** * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. */ - reportProgress?: boolean; + reportProgress?: boolean | undefined; } - interface GetObjectByHeapObjectIdParameterType { objectId: HeapSnapshotObjectId; /** * Symbolic group name that can be used to release multiple objects. */ - objectGroup?: string; + objectGroup?: string | undefined; } - interface AddInspectedHeapObjectParameterType { /** * Heap snapshot object id to be accessible by means of $x command line API. */ heapObjectId: HeapSnapshotObjectId; } - interface GetHeapObjectIdParameterType { /** * Identifier of the object to get heap object id for. */ objectId: Runtime.RemoteObjectId; } - interface StartSamplingParameterType { /** * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. */ - samplingInterval?: number; + samplingInterval?: number | undefined; } - interface GetObjectByHeapObjectIdReturnType { /** * Evaluation result. */ result: Runtime.RemoteObject; } - interface GetHeapObjectIdReturnType { /** * Id of the heap snapshot object corresponding to the passed remote object id. */ heapSnapshotObjectId: HeapSnapshotObjectId; } - interface StopSamplingReturnType { /** * Recorded sampling heap profile. */ profile: SamplingHeapProfile; } - interface GetSamplingProfileReturnType { /** * Return the sampling profile being collected. */ profile: SamplingHeapProfile; } - interface AddHeapSnapshotChunkEventDataType { chunk: string; } - interface ReportHeapSnapshotProgressEventDataType { done: number; total: number; - finished?: boolean; + finished?: boolean | undefined; } - interface LastSeenObjectIdEventDataType { lastSeenObjectId: number; timestamp: number; } - interface HeapStatsUpdateEventDataType { /** * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. @@ -1810,50 +1683,42 @@ declare module 'inspector' { statsUpdate: number[]; } } - namespace NodeTracing { interface TraceConfig { /** * Controls how the trace buffer stores data. */ - recordMode?: string; + recordMode?: string | undefined; /** * Included category filters. */ includedCategories: string[]; } - interface StartParameterType { traceConfig: TraceConfig; } - interface GetCategoriesReturnType { /** * A list of supported tracing categories. */ categories: string[]; } - interface DataCollectedEventDataType { value: Array<{}>; } } - namespace NodeWorker { type WorkerID = string; - /** * Unique identifier of attached debugging session. */ type SessionID = string; - interface WorkerInfo { workerId: WorkerID; type: string; title: string; url: string; } - interface SendMessageToWorkerParameterType { message: string; /** @@ -1861,7 +1726,6 @@ declare module 'inspector' { */ sessionId: SessionID; } - interface EnableParameterType { /** * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` @@ -1869,11 +1733,9 @@ declare module 'inspector' { */ waitForDebuggerOnStart: boolean; } - interface DetachParameterType { sessionId: SessionID; } - interface AttachedToWorkerEventDataType { /** * Identifier assigned to the session used to send/receive messages. @@ -1882,14 +1744,12 @@ declare module 'inspector' { workerInfo: WorkerInfo; waitingForDebugger: boolean; } - interface DetachedFromWorkerEventDataType { /** * Detached session identifier. */ sessionId: SessionID; } - interface ReceivedMessageFromWorkerEventDataType { /** * Identifier of a session which sends a message. @@ -1898,15 +1758,14 @@ declare module 'inspector' { message: string; } } - namespace NodeRuntime { interface NotifyWhenWaitingForDisconnectParameterType { enabled: boolean; } } - /** - * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. */ class Session extends EventEmitter { /** @@ -1914,1135 +1773,969 @@ declare module 'inspector' { * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. */ constructor(); - /** * Connects a session to the inspector back-end. - * An exception will be thrown if there is already a connected session established either - * through the API or by a front-end connected to the Inspector WebSocket port. + * @since v8.0.0 */ connect(): void; - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * session.connect() will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + * Immediately close the session. All pending message callbacks will be called + * with an error. `session.connect()` will need to be called to be able to send + * messages again. Reconnected session will lose all inspector state, such as + * enabled agents or configured breakpoints. + * @since v8.0.0 */ disconnect(): void; - /** - * Posts a message to the inspector back-end. callback will be notified when a response is received. - * callback is a function that accepts two optional arguments - error and message-specific result. + * Posts a message to the inspector back-end. `callback` will be notified when + * a response is received. `callback` is a function that accepts two optional + * arguments: error and message-specific result. + * + * ```js + * session.post('Runtime.evaluate', { expression: '2 + 2' }, + * (error, { result }) => console.log(result)); + * // Output: { type: 'number', value: 4, description: '4' } + * ``` + * + * The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8\. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + * + * ## Example usage + * + * Apart from the debugger, various V8 Profilers are available through the DevTools + * protocol. + * @since v8.0.0 */ post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; post(method: string, callback?: (err: Error | null, params?: {}) => void): void; - /** * Returns supported domains. */ - post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; - + post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; /** * Evaluates expression on global object. */ - post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - + post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; /** * Add handler to promise with given promise object id. */ - post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - + post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; /** * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. */ - post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - + post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; /** * Returns properties of a given object. Object group of the result is inherited from the target object. */ - post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - + post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; /** * Releases remote object with given id. */ - post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; - + post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void; /** * Releases all remote objects that belong to a given group. */ - post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; - + post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void; /** * Tells inspected instance to run if it was waiting for debugger to attach. */ - post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; - + post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void; /** * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. */ - post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; - + post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void; /** * Disables reporting of execution contexts creation. */ - post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; - + post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void; /** * Discards collected exceptions and console API calls. */ - post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; - + post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void; /** * @experimental */ - post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; - + post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void; /** * Compiles expression. */ - post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - + post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; /** * Runs script with given id in a given context. */ - post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - - post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - + post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; /** * Returns all let, const and class variables from global scope. */ post( - method: "Runtime.globalLexicalScopeNames", + method: 'Runtime.globalLexicalScopeNames', params?: Runtime.GlobalLexicalScopeNamesParameterType, callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void ): void; - post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; - + post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; /** * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. */ - post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; - + post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; /** * Disables debugger for given page. */ - post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void; /** * Activates / deactivates all breakpoints on the page. */ - post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void; /** * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). */ - post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void; /** * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. */ - post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - + post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; /** * Sets JavaScript breakpoint at a given location. */ - post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - + post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; /** * Removes JavaScript breakpoint. */ - post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void; /** * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. */ post( - method: "Debugger.getPossibleBreakpoints", + method: 'Debugger.getPossibleBreakpoints', params?: Debugger.GetPossibleBreakpointsParameterType, callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void ): void; - post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; - + post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; /** * Continues execution until specific location is reached. */ - post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void; /** * @experimental */ - post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void; /** * Steps over the statement. */ - post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void; /** * Steps into the function call. */ - post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void; /** * Steps out of the function call. */ - post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void; /** * Stops on the next JavaScript statement. */ - post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void; /** * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. * @experimental */ - post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void; /** * Resumes JavaScript execution. */ - post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void; /** * Returns stack trace with given stackTraceId. * @experimental */ - post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - + post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; /** * Searches for given string in script content. */ - post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - + post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; /** * Edits JavaScript source live. */ - post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - + post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; /** * Restarts particular call frame from the beginning. */ - post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - + post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; /** * Returns source for the script with given id. */ - post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - + post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; /** * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. */ - post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void; /** * Evaluates expression on a given call frame. */ - post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - + post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; /** * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. */ - post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void; /** * Changes return value in top frame. Available only at return break position. * @experimental */ - post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void; /** * Enables or disables async call stacks tracking. */ - post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void; /** * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. * @experimental */ - post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void; /** * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. * @experimental */ - post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; - + post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void; /** * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. */ - post(method: "Console.enable", callback?: (err: Error | null) => void): void; - + post(method: 'Console.enable', callback?: (err: Error | null) => void): void; /** * Disables console domain, prevents further console messages from being reported to the client. */ - post(method: "Console.disable", callback?: (err: Error | null) => void): void; - + post(method: 'Console.disable', callback?: (err: Error | null) => void): void; /** * Does nothing. */ - post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; - + post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void; /** * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. */ - post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; - post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.start", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; - + post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.start', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; /** * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. */ - post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; - post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; - + post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void; /** * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. */ - post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; - + post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void; /** * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. */ - post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; - + post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; /** * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. */ - post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; - + post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; /** * Enable type profile. * @experimental */ - post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void; - + post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void; /** * Disable type profile. Disabling releases type profile data collected so far. * @experimental */ - post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void; - + post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void; /** * Collect type profile. * @experimental */ - post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; - - post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; - + post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; + post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void; post( - method: "HeapProfiler.getObjectByHeapObjectId", + method: 'HeapProfiler.getObjectByHeapObjectId', params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void ): void; - post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; - + post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; /** * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). */ - post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - - post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; - - post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; - + post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; /** * Gets supported tracing categories. */ - post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; - + post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; /** * Start trace events collection. */ - post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; - + post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void; /** * Stop trace events collection. Remaining collected events will be sent as a sequence of * dataCollected events followed by tracingComplete event. */ - post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; - + post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void; /** * Sends protocol message over session with given id. */ - post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; - + post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void; /** * Instructs the inspector to attach to running workers. Will also attach to new workers * as they start */ - post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; - + post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void; /** * Detaches from all running workers and disables attaching to new workers as they are started. */ - post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; - + post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void; /** * Detached from the worker with given sessionId. */ - post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; - + post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void; /** * Enable the `NodeRuntime.waitingForDisconnect`. */ - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void; - + post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void; // Events - addListener(event: string, listener: (...args: any[]) => void): this; - /** * Emitted when any notification from the V8 Inspector is received. */ - addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - + addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; /** * Issued when new execution context is created. */ - addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; /** * Issued when execution context is destroyed. */ - addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; /** * Issued when all executionContexts were cleared in browser */ - addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - + addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; /** * Issued when exception was thrown and unhandled. */ - addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; /** * Issued when unhandled exception was revoked. */ - addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; /** * Issued when console API was called. */ - addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; /** * Issued when object should be inspected (for example, as a result of inspect() command line API call). */ - addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. */ - addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine fails to parse the script. */ - addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; /** * Fired when breakpoint is resolved to an actual script and location. */ - addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */ - addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine resumed execution. */ - addListener(event: "Debugger.resumed", listener: () => void): this; - + addListener(event: 'Debugger.resumed', listener: () => void): this; /** * Issued when new console message is added. */ - addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; /** * Sent when new profile recording is started using console.profile() call. */ - addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. */ - addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend may send update for one or more fragments */ - addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; /** * Contains an bucket of collected trace events. */ - addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; /** * Signals that tracing is stopped and there is no trace buffers pending flush, all data were * delivered via dataCollected events. */ - addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - + addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; /** * Issued when attached to a worker. */ - addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; /** * Issued when detached from the worker. */ - addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; /** * Notifies about a new protocol message received from the session * (session ID is provided in attachedToWorker notification). */ - addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - + addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. * It is fired when the Node process finished all code execution and is * waiting for all frontends to disconnect. */ - addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - + addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; - emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextsCleared"): boolean; - emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; - emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; - emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; - emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; - emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; - emit(event: "Debugger.paused", message: InspectorNotification): boolean; - emit(event: "Debugger.resumed"): boolean; - emit(event: "Console.messageAdded", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.resetProfiles"): boolean; - emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; - emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; - emit(event: "NodeTracing.tracingComplete"): boolean; - emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; - emit(event: "NodeRuntime.waitingForDisconnect"): boolean; - + emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean; + emit(event: 'Runtime.executionContextCreated', message: InspectorNotification): boolean; + emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification): boolean; + emit(event: 'Runtime.executionContextsCleared'): boolean; + emit(event: 'Runtime.exceptionThrown', message: InspectorNotification): boolean; + emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification): boolean; + emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification): boolean; + emit(event: 'Runtime.inspectRequested', message: InspectorNotification): boolean; + emit(event: 'Debugger.scriptParsed', message: InspectorNotification): boolean; + emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification): boolean; + emit(event: 'Debugger.breakpointResolved', message: InspectorNotification): boolean; + emit(event: 'Debugger.paused', message: InspectorNotification): boolean; + emit(event: 'Debugger.resumed'): boolean; + emit(event: 'Console.messageAdded', message: InspectorNotification): boolean; + emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification): boolean; + emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.resetProfiles'): boolean; + emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification): boolean; + emit(event: 'NodeTracing.dataCollected', message: InspectorNotification): boolean; + emit(event: 'NodeTracing.tracingComplete'): boolean; + emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; + emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; + emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; + emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; on(event: string, listener: (...args: any[]) => void): this; - /** * Emitted when any notification from the V8 Inspector is received. */ - on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - + on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; /** * Issued when new execution context is created. */ - on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - + on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; /** * Issued when execution context is destroyed. */ - on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - + on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; /** * Issued when all executionContexts were cleared in browser */ - on(event: "Runtime.executionContextsCleared", listener: () => void): this; - + on(event: 'Runtime.executionContextsCleared', listener: () => void): this; /** * Issued when exception was thrown and unhandled. */ - on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - + on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; /** * Issued when unhandled exception was revoked. */ - on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - + on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; /** * Issued when console API was called. */ - on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - + on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; /** * Issued when object should be inspected (for example, as a result of inspect() command line API call). */ - on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - + on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. */ - on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - + on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine fails to parse the script. */ - on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - + on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; /** * Fired when breakpoint is resolved to an actual script and location. */ - on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - + on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */ - on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - + on(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine resumed execution. */ - on(event: "Debugger.resumed", listener: () => void): this; - + on(event: 'Debugger.resumed', listener: () => void): this; /** * Issued when new console message is added. */ - on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - + on(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; /** * Sent when new profile recording is started using console.profile() call. */ - on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.resetProfiles", listener: () => void): this; - on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - + on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + on(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. */ - on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - + on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend may send update for one or more fragments */ - on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - + on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; /** * Contains an bucket of collected trace events. */ - on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - + on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; /** * Signals that tracing is stopped and there is no trace buffers pending flush, all data were * delivered via dataCollected events. */ - on(event: "NodeTracing.tracingComplete", listener: () => void): this; - + on(event: 'NodeTracing.tracingComplete', listener: () => void): this; /** * Issued when attached to a worker. */ - on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - + on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; /** * Issued when detached from the worker. */ - on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - + on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; /** * Notifies about a new protocol message received from the session * (session ID is provided in attachedToWorker notification). */ - on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - + on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. * It is fired when the Node process finished all code execution and is * waiting for all frontends to disconnect. */ - on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - + on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; once(event: string, listener: (...args: any[]) => void): this; - /** * Emitted when any notification from the V8 Inspector is received. */ - once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - + once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; /** * Issued when new execution context is created. */ - once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - + once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; /** * Issued when execution context is destroyed. */ - once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - + once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; /** * Issued when all executionContexts were cleared in browser */ - once(event: "Runtime.executionContextsCleared", listener: () => void): this; - + once(event: 'Runtime.executionContextsCleared', listener: () => void): this; /** * Issued when exception was thrown and unhandled. */ - once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - + once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; /** * Issued when unhandled exception was revoked. */ - once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - + once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; /** * Issued when console API was called. */ - once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - + once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; /** * Issued when object should be inspected (for example, as a result of inspect() command line API call). */ - once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - + once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. */ - once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - + once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine fails to parse the script. */ - once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - + once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; /** * Fired when breakpoint is resolved to an actual script and location. */ - once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - + once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */ - once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - + once(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine resumed execution. */ - once(event: "Debugger.resumed", listener: () => void): this; - + once(event: 'Debugger.resumed', listener: () => void): this; /** * Issued when new console message is added. */ - once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - + once(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; /** * Sent when new profile recording is started using console.profile() call. */ - once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.resetProfiles", listener: () => void): this; - once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - + once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + once(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. */ - once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - + once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend may send update for one or more fragments */ - once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - + once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; /** * Contains an bucket of collected trace events. */ - once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - + once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; /** * Signals that tracing is stopped and there is no trace buffers pending flush, all data were * delivered via dataCollected events. */ - once(event: "NodeTracing.tracingComplete", listener: () => void): this; - + once(event: 'NodeTracing.tracingComplete', listener: () => void): this; /** * Issued when attached to a worker. */ - once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - + once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; /** * Issued when detached from the worker. */ - once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - + once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; /** * Notifies about a new protocol message received from the session * (session ID is provided in attachedToWorker notification). */ - once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - + once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. * It is fired when the Node process finished all code execution and is * waiting for all frontends to disconnect. */ - once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - + once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - /** * Emitted when any notification from the V8 Inspector is received. */ - prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - + prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; /** * Issued when new execution context is created. */ - prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; /** * Issued when execution context is destroyed. */ - prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; /** * Issued when all executionContexts were cleared in browser */ - prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - + prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; /** * Issued when exception was thrown and unhandled. */ - prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; /** * Issued when unhandled exception was revoked. */ - prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; /** * Issued when console API was called. */ - prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; /** * Issued when object should be inspected (for example, as a result of inspect() command line API call). */ - prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. */ - prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine fails to parse the script. */ - prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; /** * Fired when breakpoint is resolved to an actual script and location. */ - prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */ - prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine resumed execution. */ - prependListener(event: "Debugger.resumed", listener: () => void): this; - + prependListener(event: 'Debugger.resumed', listener: () => void): this; /** * Issued when new console message is added. */ - prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; /** * Sent when new profile recording is started using console.profile() call. */ - prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. */ - prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend may send update for one or more fragments */ - prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; /** * Contains an bucket of collected trace events. */ - prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; /** * Signals that tracing is stopped and there is no trace buffers pending flush, all data were * delivered via dataCollected events. */ - prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - + prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; /** * Issued when attached to a worker. */ - prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; /** * Issued when detached from the worker. */ - prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; /** * Notifies about a new protocol message received from the session * (session ID is provided in attachedToWorker notification). */ - prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - + prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. * It is fired when the Node process finished all code execution and is * waiting for all frontends to disconnect. */ - prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - + prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** * Emitted when any notification from the V8 Inspector is received. */ - prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - + prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; /** * Issued when new execution context is created. */ - prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; /** * Issued when execution context is destroyed. */ - prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; /** * Issued when all executionContexts were cleared in browser */ - prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - + prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; /** * Issued when exception was thrown and unhandled. */ - prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; /** * Issued when unhandled exception was revoked. */ - prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; /** * Issued when console API was called. */ - prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; /** * Issued when object should be inspected (for example, as a result of inspect() command line API call). */ - prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. */ - prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; /** * Fired when virtual machine fails to parse the script. */ - prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; /** * Fired when breakpoint is resolved to an actual script and location. */ - prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */ - prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; /** * Fired when the virtual machine resumed execution. */ - prependOnceListener(event: "Debugger.resumed", listener: () => void): this; - + prependOnceListener(event: 'Debugger.resumed', listener: () => void): this; /** * Issued when new console message is added. */ - prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; /** * Sent when new profile recording is started using console.profile() call. */ - prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. */ - prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; /** * If heap objects tracking has been started then backend may send update for one or more fragments */ - prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; /** * Contains an bucket of collected trace events. */ - prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; /** * Signals that tracing is stopped and there is no trace buffers pending flush, all data were * delivered via dataCollected events. */ - prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - + prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; /** * Issued when attached to a worker. */ - prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; /** * Issued when detached from the worker. */ - prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; /** * Notifies about a new protocol message received from the session * (session ID is provided in attachedToWorker notification). */ - prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - + prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. * It is fired when the Node process finished all code execution and is * waiting for all frontends to disconnect. */ - prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; } - - // Top Level API - /** - * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started. - * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. - * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI. - * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI. - * @param wait Block until a client has connected. Optional, defaults to false. + * Activate inspector on host and port. Equivalent to`node --inspect=[[host:]port]`, but can be done programmatically after node has + * started. + * + * If wait is `true`, will block until a client has connected to the inspect port + * and flow control has been passed to the debugger client. + * + * See the `security warning` regarding the `host`parameter usage. + * @param [port='what was specified on the CLI'] Port to listen on for inspector connections. Optional. + * @param [host='what was specified on the CLI'] Host to listen on for inspector connections. Optional. + * @param [wait=false] Block until a client has connected. Optional. */ function open(port?: number, host?: string, wait?: boolean): void; - /** * Deactivate the inspector. Blocks until there are no active connections. */ function close(): void; - /** * Return the URL of the active inspector, or `undefined` if there is none. + * + * ```console + * $ node --inspect -p 'inspector.url()' + * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * For help, see: https://nodejs.org/en/docs/inspector + * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * + * $ node --inspect=localhost:3000 -p 'inspector.url()' + * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * For help, see: https://nodejs.org/en/docs/inspector + * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * + * $ node -p 'inspector.url()' + * undefined + * ``` */ function url(): string | undefined; - /** - * Blocks until a client (existing or connected later) has sent - * `Runtime.runIfWaitingForDebugger` command. + * Blocks until a client (existing or connected later) has sent`Runtime.runIfWaitingForDebugger` command. + * * An exception will be thrown if there is no active inspector. + * @since v12.7.0 */ function waitForDebugger(): void; } +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module 'node:inspector' { + import inspector = require('inspector'); + export = inspector; +} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts index 0778bcd..d83aec9 100644 --- a/node_modules/@types/node/module.d.ts +++ b/node_modules/@types/node/module.d.ts @@ -1,17 +1,50 @@ -declare module 'node:module' { - import Module = require('module'); - export = Module; -} - +/** + * @since v0.3.7 + */ declare module 'module' { import { URL } from 'node:url'; namespace Module { /** - * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports. - * It does not add or remove exported names from the ES Modules. + * The `module.syncBuiltinESMExports()` method updates all the live bindings for + * builtin `ES Modules` to match the properties of the `CommonJS` exports. It + * does not add or remove exported names from the `ES Modules`. + * + * ```js + * const fs = require('fs'); + * const assert = require('assert'); + * const { syncBuiltinESMExports } = require('module'); + * + * fs.readFile = newAPI; + * + * delete fs.readFileSync; + * + * function newAPI() { + * // ... + * } + * + * fs.newAPI = newAPI; + * + * syncBuiltinESMExports(); + * + * import('fs').then((esmFS) => { + * // It syncs the existing readFile property with the new value + * assert.strictEqual(esmFS.readFile, newAPI); + * // readFileSync has been deleted from the required fs + * assert.strictEqual('readFileSync' in fs, false); + * // syncBuiltinESMExports() does not remove readFileSync from esmFS + * assert.strictEqual('readFileSync' in esmFS, true); + * // syncBuiltinESMExports() does not add names + * assert.strictEqual(esmFS.newAPI, undefined); + * }); + * ``` + * @since v12.12.0 */ function syncBuiltinESMExports(): void; - + /** + * `path` is the resolved path for the file for which a corresponding source map + * should be fetched. + * @since v13.7.0, v12.17.0 + */ function findSourceMap(path: string, error?: Error): SourceMap; interface SourceMapPayload { file: string; @@ -22,7 +55,6 @@ declare module 'module' { mappings: string; sourceRoot: string; } - interface SourceMapping { generatedLine: number; generatedColumn: number; @@ -30,10 +62,20 @@ declare module 'module' { originalLine: number; originalColumn: number; } - + /** + * @since v13.7.0, v12.17.0 + */ class SourceMap { + /** + * Getter for the payload used to construct the `SourceMap` instance. + */ readonly payload: SourceMapPayload; constructor(payload: SourceMapPayload); + /** + * Given a line number and column number in the generated source file, returns + * an object representing the position in the original file. The object returned + * consists of the following keys: + */ findEntry(line: number, column: number): SourceMapping; } } @@ -41,17 +83,32 @@ declare module 'module' { class Module { static runMain(): void; static wrap(code: string): string; - - /** - * @deprecated Deprecated since: v12.2.0. Please use createRequire() instead. - */ - static createRequireFromPath(path: string): NodeRequire; static createRequire(path: string | URL): NodeRequire; static builtinModules: string[]; - static Module: typeof Module; - constructor(id: string, parent?: Module); } + global { + interface ImportMeta { + url: string; + /** + * @experimental + * This feature is only available with the `--experimental-import-meta-resolve` + * command flag enabled. + * + * Provides a module-relative resolution function scoped to each module, returning + * the URL string. + * + * @param specified The module specifier to resolve relative to `parent`. + * @param parent The absolute parent module URL to resolve from. If none + * is specified, the value of `import.meta.url` is used as the default. + */ + resolve?(specified: string, parent?: string | URL): Promise; + } + } export = Module; } +declare module 'node:module' { + import module = require('module'); + export = module; +} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts index b764dd2..b735538 100644 --- a/node_modules/@types/node/net.d.ts +++ b/node_modules/@types/node/net.d.ts @@ -1,31 +1,34 @@ -declare module 'node:net' { - export * from 'net'; -} - +/** + * > Stability: 2 - Stable + * + * The `net` module provides an asynchronous network API for creating stream-based + * TCP or `IPC` servers ({@link createServer}) and clients + * ({@link createConnection}). + * + * It can be accessed using: + * + * ```js + * const net = require('net'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/net.js) + */ declare module 'net' { import * as stream from 'node:stream'; - import EventEmitter = require('node:events'); + import { Abortable, EventEmitter } from 'node:events'; import * as dns from 'node:dns'; - - type LookupFunction = ( - hostname: string, - options: dns.LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ) => void; - + type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; interface AddressInfo { address: string; family: string; port: number; } - interface SocketConstructorOpts { - fd?: number; - allowHalfOpen?: boolean; - readable?: boolean; - writable?: boolean; + fd?: number | undefined; + allowHalfOpen?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + signal?: AbortSignal; } - interface OnReadOpts { buffer: Uint8Array | (() => Uint8Array); /** @@ -35,71 +38,290 @@ declare module 'net' { */ callback(bytesWritten: number, buf: Uint8Array): boolean; } - interface ConnectOpts { /** * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will * still be emitted as normal and methods like pause() and resume() will also behave as expected. */ - onread?: OnReadOpts; + onread?: OnReadOpts | undefined; } - interface TcpSocketConnectOpts extends ConnectOpts { port: number; - host?: string; - localAddress?: string; - localPort?: number; - hints?: number; - family?: number; - lookup?: LookupFunction; + host?: string | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + hints?: number | undefined; + family?: number | undefined; + lookup?: LookupFunction | undefined; + noDelay?: boolean | undefined; + keepAlive?: boolean | undefined; + keepAliveInitialDelay?: number | undefined; } - interface IpcSocketConnectOpts extends ConnectOpts { path: string; } - type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; - + type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed'; + /** + * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint + * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also + * an `EventEmitter`. + * + * A `net.Socket` can be created by the user and used directly to interact with + * a server. For example, it is returned by {@link createConnection}, + * so the user can use it to talk to the server. + * + * It can also be created by Node.js and passed to the user when a connection + * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use + * it to interact with the client. + * @since v0.3.4 + */ class Socket extends stream.Duplex { constructor(options?: SocketConstructorOpts); - - // Extended base methods + /** + * Sends data on the socket. The second parameter specifies the encoding in the + * case of a string. It defaults to UTF8 encoding. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. + * + * The optional `callback` parameter will be executed when the data is finally + * written out, which may not be immediately. + * + * See `Writable` stream `write()` method for more + * information. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + */ write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean; - + /** + * Initiate a connection on a given socket. + * + * Possible signatures: + * + * * `socket.connect(options[, connectListener])` + * * `socket.connect(path[, connectListener])` for `IPC` connections. + * * `socket.connect(port[, host][, connectListener])` for TCP connections. + * * Returns: `net.Socket` The socket itself. + * + * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, + * instead of a `'connect'` event, an `'error'` event will be emitted with + * the error passed to the `'error'` listener. + * The last parameter `connectListener`, if supplied, will be added as a listener + * for the `'connect'` event **once**. + * + * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined + * behavior. + */ connect(options: SocketConnectOpts, connectionListener?: () => void): this; connect(port: number, host: string, connectionListener?: () => void): this; connect(port: number, connectionListener?: () => void): this; connect(path: string, connectionListener?: () => void): this; - + /** + * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. + * @since v0.1.90 + * @return The socket itself. + */ setEncoding(encoding?: BufferEncoding): this; + /** + * Pauses the reading of data. That is, `'data'` events will not be emitted. + * Useful to throttle back an upload. + * @return The socket itself. + */ pause(): this; + /** + * Close the TCP connection by sending an RST packet and destroy the stream. + * If this TCP socket is in connecting status, it will send an RST packet + * and destroy this TCP socket once it is connected. Otherwise, it will call + * `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. If this is not a TCP socket + * (for example, a pipe), calling this method will immediately throw + * an `ERR_INVALID_HANDLE_TYPE` Error. + * @since v18.3.0 + * @return The socket itself. + */ + resetAndDestroy(): this; + /** + * Resumes reading after a call to `socket.pause()`. + * @return The socket itself. + */ resume(): this; + /** + * Sets the socket to timeout after `timeout` milliseconds of inactivity on + * the socket. By default `net.Socket` do not have a timeout. + * + * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to + * end the connection. + * + * ```js + * socket.setTimeout(3000); + * socket.on('timeout', () => { + * console.log('socket timeout'); + * socket.end(); + * }); + * ``` + * + * If `timeout` is 0, then the existing idle timeout is disabled. + * + * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. + * @since v0.1.90 + * @return The socket itself. + */ setTimeout(timeout: number, callback?: () => void): this; + /** + * Enable/disable the use of Nagle's algorithm. + * + * When a TCP connection is created, it will have Nagle's algorithm enabled. + * + * Nagle's algorithm delays data before it is sent via the network. It attempts + * to optimize throughput at the expense of latency. + * + * Passing `true` for `noDelay` or not passing an argument will disable Nagle's + * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's + * algorithm. + * @since v0.1.90 + * @param [noDelay=true] + * @return The socket itself. + */ setNoDelay(noDelay?: boolean): this; + /** + * Enable/disable keep-alive functionality, and optionally set the initial + * delay before the first keepalive probe is sent on an idle socket. + * + * Set `initialDelay` (in milliseconds) to set the delay between the last + * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default + * (or previous) setting. + * + * Enabling the keep-alive functionality will set the following socket options: + * + * * `SO_KEEPALIVE=1` + * * `TCP_KEEPIDLE=initialDelay` + * * `TCP_KEEPCNT=10` + * * `TCP_KEEPINTVL=1` + * @since v0.1.92 + * @param [enable=false] + * @param [initialDelay=0] + * @return The socket itself. + */ setKeepAlive(enable?: boolean, initialDelay?: number): this; + /** + * Returns the bound `address`, the address `family` name and `port` of the + * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` + * @since v0.1.90 + */ address(): AddressInfo | {}; + /** + * Calling `unref()` on a socket will allow the program to exit if this is the only + * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ unref(): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). + * If the socket is `ref`ed calling `ref` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ ref(): this; - - /** @deprecated since v14.6.0 - Use `writableLength` instead. */ + /** + * This property shows the number of characters buffered for writing. The buffer + * may contain strings whose length after encoding is not yet known. So this number + * is only an approximation of the number of bytes in the buffer. + * + * `net.Socket` has the property that `socket.write()` always works. This is to + * help users get up and running quickly. The computer cannot always keep up + * with the amount of data that is written to a socket. The network connection + * simply might be too slow. Node.js will internally queue up the data written to a + * socket and send it out over the wire when it is possible. + * + * The consequence of this internal buffering is that memory may grow. + * Users who experience large or growing `bufferSize` should attempt to + * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. + * @since v0.3.8 + * @deprecated Since v14.6.0 - Use `writableLength` instead. + */ readonly bufferSize: number; + /** + * The amount of received bytes. + * @since v0.5.3 + */ readonly bytesRead: number; + /** + * The amount of bytes sent. + * @since v0.5.3 + */ readonly bytesWritten: number; + /** + * If `true`,`socket.connect(options[, connectListener])` was + * called and has not yet finished. It will stay `true` until the socket becomes + * connected, then it is set to `false` and the `'connect'` event is emitted. Note + * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. + * @since v6.1.0 + */ readonly connecting: boolean; + /** + * See `writable.destroyed` for further details. + */ readonly destroyed: boolean; - readonly localAddress: string; - readonly localPort: number; - readonly remoteAddress?: string; - readonly remoteFamily?: string; - readonly remotePort?: number; - - // Extended base methods - end(cb?: () => void): void; - end(buffer: Uint8Array | string, cb?: () => void): void; - end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): void; - + /** + * The string representation of the local IP address the remote client is + * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client + * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. + * @since v0.9.6 + */ + readonly localAddress?: string; + /** + * The numeric representation of the local port. For example, `80` or `21`. + * @since v0.9.6 + */ + readonly localPort?: number; + /** + * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. + * @since v18.8.0 + */ + readonly localFamily?: string; + /** + * This property represents the state of the connection as a string. + * @see {https://nodejs.org/api/net.html#socketreadystate} + * @since v0.5.0 + */ + readonly readyState: SocketReadyState; + /** + * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remoteAddress?: string | undefined; + /** + * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. + * @since v0.11.14 + */ + readonly remoteFamily?: string | undefined; + /** + * The numeric representation of the remote port. For example, `80` or `21`. + * @since v0.5.10 + */ + readonly remotePort?: number | undefined; + /** + * The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set. + * @since v10.7.0 + */ + readonly timeout?: number | undefined; + /** + * Half-closes the socket. i.e., it sends a FIN packet. It is possible the + * server will still send some data. + * + * See `writable.end()` for further details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(callback?: () => void): this; + end(buffer: Uint8Array | string, callback?: () => void): this; + end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; /** * events.EventEmitter * 1. close @@ -109,100 +331,170 @@ declare module 'net' { * 5. end * 6. error * 7. lookup - * 8. timeout + * 8. ready + * 9. timeout */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: (had_error: boolean) => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "data", listener: (data: Buffer) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - addListener(event: "timeout", listener: () => void): this; - + addListener(event: 'close', listener: (hadError: boolean) => void): this; + addListener(event: 'connect', listener: () => void): this; + addListener(event: 'data', listener: (data: Buffer) => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'timeout', listener: () => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close", had_error: boolean): boolean; - emit(event: "connect"): boolean; - emit(event: "data", data: Buffer): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; - emit(event: "timeout"): boolean; - + emit(event: 'close', hadError: boolean): boolean; + emit(event: 'connect'): boolean; + emit(event: 'data', data: Buffer): boolean; + emit(event: 'drain'): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean; + emit(event: 'ready'): boolean; + emit(event: 'timeout'): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: (had_error: boolean) => void): this; - on(event: "connect", listener: () => void): this; - on(event: "data", listener: (data: Buffer) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - on(event: "timeout", listener: () => void): this; - + on(event: 'close', listener: (hadError: boolean) => void): this; + on(event: 'connect', listener: () => void): this; + on(event: 'data', listener: (data: Buffer) => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'timeout', listener: () => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: (had_error: boolean) => void): this; - once(event: "connect", listener: () => void): this; - once(event: "data", listener: (data: Buffer) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - once(event: "timeout", listener: () => void): this; - + once(event: 'close', listener: (hadError: boolean) => void): this; + once(event: 'connect', listener: () => void): this; + once(event: 'data', listener: (data: Buffer) => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'timeout', listener: () => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: (had_error: boolean) => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "data", listener: (data: Buffer) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependListener(event: "timeout", listener: () => void): this; - + prependListener(event: 'close', listener: (hadError: boolean) => void): this; + prependListener(event: 'connect', listener: () => void): this; + prependListener(event: 'data', listener: (data: Buffer) => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'timeout', listener: () => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener(event: "data", listener: (data: Buffer) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this; + prependOnceListener(event: 'connect', listener: () => void): this; + prependOnceListener(event: 'data', listener: (data: Buffer) => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; } - - interface ListenOptions { - port?: number; - host?: string; - backlog?: number; - path?: string; - exclusive?: boolean; - readableAll?: boolean; - writableAll?: boolean; + interface ListenOptions extends Abortable { + port?: number | undefined; + host?: string | undefined; + backlog?: number | undefined; + path?: string | undefined; + exclusive?: boolean | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; /** * @default false */ - ipv6Only?: boolean; + ipv6Only?: boolean | undefined; } - interface ServerOpts { /** - * Indicates whether half-opened TCP connections are allowed. __Default:__ `false`. + * Indicates whether half-opened TCP connections are allowed. + * @default false + */ + allowHalfOpen?: boolean | undefined; + /** + * Indicates whether the socket should be paused on incoming connections. + * @default false + */ + pauseOnConnect?: boolean | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default false + * @since v16.5.0 */ - allowHalfOpen?: boolean; - + noDelay?: boolean | undefined; /** - * Indicates whether the socket should be paused on incoming connections. __Default:__ `false`. + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 */ - pauseOnConnect?: boolean; + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + } + interface DropArgument { + localAddress?: string; + localPort?: number; + localFamily?: string; + remoteAddress?: string; + remotePort?: number; + remoteFamily?: string; } - - // https://github.com/nodejs/node/blob/master/lib/net.js + /** + * This class is used to create a TCP or `IPC` server. + * @since v0.1.90 + */ class Server extends EventEmitter { constructor(connectionListener?: (socket: Socket) => void); constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); - + /** + * Start a server listening for connections. A `net.Server` can be a TCP or + * an `IPC` server depending on what it listens to. + * + * Possible signatures: + * + * * `server.listen(handle[, backlog][, callback])` + * * `server.listen(options[, callback])` + * * `server.listen(path[, backlog][, callback])` for `IPC` servers + * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers + * + * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` + * event. + * + * All `listen()` methods can take a `backlog` parameter to specify the maximum + * length of the queue of pending connections. The actual length will be determined + * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn`on Linux. The default value of this parameter is 511 (not 512). + * + * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for + * details). + * + * The `server.listen()` method can be called again if and only if there was an + * error during the first `server.listen()` call or `server.close()` has been + * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. + * + * One of the most common errors raised when listening is `EADDRINUSE`. + * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry + * after a certain amount of time: + * + * ```js + * server.on('error', (e) => { + * if (e.code === 'EADDRINUSE') { + * console.log('Address in use, retrying...'); + * setTimeout(() => { + * server.close(); + * server.listen(PORT, HOST); + * }, 1000); + * } + * }); + * ``` + */ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; listen(port?: number, hostname?: string, listeningListener?: () => void): this; listen(port?: number, backlog?: number, listeningListener?: () => void): this; @@ -212,78 +504,366 @@ declare module 'net' { listen(options: ListenOptions, listeningListener?: () => void): this; listen(handle: any, backlog?: number, listeningListener?: () => void): this; listen(handle: any, listeningListener?: () => void): this; + /** + * Stops the server from accepting new connections and keeps existing + * connections. This function is asynchronous, the server is finally closed + * when all connections are ended and the server emits a `'close'` event. + * The optional `callback` will be called once the `'close'` event occurs. Unlike + * that event, it will be called with an `Error` as its only argument if the server + * was not open when it was closed. + * @since v0.1.90 + * @param callback Called when the server is closed. + */ close(callback?: (err?: Error) => void): this; + /** + * Returns the bound `address`, the address `family` name, and `port` of the server + * as reported by the operating system if listening on an IP socket + * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. + * + * For a server listening on a pipe or Unix domain socket, the name is returned + * as a string. + * + * ```js + * const server = net.createServer((socket) => { + * socket.end('goodbye\n'); + * }).on('error', (err) => { + * // Handle errors here. + * throw err; + * }); + * + * // Grab an arbitrary unused port. + * server.listen(() => { + * console.log('opened server on', server.address()); + * }); + * ``` + * + * `server.address()` returns `null` before the `'listening'` event has been + * emitted or after calling `server.close()`. + * @since v0.1.90 + */ address(): AddressInfo | string | null; + /** + * Asynchronously get the number of concurrent connections on the server. Works + * when sockets were sent to forks. + * + * Callback should take two arguments `err` and `count`. + * @since v0.9.7 + */ getConnections(cb: (error: Error | null, count: number) => void): void; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). + * If the server is `ref`ed calling `ref()` again will have no effect. + * @since v0.9.1 + */ ref(): this; + /** + * Calling `unref()` on a server will allow the program to exit if this is the only + * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + */ unref(): this; + /** + * Set this property to reject connections when the server's connection count gets + * high. + * + * It is not recommended to use this option once a socket has been sent to a child + * with `child_process.fork()`. + * @since v0.2.0 + */ maxConnections: number; connections: number; + /** + * Indicates whether or not the server is listening for connections. + * @since v5.7.0 + */ listening: boolean; - /** * events.EventEmitter * 1. close * 2. connection * 3. error * 4. listening + * 5. drop */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Socket) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'drop', listener: (data?: DropArgument) => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Socket): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit(event: 'drop', data?: DropArgument): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Socket) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'drop', listener: (data?: DropArgument) => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Socket) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'drop', listener: (data?: DropArgument) => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Socket) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'drop', listener: (data?: DropArgument) => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'drop', listener: (data?: DropArgument) => void): this; + } + type IPVersion = 'ipv4' | 'ipv6'; + /** + * The `BlockList` object can be used with some network APIs to specify rules for + * disabling inbound or outbound access to specific IP addresses, IP ranges, or + * IP subnets. + * @since v15.0.0, v14.18.0 + */ + class BlockList { + /** + * Adds a rule to block the given IP address. + * @since v15.0.0, v14.18.0 + * @param address An IPv4 or IPv6 address. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addAddress(address: string, type?: IPVersion): void; + addAddress(address: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). + * @since v15.0.0, v14.18.0 + * @param start The starting IPv4 or IPv6 address in the range. + * @param end The ending IPv4 or IPv6 address in the range. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addRange(start: string, end: string, type?: IPVersion): void; + addRange(start: SocketAddress, end: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses specified as a subnet mask. + * @since v15.0.0, v14.18.0 + * @param net The network IPv4 or IPv6 address. + * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addSubnet(net: SocketAddress, prefix: number): void; + addSubnet(net: string, prefix: number, type?: IPVersion): void; + /** + * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. + * + * ```js + * const blockList = new net.BlockList(); + * blockList.addAddress('123.123.123.123'); + * blockList.addRange('10.0.0.1', '10.0.0.10'); + * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); + * + * console.log(blockList.check('123.123.123.123')); // Prints: true + * console.log(blockList.check('10.0.0.3')); // Prints: true + * console.log(blockList.check('222.111.111.222')); // Prints: false + * + * // IPv6 notation for IPv4 addresses works: + * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true + * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true + * ``` + * @since v15.0.0, v14.18.0 + * @param address The IP address to check + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + check(address: SocketAddress): boolean; + check(address: string, type?: IPVersion): boolean; } - interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { - timeout?: number; + timeout?: number | undefined; } - interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { - timeout?: number; + timeout?: number | undefined; } - type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; - + /** + * Creates a new TCP or `IPC` server. + * + * If `allowHalfOpen` is set to `true`, when the other end of the socket + * signals the end of transmission, the server will only send back the end of + * transmission when `socket.end()` is explicitly called. For example, in the + * context of TCP, when a FIN packed is received, a FIN packed is sent + * back only when `socket.end()` is explicitly called. Until then the + * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. + * + * If `pauseOnConnect` is set to `true`, then the socket associated with each + * incoming connection will be paused, and no data will be read from its handle. + * This allows connections to be passed between processes without any data being + * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. + * + * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. + * + * Here is an example of a TCP echo server which listens for connections + * on port 8124: + * + * ```js + * const net = require('net'); + * const server = net.createServer((c) => { + * // 'connection' listener. + * console.log('client connected'); + * c.on('end', () => { + * console.log('client disconnected'); + * }); + * c.write('hello\r\n'); + * c.pipe(c); + * }); + * server.on('error', (err) => { + * throw err; + * }); + * server.listen(8124, () => { + * console.log('server bound'); + * }); + * ``` + * + * Test this by using `telnet`: + * + * ```console + * $ telnet localhost 8124 + * ``` + * + * To listen on the socket `/tmp/echo.sock`: + * + * ```js + * server.listen('/tmp/echo.sock', () => { + * console.log('server bound'); + * }); + * ``` + * + * Use `nc` to connect to a Unix domain socket server: + * + * ```console + * $ nc -U /tmp/echo.sock + * ``` + * @since v0.5.0 + * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. + */ function createServer(connectionListener?: (socket: Socket) => void): Server; function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; + /** + * Aliases to {@link createConnection}. + * + * Possible signatures: + * + * * {@link connect} + * * {@link connect} for `IPC` connections. + * * {@link connect} for TCP connections. + */ function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; function connect(port: number, host?: string, connectionListener?: () => void): Socket; function connect(path: string, connectionListener?: () => void): Socket; + /** + * A factory function, which creates a new {@link Socket}, + * immediately initiates connection with `socket.connect()`, + * then returns the `net.Socket` that starts the connection. + * + * When the connection is established, a `'connect'` event will be emitted + * on the returned socket. The last parameter `connectListener`, if supplied, + * will be added as a listener for the `'connect'` event **once**. + * + * Possible signatures: + * + * * {@link createConnection} + * * {@link createConnection} for `IPC` connections. + * * {@link createConnection} for TCP connections. + * + * The {@link connect} function is an alias to this function. + */ function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; function createConnection(path: string, connectionListener?: () => void): Socket; + /** + * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 + * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. + * + * ```js + * net.isIP('::1'); // returns 6 + * net.isIP('127.0.0.1'); // returns 4 + * net.isIP('127.000.000.001'); // returns 0 + * net.isIP('127.0.0.1/24'); // returns 0 + * net.isIP('fhqwhgads'); // returns 0 + * ``` + * @since v0.3.0 + */ function isIP(input: string): number; + /** + * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no + * leading zeroes. Otherwise, returns `false`. + * + * ```js + * net.isIPv4('127.0.0.1'); // returns true + * net.isIPv4('127.000.000.001'); // returns false + * net.isIPv4('127.0.0.1/24'); // returns false + * net.isIPv4('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ function isIPv4(input: string): boolean; + /** + * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. + * + * ```js + * net.isIPv6('::1'); // returns true + * net.isIPv6('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ function isIPv6(input: string): boolean; + interface SocketAddressInitOptions { + /** + * The network address as either an IPv4 or IPv6 string. + * @default 127.0.0.1 + */ + address?: string | undefined; + /** + * @default `'ipv4'` + */ + family?: IPVersion | undefined; + /** + * An IPv6 flow-label used only if `family` is `'ipv6'`. + * @default 0 + */ + flowlabel?: number | undefined; + /** + * An IP port. + * @default 0 + */ + port?: number | undefined; + } + /** + * @since v15.14.0, v14.18.0 + */ + class SocketAddress { + constructor(options: SocketAddressInitOptions); + /** + * @since v15.14.0, v14.18.0 + */ + readonly address: string; + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly family: IPVersion; + /** + * @since v15.14.0, v14.18.0 + */ + readonly port: number; + /** + * @since v15.14.0, v14.18.0 + */ + readonly flowlabel: number; + } +} +declare module 'node:net' { + export * from 'net'; } diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts index f152ade..3c55599 100644 --- a/node_modules/@types/node/os.d.ts +++ b/node_modules/@types/node/os.d.ts @@ -1,7 +1,12 @@ -declare module 'node:os' { - export * from 'os'; -} - +/** + * The `os` module provides operating system-related utility methods and + * properties. It can be accessed using: + * + * ```js + * const os = require('os'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js) + */ declare module 'os' { interface CpuInfo { model: string; @@ -14,7 +19,6 @@ declare module 'os' { irq: number; }; } - interface NetworkInterfaceBase { address: string; netmask: string; @@ -22,16 +26,14 @@ declare module 'os' { internal: boolean; cidr: string | null; } - interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { - family: "IPv4"; + family: 'IPv4'; + scopeid?: undefined; } - interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { - family: "IPv6"; + family: 'IPv6'; scopeid: number; } - interface UserInfo { username: T; uid: number; @@ -39,26 +41,197 @@ declare module 'os' { shell: T; homedir: T; } - type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; - + /** + * Returns the host name of the operating system as a string. + * @since v0.3.3 + */ function hostname(): string; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. + * + * The load average is a measure of system activity calculated by the operating + * system and expressed as a fractional number. + * + * The load average is a Unix-specific concept. On Windows, the return value is + * always `[0, 0, 0]`. + * @since v0.3.3 + */ function loadavg(): number[]; + /** + * Returns the system uptime in number of seconds. + * @since v0.3.3 + */ function uptime(): number; + /** + * Returns the amount of free system memory in bytes as an integer. + * @since v0.3.3 + */ function freemem(): number; + /** + * Returns the total amount of system memory in bytes as an integer. + * @since v0.3.3 + */ function totalmem(): number; + /** + * Returns an array of objects containing information about each logical CPU core. + * + * The properties included on each object include: + * + * ```js + * [ + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 252020, + * nice: 0, + * sys: 30340, + * idle: 1070356870, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 306960, + * nice: 0, + * sys: 26980, + * idle: 1071569080, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 248450, + * nice: 0, + * sys: 21750, + * idle: 1070919370, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 256880, + * nice: 0, + * sys: 19430, + * idle: 1070905480, + * irq: 20 + * } + * }, + * ] + * ``` + * + * `nice` values are POSIX-only. On Windows, the `nice` values of all processors + * are always 0. + * @since v0.3.3 + */ function cpus(): CpuInfo[]; + /** + * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it + * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. + * + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information + * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. + * @since v0.3.3 + */ function type(): string; + /** + * Returns the operating system as a string. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See + * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v0.3.3 + */ function release(): string; + /** + * Returns an object containing network interfaces that have been assigned a + * network address. + * + * Each key on the returned object identifies a network interface. The associated + * value is an array of objects that each describe an assigned network address. + * + * The properties available on the assigned network address object include: + * + * ```js + * { + * lo: [ + * { + * address: '127.0.0.1', + * netmask: '255.0.0.0', + * family: 'IPv4', + * mac: '00:00:00:00:00:00', + * internal: true, + * cidr: '127.0.0.1/8' + * }, + * { + * address: '::1', + * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + * family: 'IPv6', + * mac: '00:00:00:00:00:00', + * scopeid: 0, + * internal: true, + * cidr: '::1/128' + * } + * ], + * eth0: [ + * { + * address: '192.168.1.108', + * netmask: '255.255.255.0', + * family: 'IPv4', + * mac: '01:02:03:0a:0b:0c', + * internal: false, + * cidr: '192.168.1.108/24' + * }, + * { + * address: 'fe80::a00:27ff:fe4e:66a1', + * netmask: 'ffff:ffff:ffff:ffff::', + * family: 'IPv6', + * mac: '01:02:03:0a:0b:0c', + * scopeid: 1, + * internal: false, + * cidr: 'fe80::a00:27ff:fe4e:66a1/64' + * } + * ] + * } + * ``` + * @since v0.6.0 + */ function networkInterfaces(): NodeJS.Dict; + /** + * Returns the string path of the current user's home directory. + * + * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it + * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. + * + * On Windows, it uses the `USERPROFILE` environment variable if defined. + * Otherwise it uses the path to the profile directory of the current user. + * @since v2.3.0 + */ function homedir(): string; + /** + * Returns information about the currently effective user. On POSIX platforms, + * this is typically a subset of the password file. The returned object includes + * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`. + * + * The value of `homedir` returned by `os.userInfo()` is provided by the operating + * system. This differs from the result of `os.homedir()`, which queries + * environment variables for the home directory before falling back to the + * operating system response. + * + * Throws a `SystemError` if a user has no `username` or `homedir`. + * @since v6.0.0 + */ function userInfo(options: { encoding: 'buffer' }): UserInfo; function userInfo(options?: { encoding: BufferEncoding }): UserInfo; - type SignalConstants = { [key in NodeJS.Signals]: number; }; - namespace constants { const UV_UDP_REUSEADDR: number; namespace signals {} @@ -211,33 +384,83 @@ declare module 'os' { const PRIORITY_HIGHEST: number; } } - + const devNull: string; + const EOL: string; + /** + * Returns the operating system CPU architecture for which the Node.js binary was + * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`. + * + * The return value is equivalent to `process.arch`. + * @since v0.5.0 + */ function arch(): string; /** * Returns a string identifying the kernel version. - * On POSIX systems, the operating system release is determined by calling - * [uname(3)][]. On Windows, `pRtlGetVersion` is used, and if it is not available, - * `GetVersionExW()` will be used. See - * https://en.wikipedia.org/wiki/Uname#Examples for more information. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v13.11.0, v12.17.0 */ function version(): string; + /** + * Returns a string identifying the operating system platform for which + * the Node.js binary was compiled. The value is set at compile time. + * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`. + * + * The return value is equivalent to `process.platform`. + * + * The value `'android'` may also be returned if Node.js is built on the Android + * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.5.0 + */ function platform(): NodeJS.Platform; + /** + * Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64. + * + * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). + * On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used. + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v18.9.0 + */ + function machine(): string; + /** + * Returns the operating system's default directory for temporary files as a + * string. + * @since v0.9.9 + */ function tmpdir(): string; - const EOL: string; - function endianness(): "BE" | "LE"; /** - * Gets the priority of a process. - * Defaults to current process. + * Returns a string identifying the endianness of the CPU for which the Node.js + * binary was compiled. + * + * Possible values are `'BE'` for big endian and `'LE'` for little endian. + * @since v0.9.4 */ - function getPriority(pid?: number): number; + function endianness(): 'BE' | 'LE'; /** - * Sets the priority of the current process. - * @param priority Must be in range of -20 to 19 + * Returns the scheduling priority for the process specified by `pid`. If `pid` is + * not provided or is `0`, the priority of the current process is returned. + * @since v10.10.0 + * @param [pid=0] The process ID to retrieve scheduling priority for. */ - function setPriority(priority: number): void; + function getPriority(pid?: number): number; /** - * Sets the priority of the process specified process. - * @param priority Must be in range of -20 to 19 + * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used. + * + * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows + * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range + * mapping may cause the return value to be slightly different on Windows. To avoid + * confusion, set `priority` to one of the priority constants. + * + * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user + * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`. + * @since v10.10.0 + * @param [pid=0] The process ID to set scheduling priority for. + * @param priority The scheduling priority to assign to the process. */ + function setPriority(priority: number): void; function setPriority(pid: number, priority: number): void; } +declare module 'node:os' { + export * from 'os'; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json index a9302da..1570db1 100644 --- a/node_modules/@types/node/package.json +++ b/node_modules/@types/node/package.json @@ -1,237 +1,237 @@ { - "_from": "@types/node@*", - "_id": "@types/node@14.14.30", - "_inBundle": false, - "_integrity": "sha512-gUWhy8s45fQp4PqqKecsnOkdW0kt1IaKjgOIR3HPokkzTmQj9ji2wWFID5THu1MKrtO+d4s2lVrlEhXUsPXSvg==", - "_location": "/@types/node", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/node@*", "name": "@types/node", - "escapedName": "@types%2fnode", - "scope": "@types", - "rawSpec": "*", - "saveSpec": null, - "fetchSpec": "*" - }, - "_requiredBy": [ - "/@types/jsonwebtoken" - ], - "_resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.30.tgz", - "_shasum": "7d5162eec085ba34f8cb9011e9ba12119f76f961", - "_spec": "@types/node@*", - "_where": "C:\\Users\\akkjo\\git\\Close-milestone\\node_modules\\@types\\jsonwebtoken", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Microsoft TypeScript", - "url": "https://github.com/Microsoft" - }, - { - "name": "DefinitelyTyped", - "url": "https://github.com/DefinitelyTyped" - }, - { - "name": "Alberto Schiabel", - "url": "https://github.com/jkomyno" - }, - { - "name": "Alexander T.", - "url": "https://github.com/a-tarasyuk" - }, - { - "name": "Alvis HT Tang", - "url": "https://github.com/alvis" - }, - { - "name": "Andrew Makarov", - "url": "https://github.com/r3nya" - }, - { - "name": "Benjamin Toueg", - "url": "https://github.com/btoueg" - }, - { - "name": "Bruno Scheufler", - "url": "https://github.com/brunoscheufler" - }, - { - "name": "Chigozirim C.", - "url": "https://github.com/smac89" - }, - { - "name": "David Junger", - "url": "https://github.com/touffy" - }, - { - "name": "Deividas Bakanas", - "url": "https://github.com/DeividasBakanas" - }, - { - "name": "Eugene Y. Q. Shen", - "url": "https://github.com/eyqs" - }, - { - "name": "Hannes Magnusson", - "url": "https://github.com/Hannes-Magnusson-CK" - }, - { - "name": "Hoàng Văn Khải", - "url": "https://github.com/KSXGitHub" - }, - { - "name": "Huw", - "url": "https://github.com/hoo29" - }, - { - "name": "Kelvin Jin", - "url": "https://github.com/kjin" - }, - { - "name": "Klaus Meinhardt", - "url": "https://github.com/ajafff" - }, - { - "name": "Lishude", - "url": "https://github.com/islishude" - }, - { - "name": "Mariusz Wiktorczyk", - "url": "https://github.com/mwiktorczyk" - }, - { - "name": "Mohsen Azimi", - "url": "https://github.com/mohsen1" - }, - { - "name": "Nicolas Even", - "url": "https://github.com/n-e" - }, - { - "name": "Nikita Galkin", - "url": "https://github.com/galkin" - }, - { - "name": "Parambir Singh", - "url": "https://github.com/parambirs" - }, - { - "name": "Sebastian Silbermann", - "url": "https://github.com/eps1lon" - }, - { - "name": "Simon Schick", - "url": "https://github.com/SimonSchick" - }, - { - "name": "Thomas den Hollander", - "url": "https://github.com/ThomasdenH" - }, - { - "name": "Wilco Bakker", - "url": "https://github.com/WilcoBakker" - }, - { - "name": "wwwy3y3", - "url": "https://github.com/wwwy3y3" - }, - { - "name": "Samuel Ainsworth", - "url": "https://github.com/samuela" - }, - { - "name": "Kyle Uehlein", - "url": "https://github.com/kuehlein" - }, - { - "name": "Jordi Oliveras Rovira", - "url": "https://github.com/j-oliveras" - }, - { - "name": "Thanik Bhongbhibhat", - "url": "https://github.com/bhongy" - }, - { - "name": "Marcin Kopacz", - "url": "https://github.com/chyzwar" - }, - { - "name": "Trivikram Kamat", - "url": "https://github.com/trivikr" - }, - { - "name": "Minh Son Nguyen", - "url": "https://github.com/nguymin4" - }, - { - "name": "Junxiao Shi", - "url": "https://github.com/yoursunny" - }, - { - "name": "Ilia Baryshnikov", - "url": "https://github.com/qwelias" - }, - { - "name": "ExE Boss", - "url": "https://github.com/ExE-Boss" - }, - { - "name": "Surasak Chaisurin", - "url": "https://github.com/Ryan-Willpower" - }, - { - "name": "Piotr Błażejewicz", - "url": "https://github.com/peterblazejewicz" - }, - { - "name": "Anna Henningsen", - "url": "https://github.com/addaleax" - }, - { - "name": "Jason Kwok", - "url": "https://github.com/JasonHK" - }, - { - "name": "Victor Perin", - "url": "https://github.com/victorperin" - }, - { - "name": "Yongsheng Zhang", - "url": "https://github.com/ZYSzys" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for Node.js", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/node", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/node" - }, - "scripts": {}, - "typeScriptVersion": "3.4", - "types": "index.d.ts", - "typesPublisherContentHash": "78f651110546a8e4f89075c7ccd6853b60594153dd39d847d29f027a28076b07", - "typesVersions": { - "<=3.4": { - "*": [ - "ts3.4/*" - ] - }, - "<=3.6": { - "*": [ - "ts3.6/*" - ] - } - }, - "version": "14.14.30" -} + "version": "18.11.18", + "description": "TypeScript definitions for Node.js", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", + "license": "MIT", + "contributors": [ + { + "name": "Microsoft TypeScript", + "url": "https://github.com/Microsoft", + "githubUsername": "Microsoft" + }, + { + "name": "DefinitelyTyped", + "url": "https://github.com/DefinitelyTyped", + "githubUsername": "DefinitelyTyped" + }, + { + "name": "Alberto Schiabel", + "url": "https://github.com/jkomyno", + "githubUsername": "jkomyno" + }, + { + "name": "Alvis HT Tang", + "url": "https://github.com/alvis", + "githubUsername": "alvis" + }, + { + "name": "Andrew Makarov", + "url": "https://github.com/r3nya", + "githubUsername": "r3nya" + }, + { + "name": "Benjamin Toueg", + "url": "https://github.com/btoueg", + "githubUsername": "btoueg" + }, + { + "name": "Chigozirim C.", + "url": "https://github.com/smac89", + "githubUsername": "smac89" + }, + { + "name": "David Junger", + "url": "https://github.com/touffy", + "githubUsername": "touffy" + }, + { + "name": "Deividas Bakanas", + "url": "https://github.com/DeividasBakanas", + "githubUsername": "DeividasBakanas" + }, + { + "name": "Eugene Y. Q. Shen", + "url": "https://github.com/eyqs", + "githubUsername": "eyqs" + }, + { + "name": "Hannes Magnusson", + "url": "https://github.com/Hannes-Magnusson-CK", + "githubUsername": "Hannes-Magnusson-CK" + }, + { + "name": "Huw", + "url": "https://github.com/hoo29", + "githubUsername": "hoo29" + }, + { + "name": "Kelvin Jin", + "url": "https://github.com/kjin", + "githubUsername": "kjin" + }, + { + "name": "Klaus Meinhardt", + "url": "https://github.com/ajafff", + "githubUsername": "ajafff" + }, + { + "name": "Lishude", + "url": "https://github.com/islishude", + "githubUsername": "islishude" + }, + { + "name": "Mariusz Wiktorczyk", + "url": "https://github.com/mwiktorczyk", + "githubUsername": "mwiktorczyk" + }, + { + "name": "Mohsen Azimi", + "url": "https://github.com/mohsen1", + "githubUsername": "mohsen1" + }, + { + "name": "Nicolas Even", + "url": "https://github.com/n-e", + "githubUsername": "n-e" + }, + { + "name": "Nikita Galkin", + "url": "https://github.com/galkin", + "githubUsername": "galkin" + }, + { + "name": "Parambir Singh", + "url": "https://github.com/parambirs", + "githubUsername": "parambirs" + }, + { + "name": "Sebastian Silbermann", + "url": "https://github.com/eps1lon", + "githubUsername": "eps1lon" + }, + { + "name": "Simon Schick", + "url": "https://github.com/SimonSchick", + "githubUsername": "SimonSchick" + }, + { + "name": "Thomas den Hollander", + "url": "https://github.com/ThomasdenH", + "githubUsername": "ThomasdenH" + }, + { + "name": "Wilco Bakker", + "url": "https://github.com/WilcoBakker", + "githubUsername": "WilcoBakker" + }, + { + "name": "wwwy3y3", + "url": "https://github.com/wwwy3y3", + "githubUsername": "wwwy3y3" + }, + { + "name": "Samuel Ainsworth", + "url": "https://github.com/samuela", + "githubUsername": "samuela" + }, + { + "name": "Kyle Uehlein", + "url": "https://github.com/kuehlein", + "githubUsername": "kuehlein" + }, + { + "name": "Thanik Bhongbhibhat", + "url": "https://github.com/bhongy", + "githubUsername": "bhongy" + }, + { + "name": "Marcin Kopacz", + "url": "https://github.com/chyzwar", + "githubUsername": "chyzwar" + }, + { + "name": "Trivikram Kamat", + "url": "https://github.com/trivikr", + "githubUsername": "trivikr" + }, + { + "name": "Junxiao Shi", + "url": "https://github.com/yoursunny", + "githubUsername": "yoursunny" + }, + { + "name": "Ilia Baryshnikov", + "url": "https://github.com/qwelias", + "githubUsername": "qwelias" + }, + { + "name": "ExE Boss", + "url": "https://github.com/ExE-Boss", + "githubUsername": "ExE-Boss" + }, + { + "name": "Piotr Błażejewicz", + "url": "https://github.com/peterblazejewicz", + "githubUsername": "peterblazejewicz" + }, + { + "name": "Anna Henningsen", + "url": "https://github.com/addaleax", + "githubUsername": "addaleax" + }, + { + "name": "Victor Perin", + "url": "https://github.com/victorperin", + "githubUsername": "victorperin" + }, + { + "name": "Yongsheng Zhang", + "url": "https://github.com/ZYSzys", + "githubUsername": "ZYSzys" + }, + { + "name": "NodeJS Contributors", + "url": "https://github.com/NodeJS", + "githubUsername": "NodeJS" + }, + { + "name": "Linus Unnebäck", + "url": "https://github.com/LinusU", + "githubUsername": "LinusU" + }, + { + "name": "wafuwafu13", + "url": "https://github.com/wafuwafu13", + "githubUsername": "wafuwafu13" + }, + { + "name": "Matteo Collina", + "url": "https://github.com/mcollina", + "githubUsername": "mcollina" + }, + { + "name": "Dmitry Semigradsky", + "url": "https://github.com/Semigradsky", + "githubUsername": "Semigradsky" + } + ], + "main": "", + "types": "index.d.ts", + "typesVersions": { + "<=4.8": { + "*": [ + "ts4.8/*" + ] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "540ec74ad976942ed4b12e09fd57842adfd77a63a4ea099f15f0602ad707835c", + "typeScriptVersion": "4.2" +} \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts index 39adcaf..1d33f79 100644 --- a/node_modules/@types/node/path.d.ts +++ b/node_modules/@types/node/path.d.ts @@ -1,8 +1,20 @@ -declare module 'node:path' { +declare module 'path/posix' { + import path = require('path'); + export = path; +} +declare module 'path/win32' { import path = require('path'); export = path; } - +/** + * The `path` module provides utilities for working with file and directory paths. + * It can be accessed using: + * + * ```js + * const path = require('path'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/path.js) + */ declare module 'path' { namespace path { /** @@ -30,47 +42,46 @@ declare module 'path' { */ name: string; } - interface FormatInputPathObject { /** * The root of the path such as '/' or 'c:\' */ - root?: string; + root?: string | undefined; /** * The full directory path such as '/home/user/dir' or 'c:\path\dir' */ - dir?: string; + dir?: string | undefined; /** * The file name including extension (if any) such as 'index.html' */ - base?: string; + base?: string | undefined; /** * The file extension (if any) such as '.html' */ - ext?: string; + ext?: string | undefined; /** * The file name without extension (if any) such as 'index' */ - name?: string; + name?: string | undefined; } - interface PlatformPath { /** * Normalize a string path, reducing '..' and '.' parts. * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. * - * @param p string path to normalize. + * @param path string path to normalize. + * @throws {TypeError} if `path` is not a string. */ - normalize(p: string): string; + normalize(path: string): string; /** * Join all arguments together and normalize the resulting path. - * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. * * @param paths paths to join. + * @throws {TypeError} if any of the path segments is not a string. */ join(...paths: string[]): string; /** - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. * * Starting from leftmost {from} parameter, resolves {to} to an absolute path. * @@ -79,61 +90,71 @@ declare module 'path' { * the current working directory is used as well. The resulting path is normalized, * and trailing slashes are removed unless the path gets resolved to the root directory. * - * @param pathSegments string paths to join. Non-string arguments are ignored. + * @param paths A sequence of paths or path segments. + * @throws {TypeError} if any of the arguments is not a string. */ - resolve(...pathSegments: string[]): string; + resolve(...paths: string[]): string; /** * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. * + * If the given {path} is a zero-length string, `false` will be returned. + * * @param path path to test. + * @throws {TypeError} if `path` is not a string. */ - isAbsolute(p: string): boolean; + isAbsolute(path: string): boolean; /** - * Solve the relative path from {from} to {to}. + * Solve the relative path from {from} to {to} based on the current working directory. * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @throws {TypeError} if either `from` or `to` is not a string. */ relative(from: string, to: string): string; /** * Return the directory name of a path. Similar to the Unix dirname command. * - * @param p the path to evaluate. + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. */ - dirname(p: string): string; + dirname(path: string): string; /** * Return the last portion of a path. Similar to the Unix basename command. * Often used to extract the file name from a fully qualified path. * - * @param p the path to evaluate. - * @param ext optionally, an extension to remove from the result. + * @param path the path to evaluate. + * @param suffix optionally, an extension to remove from the result. + * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. */ - basename(p: string, ext?: string): string; + basename(path: string, suffix?: string): string; /** * Return the extension of the path, from the last '.' to end of string in the last portion of the path. - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. * - * @param p the path to evaluate. + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. */ - extname(p: string): string; + extname(path: string): string; /** * The platform-specific file separator. '\\' or '/'. */ - readonly sep: string; + readonly sep: '\\' | '/'; /** * The platform-specific file delimiter. ';' or ':'. */ - readonly delimiter: string; + readonly delimiter: ';' | ':'; /** * Returns an object from a path string - the opposite of format(). * - * @param pathString path to evaluate. + * @param path path to evaluate. + * @throws {TypeError} if `path` is not a string. */ - parse(p: string): ParsedPath; + parse(path: string): ParsedPath; /** * Returns a path string from an object - the opposite of parse(). * - * @param pathString path to evaluate. + * @param pathObject path to evaluate. */ - format(pP: FormatInputPathObject): string; + format(pathObject: FormatInputPathObject): string; /** * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. * If path is not a string, path will be returned without modifications. @@ -156,3 +177,15 @@ declare module 'path' { const path: path.PlatformPath; export = path; } +declare module 'node:path' { + import path = require('path'); + export = path; +} +declare module 'node:path/posix' { + import path = require('path/posix'); + export = path; +} +declare module 'node:path/win32' { + import path = require('path/win32'); + export = path; +} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts index 6c858ef..5c0b228 100644 --- a/node_modules/@types/node/perf_hooks.d.ts +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -1,93 +1,197 @@ -declare module 'node:perf_hooks' { - export * from 'perf_hooks'; -} - +/** + * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for + * Node.js-specific performance measurements. + * + * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/): + * + * * [High Resolution Time](https://www.w3.org/TR/hr-time-2) + * * [Performance Timeline](https://w3c.github.io/performance-timeline/) + * * [User Timing](https://www.w3.org/TR/user-timing/) + * + * ```js + * const { PerformanceObserver, performance } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((items) => { + * console.log(items.getEntries()[0].duration); + * performance.clearMarks(); + * }); + * obs.observe({ type: 'measure' }); + * performance.measure('Start to Now'); + * + * performance.mark('A'); + * doSomeLongRunningProcess(() => { + * performance.measure('A to Now', 'A'); + * + * performance.mark('B'); + * performance.measure('A to B', 'A', 'B'); + * }); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/perf_hooks.js) + */ declare module 'perf_hooks' { import { AsyncResource } from 'node:async_hooks'; - type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http'; - - interface PerformanceEntry { + interface NodeGCPerformanceDetail { /** - * The total number of milliseconds elapsed for this entry. - * This value will not be meaningful for all Performance Entry types. + * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies + * the type of garbage collection operation that occurred. + * See perf_hooks.constants for valid values. + */ + readonly kind?: number | undefined; + /** + * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags` + * property contains additional information about garbage collection operation. + * See perf_hooks.constants for valid values. + */ + readonly flags?: number | undefined; + } + /** + * @since v8.5.0 + */ + class PerformanceEntry { + protected constructor(); + /** + * The total number of milliseconds elapsed for this entry. This value will not + * be meaningful for all Performance Entry types. + * @since v8.5.0 */ readonly duration: number; - /** * The name of the performance entry. + * @since v8.5.0 */ readonly name: string; - /** - * The high resolution millisecond timestamp marking the starting time of the Performance Entry. + * The high resolution millisecond timestamp marking the starting time of the + * Performance Entry. + * @since v8.5.0 */ readonly startTime: number; - /** - * The type of the performance entry. - * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'. + * The type of the performance entry. It may be one of: + * + * * `'node'` (Node.js only) + * * `'mark'` (available on the Web) + * * `'measure'` (available on the Web) + * * `'gc'` (Node.js only) + * * `'function'` (Node.js only) + * * `'http2'` (Node.js only) + * * `'http'` (Node.js only) + * @since v8.5.0 */ readonly entryType: EntryType; - /** - * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies - * the type of garbage collection operation that occurred. - * See perf_hooks.constants for valid values. + * Additional detail specific to the `entryType`. + * @since v16.0.0 */ - readonly kind?: number; - - /** - * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags` - * property contains additional information about garbage collection operation. - * See perf_hooks.constants for valid values. - */ - readonly flags?: number; + readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type. + toJSON(): any; } - - interface PerformanceNodeTiming extends PerformanceEntry { - /** - * The high resolution millisecond timestamp at which the Node.js process completed bootstrap. + class PerformanceMark extends PerformanceEntry { + readonly duration: 0; + readonly entryType: 'mark'; + } + class PerformanceMeasure extends PerformanceEntry { + readonly entryType: 'measure'; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Provides timing details for Node.js itself. The constructor of this class + * is not exposed to users. + * @since v8.5.0 + */ + class PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process + * completed bootstrapping. If bootstrapping has not yet finished, the property + * has the value of -1. + * @since v8.5.0 */ readonly bootstrapComplete: number; - /** - * The high resolution millisecond timestamp at which the Node.js process completed bootstrapping. - * If bootstrapping has not yet finished, the property has the value of -1. + * The high resolution millisecond timestamp at which the Node.js environment was + * initialized. + * @since v8.5.0 */ readonly environment: number; - /** - * The high resolution millisecond timestamp at which the Node.js environment was initialized. + * The high resolution millisecond timestamp of the amount of time the event loop + * has been idle within the event loop's event provider (e.g. `epoll_wait`). This + * does not take CPU usage into consideration. If the event loop has not yet + * started (e.g., in the first tick of the main script), the property has the + * value of 0. + * @since v14.10.0, v12.19.0 */ readonly idleTime: number; - /** - * The high resolution millisecond timestamp of the amount of time the event loop has been idle - * within the event loop's event provider (e.g. `epoll_wait`). This does not take CPU usage - * into consideration. If the event loop has not yet started (e.g., in the first tick of the main script), - * the property has the value of 0. + * The high resolution millisecond timestamp at which the Node.js event loop + * exited. If the event loop has not yet exited, the property has the value of -1\. + * It can only have a value of not -1 in a handler of the `'exit'` event. + * @since v8.5.0 */ readonly loopExit: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop started. - * If the event loop has not yet started (e.g., in the first tick of the main script), the property has the value of -1. + * The high resolution millisecond timestamp at which the Node.js event loop + * started. If the event loop has not yet started (e.g., in the first tick of the + * main script), the property has the value of -1. + * @since v8.5.0 */ readonly loopStart: number; - /** - * The high resolution millisecond timestamp at which the V8 platform was initialized. + * The high resolution millisecond timestamp at which the V8 platform was + * initialized. + * @since v8.5.0 */ readonly v8Start: number; } - interface EventLoopUtilization { idle: number; active: number; utilization: number; } - + /** + * @param util1 The result of a previous call to eventLoopUtilization() + * @param util2 The result of a previous call to eventLoopUtilization() prior to util1 + */ + type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization; + interface MarkOptions { + /** + * Additional optional detail to include with the mark. + */ + detail?: unknown | undefined; + /** + * An optional timestamp to be used as the mark time. + * @default `performance.now()`. + */ + startTime?: number | undefined; + } + interface MeasureOptions { + /** + * Additional optional detail to include with the mark. + */ + detail?: unknown | undefined; + /** + * Duration between start and end times. + */ + duration?: number | undefined; + /** + * Timestamp to be used as the end time, or a string identifying a previously recorded mark. + */ + end?: number | string | undefined; + /** + * Timestamp to be used as the start time, or a string identifying a previously recorded mark. + */ + start?: number | string | undefined; + } + interface TimerifyOptions { + /** + * A histogram object created using + * `perf_hooks.createHistogram()` that will record runtime durations in + * nanoseconds. + */ + histogram?: RecordableHistogram | undefined; + } interface Performance { /** * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. @@ -95,16 +199,44 @@ declare module 'perf_hooks' { * @param name */ clearMarks(name?: string): void; - + /** + * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline. + * If name is provided, removes only the named measure. + * @param name + * @since v16.7.0 + */ + clearMeasures(name?: string): void; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`. + * If you are only interested in performance entries of certain types or that have certain names, see + * `performance.getEntriesByType()` and `performance.getEntriesByName()`. + * @since v16.7.0 + */ + getEntries(): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` + * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`. + * @param name + * @param type + * @since v16.7.0 + */ + getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` + * whose `performanceEntry.entryType` is equal to `type`. + * @param type + * @since v16.7.0 + */ + getEntriesByType(type: EntryType): PerformanceEntry[]; /** * Creates a new PerformanceMark entry in the Performance Timeline. * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', * and whose performanceEntry.duration is always 0. * Performance marks are used to mark specific significant moments in the Performance Timeline. * @param name + * @return The PerformanceMark entry that was created */ - mark(name?: string): void; - + mark(name?: string, options?: MarkOptions): PerformanceMark; /** * Creates a new PerformanceMeasure entry in the Performance Timeline. * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', @@ -119,86 +251,212 @@ declare module 'perf_hooks' { * @param name * @param startMark * @param endMark + * @return The PerformanceMeasure entry that was created */ - measure(name: string, startMark: string, endMark: string): void; - + measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure; + measure(name: string, options: MeasureOptions): PerformanceMeasure; /** * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. */ readonly nodeTiming: PerformanceNodeTiming; - /** * @return the current high resolution millisecond timestamp */ now(): number; - /** * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. */ readonly timeOrigin: number; - /** * Wraps a function within a new function that measures the running time of the wrapped function. * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. * @param fn */ - timerify any>(fn: T): T; - + timerify any>(fn: T, options?: TimerifyOptions): T; /** * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time. * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait). * No other CPU idle time is taken into consideration. - * - * @param util1 The result of a previous call to eventLoopUtilization() - * @param util2 The result of a previous call to eventLoopUtilization() prior to util1 */ - eventLoopUtilization(util1?: EventLoopUtilization, util2?: EventLoopUtilization): EventLoopUtilization; + eventLoopUtilization: EventLoopUtilityFunction; } - interface PerformanceObserverEntryList { /** - * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntries()); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 81.465639, + * * duration: 0 + * * }, + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 81.860064, + * * duration: 0 + * * } + * * ] + * + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ type: 'mark' }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 */ getEntries(): PerformanceEntry[]; - /** - * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime - * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is + * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntriesByName('meow')); + * + * * [ + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 98.545991, + * * duration: 0 + * * } + * * ] + * + * console.log(perfObserverList.getEntriesByName('nope')); // [] + * + * console.log(perfObserverList.getEntriesByName('test', 'mark')); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 63.518931, + * * duration: 0 + * * } + * * ] + * + * console.log(perfObserverList.getEntriesByName('test', 'measure')); // [] + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ entryTypes: ['mark', 'measure'] }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 */ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; - /** - * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime - * whose performanceEntry.entryType is equal to type. + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntriesByType('mark')); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 55.897834, + * * duration: 0 + * * }, + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 56.350146, + * * duration: 0 + * * } + * * ] + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ type: 'mark' }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 */ getEntriesByType(type: EntryType): PerformanceEntry[]; } - type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; - class PerformanceObserver extends AsyncResource { constructor(callback: PerformanceObserverCallback); - /** - * Disconnects the PerformanceObserver instance from all notifications. + * Disconnects the `PerformanceObserver` instance from all notifications. + * @since v8.5.0 */ disconnect(): void; - /** - * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes. - * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance. - * Property buffered defaults to false. - * @param options - */ - observe(options: { entryTypes: ReadonlyArray; buffered?: boolean }): void; + * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`: + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((list, observer) => { + * // Called once asynchronously. `list` contains three items. + * }); + * obs.observe({ type: 'mark' }); + * + * for (let n = 0; n < 3; n++) + * performance.mark(`test${n}`); + * ``` + * @since v8.5.0 + */ + observe( + options: + | { + entryTypes: ReadonlyArray; + buffered?: boolean | undefined; + } + | { + type: EntryType; + buffered?: boolean | undefined; + } + ): void; } - namespace constants { const NODE_PERFORMANCE_GC_MAJOR: number; const NODE_PERFORMANCE_GC_MINOR: number; const NODE_PERFORMANCE_GC_INCREMENTAL: number; const NODE_PERFORMANCE_GC_WEAKCB: number; - const NODE_PERFORMANCE_GC_FLAGS_NO: number; const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; @@ -207,69 +465,161 @@ declare module 'perf_hooks' { const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; } - const performance: Performance; - interface EventLoopMonitorOptions { /** * The sampling rate in milliseconds. * Must be greater than zero. * @default 10 */ - resolution?: number; + resolution?: number | undefined; } - - interface EventLoopDelayMonitor { + interface Histogram { /** - * Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started. - */ - enable(): boolean; - /** - * Disables the event loop delay sample timer. Returns `true` if the timer was stopped, `false` if it was already stopped. - */ - disable(): boolean; - - /** - * Resets the collected histogram data. - */ - reset(): void; - - /** - * Returns the value at the given percentile. - * @param percentile A percentile value between 1 and 100. - */ - percentile(percentile: number): number; - - /** - * A `Map` object detailing the accumulated percentile distribution. + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v11.10.0 */ readonly percentiles: Map; - /** - * The number of times the event loop delay exceeded the maximum 1 hour eventloop delay threshold. + * The number of times the event loop delay exceeded the maximum 1 hour event + * loop delay threshold. + * @since v11.10.0 */ readonly exceeds: number; - /** * The minimum recorded event loop delay. + * @since v11.10.0 */ readonly min: number; - /** * The maximum recorded event loop delay. + * @since v11.10.0 */ readonly max: number; - /** * The mean of the recorded event loop delays. + * @since v11.10.0 */ readonly mean: number; - /** * The standard deviation of the recorded event loop delays. + * @since v11.10.0 */ readonly stddev: number; + /** + * Resets the collected histogram data. + * @since v11.10.0 + */ + reset(): void; + /** + * Returns the value at the given percentile. + * @since v11.10.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentile(percentile: number): number; } - - function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor; + interface IntervalHistogram extends Histogram { + /** + * Enables the update interval timer. Returns `true` if the timer was + * started, `false` if it was already started. + * @since v11.10.0 + */ + enable(): boolean; + /** + * Disables the update interval timer. Returns `true` if the timer was + * stopped, `false` if it was already stopped. + * @since v11.10.0 + */ + disable(): boolean; + } + interface RecordableHistogram extends Histogram { + /** + * @since v15.9.0, v14.18.0 + * @param val The amount to record in the histogram. + */ + record(val: number | bigint): void; + /** + * Calculates the amount of time (in nanoseconds) that has passed since the + * previous call to `recordDelta()` and records that amount in the histogram. + * + * ## Examples + * @since v15.9.0, v14.18.0 + */ + recordDelta(): void; + /** + * Adds the values from other to this histogram. + * @since v17.4.0, v16.14.0 + * @param other Recordable Histogram to combine with + */ + add(other: RecordableHistogram): void; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Creates an `IntervalHistogram` object that samples and reports the event loop + * delay over time. The delays will be reported in nanoseconds. + * + * Using a timer to detect approximate event loop delay works because the + * execution of timers is tied specifically to the lifecycle of the libuv + * event loop. That is, a delay in the loop will cause a delay in the execution + * of the timer, and those delays are specifically what this API is intended to + * detect. + * + * ```js + * const { monitorEventLoopDelay } = require('perf_hooks'); + * const h = monitorEventLoopDelay({ resolution: 20 }); + * h.enable(); + * // Do something. + * h.disable(); + * console.log(h.min); + * console.log(h.max); + * console.log(h.mean); + * console.log(h.stddev); + * console.log(h.percentiles); + * console.log(h.percentile(50)); + * console.log(h.percentile(99)); + * ``` + * @since v11.10.0 + */ + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; + interface CreateHistogramOptions { + /** + * The minimum recordable value. Must be an integer value greater than 0. + * @default 1 + */ + min?: number | bigint | undefined; + /** + * The maximum recordable value. Must be an integer value greater than min. + * @default Number.MAX_SAFE_INTEGER + */ + max?: number | bigint | undefined; + /** + * The number of accuracy digits. Must be a number between 1 and 5. + * @default 3 + */ + figures?: number | undefined; + } + /** + * Returns a `RecordableHistogram`. + * @since v15.9.0, v14.18.0 + */ + function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; + + import { performance as _performance } from 'perf_hooks'; + global { + /** + * `performance` is a global reference for `require('perf_hooks').performance` + * https://nodejs.org/api/globals.html#performance + * @since v16.0.0 + */ + var performance: typeof globalThis extends { + onmessage: any; + performance: infer T; + } + ? T + : typeof _performance; + } +} +declare module 'node:perf_hooks' { + export * from 'perf_hooks'; } diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts index 8538135..12148f9 100644 --- a/node_modules/@types/node/process.d.ts +++ b/node_modules/@types/node/process.d.ts @@ -1,20 +1,25 @@ -declare module 'node:process' { - export = process; -} - declare module 'process' { import * as tty from 'node:tty'; - + import { Worker } from 'node:worker_threads'; global { var process: NodeJS.Process; - namespace NodeJS { // this namespace merge is here because these are specifically used // as the type for process.stdin, process.stdout, and process.stderr. // they can't live in tty.d.ts because we need to disambiguate the imported name. interface ReadStream extends tty.ReadStream {} interface WriteStream extends tty.WriteStream {} - + interface MemoryUsageFn { + /** + * The `process.memoryUsage()` method iterate over each page to gather informations about memory + * usage which can be slow depending on the program memory allocations. + */ + (): MemoryUsage; + /** + * method returns an integer representing the Resident Set Size (RSS) in bytes. + */ + rss(): number; + } interface MemoryUsage { rss: number; heapTotal: number; @@ -22,20 +27,17 @@ declare module 'process' { external: number; arrayBuffers: number; } - interface CpuUsage { user: number; system: number; } - interface ProcessRelease { name: string; - sourceUrl?: string; - headersUrl?: string; - libUrl?: string; - lts?: string; + sourceUrl?: string | undefined; + headersUrl?: string | undefined; + libUrl?: string | undefined; + lts?: string | undefined; } - interface ProcessVersions extends Dict { http_parser: string; node: string; @@ -46,51 +48,77 @@ declare module 'process' { modules: string; openssl: string; } - - type Platform = 'aix' - | 'android' - | 'darwin' - | 'freebsd' - | 'linux' - | 'openbsd' - | 'sunos' - | 'win32' - | 'cygwin' - | 'netbsd'; - + type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; + type Architecture = 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x64'; type Signals = - "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | - "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | - "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | - "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO"; - + | 'SIGABRT' + | 'SIGALRM' + | 'SIGBUS' + | 'SIGCHLD' + | 'SIGCONT' + | 'SIGFPE' + | 'SIGHUP' + | 'SIGILL' + | 'SIGINT' + | 'SIGIO' + | 'SIGIOT' + | 'SIGKILL' + | 'SIGPIPE' + | 'SIGPOLL' + | 'SIGPROF' + | 'SIGPWR' + | 'SIGQUIT' + | 'SIGSEGV' + | 'SIGSTKFLT' + | 'SIGSTOP' + | 'SIGSYS' + | 'SIGTERM' + | 'SIGTRAP' + | 'SIGTSTP' + | 'SIGTTIN' + | 'SIGTTOU' + | 'SIGUNUSED' + | 'SIGURG' + | 'SIGUSR1' + | 'SIGUSR2' + | 'SIGVTALRM' + | 'SIGWINCH' + | 'SIGXCPU' + | 'SIGXFSZ' + | 'SIGBREAK' + | 'SIGLOST' + | 'SIGINFO'; + type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection'; type MultipleResolveType = 'resolve' | 'reject'; - type BeforeExitListener = (code: number) => void; type DisconnectListener = () => void; type ExitListener = (code: number) => void; - type RejectionHandledListener = (promise: Promise) => void; - type UncaughtExceptionListener = (error: Error) => void; - type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise) => void; + type RejectionHandledListener = (promise: Promise) => void; + type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void; + /** + * Most of the time the unhandledRejection will be an Error, but this should not be relied upon + * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error. + */ + type UnhandledRejectionListener = (reason: unknown, promise: Promise) => void; type WarningListener = (warning: Error) => void; - type MessageListener = (message: any, sendHandle: any) => void; + type MessageListener = (message: unknown, sendHandle: unknown) => void; type SignalsListener = (signal: Signals) => void; - type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; - type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; - type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: any) => void; - + type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: unknown) => void; + type WorkerListener = (worker: Worker) => void; interface Socket extends ReadWriteStream { - isTTY?: true; + isTTY?: true | undefined; } - // Alias for compatibility - interface ProcessEnv extends Dict {} - + interface ProcessEnv extends Dict { + /** + * Can be used to change the default timezone at runtime + */ + TZ?: string; + } interface HRTime { (time?: [number, number]): [number, number]; bigint(): bigint; } - interface ProcessReport { /** * Directory where the report is written. @@ -98,7 +126,6 @@ declare module 'process' { * @default '' indicating that reports are written to the current */ directory: string; - /** * Filename where the report is written. * The default value is the empty string. @@ -106,39 +133,33 @@ declare module 'process' { * PID, and sequence number. */ filename: string; - /** * Returns a JSON-formatted diagnostic report for the running process. * The report's JavaScript stack trace is taken from err, if present. */ getReport(err?: Error): string; - /** * If true, a diagnostic report is generated on fatal errors, * such as out of memory errors or failed C++ assertions. * @default false */ reportOnFatalError: boolean; - /** * If true, a diagnostic report is generated when the process * receives the signal specified by process.report.signal. - * @defaul false + * @default false */ reportOnSignal: boolean; - /** * If true, a diagnostic report is generated on uncaught exception. * @default false */ reportOnUncaughtException: boolean; - /** * The signal used to trigger the creation of a diagnostic report. * @default 'SIGUSR2' */ signal: Signals; - /** * Writes a diagnostic report to a file. If filename is not provided, the default filename * includes the date, time, PID, and a sequence number. @@ -155,7 +176,6 @@ declare module 'process' { writeReport(error?: Error): string; writeReport(fileName?: string, err?: Error): string; } - interface ResourceUsage { fsRead: number; fsWrite: number; @@ -174,88 +194,1039 @@ declare module 'process' { userCPUTime: number; voluntaryContextSwitches: number; } - + interface EmitWarningOptions { + /** + * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. + * + * @default 'Warning' + */ + type?: string | undefined; + /** + * A unique identifier for the warning instance being emitted. + */ + code?: string | undefined; + /** + * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. + * + * @default process.emitWarning + */ + ctor?: Function | undefined; + /** + * Additional text to include with the error. + */ + detail?: string | undefined; + } + interface ProcessConfig { + readonly target_defaults: { + readonly cflags: any[]; + readonly default_configuration: string; + readonly defines: string[]; + readonly include_dirs: string[]; + readonly libraries: string[]; + }; + readonly variables: { + readonly clang: number; + readonly host_arch: string; + readonly node_install_npm: boolean; + readonly node_install_waf: boolean; + readonly node_prefix: string; + readonly node_shared_openssl: boolean; + readonly node_shared_v8: boolean; + readonly node_shared_zlib: boolean; + readonly node_use_dtrace: boolean; + readonly node_use_etw: boolean; + readonly node_use_openssl: boolean; + readonly target_arch: string; + readonly v8_no_strict_aliasing: number; + readonly v8_use_snapshot: boolean; + readonly visibility: string; + }; + } interface Process extends EventEmitter { /** - * Can also be a tty.WriteStream, not typed due to limitations. + * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is + * a `Writable` stream. + * + * For example, to copy `process.stdin` to `process.stdout`: + * + * ```js + * import { stdin, stdout } from 'process'; + * + * stdin.pipe(stdout); + * ``` + * + * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. */ stdout: WriteStream & { fd: 1; }; /** - * Can also be a tty.WriteStream, not typed due to limitations. + * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is + * a `Writable` stream. + * + * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. */ stderr: WriteStream & { fd: 2; }; + /** + * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is + * a `Readable` stream. + * + * For details of how to read from `stdin` see `readable.read()`. + * + * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that + * is compatible with scripts written for Node.js prior to v0.10\. + * For more information see `Stream compatibility`. + * + * In "old" streams mode the `stdin` stream is paused by default, so one + * must call `process.stdin.resume()` to read from it. Note also that calling`process.stdin.resume()` itself would switch stream to "old" mode. + */ stdin: ReadStream & { fd: 0; }; openStdin(): Socket; + /** + * The `process.argv` property returns an array containing the command-line + * arguments passed when the Node.js process was launched. The first element will + * be {@link execPath}. See `process.argv0` if access to the original value + * of `argv[0]` is needed. The second element will be the path to the JavaScript + * file being executed. The remaining elements will be any additional command-line + * arguments. + * + * For example, assuming the following script for `process-args.js`: + * + * ```js + * import { argv } from 'process'; + * + * // print process.argv + * argv.forEach((val, index) => { + * console.log(`${index}: ${val}`); + * }); + * ``` + * + * Launching the Node.js process as: + * + * ```console + * $ node process-args.js one two=three four + * ``` + * + * Would generate the output: + * + * ```text + * 0: /usr/local/bin/node + * 1: /Users/mjr/work/node/process-args.js + * 2: one + * 3: two=three + * 4: four + * ``` + * @since v0.1.27 + */ argv: string[]; + /** + * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. + * + * ```console + * $ bash -c 'exec -a customArgv0 ./node' + * > process.argv[0] + * '/Volumes/code/external/node/out/Release/node' + * > process.argv0 + * 'customArgv0' + * ``` + * @since v6.4.0 + */ argv0: string; + /** + * The `process.execArgv` property returns the set of Node.js-specific command-line + * options passed when the Node.js process was launched. These options do not + * appear in the array returned by the {@link argv} property, and do not + * include the Node.js executable, the name of the script, or any options following + * the script name. These options are useful in order to spawn child processes with + * the same execution environment as the parent. + * + * ```console + * $ node --harmony script.js --version + * ``` + * + * Results in `process.execArgv`: + * + * ```js + * ['--harmony'] + * ``` + * + * And `process.argv`: + * + * ```js + * ['/usr/local/bin/node', 'script.js', '--version'] + * ``` + * + * Refer to `Worker constructor` for the detailed behavior of worker + * threads with this property. + * @since v0.7.7 + */ execArgv: string[]; + /** + * The `process.execPath` property returns the absolute pathname of the executable + * that started the Node.js process. Symbolic links, if any, are resolved. + * + * ```js + * '/usr/local/bin/node' + * ``` + * @since v0.1.100 + */ execPath: string; + /** + * The `process.abort()` method causes the Node.js process to exit immediately and + * generate a core file. + * + * This feature is not available in `Worker` threads. + * @since v0.7.0 + */ abort(): never; + /** + * The `process.chdir()` method changes the current working directory of the + * Node.js process or throws an exception if doing so fails (for instance, if + * the specified `directory` does not exist). + * + * ```js + * import { chdir, cwd } from 'process'; + * + * console.log(`Starting directory: ${cwd()}`); + * try { + * chdir('/tmp'); + * console.log(`New directory: ${cwd()}`); + * } catch (err) { + * console.error(`chdir: ${err}`); + * } + * ``` + * + * This feature is not available in `Worker` threads. + * @since v0.1.17 + */ chdir(directory: string): void; + /** + * The `process.cwd()` method returns the current working directory of the Node.js + * process. + * + * ```js + * import { cwd } from 'process'; + * + * console.log(`Current directory: ${cwd()}`); + * ``` + * @since v0.1.8 + */ cwd(): string; + /** + * The port used by the Node.js debugger when enabled. + * + * ```js + * import process from 'process'; + * + * process.debugPort = 5858; + * ``` + * @since v0.7.2 + */ debugPort: number; - emitWarning(warning: string | Error, name?: string, ctor?: Function): void; + /** + * The `process.emitWarning()` method can be used to emit custom or application + * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. + * + * ```js + * import { emitWarning } from 'process'; + * + * // Emit a warning with a code and additional detail. + * emitWarning('Something happened!', { + * code: 'MY_WARNING', + * detail: 'This is some additional information' + * }); + * // Emits: + * // (node:56338) [MY_WARNING] Warning: Something happened! + * // This is some additional information + * ``` + * + * In this example, an `Error` object is generated internally by`process.emitWarning()` and passed through to the `'warning'` handler. + * + * ```js + * import process from 'process'; + * + * process.on('warning', (warning) => { + * console.warn(warning.name); // 'Warning' + * console.warn(warning.message); // 'Something happened!' + * console.warn(warning.code); // 'MY_WARNING' + * console.warn(warning.stack); // Stack trace + * console.warn(warning.detail); // 'This is some additional information' + * }); + * ``` + * + * If `warning` is passed as an `Error` object, the `options` argument is ignored. + * @since v8.0.0 + * @param warning The warning to emit. + */ + emitWarning(warning: string | Error, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; + emitWarning(warning: string | Error, options?: EmitWarningOptions): void; + /** + * The `process.env` property returns an object containing the user environment. + * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). + * + * An example of this object looks like: + * + * ```js + * { + * TERM: 'xterm-256color', + * SHELL: '/usr/local/bin/bash', + * USER: 'maciej', + * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', + * PWD: '/Users/maciej', + * EDITOR: 'vim', + * SHLVL: '1', + * HOME: '/Users/maciej', + * LOGNAME: 'maciej', + * _: '/usr/local/bin/node' + * } + * ``` + * + * It is possible to modify this object, but such modifications will not be + * reflected outside the Node.js process, or (unless explicitly requested) + * to other `Worker` threads. + * In other words, the following example would not work: + * + * ```console + * $ node -e 'process.env.foo = "bar"' && echo $foo + * ``` + * + * While the following will: + * + * ```js + * import { env } from 'process'; + * + * env.foo = 'bar'; + * console.log(env.foo); + * ``` + * + * Assigning a property on `process.env` will implicitly convert the value + * to a string. **This behavior is deprecated.** Future versions of Node.js may + * throw an error when the value is not a string, number, or boolean. + * + * ```js + * import { env } from 'process'; + * + * env.test = null; + * console.log(env.test); + * // => 'null' + * env.test = undefined; + * console.log(env.test); + * // => 'undefined' + * ``` + * + * Use `delete` to delete a property from `process.env`. + * + * ```js + * import { env } from 'process'; + * + * env.TEST = 1; + * delete env.TEST; + * console.log(env.TEST); + * // => undefined + * ``` + * + * On Windows operating systems, environment variables are case-insensitive. + * + * ```js + * import { env } from 'process'; + * + * env.TEST = 1; + * console.log(env.test); + * // => 1 + * ``` + * + * Unless explicitly specified when creating a `Worker` instance, + * each `Worker` thread has its own copy of `process.env`, based on its + * parent thread’s `process.env`, or whatever was specified as the `env` option + * to the `Worker` constructor. Changes to `process.env` will not be visible + * across `Worker` threads, and only the main thread can make changes that + * are visible to the operating system or to native add-ons. + * @since v0.1.27 + */ env: ProcessEnv; + /** + * The `process.exit()` method instructs Node.js to terminate the process + * synchronously with an exit status of `code`. If `code` is omitted, exit uses + * either the 'success' code `0` or the value of `process.exitCode` if it has been + * set. Node.js will not terminate until all the `'exit'` event listeners are + * called. + * + * To exit with a 'failure' code: + * + * ```js + * import { exit } from 'process'; + * + * exit(1); + * ``` + * + * The shell that executed Node.js should see the exit code as `1`. + * + * Calling `process.exit()` will force the process to exit as quickly as possible + * even if there are still asynchronous operations pending that have not yet + * completed fully, including I/O operations to `process.stdout` and`process.stderr`. + * + * In most situations, it is not actually necessary to call `process.exit()`explicitly. The Node.js process will exit on its own _if there is no additional_ + * _work pending_ in the event loop. The `process.exitCode` property can be set to + * tell the process which exit code to use when the process exits gracefully. + * + * For instance, the following example illustrates a _misuse_ of the`process.exit()` method that could lead to data printed to stdout being + * truncated and lost: + * + * ```js + * import { exit } from 'process'; + * + * // This is an example of what *not* to do: + * if (someConditionNotMet()) { + * printUsageToStdout(); + * exit(1); + * } + * ``` + * + * The reason this is problematic is because writes to `process.stdout` in Node.js + * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js + * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. + * + * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding + * scheduling any additional work for the event loop: + * + * ```js + * import process from 'process'; + * + * // How to properly set the exit code while letting + * // the process exit gracefully. + * if (someConditionNotMet()) { + * printUsageToStdout(); + * process.exitCode = 1; + * } + * ``` + * + * If it is necessary to terminate the Node.js process due to an error condition, + * throwing an _uncaught_ error and allowing the process to terminate accordingly + * is safer than calling `process.exit()`. + * + * In `Worker` threads, this function stops the current thread rather + * than the current process. + * @since v0.1.13 + * @param [code=0] The exit code. + */ exit(code?: number): never; - exitCode?: number; - getgid(): number; - setgid(id: number | string): void; - getuid(): number; - setuid(id: number | string): void; - geteuid(): number; - seteuid(id: number | string): void; - getegid(): number; - setegid(id: number | string): void; - getgroups(): number[]; - setgroups(groups: ReadonlyArray): void; + /** + * A number which will be the process exit code, when the process either + * exits gracefully, or is exited via {@link exit} without specifying + * a code. + * + * Specifying a code to {@link exit} will override any + * previous setting of `process.exitCode`. + * @since v0.11.8 + */ + exitCode?: number | undefined; + /** + * The `process.getgid()` method returns the numerical group identity of the + * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getgid) { + * console.log(`Current gid: ${process.getgid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.31 + */ + getgid?: () => number; + /** + * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a + * numeric ID or a group name + * string. If a group name is specified, this method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getgid && process.setgid) { + * console.log(`Current gid: ${process.getgid()}`); + * try { + * process.setgid(501); + * console.log(`New gid: ${process.getgid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.31 + * @param id The group name or ID + */ + setgid?: (id: number | string) => void; + /** + * The `process.getuid()` method returns the numeric user identity of the process. + * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getuid) { + * console.log(`Current uid: ${process.getuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.28 + */ + getuid?: () => number; + /** + * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a + * numeric ID or a username string. + * If a username is specified, the method blocks while resolving the associated + * numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getuid && process.setuid) { + * console.log(`Current uid: ${process.getuid()}`); + * try { + * process.setuid(501); + * console.log(`New uid: ${process.getuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.28 + */ + setuid?: (id: number | string) => void; + /** + * The `process.geteuid()` method returns the numerical effective user identity of + * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.geteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + geteuid?: () => number; + /** + * The `process.seteuid()` method sets the effective user identity of the process. + * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username + * string. If a username is specified, the method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.geteuid && process.seteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * try { + * process.seteuid(501); + * console.log(`New uid: ${process.geteuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A user name or ID + */ + seteuid?: (id: number | string) => void; + /** + * The `process.getegid()` method returns the numerical effective group identity + * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getegid) { + * console.log(`Current gid: ${process.getegid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + getegid?: () => number; + /** + * The `process.setegid()` method sets the effective group identity of the process. + * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group + * name string. If a group name is specified, this method blocks while resolving + * the associated a numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getegid && process.setegid) { + * console.log(`Current gid: ${process.getegid()}`); + * try { + * process.setegid(501); + * console.log(`New gid: ${process.getegid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A group name or ID + */ + setegid?: (id: number | string) => void; + /** + * The `process.getgroups()` method returns an array with the supplementary group + * IDs. POSIX leaves it unspecified if the effective group ID is included but + * Node.js ensures it always is. + * + * ```js + * import process from 'process'; + * + * if (process.getgroups) { + * console.log(process.getgroups()); // [ 16, 21, 297 ] + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.9.4 + */ + getgroups?: () => number[]; + /** + * The `process.setgroups()` method sets the supplementary group IDs for the + * Node.js process. This is a privileged operation that requires the Node.js + * process to have `root` or the `CAP_SETGID` capability. + * + * The `groups` array can contain numeric group IDs, group names, or both. + * + * ```js + * import process from 'process'; + * + * if (process.getgroups && process.setgroups) { + * try { + * process.setgroups([501]); + * console.log(process.getgroups()); // new groups + * } catch (err) { + * console.log(`Failed to set groups: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.9.4 + */ + setgroups?: (groups: ReadonlyArray) => void; + /** + * The `process.setUncaughtExceptionCaptureCallback()` function sets a function + * that will be invoked when an uncaught exception occurs, which will receive the + * exception value itself as its first argument. + * + * If such a function is set, the `'uncaughtException'` event will + * not be emitted. If `--abort-on-uncaught-exception` was passed from the + * command line or set through `v8.setFlagsFromString()`, the process will + * not abort. Actions configured to take place on exceptions such as report + * generations will be affected too + * + * To unset the capture function,`process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this + * method with a non-`null` argument while another capture function is set will + * throw an error. + * + * Using this function is mutually exclusive with using the deprecated `domain` built-in module. + * @since v9.3.0 + */ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; + /** + * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. + * @since v9.3.0 + */ hasUncaughtExceptionCaptureCallback(): boolean; - version: string; - versions: ProcessVersions; - config: { - target_defaults: { - cflags: any[]; - default_configuration: string; - defines: string[]; - include_dirs: string[]; - libraries: string[]; - }; - variables: { - clang: number; - host_arch: string; - node_install_npm: boolean; - node_install_waf: boolean; - node_prefix: string; - node_shared_openssl: boolean; - node_shared_v8: boolean; - node_shared_zlib: boolean; - node_use_dtrace: boolean; - node_use_etw: boolean; - node_use_openssl: boolean; - target_arch: string; - v8_no_strict_aliasing: number; - v8_use_snapshot: boolean; - visibility: string; - }; - }; + /** + * The `process.version` property contains the Node.js version string. + * + * ```js + * import { version } from 'process'; + * + * console.log(`Version: ${version}`); + * // Version: v14.8.0 + * ``` + * + * To get the version string without the prepended _v_, use`process.versions.node`. + * @since v0.1.3 + */ + readonly version: string; + /** + * The `process.versions` property returns an object listing the version strings of + * Node.js and its dependencies. `process.versions.modules` indicates the current + * ABI version, which is increased whenever a C++ API changes. Node.js will refuse + * to load modules that were compiled against a different module ABI version. + * + * ```js + * import { versions } from 'process'; + * + * console.log(versions); + * ``` + * + * Will generate an object similar to: + * + * ```console + * { node: '11.13.0', + * v8: '7.0.276.38-node.18', + * uv: '1.27.0', + * zlib: '1.2.11', + * brotli: '1.0.7', + * ares: '1.15.0', + * modules: '67', + * nghttp2: '1.34.0', + * napi: '4', + * llhttp: '1.1.1', + * openssl: '1.1.1b', + * cldr: '34.0', + * icu: '63.1', + * tz: '2018e', + * unicode: '11.0' } + * ``` + * @since v0.2.0 + */ + readonly versions: ProcessVersions; + /** + * The `process.config` property returns an `Object` containing the JavaScript + * representation of the configure options used to compile the current Node.js + * executable. This is the same as the `config.gypi` file that was produced when + * running the `./configure` script. + * + * An example of the possible output looks like: + * + * ```js + * { + * target_defaults: + * { cflags: [], + * default_configuration: 'Release', + * defines: [], + * include_dirs: [], + * libraries: [] }, + * variables: + * { + * host_arch: 'x64', + * napi_build_version: 5, + * node_install_npm: 'true', + * node_prefix: '', + * node_shared_cares: 'false', + * node_shared_http_parser: 'false', + * node_shared_libuv: 'false', + * node_shared_zlib: 'false', + * node_use_dtrace: 'false', + * node_use_openssl: 'true', + * node_shared_openssl: 'false', + * strict_aliasing: 'true', + * target_arch: 'x64', + * v8_use_snapshot: 1 + * } + * } + * ``` + * + * The `process.config` property is **not** read-only and there are existing + * modules in the ecosystem that are known to extend, modify, or entirely replace + * the value of `process.config`. + * + * Modifying the `process.config` property, or any child-property of the`process.config` object has been deprecated. The `process.config` will be made + * read-only in a future release. + * @since v0.7.7 + */ + readonly config: ProcessConfig; + /** + * The `process.kill()` method sends the `signal` to the process identified by`pid`. + * + * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. + * + * This method will throw an error if the target `pid` does not exist. As a special + * case, a signal of `0` can be used to test for the existence of a process. + * Windows platforms will throw an error if the `pid` is used to kill a process + * group. + * + * Even though the name of this function is `process.kill()`, it is really just a + * signal sender, like the `kill` system call. The signal sent may do something + * other than kill the target process. + * + * ```js + * import process, { kill } from 'process'; + * + * process.on('SIGHUP', () => { + * console.log('Got SIGHUP signal.'); + * }); + * + * setTimeout(() => { + * console.log('Exiting.'); + * process.exit(0); + * }, 100); + * + * kill(process.pid, 'SIGHUP'); + * ``` + * + * When `SIGUSR1` is received by a Node.js process, Node.js will start the + * debugger. See `Signal Events`. + * @since v0.0.6 + * @param pid A process ID + * @param [signal='SIGTERM'] The signal to send, either as a string or number. + */ kill(pid: number, signal?: string | number): true; - pid: number; - ppid: number; + /** + * The `process.pid` property returns the PID of the process. + * + * ```js + * import { pid } from 'process'; + * + * console.log(`This process is pid ${pid}`); + * ``` + * @since v0.1.15 + */ + readonly pid: number; + /** + * The `process.ppid` property returns the PID of the parent of the + * current process. + * + * ```js + * import { ppid } from 'process'; + * + * console.log(`The parent process is pid ${ppid}`); + * ``` + * @since v9.2.0, v8.10.0, v6.13.0 + */ + readonly ppid: number; + /** + * The `process.title` property returns the current process title (i.e. returns + * the current value of `ps`). Assigning a new value to `process.title` modifies + * the current value of `ps`. + * + * When a new value is assigned, different platforms will impose different maximum + * length restrictions on the title. Usually such restrictions are quite limited. + * For instance, on Linux and macOS, `process.title` is limited to the size of the + * binary name plus the length of the command-line arguments because setting the`process.title` overwrites the `argv` memory of the process. Node.js v0.8 + * allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure) + * cases. + * + * Assigning a value to `process.title` might not result in an accurate label + * within process manager applications such as macOS Activity Monitor or Windows + * Services Manager. + * @since v0.1.104 + */ title: string; - arch: string; - platform: Platform; - /** @deprecated since v14.0.0 - use `require.main` instead. */ - mainModule?: Module; - memoryUsage(): MemoryUsage; + /** + * The operating system CPU architecture for which the Node.js binary was compiled. + * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`. + * + * ```js + * import { arch } from 'process'; + * + * console.log(`This processor architecture is ${arch}`); + * ``` + * @since v0.5.0 + */ + readonly arch: Architecture; + /** + * The `process.platform` property returns a string identifying the operating + * system platform for which the Node.js binary was compiled. + * + * Currently possible values are: + * + * * `'aix'` + * * `'darwin'` + * * `'freebsd'` + * * `'linux'` + * * `'openbsd'` + * * `'sunos'` + * * `'win32'` + * + * ```js + * import { platform } from 'process'; + * + * console.log(`This platform is ${platform}`); + * ``` + * + * The value `'android'` may also be returned if the Node.js is built on the + * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.1.16 + */ + readonly platform: Platform; + /** + * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at + * runtime, `require.main` may still refer to the original main module in + * modules that were required before the change occurred. Generally, it's + * safe to assume that the two refer to the same module. + * + * As with `require.main`, `process.mainModule` will be `undefined` if there + * is no entry script. + * @since v0.1.17 + * @deprecated Since v14.0.0 - Use `main` instead. + */ + mainModule?: Module | undefined; + memoryUsage: MemoryUsageFn; + /** + * The `process.cpuUsage()` method returns the user and system CPU time usage of + * the current process, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). These values measure time + * spent in user and system code respectively, and may end up being greater than + * actual elapsed time if multiple CPU cores are performing work for this process. + * + * The result of a previous call to `process.cpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * + * ```js + * import { cpuUsage } from 'process'; + * + * const startUsage = cpuUsage(); + * // { user: 38579, system: 6986 } + * + * // spin the CPU for 500 milliseconds + * const now = Date.now(); + * while (Date.now() - now < 500); + * + * console.log(cpuUsage(startUsage)); + * // { user: 514883, system: 11226 } + * ``` + * @since v6.1.0 + * @param previousValue A previous return value from calling `process.cpuUsage()` + */ cpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * `process.nextTick()` adds `callback` to the "next tick queue". This queue is + * fully drained after the current operation on the JavaScript stack runs to + * completion and before the event loop is allowed to continue. It's possible to + * create an infinite loop if one were to recursively call `process.nextTick()`. + * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. + * + * ```js + * import { nextTick } from 'process'; + * + * console.log('start'); + * nextTick(() => { + * console.log('nextTick callback'); + * }); + * console.log('scheduled'); + * // Output: + * // start + * // scheduled + * // nextTick callback + * ``` + * + * This is important when developing APIs in order to give users the opportunity + * to assign event handlers _after_ an object has been constructed but before any + * I/O has occurred: + * + * ```js + * import { nextTick } from 'process'; + * + * function MyThing(options) { + * this.setupOptions(options); + * + * nextTick(() => { + * this.startDoingStuff(); + * }); + * } + * + * const thing = new MyThing(); + * thing.getReadyForStuff(); + * + * // thing.startDoingStuff() gets called now, not before. + * ``` + * + * It is very important for APIs to be either 100% synchronous or 100% + * asynchronous. Consider this example: + * + * ```js + * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! + * function maybeSync(arg, cb) { + * if (arg) { + * cb(); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * + * This API is hazardous because in the following case: + * + * ```js + * const maybeTrue = Math.random() > 0.5; + * + * maybeSync(maybeTrue, () => { + * foo(); + * }); + * + * bar(); + * ``` + * + * It is not clear whether `foo()` or `bar()` will be called first. + * + * The following approach is much better: + * + * ```js + * import { nextTick } from 'process'; + * + * function definitelyAsync(arg, cb) { + * if (arg) { + * nextTick(cb); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * @since v0.1.26 + * @param args Additional arguments to pass when invoking the `callback` + */ nextTick(callback: Function, ...args: any[]): void; - release: ProcessRelease; + /** + * The `process.release` property returns an `Object` containing metadata related + * to the current release, including URLs for the source tarball and headers-only + * tarball. + * + * `process.release` contains the following properties: + * + * ```js + * { + * name: 'node', + * lts: 'Erbium', + * sourceUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1.tar.gz', + * headersUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1-headers.tar.gz', + * libUrl: 'https://nodejs.org/download/release/v12.18.1/win-x64/node.lib' + * } + * ``` + * + * In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be + * relied upon to exist. + * @since v3.0.0 + */ + readonly release: ProcessRelease; features: { inspector: boolean; debug: boolean; @@ -267,146 +1238,245 @@ declare module 'process' { tls: boolean; }; /** - * @deprecated since v14.0.0 - Calling process.umask() with no argument causes - * the process-wide umask to be written twice. This introduces a race condition between threads, - * and is a potential security vulnerability. There is no safe, cross-platform alternative API. + * `process.umask()` returns the Node.js process's file mode creation mask. Child + * processes inherit the mask from the parent process. + * @since v0.1.19 + * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential * + * security vulnerability. There is no safe, cross-platform alternative API. */ umask(): number; /** * Can only be set if not in worker thread. */ umask(mask: string | number): number; + /** + * The `process.uptime()` method returns the number of seconds the current Node.js + * process has been running. + * + * The return value includes fractions of a second. Use `Math.floor()` to get whole + * seconds. + * @since v0.5.0 + */ uptime(): number; hrtime: HRTime; - domain: Domain; - - // Worker - send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean; + /** + * If Node.js is spawned with an IPC channel, the `process.send()` method can be + * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. + * + * If Node.js was not spawned with an IPC channel, `process.send` will be`undefined`. + * + * The message goes through serialization and parsing. The resulting message might + * not be the same as what is originally sent. + * @since v0.5.9 + * @param options used to parameterize the sending of certain types of handles.`options` supports the following properties: + */ + send?( + message: any, + sendHandle?: any, + options?: { + swallowErrors?: boolean | undefined; + }, + callback?: (error: Error | null) => void + ): boolean; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the + * IPC channel to the parent process, allowing the child process to exit gracefully + * once there are no other connections keeping it alive. + * + * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. + * + * If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`. + * @since v0.7.2 + */ disconnect(): void; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return`true` so long as the IPC + * channel is connected and will return `false` after`process.disconnect()` is called. + * + * Once `process.connected` is `false`, it is no longer possible to send messages + * over the IPC channel using `process.send()`. + * @since v0.7.2 + */ connected: boolean; - /** * The `process.allowedNodeEnvironmentFlags` property is a special, - * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][] - * environment variable. + * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. + * + * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag + * representations. `process.allowedNodeEnvironmentFlags.has()` will + * return `true` in the following cases: + * + * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`. + * * Flags passed through to V8 (as listed in `--v8-options`) may replace + * one or more _non-leading_ dashes for an underscore, or vice-versa; + * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, + * etc. + * * Flags may contain one or more equals (`=`) characters; all + * characters after and including the first equals will be ignored; + * e.g., `--stack-trace-limit=100`. + * * Flags _must_ be allowable within `NODE_OPTIONS`. + * + * When iterating over `process.allowedNodeEnvironmentFlags`, flags will + * appear only _once_; each will begin with one or more dashes. Flags + * passed through to V8 will contain underscores instead of non-leading + * dashes: + * + * ```js + * import { allowedNodeEnvironmentFlags } from 'process'; + * + * allowedNodeEnvironmentFlags.forEach((flag) => { + * // -r + * // --inspect-brk + * // --abort_on_uncaught_exception + * // ... + * }); + * ``` + * + * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail + * silently. + * + * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will + * contain what _would have_ been allowable. + * @since v10.10.0 */ allowedNodeEnvironmentFlags: ReadonlySet; - /** - * Only available with `--experimental-report` + * `process.report` is an object whose methods are used to generate diagnostic + * reports for the current process. Additional documentation is available in the `report documentation`. + * @since v11.8.0 + */ + report?: ProcessReport | undefined; + /** + * ```js + * import { resourceUsage } from 'process'; + * + * console.log(resourceUsage()); + * /* + * Will output: + * { + * userCPUTime: 82872, + * systemCPUTime: 4143, + * maxRSS: 33164, + * sharedMemorySize: 0, + * unsharedDataSize: 0, + * unsharedStackSize: 0, + * minorPageFault: 2469, + * majorPageFault: 0, + * swappedOut: 0, + * fsRead: 0, + * fsWrite: 8, + * ipcSent: 0, + * ipcReceived: 0, + * signalsCount: 0, + * voluntaryContextSwitches: 79, + * involuntaryContextSwitches: 1 + * } + * + * ``` + * @since v12.6.0 + * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. */ - report?: ProcessReport; - resourceUsage(): ResourceUsage; - + /** + * The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the + * documentation for the `'warning' event` and the `emitWarning() method` for more information about this + * flag's behavior. + * @since v0.8.0 + */ traceDeprecation: boolean; - /* EventEmitter */ - addListener(event: "beforeExit", listener: BeforeExitListener): this; - addListener(event: "disconnect", listener: DisconnectListener): this; - addListener(event: "exit", listener: ExitListener): this; - addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - addListener(event: "warning", listener: WarningListener): this; - addListener(event: "message", listener: MessageListener): this; + addListener(event: 'beforeExit', listener: BeforeExitListener): this; + addListener(event: 'disconnect', listener: DisconnectListener): this; + addListener(event: 'exit', listener: ExitListener): this; + addListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + addListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + addListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + addListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + addListener(event: 'warning', listener: WarningListener): this; + addListener(event: 'message', listener: MessageListener): this; addListener(event: Signals, listener: SignalsListener): this; - addListener(event: "newListener", listener: NewListenerListener): this; - addListener(event: "removeListener", listener: RemoveListenerListener): this; - addListener(event: "multipleResolves", listener: MultipleResolveListener): this; - - emit(event: "beforeExit", code: number): boolean; - emit(event: "disconnect"): boolean; - emit(event: "exit", code: number): boolean; - emit(event: "rejectionHandled", promise: Promise): boolean; - emit(event: "uncaughtException", error: Error): boolean; - emit(event: "uncaughtExceptionMonitor", error: Error): boolean; - emit(event: "unhandledRejection", reason: any, promise: Promise): boolean; - emit(event: "warning", warning: Error): boolean; - emit(event: "message", message: any, sendHandle: any): this; - emit(event: Signals, signal: Signals): boolean; - emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this; - emit(event: "multipleResolves", listener: MultipleResolveListener): this; - - on(event: "beforeExit", listener: BeforeExitListener): this; - on(event: "disconnect", listener: DisconnectListener): this; - on(event: "exit", listener: ExitListener): this; - on(event: "rejectionHandled", listener: RejectionHandledListener): this; - on(event: "uncaughtException", listener: UncaughtExceptionListener): this; - on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - on(event: "warning", listener: WarningListener): this; - on(event: "message", listener: MessageListener): this; + addListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + addListener(event: 'worker', listener: WorkerListener): this; + emit(event: 'beforeExit', code: number): boolean; + emit(event: 'disconnect'): boolean; + emit(event: 'exit', code: number): boolean; + emit(event: 'rejectionHandled', promise: Promise): boolean; + emit(event: 'uncaughtException', error: Error): boolean; + emit(event: 'uncaughtExceptionMonitor', error: Error): boolean; + emit(event: 'unhandledRejection', reason: unknown, promise: Promise): boolean; + emit(event: 'warning', warning: Error): boolean; + emit(event: 'message', message: unknown, sendHandle: unknown): this; + emit(event: Signals, signal?: Signals): boolean; + emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise, value: unknown): this; + emit(event: 'worker', listener: WorkerListener): this; + on(event: 'beforeExit', listener: BeforeExitListener): this; + on(event: 'disconnect', listener: DisconnectListener): this; + on(event: 'exit', listener: ExitListener): this; + on(event: 'rejectionHandled', listener: RejectionHandledListener): this; + on(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + on(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + on(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + on(event: 'warning', listener: WarningListener): this; + on(event: 'message', listener: MessageListener): this; on(event: Signals, listener: SignalsListener): this; - on(event: "newListener", listener: NewListenerListener): this; - on(event: "removeListener", listener: RemoveListenerListener): this; - on(event: "multipleResolves", listener: MultipleResolveListener): this; + on(event: 'multipleResolves', listener: MultipleResolveListener): this; + on(event: 'worker', listener: WorkerListener): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "beforeExit", listener: BeforeExitListener): this; - once(event: "disconnect", listener: DisconnectListener): this; - once(event: "exit", listener: ExitListener): this; - once(event: "rejectionHandled", listener: RejectionHandledListener): this; - once(event: "uncaughtException", listener: UncaughtExceptionListener): this; - once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - once(event: "warning", listener: WarningListener): this; - once(event: "message", listener: MessageListener): this; + once(event: 'beforeExit', listener: BeforeExitListener): this; + once(event: 'disconnect', listener: DisconnectListener): this; + once(event: 'exit', listener: ExitListener): this; + once(event: 'rejectionHandled', listener: RejectionHandledListener): this; + once(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + once(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + once(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + once(event: 'warning', listener: WarningListener): this; + once(event: 'message', listener: MessageListener): this; once(event: Signals, listener: SignalsListener): this; - once(event: "newListener", listener: NewListenerListener): this; - once(event: "removeListener", listener: RemoveListenerListener): this; - once(event: "multipleResolves", listener: MultipleResolveListener): this; - - prependListener(event: "beforeExit", listener: BeforeExitListener): this; - prependListener(event: "disconnect", listener: DisconnectListener): this; - prependListener(event: "exit", listener: ExitListener): this; - prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - prependListener(event: "warning", listener: WarningListener): this; - prependListener(event: "message", listener: MessageListener): this; + once(event: 'multipleResolves', listener: MultipleResolveListener): this; + once(event: 'worker', listener: WorkerListener): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'beforeExit', listener: BeforeExitListener): this; + prependListener(event: 'disconnect', listener: DisconnectListener): this; + prependListener(event: 'exit', listener: ExitListener): this; + prependListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + prependListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + prependListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + prependListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + prependListener(event: 'warning', listener: WarningListener): this; + prependListener(event: 'message', listener: MessageListener): this; prependListener(event: Signals, listener: SignalsListener): this; - prependListener(event: "newListener", listener: NewListenerListener): this; - prependListener(event: "removeListener", listener: RemoveListenerListener): this; - prependListener(event: "multipleResolves", listener: MultipleResolveListener): this; - - prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; - prependOnceListener(event: "disconnect", listener: DisconnectListener): this; - prependOnceListener(event: "exit", listener: ExitListener): this; - prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - prependOnceListener(event: "warning", listener: WarningListener): this; - prependOnceListener(event: "message", listener: MessageListener): this; + prependListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + prependListener(event: 'worker', listener: WorkerListener): this; + prependOnceListener(event: 'beforeExit', listener: BeforeExitListener): this; + prependOnceListener(event: 'disconnect', listener: DisconnectListener): this; + prependOnceListener(event: 'exit', listener: ExitListener): this; + prependOnceListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + prependOnceListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + prependOnceListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + prependOnceListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + prependOnceListener(event: 'warning', listener: WarningListener): this; + prependOnceListener(event: 'message', listener: MessageListener): this; prependOnceListener(event: Signals, listener: SignalsListener): this; - prependOnceListener(event: "newListener", listener: NewListenerListener): this; - prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this; - prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this; - - listeners(event: "beforeExit"): BeforeExitListener[]; - listeners(event: "disconnect"): DisconnectListener[]; - listeners(event: "exit"): ExitListener[]; - listeners(event: "rejectionHandled"): RejectionHandledListener[]; - listeners(event: "uncaughtException"): UncaughtExceptionListener[]; - listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[]; - listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; - listeners(event: "warning"): WarningListener[]; - listeners(event: "message"): MessageListener[]; + prependOnceListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + prependOnceListener(event: 'worker', listener: WorkerListener): this; + listeners(event: 'beforeExit'): BeforeExitListener[]; + listeners(event: 'disconnect'): DisconnectListener[]; + listeners(event: 'exit'): ExitListener[]; + listeners(event: 'rejectionHandled'): RejectionHandledListener[]; + listeners(event: 'uncaughtException'): UncaughtExceptionListener[]; + listeners(event: 'uncaughtExceptionMonitor'): UncaughtExceptionListener[]; + listeners(event: 'unhandledRejection'): UnhandledRejectionListener[]; + listeners(event: 'warning'): WarningListener[]; + listeners(event: 'message'): MessageListener[]; listeners(event: Signals): SignalsListener[]; - listeners(event: "newListener"): NewListenerListener[]; - listeners(event: "removeListener"): RemoveListenerListener[]; - listeners(event: "multipleResolves"): MultipleResolveListener[]; - } - - interface Global { - process: Process; + listeners(event: 'multipleResolves'): MultipleResolveListener[]; + listeners(event: 'worker'): WorkerListener[]; } } } - + export = process; +} +declare module 'node:process' { + import process = require('process'); export = process; } diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts index 593e9cb..87ebbb9 100644 --- a/node_modules/@types/node/punycode.d.ts +++ b/node_modules/@types/node/punycode.d.ts @@ -1,52 +1,80 @@ /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ -declare module 'node:punycode' { - export * from 'punycode'; -} - -/** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. + * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users + * currently depending on the `punycode` module should switch to using the + * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL + * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`. + * + * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It + * can be accessed using: + * + * ```js + * const punycode = require('punycode'); + * ``` + * + * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is + * primarily intended for use in Internationalized Domain Names. Because host + * names in URLs are limited to ASCII characters only, Domain Names that contain + * non-ASCII characters must be converted into ASCII using the Punycode scheme. + * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent + * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`. + * + * The `punycode` module provides a simple implementation of the Punycode standard. + * + * The `punycode` module is a third-party dependency used by Node.js and + * made available to developers as a convenience. Fixes or other modifications to + * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. + * @deprecated Since v7.0.0 - Deprecated + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/punycode.js) */ declare module 'punycode' { /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. + * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only + * characters to the equivalent string of Unicode codepoints. + * + * ```js + * punycode.decode('maana-pta'); // 'mañana' + * punycode.decode('--dqo34k'); // '☃-⌘' + * ``` + * @since v0.5.1 */ function decode(string: string): string; /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. + * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. + * + * ```js + * punycode.encode('mañana'); // 'maana-pta' + * punycode.encode('☃-⌘'); // '--dqo34k' + * ``` + * @since v0.5.1 */ function encode(string: string): string; /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. + * The `punycode.toUnicode()` method converts a string representing a domain name + * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be + * converted. + * + * ```js + * // decode domain names + * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' + * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' + * punycode.toUnicode('example.com'); // 'example.com' + * ``` + * @since v0.6.1 */ function toUnicode(domain: string): string; /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. + * The `punycode.toASCII()` method converts a Unicode string representing an + * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the + * domain name will be converted. Calling `punycode.toASCII()` on a string that + * already only contains ASCII characters will have no effect. + * + * ```js + * // encode domain names + * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' + * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' + * punycode.toASCII('example.com'); // 'example.com' + * ``` + * @since v0.6.1 */ function toASCII(domain: string): string; /** @@ -84,3 +112,6 @@ declare module 'punycode' { */ const version: string; } +declare module 'node:punycode' { + export * from 'punycode'; +} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts index e37234c..e118547 100644 --- a/node_modules/@types/node/querystring.d.ts +++ b/node_modules/@types/node/querystring.d.ts @@ -1,23 +1,95 @@ -declare module 'node:querystring' { - export * from 'querystring'; -} - +/** + * The `querystring` module provides utilities for parsing and formatting URL + * query strings. It can be accessed using: + * + * ```js + * const querystring = require('querystring'); + * ``` + * + * `querystring` is more performant than `URLSearchParams` but is not a + * standardized API. Use `URLSearchParams` when performance is not critical + * or when compatibility with browser code is desirable. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js) + */ declare module 'querystring' { interface StringifyOptions { - encodeURIComponent?: (str: string) => string; + encodeURIComponent?: ((str: string) => string) | undefined; } - interface ParseOptions { - maxKeys?: number; - decodeURIComponent?: (str: string) => string; - } - - interface ParsedUrlQuery extends NodeJS.Dict { } - - interface ParsedUrlQueryInput extends NodeJS.Dict | ReadonlyArray | ReadonlyArray | null> { + maxKeys?: number | undefined; + decodeURIComponent?: ((str: string) => string) | undefined; } - + interface ParsedUrlQuery extends NodeJS.Dict {} + interface ParsedUrlQueryInput extends NodeJS.Dict | ReadonlyArray | ReadonlyArray | null> {} + /** + * The `querystring.stringify()` method produces a URL query string from a + * given `obj` by iterating through the object's "own properties". + * + * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | + * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to + * empty strings. + * + * ```js + * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); + * // Returns 'foo=bar&baz=qux&baz=quux&corge=' + * + * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); + * // Returns 'foo:bar;baz:qux' + * ``` + * + * By default, characters requiring percent-encoding within the query string will + * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkEncodeURIComponent function already exists, + * + * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, + * { encodeURIComponent: gbkEncodeURIComponent }); + * ``` + * @since v0.1.25 + * @param obj The object to serialize into a URL query string + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + /** + * The `querystring.parse()` method parses a URL query string (`str`) into a + * collection of key and value pairs. + * + * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: + * + * ```js + * { + * foo: 'bar', + * abc: ['xyz', '123'] + * } + * ``` + * + * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * By default, percent-encoded characters within the query string will be assumed + * to use UTF-8 encoding. If an alternative character encoding is used, then an + * alternative `decodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkDecodeURIComponent function already exists... + * + * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, + * { decodeURIComponent: gbkDecodeURIComponent }); + * ``` + * @since v0.1.25 + * @param str The URL query string to parse + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; /** * The querystring.encode() function is an alias for querystring.stringify(). @@ -27,6 +99,33 @@ declare module 'querystring' { * The querystring.decode() function is an alias for querystring.parse(). */ const decode: typeof parse; + /** + * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL + * query strings. + * + * The `querystring.escape()` method is used by `querystring.stringify()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement percent-encoding implementation if + * necessary by assigning `querystring.escape` to an alternative function. + * @since v0.1.25 + */ function escape(str: string): string; + /** + * The `querystring.unescape()` method performs decoding of URL percent-encoded + * characters on the given `str`. + * + * The `querystring.unescape()` method is used by `querystring.parse()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement decoding implementation if + * necessary by assigning `querystring.unescape` to an alternative function. + * + * By default, the `querystring.unescape()` method will attempt to use the + * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, + * a safer equivalent that does not throw on malformed URLs will be used. + * @since v0.1.25 + */ function unescape(str: string): string; } +declare module 'node:querystring' { + export * from 'querystring'; +} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts index 2449d89..6ab64ac 100644 --- a/node_modules/@types/node/readline.d.ts +++ b/node_modules/@types/node/readline.d.ts @@ -1,28 +1,99 @@ -declare module 'node:readline' { - export * from 'readline'; -} - +/** + * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time. + * + * To use the promise-based APIs: + * + * ```js + * import * as readline from 'node:readline/promises'; + * ``` + * + * To use the callback and sync APIs: + * + * ```js + * import * as readline from 'node:readline'; + * ``` + * + * The following simple example illustrates the basic use of the `readline` module. + * + * ```js + * import * as readline from 'node:readline/promises'; + * import { stdin as input, stdout as output } from 'node:process'; + * + * const rl = readline.createInterface({ input, output }); + * + * const answer = await rl.question('What do you think of Node.js? '); + * + * console.log(`Thank you for your valuable feedback: ${answer}`); + * + * rl.close(); + * ``` + * + * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be + * received on the `input` stream. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline.js) + */ declare module 'readline' { - import EventEmitter = require('node:events'); + import { Abortable, EventEmitter } from 'node:events'; + import * as promises from 'node:readline/promises'; - interface Key { - sequence?: string; - name?: string; - ctrl?: boolean; - meta?: boolean; - shift?: boolean; + export { promises }; + export interface Key { + sequence?: string | undefined; + name?: string | undefined; + ctrl?: boolean | undefined; + meta?: boolean | undefined; + shift?: boolean | undefined; } - - class Interface extends EventEmitter { + /** + * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a + * single `input` `Readable` stream and a single `output` `Writable` stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v0.1.104 + */ + export class Interface extends EventEmitter { readonly terminal: boolean; - - // Need direct access to line/cursor data, for use in external processes - // see: https://github.com/nodejs/node/issues/30347 - /** The current input data */ + /** + * The current input data being processed by node. + * + * This can be used when collecting input from a TTY stream to retrieve the + * current value that has been processed thus far, prior to the `line` event + * being emitted. Once the `line` event has been emitted, this property will + * be an empty string. + * + * Be aware that modifying the value during the instance runtime may have + * unintended consequences if `rl.cursor` is not also controlled. + * + * **If not using a TTY stream for input, use the `'line'` event.** + * + * One possible use case would be as follows: + * + * ```js + * const values = ['lorem ipsum', 'dolor sit amet']; + * const rl = readline.createInterface(process.stdin); + * const showResults = debounce(() => { + * console.log( + * '\n', + * values.filter((val) => val.startsWith(rl.line)).join(' ') + * ); + * }, 300); + * process.stdin.on('keypress', (c, k) => { + * showResults(); + * }); + * ``` + * @since v0.1.98 + */ readonly line: string; - /** The current cursor position in the input line */ + /** + * The cursor position relative to `rl.line`. + * + * This will track where the current cursor lands in the input string, when + * reading input from a TTY stream. The position of cursor determines the + * portion of the input string that will be modified as input is processed, + * as well as the column where the terminal caret will be rendered. + * @since v0.1.98 + */ readonly cursor: number; - /** * NOTE: According to the documentation: * @@ -41,22 +112,145 @@ declare module 'readline' { * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface */ protected constructor(options: ReadLineOptions); - + /** + * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + * @since v15.3.0 + * @return the current prompt string + */ + getPrompt(): string; + /** + * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called. + * @since v0.1.98 + */ setPrompt(prompt: string): void; + /** + * The `rl.prompt()` method writes the `readline.Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new + * location at which to provide input. + * + * When called, `rl.prompt()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the prompt is not written. + * @since v0.1.98 + * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. + */ prompt(preserveCursor?: boolean): void; + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `query` is not written. + * + * The `callback` function passed to `rl.question()` does not follow the typical + * pattern of accepting an `Error` object or `null` as the first argument. + * The `callback` is called with the provided answer as the only argument. + * + * Example usage: + * + * ```js + * rl.question('What is your favorite food? ', (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * ``` + * + * Using an `AbortController` to cancel a question. + * + * ```js + * const ac = new AbortController(); + * const signal = ac.signal; + * + * rl.question('What is your favorite food? ', { signal }, (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * setTimeout(() => ac.abort(), 10000); + * ``` + * + * If this method is invoked as it's util.promisify()ed version, it returns a + * Promise that fulfills with the answer. If the question is canceled using + * an `AbortController` it will reject with an `AbortError`. + * + * ```js + * const util = require('util'); + * const question = util.promisify(rl.question).bind(rl); + * + * async function questionExample() { + * try { + * const answer = await question('What is you favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * } catch (err) { + * console.error('Question rejected', err); + * } + * } + * questionExample(); + * ``` + * @since v0.3.3 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @param callback A callback function that is invoked with the user's input in response to the `query`. + */ question(query: string, callback: (answer: string) => void): void; + question(query: string, options: Abortable, callback: (answer: string) => void): void; + /** + * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed + * later if necessary. + * + * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `readline.Interface` instance. + * @since v0.3.4 + */ pause(): this; + /** + * The `rl.resume()` method resumes the `input` stream if it has been paused. + * @since v0.3.4 + */ resume(): this; + /** + * The `rl.close()` method closes the `readline.Interface` instance and + * relinquishes control over the `input` and `output` streams. When called, + * the `'close'` event will be emitted. + * + * Calling `rl.close()` does not immediately stop other events (including `'line'`) + * from being emitted by the `readline.Interface` instance. + * @since v0.1.98 + */ close(): void; + /** + * The `rl.write()` method will write either `data` or a key sequence identified + * by `key` to the `output`. The `key` argument is supported only if `output` is + * a `TTY` text terminal. See `TTY keybindings` for a list of key + * combinations. + * + * If `key` is specified, `data` is ignored. + * + * When called, `rl.write()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written. + * + * ```js + * rl.write('Delete this!'); + * // Simulate Ctrl+U to delete the line written previously + * rl.write(null, { ctrl: true, name: 'u' }); + * ``` + * + * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_. + * @since v0.1.98 + */ write(data: string | Buffer, key?: Key): void; - + write(data: undefined | null | string | Buffer, key: Key): void; /** * Returns the real position of the cursor in relation to the input - * prompt + string. Long input (wrapping) strings, as well as multiple + * prompt + string. Long input (wrapping) strings, as well as multiple * line prompts are included in the calculations. + * @since v13.5.0, v12.16.0 */ getCursorPos(): CursorPos; - /** * events.EventEmitter * 1. close @@ -66,109 +260,394 @@ declare module 'readline' { * 5. SIGCONT * 6. SIGINT * 7. SIGTSTP + * 8. history */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: string) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - + addListener(event: 'close', listener: () => void): this; + addListener(event: 'line', listener: (input: string) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: 'SIGCONT', listener: () => void): this; + addListener(event: 'SIGINT', listener: () => void): this; + addListener(event: 'SIGTSTP', listener: () => void): this; + addListener(event: 'history', listener: (history: string[]) => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: string): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - + emit(event: 'close'): boolean; + emit(event: 'line', input: string): boolean; + emit(event: 'pause'): boolean; + emit(event: 'resume'): boolean; + emit(event: 'SIGCONT'): boolean; + emit(event: 'SIGINT'): boolean; + emit(event: 'SIGTSTP'): boolean; + emit(event: 'history', history: string[]): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: string) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - + on(event: 'close', listener: () => void): this; + on(event: 'line', listener: (input: string) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: 'SIGCONT', listener: () => void): this; + on(event: 'SIGINT', listener: () => void): this; + on(event: 'SIGTSTP', listener: () => void): this; + on(event: 'history', listener: (history: string[]) => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: string) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - + once(event: 'close', listener: () => void): this; + once(event: 'line', listener: (input: string) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: 'SIGCONT', listener: () => void): this; + once(event: 'SIGINT', listener: () => void): this; + once(event: 'SIGTSTP', listener: () => void): this; + once(event: 'history', listener: (history: string[]) => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: string) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'line', listener: (input: string) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: 'SIGCONT', listener: () => void): this; + prependListener(event: 'SIGINT', listener: () => void): this; + prependListener(event: 'SIGTSTP', listener: () => void): this; + prependListener(event: 'history', listener: (history: string[]) => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: string) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'line', listener: (input: string) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: 'SIGCONT', listener: () => void): this; + prependOnceListener(event: 'SIGINT', listener: () => void): this; + prependOnceListener(event: 'SIGTSTP', listener: () => void): this; + prependOnceListener(event: 'history', listener: (history: string[]) => void): this; [Symbol.asyncIterator](): AsyncIterableIterator; } - - type ReadLine = Interface; // type forwarded for backwards compatibility - - type Completer = (line: string) => CompleterResult; - type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any; - - type CompleterResult = [string[], string]; - - interface ReadLineOptions { + export type ReadLine = Interface; // type forwarded for backwards compatibility + export type Completer = (line: string) => CompleterResult; + export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void; + export type CompleterResult = [string[], string]; + export interface ReadLineOptions { input: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - completer?: Completer | AsyncCompleter; - terminal?: boolean; - historySize?: number; - prompt?: string; - crlfDelay?: number; - removeHistoryDuplicates?: boolean; - escapeCodeTimeout?: number; - tabSize?: number; + output?: NodeJS.WritableStream | undefined; + completer?: Completer | AsyncCompleter | undefined; + terminal?: boolean | undefined; + /** + * Initial list of history lines. This option makes sense + * only if `terminal` is set to `true` by the user or by an internal `output` + * check, otherwise the history caching mechanism is not initialized at all. + * @default [] + */ + history?: string[] | undefined; + historySize?: number | undefined; + prompt?: string | undefined; + crlfDelay?: number | undefined; + /** + * If `true`, when a new input line added + * to the history list duplicates an older one, this removes the older line + * from the list. + * @default false + */ + removeHistoryDuplicates?: boolean | undefined; + escapeCodeTimeout?: number | undefined; + tabSize?: number | undefined; } - - function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; - function createInterface(options: ReadLineOptions): Interface; - function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; - - type Direction = -1 | 0 | 1; - - interface CursorPos { + /** + * The `readline.createInterface()` method creates a new `readline.Interface`instance. + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout + * }); + * ``` + * + * Once the `readline.Interface` instance is created, the most common case is to + * listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * + * When creating a `readline.Interface` using `stdin` as input, the program + * will not terminate until it receives `EOF` (Ctrl+D on + * Linux/macOS, Ctrl+Z followed by Return on + * Windows). + * If you want your application to exit without waiting for user input, you can `unref()` the standard input stream: + * + * ```js + * process.stdin.unref(); + * ``` + * @since v0.1.98 + */ + export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; + export function createInterface(options: ReadLineOptions): Interface; + /** + * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. + * + * Optionally, `interface` specifies a `readline.Interface` instance for which + * autocompletion is disabled when copy-pasted input is detected. + * + * If the `stream` is a `TTY`, then it must be in raw mode. + * + * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop + * the `input` from emitting `'keypress'` events. + * + * ```js + * readline.emitKeypressEvents(process.stdin); + * if (process.stdin.isTTY) + * process.stdin.setRawMode(true); + * ``` + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ' + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * const { once } = require('events'); + * const { createReadStream } = require('fs'); + * const { createInterface } = require('readline'); + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + */ + export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; + export type Direction = -1 | 0 | 1; + export interface CursorPos { rows: number; cols: number; } - /** - * Clears the current line of this WriteStream in a direction identified by `dir`. + * The `readline.clearLine()` method clears current line of given `TTY` stream + * in a specified direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. */ - function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; + export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; /** - * Clears this `WriteStream` from the current cursor down. + * The `readline.clearScreenDown()` method clears the given `TTY` stream from + * the current position of the cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. */ - function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; + export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; /** - * Moves this WriteStream's cursor to the specified position. + * The `readline.cursorTo()` method moves cursor to the specified position in a + * given `TTY` `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. */ - function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; + export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; /** - * Moves this WriteStream's cursor relative to its current position. + * The `readline.moveCursor()` method moves the cursor _relative_ to its current + * position in a given `TTY` `stream`. + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ' + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * const { once } = require('events'); + * const { createReadStream } = require('fs'); + * const { createInterface } = require('readline'); + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. */ - function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; + export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; +} +declare module 'node:readline' { + export * from 'readline'; } diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts new file mode 100644 index 0000000..8f9f06f --- /dev/null +++ b/node_modules/@types/node/readline/promises.d.ts @@ -0,0 +1,143 @@ +/** + * The `readline/promise` module provides an API for reading lines of input from a Readable stream one line at a time. + * + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline/promises.js) + * @since v17.0.0 + */ +declare module 'readline/promises' { + import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline'; + import { Abortable } from 'node:events'; + + class Interface extends _Interface { + /** + * The rl.question() method displays the query by writing it to the output, waits for user input to be provided on input, + * then invokes the callback function passing the provided input as the first argument. + * + * When called, rl.question() will resume the input stream if it has been paused. + * + * If the readlinePromises.Interface was created with output set to null or undefined the query is not written. + * + * If the question is called after rl.close(), it returns a rejected promise. + * + * Example usage: + * + * ```js + * const answer = await rl.question('What is your favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * + * Using an AbortSignal to cancel a question. + * + * ```js + * const signal = AbortSignal.timeout(10_000); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * const answer = await rl.question('What is your favorite food? ', { signal }); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * + * @since v17.0.0 + * @param query A statement or query to write to output, prepended to the prompt. + */ + question(query: string): Promise; + question(query: string, options: Abortable): Promise; + } + + class Readline { + /** + * @param stream A TTY stream. + */ + constructor(stream: NodeJS.WritableStream, options?: { autoCommit?: boolean }); + /** + * The `rl.clearLine()` method adds to the internal list of pending action an action that clears current line of the associated `stream` in a specified direction identified by `dir`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + */ + clearLine(dir: Direction): this; + /** + * The `rl.clearScreenDown()` method adds to the internal list of pending action an action that clears the associated `stream` from the current position of the cursor down. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + */ + clearScreenDown(): this; + /** + * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. + */ + commit(): Promise; + /** + * The `rl.cursorTo()` method adds to the internal list of pending action an action that moves cursor to the specified position in the associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + */ + cursorTo(x: number, y?: number): this; + /** + * The `rl.moveCursor()` method adds to the internal list of pending action an action that moves the cursor relative to its current position in the associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless autoCommit: true was passed to the constructor. + */ + moveCursor(dx: number, dy: number): this; + /** + * The `rl.rollback()` method clears the internal list of pending actions without sending it to the associated `stream`. + */ + rollback(): this; + } + + /** + * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. + * + * ```js + * const readlinePromises = require('node:readline/promises'); + * const rl = readlinePromises.createInterface({ + * input: process.stdin, + * output: process.stdout + * }); + * ``` + * + * Once the `readlinePromises.Interface` instance is created, the most common case is to listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get the best compatibility if it defines an `output.columns` property, + * and emits a `'resize'` event on the `output`, if or when the columns ever change (`process.stdout` does this automatically when it is a TTY). + * + * ## Use of the `completer` function + * + * The `completer` function takes the current line entered by the user as an argument, and returns an `Array` with 2 entries: + * + * - An Array with matching entries for the completion. + * - The substring that was used for the matching. + * + * For instance: `[[substr1, substr2, ...], originalsubstring]`. + * + * ```js + * function completer(line) { + * const completions = '.help .error .exit .quit .q'.split(' '); + * const hits = completions.filter((c) => c.startsWith(line)); + * // Show all completions if none found + * return [hits.length ? hits : completions, line]; + * } + * ``` + * + * The `completer` function can also returns a `Promise`, or be asynchronous: + * + * ```js + * async function completer(linePartial) { + * await someAsyncWork(); + * return [['123'], linePartial]; + * } + * ``` + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; +} +declare module 'node:readline/promises' { + export * from 'readline/promises'; +} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts index 8fae7f9..be42ccc 100644 --- a/node_modules/@types/node/repl.d.ts +++ b/node_modules/@types/node/repl.d.ts @@ -1,35 +1,40 @@ -declare module 'node:repl' { - export * from 'repl'; -} - +/** + * The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that + * is available both as a standalone program or includible in other applications. + * It can be accessed using: + * + * ```js + * const repl = require('repl'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/repl.js) + */ declare module 'repl' { import { Interface, Completer, AsyncCompleter } from 'node:readline'; import { Context } from 'node:vm'; import { InspectOptions } from 'node:util'; - interface ReplOptions { /** * The input prompt to display. - * Default: `"> "` + * @default "> " */ - prompt?: string; + prompt?: string | undefined; /** * The `Readable` stream from which REPL input will be read. - * Default: `process.stdin` + * @default process.stdin */ - input?: NodeJS.ReadableStream; + input?: NodeJS.ReadableStream | undefined; /** * The `Writable` stream to which REPL output will be written. - * Default: `process.stdout` + * @default process.stdout */ - output?: NodeJS.WritableStream; + output?: NodeJS.WritableStream | undefined; /** * If `true`, specifies that the output should be treated as a TTY terminal, and have * ANSI/VT100 escape codes written to it. * Default: checking the value of the `isTTY` property on the output stream upon * instantiation. */ - terminal?: boolean; + terminal?: boolean | undefined; /** * The function to be used when evaluating each given line of input. * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can @@ -39,45 +44,45 @@ declare module 'repl' { * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions */ - eval?: REPLEval; + eval?: REPLEval | undefined; /** * Defines if the repl prints output previews or not. * @default `true` Always `false` in case `terminal` is falsy. */ - preview?: boolean; + preview?: boolean | undefined; /** * If `true`, specifies that the default `writer` function should include ANSI color * styling to REPL output. If a custom `writer` function is provided then this has no * effect. * Default: the REPL instance's `terminal` value. */ - useColors?: boolean; + useColors?: boolean | undefined; /** * If `true`, specifies that the default evaluation function will use the JavaScript * `global` as the context as opposed to creating a new separate context for the REPL * instance. The node CLI REPL sets this value to `true`. * Default: `false`. */ - useGlobal?: boolean; + useGlobal?: boolean | undefined; /** * If `true`, specifies that the default writer will not output the return value of a * command if it evaluates to `undefined`. * Default: `false`. */ - ignoreUndefined?: boolean; + ignoreUndefined?: boolean | undefined; /** * The function to invoke to format the output of each command before writing to `output`. * Default: a wrapper for `util.inspect`. * * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output */ - writer?: REPLWriter; + writer?: REPLWriter | undefined; /** * An optional function used for custom Tab auto completion. * * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function */ - completer?: Completer | AsyncCompleter; + completer?: Completer | AsyncCompleter | undefined; /** * A flag that specifies whether the default evaluator executes all JavaScript commands in * strict mode or default (sloppy) mode. @@ -86,52 +91,47 @@ declare module 'repl' { * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to * prefacing every repl statement with `'use strict'`. */ - replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; /** * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is * pressed. This cannot be used together with a custom `eval` function. * Default: `false`. */ - breakEvalOnSigint?: boolean; + breakEvalOnSigint?: boolean | undefined; } - type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void; type REPLWriter = (this: REPLServer, obj: any) => string; - /** * This is the default "writer" value, if none is passed in the REPL options, * and it can be overridden by custom print functions. */ - const writer: REPLWriter & { options: InspectOptions }; - + const writer: REPLWriter & { + options: InspectOptions; + }; type REPLCommandAction = (this: REPLServer, text: string) => void; - interface REPLCommand { /** * Help text to be displayed when `.help` is entered. */ - help?: string; + help?: string | undefined; /** * The function to execute, optionally accepting a single string argument. */ action: REPLCommandAction; } - /** - * Provides a customizable Read-Eval-Print-Loop (REPL). - * - * Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those - * according to a user-defined evaluation function, then output the result. Input and output - * may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`. + * Instances of `repl.REPLServer` are created using the {@link start} method + * or directly using the JavaScript `new` keyword. * - * Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style - * line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session - * state, error recovery, and customizable evaluation functions. + * ```js + * const repl = require('repl'); * - * Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_ - * be created directly using the JavaScript `new` keyword. + * const options = { useColors: true }; * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl + * const firstInstance = repl.start(options); + * const secondInstance = new repl.REPLServer(options); + * ``` + * @since v0.1.91 */ class REPLServer extends Interface { /** @@ -232,7 +232,6 @@ declare module 'repl' { * prefacing every repl statement with `'use strict'`. */ readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; - /** * NOTE: According to the documentation: * @@ -244,49 +243,76 @@ declare module 'repl' { * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver */ private constructor(); - /** - * Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked - * by typing a `.` followed by the `keyword`. + * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands + * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following + * properties: + * + * The following example shows two new commands added to the REPL instance: + * + * ```js + * const repl = require('repl'); + * + * const replServer = repl.start({ prompt: '> ' }); + * replServer.defineCommand('sayhello', { + * help: 'Say hello', + * action(name) { + * this.clearBufferedCommand(); + * console.log(`Hello, ${name}!`); + * this.displayPrompt(); + * } + * }); + * replServer.defineCommand('saybye', function saybye() { + * console.log('Goodbye!'); + * this.close(); + * }); + * ``` + * + * The new commands can then be used from within the REPL instance: * + * ```console + * > .sayhello Node.js User + * Hello, Node.js User! + * > .saybye + * Goodbye! + * ``` + * @since v0.3.0 * @param keyword The command keyword (_without_ a leading `.` character). * @param cmd The function to invoke when the command is processed. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd */ defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; /** - * Readies the REPL instance for input from the user, printing the configured `prompt` to a - * new line in the `output` and resuming the `input` to accept new input. + * The `replServer.displayPrompt()` method readies the REPL instance for input + * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input. * - * When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'. + * When multi-line input is being entered, an ellipsis is printed rather than the + * 'prompt'. * - * This method is primarily intended to be called from within the action function for - * commands registered using the `replServer.defineCommand()` method. + * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. * - * @param preserveCursor When `true`, the cursor placement will not be reset to `0`. + * The `replServer.displayPrompt` method is primarily intended to be called from + * within the action function for commands registered using the`replServer.defineCommand()` method. + * @since v0.1.91 */ displayPrompt(preserveCursor?: boolean): void; /** - * Clears any command that has been buffered but not yet executed. - * - * This method is primarily intended to be called from within the action function for - * commands registered using the `replServer.defineCommand()` method. - * + * The `replServer.clearBufferedCommand()` method clears any command that has been + * buffered but not yet executed. This method is primarily intended to be + * called from within the action function for commands registered using the`replServer.defineCommand()` method. * @since v9.0.0 */ clearBufferedCommand(): void; - /** * Initializes a history log file for the REPL instance. When executing the - * Node.js binary and using the command line REPL, a history file is initialized + * Node.js binary and using the command-line REPL, a history file is initialized * by default. However, this is not the case when creating a REPL * programmatically. Use this method to initialize a history log file when working * with REPL instances programmatically. - * @param path The path to the history file + * @since v11.10.0 + * @param historyPath the path to the history file + * @param callback called when history writes are ready or upon error */ - setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void; - + setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void; /** * events.EventEmitter * 1. close - inherited from `readline.Interface` @@ -299,93 +325,90 @@ declare module 'repl' { * 8. exit * 9. reset */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: string) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - addListener(event: "exit", listener: () => void): this; - addListener(event: "reset", listener: (context: Context) => void): this; - + addListener(event: 'close', listener: () => void): this; + addListener(event: 'line', listener: (input: string) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: 'SIGCONT', listener: () => void): this; + addListener(event: 'SIGINT', listener: () => void): this; + addListener(event: 'SIGTSTP', listener: () => void): this; + addListener(event: 'exit', listener: () => void): this; + addListener(event: 'reset', listener: (context: Context) => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: string): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - emit(event: "exit"): boolean; - emit(event: "reset", context: Context): boolean; - + emit(event: 'close'): boolean; + emit(event: 'line', input: string): boolean; + emit(event: 'pause'): boolean; + emit(event: 'resume'): boolean; + emit(event: 'SIGCONT'): boolean; + emit(event: 'SIGINT'): boolean; + emit(event: 'SIGTSTP'): boolean; + emit(event: 'exit'): boolean; + emit(event: 'reset', context: Context): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: string) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - on(event: "exit", listener: () => void): this; - on(event: "reset", listener: (context: Context) => void): this; - + on(event: 'close', listener: () => void): this; + on(event: 'line', listener: (input: string) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: 'SIGCONT', listener: () => void): this; + on(event: 'SIGINT', listener: () => void): this; + on(event: 'SIGTSTP', listener: () => void): this; + on(event: 'exit', listener: () => void): this; + on(event: 'reset', listener: (context: Context) => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: string) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - once(event: "exit", listener: () => void): this; - once(event: "reset", listener: (context: Context) => void): this; - + once(event: 'close', listener: () => void): this; + once(event: 'line', listener: (input: string) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: 'SIGCONT', listener: () => void): this; + once(event: 'SIGINT', listener: () => void): this; + once(event: 'SIGTSTP', listener: () => void): this; + once(event: 'exit', listener: () => void): this; + once(event: 'reset', listener: (context: Context) => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: string) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - prependListener(event: "exit", listener: () => void): this; - prependListener(event: "reset", listener: (context: Context) => void): this; - + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'line', listener: (input: string) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: 'SIGCONT', listener: () => void): this; + prependListener(event: 'SIGINT', listener: () => void): this; + prependListener(event: 'SIGTSTP', listener: () => void): this; + prependListener(event: 'exit', listener: () => void): this; + prependListener(event: 'reset', listener: (context: Context) => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: string) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; - prependOnceListener(event: "exit", listener: () => void): this; - prependOnceListener(event: "reset", listener: (context: Context) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'line', listener: (input: string) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: 'SIGCONT', listener: () => void): this; + prependOnceListener(event: 'SIGINT', listener: () => void): this; + prependOnceListener(event: 'SIGTSTP', listener: () => void): this; + prependOnceListener(event: 'exit', listener: () => void): this; + prependOnceListener(event: 'reset', listener: (context: Context) => void): this; } - /** * A flag passed in the REPL options. Evaluates expressions in sloppy mode. */ const REPL_MODE_SLOPPY: unique symbol; - /** * A flag passed in the REPL options. Evaluates expressions in strict mode. * This is equivalent to prefacing every repl statement with `'use strict'`. */ const REPL_MODE_STRICT: unique symbol; - /** - * Creates and starts a `repl.REPLServer` instance. + * The `repl.start()` method creates and starts a {@link REPLServer} instance. + * + * If `options` is a string, then it specifies the input prompt: * - * @param options The options for the `REPLServer`. If `options` is a string, then it specifies - * the input prompt. + * ```js + * const repl = require('repl'); + * + * // a Unix style prompt + * repl.start('$ '); + * ``` + * @since v0.1.91 */ function start(options?: string | ReplOptions): REPLServer; - /** * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. * @@ -393,7 +416,9 @@ declare module 'repl' { */ class Recoverable extends SyntaxError { err: Error; - constructor(err: Error); } } +declare module 'node:repl' { + export * from 'repl'; +} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts index a3bc920..711fd9c 100644 --- a/node_modules/@types/node/stream.d.ts +++ b/node_modules/@types/node/stream.d.ts @@ -1,57 +1,438 @@ -declare module 'node:stream' { - import Stream = require('stream'); - export = Stream; -} - +/** + * A stream is an abstract interface for working with streaming data in Node.js. + * The `stream` module provides an API for implementing the stream interface. + * + * There are many stream objects provided by Node.js. For instance, a `request to an HTTP server` and `process.stdout` are both stream instances. + * + * Streams can be readable, writable, or both. All streams are instances of `EventEmitter`. + * + * To access the `stream` module: + * + * ```js + * const stream = require('stream'); + * ``` + * + * The `stream` module is useful for creating new types of stream instances. It is + * usually not necessary to use the `stream` module to consume streams. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/stream.js) + */ declare module 'stream' { - import EventEmitter = require('node:events'); - + import { EventEmitter, Abortable } from 'node:events'; + import { Blob as NodeBlob } from "node:buffer"; + import * as streamPromises from 'node:stream/promises'; + import * as streamConsumers from 'node:stream/consumers'; + import * as streamWeb from 'node:stream/web'; class internal extends EventEmitter { - pipe(destination: T, options?: { end?: boolean; }): T; + pipe( + destination: T, + options?: { + end?: boolean | undefined; + } + ): T; } - namespace internal { class Stream extends internal { constructor(opts?: ReadableOptions); } - - interface ReadableOptions { - highWaterMark?: number; - encoding?: BufferEncoding; - objectMode?: boolean; + interface StreamOptions extends Abortable { + emitClose?: boolean | undefined; + highWaterMark?: number | undefined; + objectMode?: boolean | undefined; + construct?(this: T, callback: (error?: Error | null) => void): void; + destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean | undefined; + } + interface ReadableOptions extends StreamOptions { + encoding?: BufferEncoding | undefined; read?(this: Readable, size: number): void; - destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void; - autoDestroy?: boolean; } - + /** + * @since v0.9.4 + */ class Readable extends Stream implements NodeJS.ReadableStream { /** * A utility method for creating Readable Streams out of iterators. */ static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; - + /** + * A utility method for creating a `Readable` from a web `ReadableStream`. + * @since v17.0.0 + * @experimental + */ + static fromWeb(readableStream: streamWeb.ReadableStream, options?: Pick): Readable; + /** + * Returns whether the stream has been read from or cancelled. + * @since v16.8.0 + */ + static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean; + /** + * A utility method for creating a web `ReadableStream` from a `Readable`. + * @since v17.0.0 + * @experimental + */ + static toWeb(streamReadable: Readable): streamWeb.ReadableStream; + /** + * Returns whether the stream was destroyed or errored before emitting `'end'`. + * @since v16.8.0 + * @experimental + */ + readonly readableAborted: boolean; + /** + * Is `true` if it is safe to call `readable.read()`, which means + * the stream has not been destroyed or emitted `'error'` or `'end'`. + * @since v11.4.0 + */ readable: boolean; + /** + * Returns whether `'data'` has been emitted. + * @since v16.7.0, v14.18.0 + * @experimental + */ + readonly readableDidRead: boolean; + /** + * Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method. + * @since v12.7.0 + */ readonly readableEncoding: BufferEncoding | null; + /** + * Becomes `true` when `'end'` event is emitted. + * @since v12.9.0 + */ readonly readableEnded: boolean; + /** + * This property reflects the current state of a `Readable` stream as described + * in the `Three states` section. + * @since v9.4.0 + */ readonly readableFlowing: boolean | null; + /** + * Returns the value of `highWaterMark` passed when creating this `Readable`. + * @since v9.3.0 + */ readonly readableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be read. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ readonly readableLength: number; + /** + * Getter for the property `objectMode` of a given `Readable` stream. + * @since v12.3.0 + */ readonly readableObjectMode: boolean; + /** + * Is `true` after `readable.destroy()` has been called. + * @since v8.0.0 + */ destroyed: boolean; + /** + * Is true after 'close' has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; constructor(opts?: ReadableOptions); + _construct?(callback: (error?: Error | null) => void): void; _read(size: number): void; + /** + * The `readable.read()` method reads data out of the internal buffer and + * returns it. If no data is available to be read, `null` is returned. By default, + * the data is returned as a `Buffer` object unless an encoding has been + * specified using the `readable.setEncoding()` method or the stream is operating + * in object mode. + * + * The optional `size` argument specifies a specific number of bytes to read. If`size` bytes are not available to be read, `null` will be returned _unless_the stream has ended, in which + * case all of the data remaining in the internal + * buffer will be returned. + * + * If the `size` argument is not specified, all of the data contained in the + * internal buffer will be returned. + * + * The `size` argument must be less than or equal to 1 GiB. + * + * The `readable.read()` method should only be called on `Readable` streams + * operating in paused mode. In flowing mode, `readable.read()` is called + * automatically until the internal buffer is fully drained. + * + * ```js + * const readable = getReadableStreamSomehow(); + * + * // 'readable' may be triggered multiple times as data is buffered in + * readable.on('readable', () => { + * let chunk; + * console.log('Stream is readable (new data received in buffer)'); + * // Use a loop to make sure we read all currently available data + * while (null !== (chunk = readable.read())) { + * console.log(`Read ${chunk.length} bytes of data...`); + * } + * }); + * + * // 'end' will be triggered once when there is no more data available + * readable.on('end', () => { + * console.log('Reached end of stream.'); + * }); + * ``` + * + * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks + * are not concatenated. A `while` loop is necessary to consume all data + * currently in the buffer. When reading a large file `.read()` may return `null`, + * having consumed all buffered content so far, but there is still more data to + * come not yet buffered. In this case a new `'readable'` event will be emitted + * when there is more data in the buffer. Finally the `'end'` event will be + * emitted when there is no more data to come. + * + * Therefore to read a file's whole contents from a `readable`, it is necessary + * to collect chunks across multiple `'readable'` events: + * + * ```js + * const chunks = []; + * + * readable.on('readable', () => { + * let chunk; + * while (null !== (chunk = readable.read())) { + * chunks.push(chunk); + * } + * }); + * + * readable.on('end', () => { + * const content = chunks.join(''); + * }); + * ``` + * + * A `Readable` stream in object mode will always return a single item from + * a call to `readable.read(size)`, regardless of the value of the`size` argument. + * + * If the `readable.read()` method returns a chunk of data, a `'data'` event will + * also be emitted. + * + * Calling {@link read} after the `'end'` event has + * been emitted will return `null`. No runtime error will be raised. + * @since v0.9.4 + * @param size Optional argument to specify how much data to read. + */ read(size?: number): any; + /** + * The `readable.setEncoding()` method sets the character encoding for + * data read from the `Readable` stream. + * + * By default, no encoding is assigned and stream data will be returned as`Buffer` objects. Setting an encoding causes the stream data + * to be returned as strings of the specified encoding rather than as `Buffer`objects. For instance, calling `readable.setEncoding('utf8')` will cause the + * output data to be interpreted as UTF-8 data, and passed as strings. Calling`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal + * string format. + * + * The `Readable` stream will properly handle multi-byte characters delivered + * through the stream that would otherwise become improperly decoded if simply + * pulled from the stream as `Buffer` objects. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.setEncoding('utf8'); + * readable.on('data', (chunk) => { + * assert.equal(typeof chunk, 'string'); + * console.log('Got %d characters of string data:', chunk.length); + * }); + * ``` + * @since v0.9.4 + * @param encoding The encoding to use. + */ setEncoding(encoding: BufferEncoding): this; + /** + * The `readable.pause()` method will cause a stream in flowing mode to stop + * emitting `'data'` events, switching out of flowing mode. Any data that + * becomes available will remain in the internal buffer. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.on('data', (chunk) => { + * console.log(`Received ${chunk.length} bytes of data.`); + * readable.pause(); + * console.log('There will be no additional data for 1 second.'); + * setTimeout(() => { + * console.log('Now data will start flowing again.'); + * readable.resume(); + * }, 1000); + * }); + * ``` + * + * The `readable.pause()` method has no effect if there is a `'readable'`event listener. + * @since v0.9.4 + */ pause(): this; + /** + * The `readable.resume()` method causes an explicitly paused `Readable` stream to + * resume emitting `'data'` events, switching the stream into flowing mode. + * + * The `readable.resume()` method can be used to fully consume the data from a + * stream without actually processing any of that data: + * + * ```js + * getReadableStreamSomehow() + * .resume() + * .on('end', () => { + * console.log('Reached the end, but did not read anything.'); + * }); + * ``` + * + * The `readable.resume()` method has no effect if there is a `'readable'`event listener. + * @since v0.9.4 + */ resume(): this; + /** + * The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most + * typical cases, there will be no reason to + * use this method directly. + * + * ```js + * const readable = new stream.Readable(); + * + * readable.isPaused(); // === false + * readable.pause(); + * readable.isPaused(); // === true + * readable.resume(); + * readable.isPaused(); // === false + * ``` + * @since v0.11.14 + */ isPaused(): boolean; + /** + * The `readable.unpipe()` method detaches a `Writable` stream previously attached + * using the {@link pipe} method. + * + * If the `destination` is not specified, then _all_ pipes are detached. + * + * If the `destination` is specified, but no pipe is set up for it, then + * the method does nothing. + * + * ```js + * const fs = require('fs'); + * const readable = getReadableStreamSomehow(); + * const writable = fs.createWriteStream('file.txt'); + * // All the data from readable goes into 'file.txt', + * // but only for the first second. + * readable.pipe(writable); + * setTimeout(() => { + * console.log('Stop writing to file.txt.'); + * readable.unpipe(writable); + * console.log('Manually close the file stream.'); + * writable.end(); + * }, 1000); + * ``` + * @since v0.9.4 + * @param destination Optional specific stream to unpipe + */ unpipe(destination?: NodeJS.WritableStream): this; + /** + * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the + * same as `readable.push(null)`, after which no more data can be written. The EOF + * signal is put at the end of the buffer and any buffered data will still be + * flushed. + * + * The `readable.unshift()` method pushes a chunk of data back into the internal + * buffer. This is useful in certain situations where a stream is being consumed by + * code that needs to "un-consume" some amount of data that it has optimistically + * pulled out of the source, so that the data can be passed on to some other party. + * + * The `stream.unshift(chunk)` method cannot be called after the `'end'` event + * has been emitted or a runtime error will be thrown. + * + * Developers using `stream.unshift()` often should consider switching to + * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. + * + * ```js + * // Pull off a header delimited by \n\n. + * // Use unshift() if we get too much. + * // Call the callback with (error, header, stream). + * const { StringDecoder } = require('string_decoder'); + * function parseHeader(stream, callback) { + * stream.on('error', callback); + * stream.on('readable', onReadable); + * const decoder = new StringDecoder('utf8'); + * let header = ''; + * function onReadable() { + * let chunk; + * while (null !== (chunk = stream.read())) { + * const str = decoder.write(chunk); + * if (str.includes('\n\n')) { + * // Found the header boundary. + * const split = str.split(/\n\n/); + * header += split.shift(); + * const remaining = split.join('\n\n'); + * const buf = Buffer.from(remaining, 'utf8'); + * stream.removeListener('error', callback); + * // Remove the 'readable' listener before unshifting. + * stream.removeListener('readable', onReadable); + * if (buf.length) + * stream.unshift(buf); + * // Now the body of the message can be read from the stream. + * callback(null, header, stream); + * return; + * } + * // Still reading the header. + * header += str; + * } + * } + * } + * ``` + * + * Unlike {@link push}, `stream.unshift(chunk)` will not + * end the reading process by resetting the internal reading state of the stream. + * This can cause unexpected results if `readable.unshift()` is called during a + * read (i.e. from within a {@link _read} implementation on a + * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, + * however it is best to simply avoid calling `readable.unshift()` while in the + * process of performing a read. + * @since v0.9.11 + * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array` or `null`. For object mode + * streams, `chunk` may be any JavaScript value. + * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. + */ unshift(chunk: any, encoding?: BufferEncoding): void; - wrap(oldStream: NodeJS.ReadableStream): this; + /** + * Prior to Node.js 0.10, streams did not implement the entire `stream` module API + * as it is currently defined. (See `Compatibility` for more information.) + * + * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the`readable.wrap()` method can be used to create a `Readable` + * stream that uses + * the old stream as its data source. + * + * It will rarely be necessary to use `readable.wrap()` but the method has been + * provided as a convenience for interacting with older Node.js applications and + * libraries. + * + * ```js + * const { OldReader } = require('./old-api-module.js'); + * const { Readable } = require('stream'); + * const oreader = new OldReader(); + * const myReader = new Readable().wrap(oreader); + * + * myReader.on('readable', () => { + * myReader.read(); // etc. + * }); + * ``` + * @since v0.9.4 + * @param stream An "old style" readable stream + */ + wrap(stream: NodeJS.ReadableStream): this; push(chunk: any, encoding?: BufferEncoding): boolean; _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - destroy(error?: Error): void; - + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable + * stream will release any internal resources and subsequent calls to `push()`will be ignored. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, but instead implement `readable._destroy()`. + * @since v8.0.0 + * @param error Error which will be passed as payload in `'error'` event + */ + destroy(error?: Error): this; /** * Event emitter * The defined events on documents including: @@ -63,109 +444,321 @@ declare module 'stream' { * 6. readable * 7. resume */ - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: any) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: any) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "data", chunk: any): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "pause"): boolean; - emit(event: "readable"): boolean; - emit(event: "resume"): boolean; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: any): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'pause'): boolean; + emit(event: 'readable'): boolean; + emit(event: 'resume'): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: any) => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "resume", listener: () => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: any) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'resume', listener: () => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: any) => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "resume", listener: () => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: any) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'resume', listener: () => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: any) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: any) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: any) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: any) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: any) => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "pause", listener: () => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "resume", listener: () => void): this; + removeListener(event: 'close', listener: () => void): this; + removeListener(event: 'data', listener: (chunk: any) => void): this; + removeListener(event: 'end', listener: () => void): this; + removeListener(event: 'error', listener: (err: Error) => void): this; + removeListener(event: 'pause', listener: () => void): this; + removeListener(event: 'readable', listener: () => void): this; + removeListener(event: 'resume', listener: () => void): this; removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - [Symbol.asyncIterator](): AsyncIterableIterator; } - - interface WritableOptions { - highWaterMark?: number; - decodeStrings?: boolean; - defaultEncoding?: BufferEncoding; - objectMode?: boolean; - emitClose?: boolean; + interface WritableOptions extends StreamOptions { + decodeStrings?: boolean | undefined; + defaultEncoding?: BufferEncoding | undefined; write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - writev?(this: Writable, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void; - destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void; + writev?( + this: Writable, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; final?(this: Writable, callback: (error?: Error | null) => void): void; - autoDestroy?: boolean; } - + /** + * @since v0.9.4 + */ class Writable extends Stream implements NodeJS.WritableStream { + /** + * A utility method for creating a `Writable` from a web `WritableStream`. + * @since v17.0.0 + * @experimental + */ + static fromWeb(writableStream: streamWeb.WritableStream, options?: Pick): Writable; + /** + * A utility method for creating a web `WritableStream` from a `Writable`. + * @since v17.0.0 + * @experimental + */ + static toWeb(streamWritable: Writable): streamWeb.WritableStream; + /** + * Is `true` if it is safe to call `writable.write()`, which means + * the stream has not been destroyed, errored or ended. + * @since v11.4.0 + */ readonly writable: boolean; + /** + * Is `true` after `writable.end()` has been called. This property + * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. + * @since v12.9.0 + */ readonly writableEnded: boolean; + /** + * Is set to `true` immediately before the `'finish'` event is emitted. + * @since v12.6.0 + */ readonly writableFinished: boolean; + /** + * Return the value of `highWaterMark` passed when creating this `Writable`. + * @since v9.3.0 + */ readonly writableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be written. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ readonly writableLength: number; + /** + * Getter for the property `objectMode` of a given `Writable` stream. + * @since v12.3.0 + */ readonly writableObjectMode: boolean; + /** + * Number of times `writable.uncork()` needs to be + * called in order to fully uncork the stream. + * @since v13.2.0, v12.16.0 + */ readonly writableCorked: number; + /** + * Is `true` after `writable.destroy()` has been called. + * @since v8.0.0 + */ destroyed: boolean; + /** + * Is true after 'close' has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + /** + * Is `true` if the stream's buffer has been full and stream will emit 'drain'. + * @since v15.2.0, v14.17.0 + */ + readonly writableNeedDrain: boolean; constructor(opts?: WritableOptions); _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - _writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void; + _writev?( + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + _construct?(callback: (error?: Error | null) => void): void; _destroy(error: Error | null, callback: (error?: Error | null) => void): void; _final(callback: (error?: Error | null) => void): void; - write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; - write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean; + /** + * The `writable.write()` method writes some data to the stream, and calls the + * supplied `callback` once the data has been fully handled. If an error + * occurs, the `callback` will be called with the error as its + * first argument. The `callback` is called asynchronously and before `'error'` is + * emitted. + * + * The return value is `true` if the internal buffer is less than the`highWaterMark` configured when the stream was created after admitting `chunk`. + * If `false` is returned, further attempts to write data to the stream should + * stop until the `'drain'` event is emitted. + * + * While a stream is not draining, calls to `write()` will buffer `chunk`, and + * return false. Once all currently buffered chunks are drained (accepted for + * delivery by the operating system), the `'drain'` event will be emitted. + * Once `write()` returns false, do not write more chunks + * until the `'drain'` event is emitted. While calling `write()` on a stream that + * is not draining is allowed, Node.js will buffer all written chunks until + * maximum memory usage occurs, at which point it will abort unconditionally. + * Even before it aborts, high memory usage will cause poor garbage collector + * performance and high RSS (which is not typically released back to the system, + * even after the memory is no longer required). Since TCP sockets may never + * drain if the remote peer does not read the data, writing a socket that is + * not draining may lead to a remotely exploitable vulnerability. + * + * Writing data while the stream is not draining is particularly + * problematic for a `Transform`, because the `Transform` streams are paused + * by default until they are piped or a `'data'` or `'readable'` event handler + * is added. + * + * If the data to be written can be generated or fetched on demand, it is + * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is + * possible to respect backpressure and avoid memory issues using the `'drain'` event: + * + * ```js + * function write(data, cb) { + * if (!stream.write(data)) { + * stream.once('drain', cb); + * } else { + * process.nextTick(cb); + * } + * } + * + * // Wait for cb to be called before doing any other write. + * write('hello', () => { + * console.log('Write completed, do more writes now.'); + * }); + * ``` + * + * A `Writable` stream in object mode will always ignore the `encoding` argument. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any + * JavaScript value other than `null`. + * @param [encoding='utf8'] The encoding, if `chunk` is a string. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; + /** + * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. + * @since v0.11.15 + * @param encoding The new default encoding + */ setDefaultEncoding(encoding: BufferEncoding): this; - end(cb?: () => void): void; - end(chunk: any, cb?: () => void): void; - end(chunk: any, encoding: BufferEncoding, cb?: () => void): void; + /** + * Calling the `writable.end()` method signals that no more data will be written + * to the `Writable`. The optional `chunk` and `encoding` arguments allow one + * final additional chunk of data to be written immediately before closing the + * stream. + * + * Calling the {@link write} method after calling {@link end} will raise an error. + * + * ```js + * // Write 'hello, ' and then end with 'world!'. + * const fs = require('fs'); + * const file = fs.createWriteStream('example.txt'); + * file.write('hello, '); + * file.end('world!'); + * // Writing more now is not allowed! + * ``` + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any + * JavaScript value other than `null`. + * @param encoding The encoding if `chunk` is a string + * @param callback Callback for when the stream is finished. + */ + end(cb?: () => void): this; + end(chunk: any, cb?: () => void): this; + end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; + /** + * The `writable.cork()` method forces all written data to be buffered in memory. + * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. + * + * The primary intent of `writable.cork()` is to accommodate a situation in which + * several small chunks are written to the stream in rapid succession. Instead of + * immediately forwarding them to the underlying destination, `writable.cork()`buffers all the chunks until `writable.uncork()` is called, which will pass them + * all to `writable._writev()`, if present. This prevents a head-of-line blocking + * situation where data is being buffered while waiting for the first small chunk + * to be processed. However, use of `writable.cork()` without implementing`writable._writev()` may have an adverse effect on throughput. + * + * See also: `writable.uncork()`, `writable._writev()`. + * @since v0.11.2 + */ cork(): void; + /** + * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. + * + * When using `writable.cork()` and `writable.uncork()` to manage the buffering + * of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event + * loop phase. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.write('data '); + * process.nextTick(() => stream.uncork()); + * ``` + * + * If the `writable.cork()` method is called multiple times on a stream, the + * same number of calls to `writable.uncork()` must be called to flush the buffered + * data. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.cork(); + * stream.write('data '); + * process.nextTick(() => { + * stream.uncork(); + * // The data will not be flushed until uncork() is called a second time. + * stream.uncork(); + * }); + * ``` + * + * See also: `writable.cork()`. + * @since v0.11.2 + */ uncork(): void; - destroy(error?: Error): void; - + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the writable + * stream has ended and subsequent calls to `write()` or `end()` will result in + * an `ERR_STREAM_DESTROYED` error. + * This is a destructive and immediate way to destroy a stream. Previous calls to`write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. + * Use `end()` instead of destroy if data should flush before close, or wait for + * the `'drain'` event before destroying the stream. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, + * but instead implement `writable._destroy()`. + * @since v8.0.0 + * @param error Optional, an error to emit with `'error'` event. + */ + destroy(error?: Error): this; /** * Event emitter * The defined events on documents including: @@ -176,78 +769,87 @@ declare module 'stream' { * 5. pipe * 6. unpipe */ - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: Readable) => void): this; + addListener(event: 'unpipe', listener: (src: Readable) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "unpipe", src: Readable): boolean; + emit(event: 'close'): boolean; + emit(event: 'drain'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'pipe', src: Readable): boolean; + emit(event: 'unpipe', src: Readable): boolean; emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: Readable) => void): this; + on(event: 'unpipe', listener: (src: Readable) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: Readable) => void): this; + once(event: 'unpipe', listener: (src: Readable) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: Readable) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - removeListener(event: "close", listener: () => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; + removeListener(event: 'close', listener: () => void): this; + removeListener(event: 'drain', listener: () => void): this; + removeListener(event: 'error', listener: (err: Error) => void): this; + removeListener(event: 'finish', listener: () => void): this; + removeListener(event: 'pipe', listener: (src: Readable) => void): this; + removeListener(event: 'unpipe', listener: (src: Readable) => void): this; removeListener(event: string | symbol, listener: (...args: any[]) => void): this; } - interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean; - readableObjectMode?: boolean; - writableObjectMode?: boolean; - readableHighWaterMark?: number; - writableHighWaterMark?: number; - writableCorked?: number; + allowHalfOpen?: boolean | undefined; + readableObjectMode?: boolean | undefined; + writableObjectMode?: boolean | undefined; + readableHighWaterMark?: number | undefined; + writableHighWaterMark?: number | undefined; + writableCorked?: number | undefined; + construct?(this: Duplex, callback: (error?: Error | null) => void): void; read?(this: Duplex, size: number): void; write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void; + writev?( + this: Duplex, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; final?(this: Duplex, callback: (error?: Error | null) => void): void; destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void; } - - // Note: Duplex extends both Readable and Writable. + /** + * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Duplex` streams include: + * + * * `TCP sockets` + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ class Duplex extends Readable implements Writable { readonly writable: boolean; readonly writableEnded: boolean; @@ -256,104 +858,483 @@ declare module 'stream' { readonly writableLength: number; readonly writableObjectMode: boolean; readonly writableCorked: number; + readonly writableNeedDrain: boolean; + readonly closed: boolean; + readonly errored: Error | null; + /** + * If `false` then the stream will automatically end the writable side when the + * readable side ends. Set initially by the `allowHalfOpen` constructor option, + * which defaults to `false`. + * + * This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is + * emitted. + * @since v0.9.4 + */ + allowHalfOpen: boolean; constructor(opts?: DuplexOptions); + /** + * A utility method for creating duplex streams. + * + * - `Stream` converts writable stream into writable `Duplex` and readable stream + * to `Duplex`. + * - `Blob` converts into readable `Duplex`. + * - `string` converts into readable `Duplex`. + * - `ArrayBuffer` converts into readable `Duplex`. + * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. + * - `AsyncGeneratorFunction` converts into a readable/writable transform + * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * - `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined` + * - `Object ({ writable, readable })` converts `readable` and + * `writable` into `Stream` and then combines them into `Duplex` where the + * `Duplex` will write to the `writable` and read from the `readable`. + * - `Promise` converts into readable `Duplex`. Value `null` is ignored. + * + * @since v16.8.0 + */ + static from(src: Stream | NodeBlob | ArrayBuffer | string | Iterable | AsyncIterable | AsyncGeneratorFunction | Promise | Object): Duplex; _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - _writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void; + _writev?( + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; _destroy(error: Error | null, callback: (error: Error | null) => void): void; _final(callback: (error?: Error | null) => void): void; write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean; write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; setDefaultEncoding(encoding: BufferEncoding): this; - end(cb?: () => void): void; - end(chunk: any, cb?: () => void): void; - end(chunk: any, encoding?: BufferEncoding, cb?: () => void): void; + end(cb?: () => void): this; + end(chunk: any, cb?: () => void): this; + end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this; cork(): void; uncork(): void; } - type TransformCallback = (error?: Error | null, data?: any) => void; - interface TransformOptions extends DuplexOptions { + construct?(this: Transform, callback: (error?: Error | null) => void): void; read?(this: Transform, size: number): void; write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - writev?(this: Transform, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void; + writev?( + this: Transform, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; final?(this: Transform, callback: (error?: Error | null) => void): void; destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void; transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; flush?(this: Transform, callback: TransformCallback): void; } - + /** + * Transform streams are `Duplex` streams where the output is in some way + * related to the input. Like all `Duplex` streams, `Transform` streams + * implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Transform` streams include: + * + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ class Transform extends Duplex { constructor(opts?: TransformOptions); _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; _flush(callback: TransformCallback): void; } - - class PassThrough extends Transform { } - - interface FinishedOptions { - error?: boolean; - readable?: boolean; - writable?: boolean; + /** + * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is + * primarily for examples and testing, but there are some use cases where`stream.PassThrough` is useful as a building block for novel sorts of streams. + */ + class PassThrough extends Transform {} + /** + * Attaches an AbortSignal to a readable or writeable stream. This lets code + * control stream destruction using an `AbortController`. + * + * Calling `abort` on the `AbortController` corresponding to the passed`AbortSignal` will behave the same way as calling `.destroy(new AbortError())`on the stream. + * + * ```js + * const fs = require('fs'); + * + * const controller = new AbortController(); + * const read = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')) + * ); + * // Later, abort the operation closing the stream + * controller.abort(); + * ``` + * + * Or using an `AbortSignal` with a readable stream as an async iterable: + * + * ```js + * const controller = new AbortController(); + * setTimeout(() => controller.abort(), 10_000); // set a timeout + * const stream = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')) + * ); + * (async () => { + * try { + * for await (const chunk of stream) { + * await process(chunk); + * } + * } catch (e) { + * if (e.name === 'AbortError') { + * // The operation was cancelled + * } else { + * throw e; + * } + * } + * })(); + * ``` + * @since v15.4.0 + * @param signal A signal representing possible cancellation + * @param stream a stream to attach a signal to + */ + function addAbortSignal(signal: AbortSignal, stream: T): T; + interface FinishedOptions extends Abortable { + error?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; } + /** + * A function to get notified when a stream is no longer readable, writable + * or has experienced an error or a premature close event. + * + * ```js + * const { finished } = require('stream'); + * + * const rs = fs.createReadStream('archive.tar'); + * + * finished(rs, (err) => { + * if (err) { + * console.error('Stream failed.', err); + * } else { + * console.log('Stream is done reading.'); + * } + * }); + * + * rs.resume(); // Drain the stream. + * ``` + * + * Especially useful in error handling scenarios where a stream is destroyed + * prematurely (like an aborted HTTP request), and will not emit `'end'`or `'finish'`. + * + * The `finished` API provides promise version: + * + * ```js + * const { finished } = require('stream/promises'); + * + * const rs = fs.createReadStream('archive.tar'); + * + * async function run() { + * await finished(rs); + * console.log('Stream is done reading.'); + * } + * + * run().catch(console.error); + * rs.resume(); // Drain the stream. + * ``` + * + * `stream.finished()` leaves dangling event listeners (in particular`'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been + * invoked. The reason for this is so that unexpected `'error'` events (due to + * incorrect stream implementations) do not cause unexpected crashes. + * If this is unwanted behavior then the returned cleanup function needs to be + * invoked in the callback: + * + * ```js + * const cleanup = finished(rs, (err) => { + * cleanup(); + * // ... + * }); + * ``` + * @since v10.0.0 + * @param stream A readable and/or writable stream. + * @param callback A callback function that takes an optional error argument. + * @return A cleanup function which removes all registered listeners. + */ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; namespace finished { function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise; } - - function pipeline(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; - function pipeline(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream, - stream3: NodeJS.ReadWriteStream, - stream4: T, - callback?: (err: NodeJS.ErrnoException | null) => void, - ): T; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream, - stream3: NodeJS.ReadWriteStream, - stream4: NodeJS.ReadWriteStream, - stream5: T, - callback?: (err: NodeJS.ErrnoException | null) => void, - ): T; + type PipelineSourceFunction = () => Iterable | AsyncIterable; + type PipelineSource = Iterable | AsyncIterable | NodeJS.ReadableStream | PipelineSourceFunction; + type PipelineTransform, U> = + | NodeJS.ReadWriteStream + | ((source: S extends (...args: any[]) => Iterable | AsyncIterable ? AsyncIterable : S) => AsyncIterable); + type PipelineTransformSource = PipelineSource | PipelineTransform; + type PipelineDestinationIterableFunction = (source: AsyncIterable) => AsyncIterable; + type PipelineDestinationPromiseFunction = (source: AsyncIterable) => Promise

; + type PipelineDestination, P> = S extends PipelineTransformSource + ? NodeJS.WritableStream | PipelineDestinationIterableFunction | PipelineDestinationPromiseFunction + : never; + type PipelineCallback> = S extends PipelineDestinationPromiseFunction + ? (err: NodeJS.ErrnoException | null, value: P) => void + : (err: NodeJS.ErrnoException | null) => void; + type PipelinePromise> = S extends PipelineDestinationPromiseFunction ? Promise

: Promise; + interface PipelineOptions { + signal: AbortSignal; + } + /** + * A module method to pipe between streams and generators forwarding errors and + * properly cleaning up and provide a callback when the pipeline is complete. + * + * ```js + * const { pipeline } = require('stream'); + * const fs = require('fs'); + * const zlib = require('zlib'); + * + * // Use the pipeline API to easily pipe a series of streams + * // together and get notified when the pipeline is fully done. + * + * // A pipeline to gzip a potentially huge tar file efficiently: + * + * pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * (err) => { + * if (err) { + * console.error('Pipeline failed.', err); + * } else { + * console.log('Pipeline succeeded.'); + * } + * } + * ); + * ``` + * + * The `pipeline` API provides a promise version, which can also + * receive an options argument as the last parameter with a`signal` `AbortSignal` property. When the signal is aborted,`destroy` will be called on the underlying pipeline, with + * an`AbortError`. + * + * ```js + * const { pipeline } = require('stream/promises'); + * + * async function run() { + * await pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * To use an `AbortSignal`, pass it inside an options object, + * as the last argument: + * + * ```js + * const { pipeline } = require('stream/promises'); + * + * async function run() { + * const ac = new AbortController(); + * const signal = ac.signal; + * + * setTimeout(() => ac.abort(), 1); + * await pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * { signal }, + * ); + * } + * + * run().catch(console.error); // AbortError + * ``` + * + * The `pipeline` API also supports async generators: + * + * ```js + * const { pipeline } = require('stream/promises'); + * const fs = require('fs'); + * + * async function run() { + * await pipeline( + * fs.createReadStream('lowercase.txt'), + * async function* (source, { signal }) { + * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. + * for await (const chunk of source) { + * yield await processChunk(chunk, { signal }); + * } + * }, + * fs.createWriteStream('uppercase.txt') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * Remember to handle the `signal` argument passed into the async generator. + * Especially in the case where the async generator is the source for the + * pipeline (i.e. first argument) or the pipeline will never complete. + * + * ```js + * const { pipeline } = require('stream/promises'); + * const fs = require('fs'); + * + * async function run() { + * await pipeline( + * async function* ({ signal }) { + * await someLongRunningfn({ signal }); + * yield 'asd'; + * }, + * fs.createWriteStream('uppercase.txt') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: + * + * * `Readable` streams which have emitted `'end'` or `'close'`. + * * `Writable` streams which have emitted `'finish'` or `'close'`. + * + * `stream.pipeline()` leaves dangling event listeners on the streams + * after the `callback` has been invoked. In the case of reuse of streams after + * failure, this can cause event listener leaks and swallowed errors. If the last + * stream is readable, dangling event listeners will be removed so that the last + * stream can be consumed later. + * + * `stream.pipeline()` closes all the streams when an error is raised. + * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior + * once it would destroy the socket without sending the expected response. + * See the example below: + * + * ```js + * const fs = require('fs'); + * const http = require('http'); + * const { pipeline } = require('stream'); + * + * const server = http.createServer((req, res) => { + * const fileStream = fs.createReadStream('./fileNotExist.txt'); + * pipeline(fileStream, res, (err) => { + * if (err) { + * console.log(err); // No such file + * // this message can't be sent once `pipeline` already destroyed the socket + * return res.end('error!!!'); + * } + * }); + * }); + * ``` + * @since v10.0.0 + * @param callback Called when the pipeline is fully done. + */ + function pipeline, B extends PipelineDestination>( + source: A, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, callback?: PipelineCallback): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, callback?: PipelineCallback): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; function pipeline( streams: ReadonlyArray, - callback?: (err: NodeJS.ErrnoException | null) => void, + callback?: (err: NodeJS.ErrnoException | null) => void ): NodeJS.WritableStream; function pipeline( stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array void)>, + ...streams: Array void)> ): NodeJS.WritableStream; namespace pipeline { - function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise; - function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise; - function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise; - function __promisify__( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream, - stream3: NodeJS.ReadWriteStream, - stream4: NodeJS.ReadWriteStream, - stream5: NodeJS.WritableStream, - ): Promise; - function __promisify__(streams: ReadonlyArray): Promise; + function __promisify__, B extends PipelineDestination>(source: A, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function __promisify__, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__(streams: ReadonlyArray, options?: PipelineOptions): Promise; function __promisify__( stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array, + ...streams: Array ): Promise; } - interface Pipe { close(): void; hasRef(): boolean; ref(): void; unref(): void; } - } + /** + * Returns whether the stream has encountered an error. + * @since v17.3.0 + */ + function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean; + + /** + * Returns whether the stream is readable. + * @since v17.4.0 + */ + function isReadable(stream: Readable | NodeJS.ReadableStream): boolean; + + const promises: typeof streamPromises; + const consumers: typeof streamConsumers; + } export = internal; } +declare module 'node:stream' { + import stream = require('stream'); + export = stream; +} diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts new file mode 100644 index 0000000..1ebf12e --- /dev/null +++ b/node_modules/@types/node/stream/consumers.d.ts @@ -0,0 +1,12 @@ +declare module 'stream/consumers' { + import { Blob as NodeBlob } from "node:buffer"; + import { Readable } from 'node:stream'; + function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; +} +declare module 'node:stream/consumers' { + export * from 'stream/consumers'; +} diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts new file mode 100644 index 0000000..b427073 --- /dev/null +++ b/node_modules/@types/node/stream/promises.d.ts @@ -0,0 +1,42 @@ +declare module 'stream/promises' { + import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream'; + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise; + function pipeline, B extends PipelineDestination>(source: A, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function pipeline, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline(streams: ReadonlyArray, options?: PipelineOptions): Promise; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array + ): Promise; +} +declare module 'node:stream/promises' { + export * from 'stream/promises'; +} diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts new file mode 100644 index 0000000..f9ef057 --- /dev/null +++ b/node_modules/@types/node/stream/web.d.ts @@ -0,0 +1,330 @@ +declare module 'stream/web' { + // stub module, pending copy&paste from .d.ts or manual impl + // copy from lib.dom.d.ts + interface ReadableWritablePair { + readable: ReadableStream; + /** + * Provides a convenient, chainable way of piping this readable stream + * through a transform stream (or any other { writable, readable } + * pair). It simply pipes the stream into the writable side of the + * supplied pair, and returns the readable side for further use. + * + * Piping a stream will lock it for the duration of the pipe, preventing + * any other consumer from acquiring a reader. + */ + writable: WritableStream; + } + interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + /** + * Pipes this readable stream to a given writable stream destination. + * The way in which the piping process behaves under various error + * conditions can be customized with a number of passed options. It + * returns a promise that fulfills when the piping process completes + * successfully, or rejects if any errors were encountered. + * + * Piping a stream will lock it for the duration of the pipe, preventing + * any other consumer from acquiring a reader. + * + * Errors and closures of the source and destination streams propagate + * as follows: + * + * An error in this source readable stream will abort destination, + * unless preventAbort is truthy. The returned promise will be rejected + * with the source's error, or with any error that occurs during + * aborting the destination. + * + * An error in destination will cancel this source readable stream, + * unless preventCancel is truthy. The returned promise will be rejected + * with the destination's error, or with any error that occurs during + * canceling the source. + * + * When this source readable stream closes, destination will be closed, + * unless preventClose is truthy. The returned promise will be fulfilled + * once this process completes, unless an error is encountered while + * closing the destination, in which case it will be rejected with that + * error. + * + * If destination starts out closed or closing, this source readable + * stream will be canceled, unless preventCancel is true. The returned + * promise will be rejected with an error indicating piping to a closed + * stream failed, or with any error that occurs during canceling the + * source. + * + * The signal option can be set to an AbortSignal to allow aborting an + * ongoing pipe operation via the corresponding AbortController. In this + * case, this source readable stream will be canceled, and destination + * aborted, unless the respective options preventCancel or preventAbort + * are set. + */ + preventClose?: boolean; + signal?: AbortSignal; + } + interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; + } + interface ReadableStreamDefaultReadValueResult { + done: false; + value: T; + } + interface ReadableStreamDefaultReadDoneResult { + done: true; + value?: undefined; + } + type ReadableStreamController = ReadableStreamDefaultController; + type ReadableStreamDefaultReadResult = ReadableStreamDefaultReadValueResult | ReadableStreamDefaultReadDoneResult; + interface ReadableByteStreamControllerCallback { + (controller: ReadableByteStreamController): void | PromiseLike; + } + interface UnderlyingSinkAbortCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSinkCloseCallback { + (): void | PromiseLike; + } + interface UnderlyingSinkStartCallback { + (controller: WritableStreamDefaultController): any; + } + interface UnderlyingSinkWriteCallback { + (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; + } + interface UnderlyingSourceCancelCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSourcePullCallback { + (controller: ReadableStreamController): void | PromiseLike; + } + interface UnderlyingSourceStartCallback { + (controller: ReadableStreamController): any; + } + interface TransformerFlushCallback { + (controller: TransformStreamDefaultController): void | PromiseLike; + } + interface TransformerStartCallback { + (controller: TransformStreamDefaultController): any; + } + interface TransformerTransformCallback { + (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; + } + interface UnderlyingByteSource { + autoAllocateChunkSize?: number; + cancel?: ReadableStreamErrorCallback; + pull?: ReadableByteStreamControllerCallback; + start?: ReadableByteStreamControllerCallback; + type: 'bytes'; + } + interface UnderlyingSource { + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; + type?: undefined; + } + interface UnderlyingSink { + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; + type?: undefined; + write?: UnderlyingSinkWriteCallback; + } + interface ReadableStreamErrorCallback { + (reason: any): void | PromiseLike; + } + /** This Streams API interface represents a readable stream of byte data. */ + interface ReadableStream { + readonly locked: boolean; + cancel(reason?: any): Promise; + getReader(): ReadableStreamDefaultReader; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + tee(): [ReadableStream, ReadableStream]; + values(options?: { preventCancel?: boolean }): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + const ReadableStream: { + prototype: ReadableStream; + new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy): ReadableStream; + new (underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + }; + interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; + } + const ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new (stream: ReadableStream): ReadableStreamDefaultReader; + }; + const ReadableStreamBYOBReader: any; + const ReadableStreamBYOBRequest: any; + interface ReadableByteStreamController { + readonly byobRequest: undefined; + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: ArrayBufferView): void; + error(error?: any): void; + } + const ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new (): ReadableByteStreamController; + }; + interface ReadableStreamDefaultController { + readonly desiredSize: number | null; + close(): void; + enqueue(chunk?: R): void; + error(e?: any): void; + } + const ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new (): ReadableStreamDefaultController; + }; + interface Transformer { + flush?: TransformerFlushCallback; + readableType?: undefined; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; + writableType?: undefined; + } + interface TransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + const TransformStream: { + prototype: TransformStream; + new (transformer?: Transformer, writableStrategy?: QueuingStrategy, readableStrategy?: QueuingStrategy): TransformStream; + }; + interface TransformStreamDefaultController { + readonly desiredSize: number | null; + enqueue(chunk?: O): void; + error(reason?: any): void; + terminate(): void; + } + const TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new (): TransformStreamDefaultController; + }; + /** + * This Streams API interface provides a standard abstraction for writing + * streaming data to a destination, known as a sink. This object comes with + * built-in back pressure and queuing. + */ + interface WritableStream { + readonly locked: boolean; + abort(reason?: any): Promise; + close(): Promise; + getWriter(): WritableStreamDefaultWriter; + } + const WritableStream: { + prototype: WritableStream; + new (underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; + }; + /** + * This Streams API interface is the object returned by + * WritableStream.getWriter() and once created locks the < writer to the + * WritableStream ensuring that no other streams can write to the underlying + * sink. + */ + interface WritableStreamDefaultWriter { + readonly closed: Promise; + readonly desiredSize: number | null; + readonly ready: Promise; + abort(reason?: any): Promise; + close(): Promise; + releaseLock(): void; + write(chunk?: W): Promise; + } + const WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new (stream: WritableStream): WritableStreamDefaultWriter; + }; + /** + * This Streams API interface represents a controller allowing control of a + * WritableStream's state. When constructing a WritableStream, the + * underlying sink is given a corresponding WritableStreamDefaultController + * instance to manipulate. + */ + interface WritableStreamDefaultController { + error(e?: any): void; + } + const WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new (): WritableStreamDefaultController; + }; + interface QueuingStrategy { + highWaterMark?: number; + size?: QueuingStrategySize; + } + interface QueuingStrategySize { + (chunk?: T): number; + } + interface QueuingStrategyInit { + /** + * Creates a new ByteLengthQueuingStrategy with the provided high water + * mark. + * + * Note that the provided high water mark will not be validated ahead of + * time. Instead, if it is negative, NaN, or not a number, the resulting + * ByteLengthQueuingStrategy will cause the corresponding stream + * constructor to throw. + */ + highWaterMark: number; + } + /** + * This Streams API interface provides a built-in byte length queuing + * strategy that can be used when constructing streams. + */ + interface ByteLengthQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + const ByteLengthQueuingStrategy: { + prototype: ByteLengthQueuingStrategy; + new (init: QueuingStrategyInit): ByteLengthQueuingStrategy; + }; + /** + * This Streams API interface provides a built-in byte length queuing + * strategy that can be used when constructing streams. + */ + interface CountQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + const CountQueuingStrategy: { + prototype: CountQueuingStrategy; + new (init: QueuingStrategyInit): CountQueuingStrategy; + }; + interface TextEncoderStream { + /** Returns "utf-8". */ + readonly encoding: 'utf-8'; + readonly readable: ReadableStream; + readonly writable: WritableStream; + readonly [Symbol.toStringTag]: string; + } + const TextEncoderStream: { + prototype: TextEncoderStream; + new (): TextEncoderStream; + }; + interface TextDecoderOptions { + fatal?: boolean; + ignoreBOM?: boolean; + } + type BufferSource = ArrayBufferView | ArrayBuffer; + interface TextDecoderStream { + /** Returns encoding's name, lower cased. */ + readonly encoding: string; + /** Returns `true` if error mode is "fatal", and `false` otherwise. */ + readonly fatal: boolean; + /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */ + readonly ignoreBOM: boolean; + readonly readable: ReadableStream; + readonly writable: WritableStream; + readonly [Symbol.toStringTag]: string; + } + const TextDecoderStream: { + prototype: TextDecoderStream; + new (label?: string, options?: TextDecoderOptions): TextDecoderStream; + }; +} +declare module 'node:stream/web' { + export * from 'stream/web'; +} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts index 6b688d3..a585804 100644 --- a/node_modules/@types/node/string_decoder.d.ts +++ b/node_modules/@types/node/string_decoder.d.ts @@ -1,11 +1,67 @@ -declare module 'node:string_decoder' { - export * from 'string_decoder'; -} - +/** + * The `string_decoder` module provides an API for decoding `Buffer` objects into + * strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 + * characters. It can be accessed using: + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * ``` + * + * The following example shows the basic use of the `StringDecoder` class. + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * const decoder = new StringDecoder('utf8'); + * + * const cent = Buffer.from([0xC2, 0xA2]); + * console.log(decoder.write(cent)); + * + * const euro = Buffer.from([0xE2, 0x82, 0xAC]); + * console.log(decoder.write(euro)); + * ``` + * + * When a `Buffer` instance is written to the `StringDecoder` instance, an + * internal buffer is used to ensure that the decoded string does not contain + * any incomplete multibyte characters. These are held in the buffer until the + * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. + * + * In the following example, the three UTF-8 encoded bytes of the European Euro + * symbol (`€`) are written over three separate operations: + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * const decoder = new StringDecoder('utf8'); + * + * decoder.write(Buffer.from([0xE2])); + * decoder.write(Buffer.from([0x82])); + * console.log(decoder.end(Buffer.from([0xAC]))); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/string_decoder.js) + */ declare module 'string_decoder' { class StringDecoder { constructor(encoding?: BufferEncoding); + /** + * Returns a decoded string, ensuring that any incomplete multibyte characters at + * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the + * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`. + * @since v0.1.99 + * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode. + */ write(buffer: Buffer): string; + /** + * Returns any remaining input stored in the internal buffer as a string. Bytes + * representing incomplete UTF-8 and UTF-16 characters will be replaced with + * substitution characters appropriate for the character encoding. + * + * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input. + * After `end()` is called, the `stringDecoder` object can be reused for new input. + * @since v0.9.3 + * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode. + */ end(buffer?: Buffer): string; } } +declare module 'node:string_decoder' { + export * from 'string_decoder'; +} diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts new file mode 100644 index 0000000..8e20710 --- /dev/null +++ b/node_modules/@types/node/test.d.ts @@ -0,0 +1,446 @@ +/** + * The `node:test` module provides a standalone testing module. + * @see [source](https://github.com/nodejs/node/blob/v18.x/lib/test.js) + */ +declare module 'node:test' { + /** + * Programmatically start the test runner. + * @since v18.9.0 + * @param options Configuration options for running tests. + * @returns A {@link TapStream} that emits events about the test execution. + */ + function run(options?: RunOptions): TapStream; + + /** + * The `test()` function is the value imported from the test module. Each invocation of this + * function results in the creation of a test point in the TAP output. + * + * The {@link TestContext} object passed to the fn argument can be used to perform actions + * related to the current test. Examples include skipping the test, adding additional TAP + * diagnostic information, or creating subtests. + * + * `test()` returns a {@link Promise} that resolves once the test completes. The return value + * can usually be discarded for top level tests. However, the return value from subtests should + * be used to prevent the parent test from finishing first and cancelling the subtest as shown + * in the following example. + * + * ```js + * test('top level test', async (t) => { + * // The setTimeout() in the following subtest would cause it to outlive its + * // parent test if 'await' is removed on the next line. Once the parent test + * // completes, it will cancel any outstanding subtests. + * await t.test('longer running subtest', async (t) => { + * return new Promise((resolve, reject) => { + * setTimeout(resolve, 1000); + * }); + * }); + * }); + * ``` + * @since v18.0.0 + * @param name The name of the test, which is displayed when reporting test results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the test + * @param fn The function under test. The first argument to this function is a + * {@link TestContext} object. If the test uses callbacks, the callback function is + * passed as the second argument. Default: A no-op function. + * @returns A {@link Promise} resolved with `undefined` once the test completes. + */ + function test(name?: string, fn?: TestFn): Promise; + function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function test(options?: TestOptions, fn?: TestFn): Promise; + function test(fn?: TestFn): Promise; + + /** + * @since v18.6.0 + * @param name The name of the suite, which is displayed when reporting suite results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the suite + * @param fn The function under suite. Default: A no-op function. + */ + function describe(name?: string, options?: TestOptions, fn?: SuiteFn): void; + function describe(name?: string, fn?: SuiteFn): void; + function describe(options?: TestOptions, fn?: SuiteFn): void; + function describe(fn?: SuiteFn): void; + namespace describe { + // Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`. + function skip(name?: string, options?: TestOptions, fn?: SuiteFn): void; + function skip(name?: string, fn?: SuiteFn): void; + function skip(options?: TestOptions, fn?: SuiteFn): void; + function skip(fn?: SuiteFn): void; + + // Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`. + function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void; + function todo(name?: string, fn?: SuiteFn): void; + function todo(options?: TestOptions, fn?: SuiteFn): void; + function todo(fn?: SuiteFn): void; + } + + /** + * @since v18.6.0 + * @param name The name of the test, which is displayed when reporting test results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the test + * @param fn The function under test. If the test uses callbacks, the callback function is + * passed as the second argument. Default: A no-op function. + */ + function it(name?: string, options?: TestOptions, fn?: ItFn): void; + function it(name?: string, fn?: ItFn): void; + function it(options?: TestOptions, fn?: ItFn): void; + function it(fn?: ItFn): void; + namespace it { + // Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`. + function skip(name?: string, options?: TestOptions, fn?: ItFn): void; + function skip(name?: string, fn?: ItFn): void; + function skip(options?: TestOptions, fn?: ItFn): void; + function skip(fn?: ItFn): void; + + // Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`. + function todo(name?: string, options?: TestOptions, fn?: ItFn): void; + function todo(name?: string, fn?: ItFn): void; + function todo(options?: TestOptions, fn?: ItFn): void; + function todo(fn?: ItFn): void; + } + + /** + * The type of a function under test. The first argument to this function is a + * {@link TestContext} object. If the test uses callbacks, the callback function is passed as + * the second argument. + */ + type TestFn = (t: TestContext, done: (result?: any) => void) => any; + + /** + * The type of a function under Suite. + * If the test uses callbacks, the callback function is passed as an argument + */ + type SuiteFn = (done: (result?: any) => void) => void; + + /** + * The type of a function under test. + * If the test uses callbacks, the callback function is passed as an argument + */ + type ItFn = (done: (result?: any) => void) => any; + + interface RunOptions { + /** + * If a number is provided, then that many files would run in parallel. + * If truthy, it would run (number of cpu cores - 1) files in parallel. + * If falsy, it would only run one file at a time. + * If unspecified, subtests inherit this value from their parent. + * @default true + */ + concurrency?: number | boolean | undefined; + + /** + * An array containing the list of files to run. + * If unspecified, the test runner execution model will be used. + */ + files?: readonly string[] | undefined; + + /** + * Allows aborting an in-progress test execution. + * @default undefined + */ + signal?: AbortSignal | undefined; + + /** + * A number of milliseconds the test will fail after. + * If unspecified, subtests inherit this value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + + /** + * Sets inspector port of test child process. + * If a nullish value is provided, each process gets its own port, + * incremented from the primary's `process.debugPort`. + */ + inspectPort?: number | (() => number) | undefined; + } + + /** + * A successful call of the `run()` method will return a new `TapStream` object, + * streaming a [TAP](https://testanything.org/) output. + * `TapStream` will emit events in the order of the tests' definitions. + * @since v18.9.0 + */ + interface TapStream extends NodeJS.ReadableStream { + addListener(event: 'test:diagnostic', listener: (message: string) => void): this; + addListener(event: 'test:fail', listener: (data: TestFail) => void): this; + addListener(event: 'test:pass', listener: (data: TestPass) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + emit(event: 'test:diagnostic', message: string): boolean; + emit(event: 'test:fail', data: TestFail): boolean; + emit(event: 'test:pass', data: TestPass): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'test:diagnostic', listener: (message: string) => void): this; + on(event: 'test:fail', listener: (data: TestFail) => void): this; + on(event: 'test:pass', listener: (data: TestPass) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: 'test:diagnostic', listener: (message: string) => void): this; + once(event: 'test:fail', listener: (data: TestFail) => void): this; + once(event: 'test:pass', listener: (data: TestPass) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'test:diagnostic', listener: (message: string) => void): this; + prependListener(event: 'test:fail', listener: (data: TestFail) => void): this; + prependListener(event: 'test:pass', listener: (data: TestPass) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this; + prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this; + prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + } + + interface TestFail { + /** + * The test duration. + */ + duration: number; + + /** + * The failure casing test to fail. + */ + error: Error; + + /** + * The test name. + */ + name: string; + + /** + * The ordinal number of the test. + */ + testNumber: number; + + /** + * Present if `context.todo` is called. + */ + todo?: string; + + /** + * Present if `context.skip` is called. + */ + skip?: string; + } + + interface TestPass { + /** + * The test duration. + */ + duration: number; + + /** + * The test name. + */ + name: string; + + /** + * The ordinal number of the test. + */ + testNumber: number; + + /** + * Present if `context.todo` is called. + */ + todo?: string; + + /** + * Present if `context.skip` is called. + */ + skip?: string; + } + + /** + * An instance of `TestContext` is passed to each test function in order to interact with the + * test runner. However, the `TestContext` constructor is not exposed as part of the API. + * @since v18.0.0 + */ + interface TestContext { + /** + * This function is used to create a hook running before each subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + beforeEach: typeof beforeEach; + + /** + * This function is used to create a hook running after each subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + afterEach: typeof afterEach; + + /** + * This function is used to write TAP diagnostics to the output. Any diagnostic information is + * included at the end of the test's results. This function does not return a value. + * @param message Message to be displayed as a TAP diagnostic. + * @since v18.0.0 + */ + diagnostic(message: string): void; + + /** + * The name of the test. + * @since v18.8.0 + */ + readonly name: string; + + /** + * If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only` + * option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only` + * command-line option, this function is a no-op. + * @param shouldRunOnlyTests Whether or not to run `only` tests. + * @since v18.0.0 + */ + runOnly(shouldRunOnlyTests: boolean): void; + + /** + * Can be used to abort test subtasks when the test has been aborted. + * @since v18.7.0 + */ + readonly signal: AbortSignal; + + /** + * This function causes the test's output to indicate the test as skipped. If `message` is + * provided, it is included in the TAP output. Calling `skip()` does not terminate execution of + * the test function. This function does not return a value. + * @param message Optional skip message to be displayed in TAP output. + * @since v18.0.0 + */ + skip(message?: string): void; + + /** + * This function adds a `TODO` directive to the test's output. If `message` is provided, it is + * included in the TAP output. Calling `todo()` does not terminate execution of the test + * function. This function does not return a value. + * @param message Optional `TODO` message to be displayed in TAP output. + * @since v18.0.0 + */ + todo(message?: string): void; + + /** + * This function is used to create subtests under the current test. This function behaves in + * the same fashion as the top level {@link test} function. + * @since v18.0.0 + * @param name The name of the test, which is displayed when reporting test results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the test + * @param fn The function under test. This first argument to this function is a + * {@link TestContext} object. If the test uses callbacks, the callback function is + * passed as the second argument. Default: A no-op function. + * @returns A {@link Promise} resolved with `undefined` once the test completes. + */ + test: typeof test; + } + + interface TestOptions { + /** + * If a number is provided, then that many tests would run in parallel. + * If truthy, it would run (number of cpu cores - 1) tests in parallel. + * For subtests, it will be `Infinity` tests in parallel. + * If falsy, it would only run one test at a time. + * If unspecified, subtests inherit this value from their parent. + * @default false + */ + concurrency?: number | boolean | undefined; + + /** + * If truthy, and the test context is configured to run `only` tests, then this test will be + * run. Otherwise, the test is skipped. + * @default false + */ + only?: boolean | undefined; + + /** + * Allows aborting an in-progress test. + * @since v18.8.0 + */ + signal?: AbortSignal | undefined; + + /** + * If truthy, the test is skipped. If a string is provided, that string is displayed in the + * test results as the reason for skipping the test. + * @default false + */ + skip?: boolean | string | undefined; + + /** + * A number of milliseconds the test will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + * @since v18.7.0 + */ + timeout?: number | undefined; + + /** + * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in + * the test results as the reason why the test is `TODO`. + * @default false + */ + todo?: boolean | string | undefined; + } + + /** + * This function is used to create a hook running before running a suite. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + function before(fn?: HookFn, options?: HookOptions): void; + + /** + * This function is used to create a hook running after running a suite. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + function after(fn?: HookFn, options?: HookOptions): void; + + /** + * This function is used to create a hook running before each subtest of the current suite. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + function beforeEach(fn?: HookFn, options?: HookOptions): void; + + /** + * This function is used to create a hook running after each subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + function afterEach(fn?: HookFn, options?: HookOptions): void; + + /** + * The hook function. If the hook uses callbacks, the callback function is passed as the + * second argument. + */ + type HookFn = (done: (result?: any) => void) => any; + + /** + * Configuration options for hooks. + * @since v18.8.0 + */ + interface HookOptions { + /** + * Allows aborting an in-progress hook. + */ + signal?: AbortSignal | undefined; + + /** + * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + } + + export { test as default, run, test, describe, it, before, after, beforeEach, afterEach }; +} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts index 11dfe35..b26f3ce 100644 --- a/node_modules/@types/node/timers.d.ts +++ b/node_modules/@types/node/timers.d.ts @@ -1,20 +1,94 @@ -declare module 'node:timers' { - export * from 'timers'; -} - +/** + * The `timer` module exposes a global API for scheduling functions to + * be called at some future period of time. Because the timer functions are + * globals, there is no need to call `require('timers')` to use the API. + * + * The timer functions within Node.js implement a similar API as the timers API + * provided by Web Browsers but use a different internal implementation that is + * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/timers.js) + */ declare module 'timers' { - function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; - namespace setTimeout { - function __promisify__(ms: number): Promise; - function __promisify__(ms: number, value: T): Promise; + import { Abortable } from 'node:events'; + import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises'; + interface TimerOptions extends Abortable { + /** + * Set to `false` to indicate that the scheduled `Timeout` + * should not require the Node.js event loop to remain active. + * @default true + */ + ref?: boolean | undefined; } - function clearTimeout(timeoutId: NodeJS.Timeout): void; - function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; - function clearInterval(intervalId: NodeJS.Timeout): void; - function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; - namespace setImmediate { - function __promisify__(): Promise; - function __promisify__(value: T): Promise; + let setTimeout: typeof global.setTimeout; + let clearTimeout: typeof global.clearTimeout; + let setInterval: typeof global.setInterval; + let clearInterval: typeof global.clearInterval; + let setImmediate: typeof global.setImmediate; + let clearImmediate: typeof global.clearImmediate; + global { + namespace NodeJS { + // compatibility with older typings + interface Timer extends RefCounted { + hasRef(): boolean; + refresh(): this; + [Symbol.toPrimitive](): number; + } + interface Immediate extends RefCounted { + /** + * If true, the `Immediate` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + _onImmediate: Function; // to distinguish it from the Timeout class + } + interface Timeout extends Timer { + /** + * If true, the `Timeout` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * Sets the timer's start time to the current time, and reschedules the timer to + * call its callback at the previously specified duration adjusted to the current + * time. This is useful for refreshing a timer without allocating a new + * JavaScript object. + * + * Using this on a timer that has already called its callback will reactivate the + * timer. + * @since v10.2.0 + * @return a reference to `timeout` + */ + refresh(): this; + [Symbol.toPrimitive](): number; + } + } + function setTimeout(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout; + namespace setTimeout { + const __promisify__: typeof setTimeoutPromise; + } + function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void; + function setInterval(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer; + namespace setInterval { + const __promisify__: typeof setIntervalPromise; + } + function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void; + function setImmediate(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setImmediate(callback: (args: void) => void): NodeJS.Immediate; + namespace setImmediate { + const __promisify__: typeof setImmediatePromise; + } + function clearImmediate(immediateId: NodeJS.Immediate | undefined): void; + function queueMicrotask(callback: () => void): void; } - function clearImmediate(immediateId: NodeJS.Immediate): void; +} +declare module 'node:timers' { + export * from 'timers'; } diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts new file mode 100644 index 0000000..c145068 --- /dev/null +++ b/node_modules/@types/node/timers/promises.d.ts @@ -0,0 +1,93 @@ +/** + * The `timers/promises` API provides an alternative set of timer functions + * that return `Promise` objects. The API is accessible via`require('timers/promises')`. + * + * ```js + * import { + * setTimeout, + * setImmediate, + * setInterval, + * } from 'timers/promises'; + * ``` + * @since v15.0.0 + */ +declare module 'timers/promises' { + import { TimerOptions } from 'node:timers'; + /** + * ```js + * import { + * setTimeout, + * } from 'timers/promises'; + * + * const res = await setTimeout(100, 'result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. + * @param value A value with which the promise is fulfilled. + */ + function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; + /** + * ```js + * import { + * setImmediate, + * } from 'timers/promises'; + * + * const res = await setImmediate('result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param value A value with which the promise is fulfilled. + */ + function setImmediate(value?: T, options?: TimerOptions): Promise; + /** + * Returns an async iterator that generates values in an interval of `delay` ms. + * + * ```js + * import { + * setInterval, + * } from 'timers/promises'; + * + * const interval = 100; + * for await (const startTime of setInterval(interval, Date.now())) { + * const now = Date.now(); + * console.log(now); + * if ((now - startTime) > 1000) + * break; + * } + * console.log(Date.now()); + * ``` + * @since v15.9.0 + */ + function setInterval(delay?: number, value?: T, options?: TimerOptions): AsyncIterable; + + interface Scheduler { + /** + * ```js + * import { scheduler } from 'node:timers/promises'; + * + * await scheduler.wait(1000); // Wait one second before continuing + * ``` + * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API. + * Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported. + * @since v16.14.0 + * @experimental + * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. + */ + wait: (delay?: number, options?: TimerOptions) => Promise; + /** + * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API. + * Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments. + * @since v16.14.0 + * @experimental + */ + yield: () => Promise; + } + + const scheduler: Scheduler; +} +declare module 'node:timers/promises' { + export * from 'timers/promises'; +} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts index e65a196..2cbc716 100644 --- a/node_modules/@types/node/tls.d.ts +++ b/node_modules/@types/node/tls.d.ts @@ -1,13 +1,19 @@ -declare module 'node:tls' { - export * from 'tls'; -} - +/** + * The `tls` module provides an implementation of the Transport Layer Security + * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. + * The module can be accessed using: + * + * ```js + * const tls = require('tls'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tls.js) + */ declare module 'tls' { + import { X509Certificate } from 'node:crypto'; import * as net from 'node:net'; - + import * as stream from 'stream'; const CLIENT_RENEG_LIMIT: number; const CLIENT_RENEG_WINDOW: number; - interface Certificate { /** * Country code. @@ -34,7 +40,6 @@ declare module 'tls' { */ CN: string; } - interface PeerCertificate { subject: Certificate; issuer: Certificate; @@ -50,11 +55,9 @@ declare module 'tls' { serialNumber: string; raw: Buffer; } - interface DetailedPeerCertificate extends PeerCertificate { issuerCertificate: DetailedPeerCertificate; } - interface CipherNameAndProtocol { /** * The cipher name. @@ -64,13 +67,11 @@ declare module 'tls' { * SSL/TLS protocol version. */ version: string; - /** * IETF name for the cipher suite. */ standardName: string; } - interface EphemeralKeyInfo { /** * The supported types are 'DH' and 'ECDH'. @@ -79,13 +80,12 @@ declare module 'tls' { /** * The name property is available only when type is 'ECDH'. */ - name?: string; + name?: string | undefined; /** * The size of parameter of an ephemeral key exchange. */ size: number; } - interface KeyObject { /** * Private keys in PEM format. @@ -94,9 +94,8 @@ declare module 'tls' { /** * Optional passphrase. */ - passphrase?: string; + passphrase?: string | undefined; } - interface PxfObject { /** * PFX or PKCS12 encoded private key and certificate chain. @@ -105,268 +104,347 @@ declare module 'tls' { /** * Optional passphrase. */ - passphrase?: string; + passphrase?: string | undefined; } - interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { /** * If true the TLS socket will be instantiated in server-mode. * Defaults to false. */ - isServer?: boolean; + isServer?: boolean | undefined; /** * An optional net.Server instance. */ - server?: net.Server; - + server?: net.Server | undefined; /** * An optional Buffer instance containing a TLS session. */ - session?: Buffer; + session?: Buffer | undefined; /** * If true, specifies that the OCSP status request extension will be * added to the client hello and an 'OCSPResponse' event will be * emitted on the socket before establishing a secure communication */ - requestOCSP?: boolean; + requestOCSP?: boolean | undefined; } - + /** + * Performs transparent encryption of written data and all required TLS + * negotiation. + * + * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. + * + * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate} will only return data while the + * connection is open. + * @since v0.11.4 + */ class TLSSocket extends net.Socket { /** * Construct a new tls.TLSSocket object from an existing TCP socket. */ constructor(socket: net.Socket, options?: TLSSocketOptions); - /** - * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. + * This property is `true` if the peer certificate was signed by one of the CAs + * specified when creating the `tls.TLSSocket` instance, otherwise `false`. + * @since v0.11.4 */ authorized: boolean; /** - * The reason why the peer's certificate has not been verified. - * This property becomes available only when tlsSocket.authorized === false. + * Returns the reason why the peer's certificate was not been verified. This + * property is set only when `tlsSocket.authorized === false`. + * @since v0.11.4 */ authorizationError: Error; /** - * Static boolean value, always true. - * May be used to distinguish TLS sockets from regular ones. + * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. + * @since v0.11.4 */ - encrypted: boolean; - + encrypted: true; /** * String containing the selected ALPN protocol. - * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false. + * Before a handshake has completed, this value is always null. + * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. */ - alpnProtocol?: string; - + alpnProtocol: string | false | null; /** - * Returns an object representing the local certificate. The returned - * object has some properties corresponding to the fields of the - * certificate. + * Returns an object representing the local certificate. The returned object has + * some properties corresponding to the fields of the certificate. * - * See tls.TLSSocket.getPeerCertificate() for an example of the - * certificate structure. + * See {@link TLSSocket.getPeerCertificate} for an example of the certificate + * structure. * - * If there is no local certificate, an empty object will be returned. - * If the socket has been destroyed, null will be returned. + * If there is no local certificate, an empty object will be returned. If the + * socket has been destroyed, `null` will be returned. + * @since v11.2.0 */ getCertificate(): PeerCertificate | object | null; /** - * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. - * @returns Returns an object representing the cipher name - * and the SSL/TLS protocol version of the current connection. + * Returns an object containing information on the negotiated cipher suite. + * + * For example: + * + * ```json + * { + * "name": "AES128-SHA256", + * "standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256", + * "version": "TLSv1.2" + * } + * ``` + * + * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. + * @since v0.11.4 */ getCipher(): CipherNameAndProtocol; /** - * Returns an object representing the type, name, and size of parameter - * of an ephemeral key exchange in Perfect Forward Secrecy on a client + * Returns an object representing the type, name, and size of parameter of + * an ephemeral key exchange in `perfect forward secrecy` on a client * connection. It returns an empty object when the key exchange is not - * ephemeral. As this is only supported on a client socket; null is - * returned if called on a server socket. The supported types are 'DH' - * and 'ECDH'. The name property is available only when type is 'ECDH'. + * ephemeral. As this is only supported on a client socket; `null` is returned + * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`. * - * For example: { type: 'ECDH', name: 'prime256v1', size: 256 }. + * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. + * @since v5.0.0 */ getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; /** - * Returns the latest Finished message that has - * been sent to the socket as part of a SSL/TLS handshake, or undefined - * if no Finished message has been sent yet. - * - * As the Finished messages are message digests of the complete - * handshake (with a total of 192 bits for TLS 1.0 and more for SSL - * 3.0), they can be used for external authentication procedures when - * the authentication provided by SSL/TLS is not desired or is not - * enough. + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. * - * Corresponds to the SSL_get_finished routine in OpenSSL and may be - * used to implement the tls-unique channel binding from RFC 5929. + * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. */ getFinished(): Buffer | undefined; /** - * Returns an object representing the peer's certificate. - * The returned object has some properties corresponding to the field of the certificate. - * If detailed argument is true the full chain with issuer property will be returned, - * if false only the top certificate without issuer property. - * If the peer does not provide a certificate, it returns null or an empty object. - * @param detailed - If true; the full chain with issuer property will be returned. - * @returns An object representing the peer's certificate. + * Returns an object representing the peer's certificate. If the peer does not + * provide a certificate, an empty object will be returned. If the socket has been + * destroyed, `null` will be returned. + * + * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's + * certificate. + * @since v0.11.4 + * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. + * @return A certificate object. */ getPeerCertificate(detailed: true): DetailedPeerCertificate; getPeerCertificate(detailed?: false): PeerCertificate; getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; /** - * Returns the latest Finished message that is expected or has actually - * been received from the socket as part of a SSL/TLS handshake, or - * undefined if there is no Finished message so far. - * - * As the Finished messages are message digests of the complete - * handshake (with a total of 192 bits for TLS 1.0 and more for SSL - * 3.0), they can be used for external authentication procedures when - * the authentication provided by SSL/TLS is not desired or is not - * enough. + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. * - * Corresponds to the SSL_get_peer_finished routine in OpenSSL and may - * be used to implement the tls-unique channel binding from RFC 5929. + * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so + * far. */ getPeerFinished(): Buffer | undefined; /** - * Returns a string containing the negotiated SSL/TLS protocol version of the current connection. - * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process. - * The value `null` will be returned for server sockets or disconnected client sockets. - * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information. - * @returns negotiated SSL/TLS protocol version of the current connection + * Returns a string containing the negotiated SSL/TLS protocol version of the + * current connection. The value `'unknown'` will be returned for connected + * sockets that have not completed the handshaking process. The value `null` will + * be returned for server sockets or disconnected client sockets. + * + * Protocol versions are: + * + * * `'SSLv3'` + * * `'TLSv1'` + * * `'TLSv1.1'` + * * `'TLSv1.2'` + * * `'TLSv1.3'` + * + * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. + * @since v5.7.0 */ getProtocol(): string | null; /** - * Could be used to speed up handshake establishment when reconnecting to the server. - * @returns ASN.1 encoded TLS session or undefined if none was negotiated. + * Returns the TLS session data or `undefined` if no session was + * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful + * for debugging. + * + * See `Session Resumption` for more information. + * + * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications + * must use the `'session'` event (it also works for TLSv1.2 and below). + * @since v0.11.4 */ getSession(): Buffer | undefined; /** - * Returns a list of signature algorithms shared between the server and - * the client in the order of decreasing preference. + * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. + * @since v12.11.0 + * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. */ getSharedSigalgs(): string[]; /** - * NOTE: Works only with client TLS sockets. - * Useful only for debugging, for session reuse provide session option to tls.connect(). - * @returns TLS session ticket or undefined if none was negotiated. + * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. + * + * It may be useful for debugging. + * + * See `Session Resumption` for more information. + * @since v0.11.4 */ getTLSTicket(): Buffer | undefined; /** - * Returns true if the session was reused, false otherwise. + * See `Session Resumption` for more information. + * @since v0.5.6 + * @return `true` if the session was reused, `false` otherwise. */ isSessionReused(): boolean; /** - * Initiate TLS renegotiation process. + * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. + * Upon completion, the `callback` function will be passed a single argument + * that is either an `Error` (if the request failed) or `null`. * - * NOTE: Can be used to request peer's certificate after the secure connection has been established. - * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. - * @param options - The options may contain the following fields: rejectUnauthorized, - * requestCert (See tls.createServer() for details). - * @param callback - callback(err) will be executed with null as err, once the renegotiation - * is successfully completed. - * @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated. - */ - renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean; - /** - * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by - * the TLS layer until the entire fragment is received and its integrity is verified; - * large fragments can span multiple roundtrips, and their processing can be delayed due to packet - * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, - * which may decrease overall server throughput. - * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * @returns Returns true on success, false otherwise. + * This method can be used to request a peer's certificate after the secure + * connection has been established. + * + * When running as the server, the socket will be destroyed with an error after`handshakeTimeout` timeout. + * + * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the + * protocol. + * @since v0.11.8 + * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with + * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. + * @return `true` if renegotiation was initiated, `false` otherwise. + */ + renegotiate( + options: { + rejectUnauthorized?: boolean | undefined; + requestCert?: boolean | undefined; + }, + callback: (err: Error | null) => void + ): undefined | boolean; + /** + * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. + * Returns `true` if setting the limit succeeded; `false` otherwise. + * + * Smaller fragment sizes decrease the buffering latency on the client: larger + * fragments are buffered by the TLS layer until the entire fragment is received + * and its integrity is verified; large fragments can span multiple roundtrips + * and their processing can be delayed due to packet loss or reordering. However, + * smaller fragments add extra TLS framing bytes and CPU overhead, which may + * decrease overall server throughput. + * @since v0.11.11 + * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. */ setMaxSendFragment(size: number): boolean; - /** - * Disables TLS renegotiation for this TLSSocket instance. Once called, - * attempts to renegotiate will trigger an 'error' event on the - * TLSSocket. + * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts + * to renegotiate will trigger an `'error'` event on the `TLSSocket`. + * @since v8.4.0 */ disableRenegotiation(): void; - /** * When enabled, TLS packet trace information is written to `stderr`. This can be * used to debug TLS connection problems. * - * Note: The format of the output is identical to the output of `openssl s_client - * -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's - * `SSL_trace()` function, the format is undocumented, can change without notice, - * and should not be relied on. + * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by + * OpenSSL's `SSL_trace()` function, the format is undocumented, can change + * without notice, and should not be relied on. + * @since v12.2.0 */ enableTrace(): void; - /** + * Returns the peer certificate as an `X509Certificate` object. + * + * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getPeerX509Certificate(): X509Certificate | undefined; + /** + * Returns the local certificate as an `X509Certificate` object. + * + * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getX509Certificate(): X509Certificate | undefined; + /** + * Keying material is used for validations to prevent different kind of attacks in + * network protocols, for example in the specifications of IEEE 802.1X. + * + * Example + * + * ```js + * const keyingMaterial = tlsSocket.exportKeyingMaterial( + * 128, + * 'client finished'); + * + * /* + * Example return value of keyingMaterial: + * + * + * ``` + * + * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more + * information. + * @since v13.10.0, v12.17.0 * @param length number of bytes to retrieve from keying material - * @param label an application specific label, typically this will be a value from the - * [IANA Exporter Label Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). - * @param context optionally provide a context. + * @param label an application specific label, typically this will be a value from the [IANA Exporter Label + * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). + * @param context Optionally provide a context. + * @return requested bytes of the keying material */ exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer; - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - addListener(event: "secureConnect", listener: () => void): this; - addListener(event: "session", listener: (session: Buffer) => void): this; - addListener(event: "keylog", listener: (line: Buffer) => void): this; - + addListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + addListener(event: 'secureConnect', listener: () => void): this; + addListener(event: 'session', listener: (session: Buffer) => void): this; + addListener(event: 'keylog', listener: (line: Buffer) => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "OCSPResponse", response: Buffer): boolean; - emit(event: "secureConnect"): boolean; - emit(event: "session", session: Buffer): boolean; - emit(event: "keylog", line: Buffer): boolean; - + emit(event: 'OCSPResponse', response: Buffer): boolean; + emit(event: 'secureConnect'): boolean; + emit(event: 'session', session: Buffer): boolean; + emit(event: 'keylog', line: Buffer): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "OCSPResponse", listener: (response: Buffer) => void): this; - on(event: "secureConnect", listener: () => void): this; - on(event: "session", listener: (session: Buffer) => void): this; - on(event: "keylog", listener: (line: Buffer) => void): this; - + on(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + on(event: 'secureConnect', listener: () => void): this; + on(event: 'session', listener: (session: Buffer) => void): this; + on(event: 'keylog', listener: (line: Buffer) => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "OCSPResponse", listener: (response: Buffer) => void): this; - once(event: "secureConnect", listener: () => void): this; - once(event: "session", listener: (session: Buffer) => void): this; - once(event: "keylog", listener: (line: Buffer) => void): this; - + once(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + once(event: 'secureConnect', listener: () => void): this; + once(event: 'session', listener: (session: Buffer) => void): this; + once(event: 'keylog', listener: (line: Buffer) => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependListener(event: "secureConnect", listener: () => void): this; - prependListener(event: "session", listener: (session: Buffer) => void): this; - prependListener(event: "keylog", listener: (line: Buffer) => void): this; - + prependListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + prependListener(event: 'secureConnect', listener: () => void): this; + prependListener(event: 'session', listener: (session: Buffer) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer) => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependOnceListener(event: "secureConnect", listener: () => void): this; - prependOnceListener(event: "session", listener: (session: Buffer) => void): this; - prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this; + prependOnceListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + prependOnceListener(event: 'secureConnect', listener: () => void): this; + prependOnceListener(event: 'session', listener: (session: Buffer) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer) => void): this; } - interface CommonConnectionOptions { /** * An optional TLS context object from tls.createSecureContext() */ - secureContext?: SecureContext; - + secureContext?: SecureContext | undefined; /** * When enabled, TLS packet trace information is written to `stderr`. This can be * used to debug TLS connection problems. * @default false */ - enableTrace?: boolean; + enableTrace?: boolean | undefined; /** * If true the server will request a certificate from clients that * connect and attempt to verify that certificate. Defaults to * false. */ - requestCert?: boolean; + requestCert?: boolean | undefined; /** * An array of strings or a Buffer naming possible ALPN protocols. * (Protocols should be ordered by their priority.) */ - ALPNProtocols?: string[] | Uint8Array[] | Uint8Array; + ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined; /** * SNICallback(servername, cb) A function that will be * called if the client supports SNI TLS extension. Two arguments @@ -376,16 +454,15 @@ declare module 'tls' { * SecureContext.) If SNICallback wasn't provided the default callback * with high-level API will be used (see below). */ - SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void; + SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; /** * If true the server will reject any connection which is not * authorized with the list of supplied CAs. This option only has an * effect if requestCert is true. * @default true */ - rejectUnauthorized?: boolean; + rejectUnauthorized?: boolean | undefined; } - interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { /** * Abort the connection if the SSL/TLS handshake does not finish in the @@ -393,18 +470,17 @@ declare module 'tls' { * the tls.Server object whenever a handshake times out. Default: * 120000 (120 seconds). */ - handshakeTimeout?: number; + handshakeTimeout?: number | undefined; /** * The number of seconds after which a TLS session created by the * server will no longer be resumable. See Session Resumption for more * information. Default: 300. */ - sessionTimeout?: number; + sessionTimeout?: number | undefined; /** * 48-bytes of cryptographically strong pseudo-random data. */ - ticketKeys?: Buffer; - + ticketKeys?: Buffer | undefined; /** * * @param socket @@ -424,7 +500,6 @@ declare module 'tls' { * requires explicitly specifying a cipher suite with the `ciphers` option. * More information can be found in the RFC 4279. */ - pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null; /** * hint to send to a client to help @@ -432,25 +507,23 @@ declare module 'tls' { * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. */ - pskIdentityHint?: string; + pskIdentityHint?: string | undefined; } - interface PSKCallbackNegotation { psk: DataView | NodeJS.TypedArray; identity: string; } - interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { - host?: string; - port?: number; - path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. - socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket - checkServerIdentity?: typeof checkServerIdentity; - servername?: string; // SNI TLS Extension - session?: Buffer; - minDHSize?: number; - lookup?: net.LookupFunction; - timeout?: number; + host?: string | undefined; + port?: number | undefined; + path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity | undefined; + servername?: string | undefined; // SNI TLS Extension + session?: Buffer | undefined; + minDHSize?: number | undefined; + lookup?: net.LookupFunction | undefined; + timeout?: number | undefined; /** * When negotiating TLS-PSK (pre-shared keys), this function is called * with optional identity `hint` provided by the server or `null` @@ -470,35 +543,50 @@ declare module 'tls' { */ pskCallback?(hint: string | null): PSKCallbackNegotation | null; } - + /** + * Accepts encrypted connections using TLS or SSL. + * @since v0.3.2 + */ class Server extends net.Server { constructor(secureConnectionListener?: (socket: TLSSocket) => void); constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); - /** - * The server.addContext() method adds a secure context that will be - * used if the client request's SNI name matches the supplied hostname - * (or wildcard). + * The `server.addContext()` method adds a secure context that will be used if + * the client request's SNI name matches the supplied `hostname` (or wildcard). + * + * When there are multiple matching contexts, the most recently added one is + * used. + * @since v0.5.3 + * @param hostname A SNI host name or wildcard (e.g. `'*'`) + * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). */ - addContext(hostName: string, credentials: SecureContextOptions): void; + addContext(hostname: string, context: SecureContextOptions): void; /** * Returns the session ticket keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @return A 48-byte buffer containing the session ticket keys. */ getTicketKeys(): Buffer; /** - * - * The server.setSecureContext() method replaces the - * secure context of an existing server. Existing connections to the - * server are not interrupted. + * The `server.setSecureContext()` method replaces the secure context of an + * existing server. Existing connections to the server are not interrupted. + * @since v11.0.0 + * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). */ - setSecureContext(details: SecureContextOptions): void; + setSecureContext(options: SecureContextOptions): void; /** - * The server.setSecureContext() method replaces the secure context of - * an existing server. Existing connections to the server are not - * interrupted. + * Sets the session ticket keys. + * + * Changes to the ticket keys are effective only for future server connections. + * Existing or currently pending server connections will use the previous keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @param keys A 48-byte buffer containing the session ticket keys. */ setTicketKeys(keys: Buffer): void; - /** * events.EventEmitter * 1. tlsClientError @@ -509,68 +597,63 @@ declare module 'tls' { * 6. keylog */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - + addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + addListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; - emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean; - emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; - emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; - emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; - emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean; - + emit(event: 'tlsClientError', err: Error, tlsSocket: TLSSocket): boolean; + emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean; + emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; + emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void): boolean; + emit(event: 'secureConnection', tlsSocket: TLSSocket): boolean; + emit(event: 'keylog', line: Buffer, tlsSocket: TLSSocket): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - + on(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + on(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + on(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - + once(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + once(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + once(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - + prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + prependListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + prependOnceListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; } - + /** + * @deprecated since v0.11.3 Use `tls.TLSSocket` instead. + */ interface SecurePair { encrypted: TLSSocket; cleartext: TLSSocket; } - type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'; - interface SecureContextOptions { /** * Optionally override the trusted CA certificates. Default is to trust * the well-known CAs curated by Mozilla. Mozilla's CAs are completely * replaced when CAs are explicitly specified using this option. */ - ca?: string | Buffer | Array; + ca?: string | Buffer | Array | undefined; /** * Cert chains in PEM format. One cert chain should be provided per * private key. Each cert chain should consist of the PEM formatted @@ -582,29 +665,29 @@ declare module 'tls' { * intermediate certificates are not provided, the peer will not be * able to validate the certificate, and the handshake will fail. */ - cert?: string | Buffer | Array; + cert?: string | Buffer | Array | undefined; /** * Colon-separated list of supported signature algorithms. The list * can contain digest algorithms (SHA256, MD5 etc.), public key * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). */ - sigalgs?: string; + sigalgs?: string | undefined; /** * Cipher suite specification, replacing the default. For more * information, see modifying the default cipher suite. Permitted * ciphers can be obtained via tls.getCiphers(). Cipher names must be * uppercased in order for OpenSSL to accept them. */ - ciphers?: string; + ciphers?: string | undefined; /** * Name of an OpenSSL engine which can provide the client certificate. */ - clientCertEngine?: string; + clientCertEngine?: string | undefined; /** * PEM formatted CRLs (Certificate Revocation Lists). */ - crl?: string | Buffer | Array; + crl?: string | Buffer | Array | undefined; /** * Diffie Hellman parameters, required for Perfect Forward Secrecy. Use * openssl dhparam to create the parameters. The key length must be @@ -613,7 +696,7 @@ declare module 'tls' { * stronger security. If omitted or invalid, the parameters are * silently discarded and DHE ciphers will not be available. */ - dhparam?: string | Buffer; + dhparam?: string | Buffer | undefined; /** * A string describing a named curve or a colon separated list of curve * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key @@ -623,13 +706,13 @@ declare module 'tls' { * name and description of each available elliptic curve. Default: * tls.DEFAULT_ECDH_CURVE. */ - ecdhCurve?: string; + ecdhCurve?: string | undefined; /** * Attempt to use the server's cipher suite preferences instead of the * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be * set in secureOptions */ - honorCipherOrder?: boolean; + honorCipherOrder?: boolean | undefined; /** * Private keys in PEM format. PEM allows the option of private keys * being encrypted. Encrypted keys will be decrypted with @@ -640,18 +723,18 @@ declare module 'tls' { * object.passphrase is optional. Encrypted keys will be decrypted with * object.passphrase if provided, or options.passphrase if it is not. */ - key?: string | Buffer | Array; + key?: string | Buffer | Array | undefined; /** * Name of an OpenSSL engine to get private key from. Should be used * together with privateKeyIdentifier. */ - privateKeyEngine?: string; + privateKeyEngine?: string | undefined; /** * Identifier of a private key managed by an OpenSSL engine. Should be * used together with privateKeyEngine. Should not be set together with * key, because both options define a private key in different ways. */ - privateKeyIdentifier?: string; + privateKeyIdentifier?: string | undefined; /** * Optionally set the maximum TLS version to allow. One * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the @@ -660,7 +743,7 @@ declare module 'tls' { * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. */ - maxVersion?: SecureVersion; + maxVersion?: SecureVersion | undefined; /** * Optionally set the minimum TLS version to allow. One * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the @@ -671,11 +754,11 @@ declare module 'tls' { * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. */ - minVersion?: SecureVersion; + minVersion?: SecureVersion | undefined; /** * Shared passphrase used for a single private key and/or a PFX. */ - passphrase?: string; + passphrase?: string | undefined; /** * PFX or PKCS12 encoded private key and certificate chain. pfx is an * alternative to providing key and cert individually. PFX is usually @@ -686,13 +769,13 @@ declare module 'tls' { * object.passphrase is optional. Encrypted PFX will be decrypted with * object.passphrase if provided, or options.passphrase if it is not. */ - pfx?: string | Buffer | Array; + pfx?: string | Buffer | Array | undefined; /** * Optionally affect the OpenSSL protocol behavior, which is not * usually necessary. This should be used carefully if at all! Value is * a numeric bitmask of the SSL_OP_* options from OpenSSL Options */ - secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options + secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options /** * Legacy mechanism to select the TLS protocol version to use, it does * not support independent control of the minimum and maximum version, @@ -704,49 +787,209 @@ declare module 'tls' { * TLS versions less than 1.2, but it may be required for * interoperability. Default: none, see minVersion. */ - secureProtocol?: string; + secureProtocol?: string | undefined; /** * Opaque identifier used by servers to ensure session state is not * shared between applications. Unused by clients. */ - sessionIdContext?: string; + sessionIdContext?: string | undefined; /** * 48-bytes of cryptographically strong pseudo-random data. * See Session Resumption for more information. */ - ticketKeys?: Buffer; + ticketKeys?: Buffer | undefined; /** * The number of seconds after which a TLS session created by the * server will no longer be resumable. See Session Resumption for more * information. Default: 300. */ - sessionTimeout?: number; + sessionTimeout?: number | undefined; } - interface SecureContext { context: any; } - - /* - * Verifies the certificate `cert` is issued to host `host`. - * @host The hostname to verify the certificate against - * @cert PeerCertificate representing the peer's certificate + /** + * Verifies the certificate `cert` is issued to `hostname`. + * + * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on + * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). + * + * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as + * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. + * + * This function can be overwritten by providing an alternative function as the`options.checkServerIdentity` option that is passed to `tls.connect()`. The + * overwriting function can call `tls.checkServerIdentity()` of course, to augment + * the checks done with additional verification. + * + * This function is only called if the certificate passed all other checks, such as + * being issued by trusted CA (`options.ca`). + * + * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name + * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use + * a custom`options.checkServerIdentity` function that implements the desired behavior. + * @since v0.8.4 + * @param hostname The host name or IP address to verify the certificate against. + * @param cert A `certificate object` representing the peer's certificate. + */ + function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; + /** + * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is + * automatically set as a listener for the `'secureConnection'` event. + * + * The `ticketKeys` options is automatically shared between `cluster` module + * workers. + * + * The following illustrates a simple echo server: + * + * ```js + * const tls = require('tls'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), * - * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined. + * // This is necessary only if using client certificate authentication. + * requestCert: true, + * + * // This is necessary only if the client uses a self-signed certificate. + * ca: [ fs.readFileSync('client-cert.pem') ] + * }; + * + * const server = tls.createServer(options, (socket) => { + * console.log('server connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * socket.write('welcome!\n'); + * socket.setEncoding('utf8'); + * socket.pipe(socket); + * }); + * server.listen(8000, () => { + * console.log('server bound'); + * }); + * ``` + * + * The server can be tested by connecting to it using the example client from {@link connect}. + * @since v0.3.2 */ - function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + /** + * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. + * + * `tls.connect()` returns a {@link TLSSocket} object. + * + * Unlike the `https` API, `tls.connect()` does not enable the + * SNI (Server Name Indication) extension by default, which may cause some + * servers to return an incorrect certificate or reject the connection + * altogether. To enable SNI, set the `servername` option in addition + * to `host`. + * + * The following illustrates a client for the echo server example from {@link createServer}: + * + * ```js + * // Assumes an echo server that is listening on port 8000. + * const tls = require('tls'); + * const fs = require('fs'); + * + * const options = { + * // Necessary only if the server requires client certificate authentication. + * key: fs.readFileSync('client-key.pem'), + * cert: fs.readFileSync('client-cert.pem'), + * + * // Necessary only if the server uses a self-signed certificate. + * ca: [ fs.readFileSync('server-cert.pem') ], + * + * // Necessary only if the server's cert isn't for "localhost". + * checkServerIdentity: () => { return null; }, + * }; + * + * const socket = tls.connect(8000, options, () => { + * console.log('client connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * process.stdin.pipe(socket); + * process.stdin.resume(); + * }); + * socket.setEncoding('utf8'); + * socket.on('data', (data) => { + * console.log(data); + * }); + * socket.on('end', () => { + * console.log('server ends connection'); + * }); + * ``` + * @since v0.11.3 + */ function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; /** - * @deprecated since v0.11.3 Use `tls.TLSSocket` instead. + * Creates a new secure pair object with two streams, one of which reads and writes + * the encrypted data and the other of which reads and writes the cleartext data. + * Generally, the encrypted stream is piped to/from an incoming encrypted data + * stream and the cleartext one is used as a replacement for the initial encrypted + * stream. + * + * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and`encrypted` stream properties. + * + * Using `cleartext` has the same API as {@link TLSSocket}. + * + * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code: + * + * ```js + * pair = tls.createSecurePair(// ... ); + * pair.encrypted.pipe(socket); + * socket.pipe(pair.encrypted); + * ``` + * + * can be replaced by: + * + * ```js + * secureSocket = tls.TLSSocket(socket, options); + * ``` + * + * where `secureSocket` has the same API as `pair.cleartext`. + * @since v0.3.2 + * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead. + * @param context A secure context object as returned by `tls.createSecureContext()` + * @param isServer `true` to specify that this TLS connection should be opened as a server. + * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. + * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`. + */ + function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + /** + * {@link createServer} sets the default value of the `honorCipherOrder` option + * to `true`, other APIs that create secure contexts leave it unset. + * + * {@link createServer} uses a 128 bit truncated SHA1 hash value generated + * from `process.argv` as the default value of the `sessionIdContext` option, other + * APIs that create secure contexts have no default value. + * + * The `tls.createSecureContext()` method creates a `SecureContext` object. It is + * usable as an argument to several `tls` APIs, such as {@link createServer} and `server.addContext()`, but has no public methods. + * + * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it. + * + * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of + * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). + * @since v0.11.13 */ - function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; function createSecureContext(options?: SecureContextOptions): SecureContext; + /** + * Returns an array with the names of the supported TLS ciphers. The names are + * lower-case for historical reasons, but must be uppercased to be used in + * the `ciphers` option of {@link createSecureContext}. + * + * Not all supported ciphers are enabled by default. See `Modifying the default TLS cipher suite`. + * + * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for + * TLSv1.2 and below. + * + * ```js + * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] + * ``` + * @since v0.10.2 + */ function getCiphers(): string[]; - /** * The default curve name to use for ECDH key agreement in a tls server. * The default value is 'auto'. See tls.createSecureContext() for further @@ -773,7 +1016,6 @@ declare module 'tls' { * are provided, the lowest minimum is used. */ let DEFAULT_MIN_VERSION: SecureVersion; - /** * An immutable array of strings representing the root certificates (in PEM * format) used for verifying peer certificates. This is the default value @@ -781,3 +1023,6 @@ declare module 'tls' { */ const rootCertificates: ReadonlyArray; } +declare module 'node:tls' { + export * from 'tls'; +} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts index 812b2b5..d47aa93 100644 --- a/node_modules/@types/node/trace_events.d.ts +++ b/node_modules/@types/node/trace_events.d.ts @@ -1,7 +1,90 @@ -declare module 'node:trace_events' { - export * from 'trace_events'; -} - +/** + * The `trace_events` module provides a mechanism to centralize tracing information + * generated by V8, Node.js core, and userspace code. + * + * Tracing can be enabled with the `--trace-event-categories` command-line flag + * or by using the `trace_events` module. The `--trace-event-categories` flag + * accepts a list of comma-separated category names. + * + * The available categories are: + * + * * `node`: An empty placeholder. + * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data. + * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. + * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. + * * `node.console`: Enables capture of `console.time()` and `console.count()`output. + * * `node.dns.native`: Enables capture of trace data for DNS queries. + * * `node.environment`: Enables capture of Node.js Environment milestones. + * * `node.fs.sync`: Enables capture of trace data for file system sync methods. + * * `node.perf`: Enables capture of `Performance API` measurements. + * * `node.perf.usertiming`: Enables capture of only Performance API User Timing + * measures and marks. + * * `node.perf.timerify`: Enables capture of only Performance API timerify + * measurements. + * * `node.promises.rejections`: Enables capture of trace data tracking the number + * of unhandled Promise rejections and handled-after-rejections. + * * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. + * * `v8`: The `V8` events are GC, compiling, and execution related. + * + * By default the `node`, `node.async_hooks`, and `v8` categories are enabled. + * + * ```bash + * node --trace-event-categories v8,node,node.async_hooks server.js + * ``` + * + * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be + * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default. + * + * ```bash + * node --trace-events-enabled + * + * # is equivalent to + * + * node --trace-event-categories v8,node,node.async_hooks + * ``` + * + * Alternatively, trace events may be enabled using the `trace_events` module: + * + * ```js + * const trace_events = require('trace_events'); + * const tracing = trace_events.createTracing({ categories: ['node.perf'] }); + * tracing.enable(); // Enable trace event capture for the 'node.perf' category + * + * // do work + * + * tracing.disable(); // Disable trace event capture for the 'node.perf' category + * ``` + * + * Running Node.js with tracing enabled will produce log files that can be opened + * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. + * + * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can + * be specified with `--trace-event-file-pattern` that accepts a template + * string that supports `${rotation}` and `${pid}`: + * + * ```bash + * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js + * ``` + * + * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers + * in your code, such as: + * + * ```js + * process.on('SIGINT', function onSigint() { + * console.info('Received SIGINT.'); + * process.exit(130); // Or applicable exit code depending on OS and signal + * }); + * ``` + * + * The tracing system uses the same time source + * as the one used by `process.hrtime()`. + * However the trace-event timestamps are expressed in microseconds, + * unlike `process.hrtime()` which returns nanoseconds. + * + * The features from this module are not available in `Worker` threads. + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/trace_events.js) + */ declare module 'trace_events' { /** * The `Tracing` object is used to enable or disable tracing for sets of @@ -19,7 +102,6 @@ declare module 'trace_events' { * `Tracing` object. */ readonly categories: string; - /** * Disables this `Tracing` object. * @@ -28,19 +110,16 @@ declare module 'trace_events' { * will be disabled. */ disable(): void; - /** * Enables this `Tracing` object for the set of categories covered by * the `Tracing` object. */ enable(): void; - /** * `true` only if the `Tracing` object has been enabled. */ readonly enabled: boolean; } - interface CreateTracingOptions { /** * An array of trace category names. Values included in the array are @@ -49,17 +128,44 @@ declare module 'trace_events' { */ categories: string[]; } - /** - * Creates and returns a Tracing object for the given set of categories. + * Creates and returns a `Tracing` object for the given set of `categories`. + * + * ```js + * const trace_events = require('trace_events'); + * const categories = ['node.perf', 'node.async_hooks']; + * const tracing = trace_events.createTracing({ categories }); + * tracing.enable(); + * // do stuff + * tracing.disable(); + * ``` + * @since v10.0.0 + * @return . */ function createTracing(options: CreateTracingOptions): Tracing; - /** * Returns a comma-separated list of all currently-enabled trace event - * categories. The current set of enabled trace event categories is - * determined by the union of all currently-enabled `Tracing` objects and - * any categories enabled using the `--trace-event-categories` flag. + * categories. The current set of enabled trace event categories is determined + * by the _union_ of all currently-enabled `Tracing` objects and any categories + * enabled using the `--trace-event-categories` flag. + * + * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console. + * + * ```js + * const trace_events = require('trace_events'); + * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); + * const t3 = trace_events.createTracing({ categories: ['v8'] }); + * + * t1.enable(); + * t2.enable(); + * + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 */ function getEnabledCategories(): string | undefined; } +declare module 'node:trace_events' { + export * from 'trace_events'; +} diff --git a/node_modules/@types/node/ts3.4/assert.d.ts b/node_modules/@types/node/ts3.4/assert.d.ts deleted file mode 100644 index 6f3a33e..0000000 --- a/node_modules/@types/node/ts3.4/assert.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare module 'node:assert' { - import assert = require('assert'); - export = assert; -} - -declare module 'assert' { - /** An alias of `assert.ok()`. */ - function assert(value: any, message?: string | Error): void; - namespace assert { - class AssertionError extends Error { - actual: any; - expected: any; - operator: string; - generatedMessage: boolean; - code: 'ERR_ASSERTION'; - - constructor(options?: { - /** If provided, the error message is set to this value. */ - message?: string; - /** The `actual` property on the error instance. */ - actual?: any; - /** The `expected` property on the error instance. */ - expected?: any; - /** The `operator` property on the error instance. */ - operator?: string; - /** If provided, the generated stack trace omits frames before this function. */ - // tslint:disable-next-line:ban-types - stackStartFn?: Function; - }); - } - - class CallTracker { - calls(exact?: number): () => void; - calls any>(fn?: Func, exact?: number): Func; - report(): CallTrackerReportInformation[]; - verify(): void; - } - interface CallTrackerReportInformation { - message: string; - /** The actual number of times the function was called. */ - actual: number; - /** The number of times the function was expected to be called. */ - expected: number; - /** The name of the function that is wrapped. */ - operator: string; - /** A stack trace of the function. */ - stack: object; - } - - type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error; - - function fail(message?: string | Error): never; - /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ - function fail( - actual: any, - expected: any, - message?: string | Error, - operator?: string, - // tslint:disable-next-line:ban-types - stackStartFn?: Function, - ): never; - function ok(value: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use strictEqual() instead. */ - function equal(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use notStrictEqual() instead. */ - function notEqual(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */ - function deepEqual(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */ - function notDeepEqual(actual: any, expected: any, message?: string | Error): void; - function strictEqual(actual: any, expected: any, message?: string | Error): void; - function notStrictEqual(actual: any, expected: any, message?: string | Error): void; - function deepStrictEqual(actual: any, expected: any, message?: string | Error): void; - function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; - - function throws(block: () => any, message?: string | Error): void; - function throws(block: () => any, error: AssertPredicate, message?: string | Error): void; - function doesNotThrow(block: () => any, message?: string | Error): void; - function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void; - - function ifError(value: any): void; - - function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; - function rejects( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; - function doesNotReject( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - - function match(value: string, regExp: RegExp, message?: string | Error): void; - function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; - - const strict: typeof assert; - } - - export = assert; -} diff --git a/node_modules/@types/node/ts3.4/base.d.ts b/node_modules/@types/node/ts3.4/base.d.ts deleted file mode 100644 index 2ea04f5..0000000 --- a/node_modules/@types/node/ts3.4/base.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -// NOTE: These definitions support NodeJS and TypeScript 3.2 - 3.4. - -// NOTE: TypeScript version-specific augmentations can be found in the following paths: -// - ~/base.d.ts - Shared definitions common to all TypeScript versions -// - ~/index.d.ts - Definitions specific to TypeScript 2.1 -// - ~/ts3.2/base.d.ts - Definitions specific to TypeScript 3.2 -// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 with global and assert pulled in - -// Reference required types from the default lib: -/// -/// -/// -/// - -// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: - -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/ts3.4/globals.global.d.ts b/node_modules/@types/node/ts3.4/globals.global.d.ts deleted file mode 100644 index 8e85466..0000000 --- a/node_modules/@types/node/ts3.4/globals.global.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare var global: NodeJS.Global; diff --git a/node_modules/@types/node/ts3.4/index.d.ts b/node_modules/@types/node/ts3.4/index.d.ts deleted file mode 100644 index 506b32a..0000000 --- a/node_modules/@types/node/ts3.4/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// NOTE: These definitions support NodeJS and TypeScript 3.2 - 3.4. -// This is required to enable globalThis support for global in ts3.5 without causing errors -// This is required to enable typing assert in ts3.7 without causing errors -// Typically type modifiations should be made in base.d.ts instead of here - -/// -/// -/// diff --git a/node_modules/@types/node/ts3.6/base.d.ts b/node_modules/@types/node/ts3.6/base.d.ts deleted file mode 100644 index 05afa40..0000000 --- a/node_modules/@types/node/ts3.6/base.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -// NOTE: These definitions support NodeJS and TypeScript 3.5. - -// NOTE: TypeScript version-specific augmentations can be found in the following paths: -// - ~/base.d.ts - Shared definitions common to all TypeScript versions -// - ~/index.d.ts - Definitions specific to TypeScript 2.1 -// - ~/ts3.5/base.d.ts - Definitions specific to TypeScript 3.5 -// - ~/ts3.5/index.d.ts - Definitions specific to TypeScript 3.5 with assert pulled in - -// Reference required types from the default lib: -/// -/// -/// -/// - -// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: -/// - -// TypeScript 3.5-specific augmentations: -/// - -// TypeScript 3.5-specific augmentations: -/// diff --git a/node_modules/@types/node/ts3.6/index.d.ts b/node_modules/@types/node/ts3.6/index.d.ts deleted file mode 100644 index 7e6b98c..0000000 --- a/node_modules/@types/node/ts3.6/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// NOTE: These definitions support NodeJS and TypeScript 3.5 - 3.6. -// This is required to enable typing assert in ts3.7 without causing errors -// Typically type modifications should be made in base.d.ts instead of here - -/// - -/// diff --git a/node_modules/@types/node/ts4.8/assert.d.ts b/node_modules/@types/node/ts4.8/assert.d.ts new file mode 100644 index 0000000..e8595e6 --- /dev/null +++ b/node_modules/@types/node/ts4.8/assert.d.ts @@ -0,0 +1,961 @@ +/** + * The `assert` module provides a set of assertion functions for verifying + * invariants. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js) + */ +declare module 'assert' { + /** + * An alias of {@link ok}. + * @since v0.5.9 + * @param value The input that is checked for being truthy. + */ + function assert(value: unknown, message?: string | Error): asserts value; + namespace assert { + /** + * Indicates the failure of an assertion. All errors thrown by the `assert` module + * will be instances of the `AssertionError` class. + */ + class AssertionError extends Error { + actual: unknown; + expected: unknown; + operator: string; + generatedMessage: boolean; + code: 'ERR_ASSERTION'; + constructor(options?: { + /** If provided, the error message is set to this value. */ + message?: string | undefined; + /** The `actual` property on the error instance. */ + actual?: unknown | undefined; + /** The `expected` property on the error instance. */ + expected?: unknown | undefined; + /** The `operator` property on the error instance. */ + operator?: string | undefined; + /** If provided, the generated stack trace omits frames before this function. */ + // tslint:disable-next-line:ban-types + stackStartFn?: Function | undefined; + }); + } + /** + * This feature is currently experimental and behavior might still change. + * @since v14.2.0, v12.19.0 + * @experimental + */ + class CallTracker { + /** + * The wrapper function is expected to be called exactly `exact` times. If the + * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an + * error. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func); + * ``` + * @since v14.2.0, v12.19.0 + * @param [fn='A no-op function'] + * @param [exact=1] + * @return that wraps `fn`. + */ + calls(exact?: number): () => void; + calls any>(fn?: Func, exact?: number): Func; + /** + * Example: + * + * ```js + * import assert from 'node:assert'; + * + * const tracker = new assert.CallTracker(); + * + * function func() {} + * const callsfunc = tracker.calls(func); + * callsfunc(1, 2, 3); + * + * assert.deepStrictEqual(tracker.getCalls(callsfunc), + * [{ thisArg: this, arguments: [1, 2, 3 ] }]); + * ``` + * + * @since v18.8.0, v16.18.0 + * @params fn + * @returns An Array with the calls to a tracked function. + */ + getCalls(fn: Function): CallTrackerCall[]; + /** + * The arrays contains information about the expected and actual number of calls of + * the functions that have not been called the expected number of times. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * function foo() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func, 2); + * + * // Returns an array containing information on callsfunc() + * tracker.report(); + * // [ + * // { + * // message: 'Expected the func function to be executed 2 time(s) but was + * // executed 0 time(s).', + * // actual: 0, + * // expected: 2, + * // operator: 'func', + * // stack: stack trace + * // } + * // ] + * ``` + * @since v14.2.0, v12.19.0 + * @return of objects containing information about the wrapper functions returned by `calls`. + */ + report(): CallTrackerReportInformation[]; + /** + * Reset calls of the call tracker. + * If a tracked function is passed as an argument, the calls will be reset for it. + * If no arguments are passed, all tracked functions will be reset. + * + * ```js + * import assert from 'node:assert'; + * + * const tracker = new assert.CallTracker(); + * + * function func() {} + * const callsfunc = tracker.calls(func); + * + * callsfunc(); + * // Tracker was called once + * tracker.getCalls(callsfunc).length === 1; + * + * tracker.reset(callsfunc); + * tracker.getCalls(callsfunc).length === 0; + * ``` + * + * @since v18.8.0, v16.18.0 + * @param fn a tracked function to reset. + */ + reset(fn?: Function): void; + /** + * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that + * have not been called the expected number of times. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func, 2); + * + * callsfunc(); + * + * // Will throw an error since callsfunc() was only called once. + * tracker.verify(); + * ``` + * @since v14.2.0, v12.19.0 + */ + verify(): void; + } + interface CallTrackerCall { + thisArg: object; + arguments: unknown[]; + } + interface CallTrackerReportInformation { + message: string; + /** The actual number of times the function was called. */ + actual: number; + /** The number of times the function was expected to be called. */ + expected: number; + /** The name of the function that is wrapped. */ + operator: string; + /** A stack trace of the function. */ + stack: object; + } + type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error; + /** + * Throws an `AssertionError` with the provided error message or a default + * error message. If the `message` parameter is an instance of an `Error` then + * it will be thrown instead of the `AssertionError`. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.fail(); + * // AssertionError [ERR_ASSERTION]: Failed + * + * assert.fail('boom'); + * // AssertionError [ERR_ASSERTION]: boom + * + * assert.fail(new TypeError('need array')); + * // TypeError: need array + * ``` + * + * Using `assert.fail()` with more than two arguments is possible but deprecated. + * See below for further details. + * @since v0.1.21 + * @param [message='Failed'] + */ + function fail(message?: string | Error): never; + /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ + function fail( + actual: unknown, + expected: unknown, + message?: string | Error, + operator?: string, + // tslint:disable-next-line:ban-types + stackStartFn?: Function + ): never; + /** + * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`. + * + * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default + * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. + * + * Be aware that in the `repl` the error message will be different to the one + * thrown in a file! See below for further details. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.ok(true); + * // OK + * assert.ok(1); + * // OK + * + * assert.ok(); + * // AssertionError: No value argument passed to `assert.ok()` + * + * assert.ok(false, 'it\'s false'); + * // AssertionError: it's false + * + * // In the repl: + * assert.ok(typeof 123 === 'string'); + * // AssertionError: false == true + * + * // In a file (e.g. test.js): + * assert.ok(typeof 123 === 'string'); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(typeof 123 === 'string') + * + * assert.ok(false); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(false) + * + * assert.ok(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(0) + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * // Using `assert()` works the same: + * assert(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert(0) + * ``` + * @since v0.1.21 + */ + function ok(value: unknown, message?: string | Error): asserts value; + /** + * **Strict assertion mode** + * + * An alias of {@link strictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link strictEqual} instead. + * + * Tests shallow, coercive equality between the `actual` and `expected` parameters + * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled + * and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'assert'; + * + * assert.equal(1, 1); + * // OK, 1 == 1 + * assert.equal(1, '1'); + * // OK, 1 == '1' + * assert.equal(NaN, NaN); + * // OK + * + * assert.equal(1, 2); + * // AssertionError: 1 == 2 + * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); + * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } + * ``` + * + * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default + * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * @since v0.1.21 + */ + function equal(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. + * + * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is + * specially handled and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'assert'; + * + * assert.notEqual(1, 2); + * // OK + * + * assert.notEqual(1, 1); + * // AssertionError: 1 != 1 + * + * assert.notEqual(1, '1'); + * // AssertionError: 1 != '1' + * ``` + * + * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error + * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * @since v0.1.21 + */ + function notEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link deepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. + * + * Tests for deep equality between the `actual` and `expected` parameters. Consider + * using {@link deepStrictEqual} instead. {@link deepEqual} can have + * surprising results. + * + * _Deep equality_ means that the enumerable "own" properties of child objects + * are also recursively evaluated by the following rules. + * @since v0.1.21 + */ + function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notDeepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. + * + * Tests for any deep inequality. Opposite of {@link deepEqual}. + * + * ```js + * import assert from 'assert'; + * + * const obj1 = { + * a: { + * b: 1 + * } + * }; + * const obj2 = { + * a: { + * b: 2 + * } + * }; + * const obj3 = { + * a: { + * b: 1 + * } + * }; + * const obj4 = Object.create(obj1); + * + * assert.notDeepEqual(obj1, obj1); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj2); + * // OK + * + * assert.notDeepEqual(obj1, obj3); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj4); + * // OK + * ``` + * + * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default + * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Tests strict equality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'assert/strict'; + * + * assert.strictEqual(1, 2); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + * // 1 !== 2 + * + * assert.strictEqual(1, 1); + * // OK + * + * assert.strictEqual('Hello foobar', 'Hello World!'); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + actual - expected + * // + * // + 'Hello foobar' + * // - 'Hello World!' + * // ^ + * + * const apples = 1; + * const oranges = 2; + * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); + * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + * + * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); + * // TypeError: Inputs are not identical + * ``` + * + * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a + * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; + /** + * Tests strict inequality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'assert/strict'; + * + * assert.notStrictEqual(1, 2); + * // OK + * + * assert.notStrictEqual(1, 1); + * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: + * // + * // 1 + * + * assert.notStrictEqual(1, '1'); + * // OK + * ``` + * + * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a + * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Tests for deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. + * @since v1.2.0 + */ + function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; + /** + * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); + * // OK + * ``` + * + * If the values are deeply and strictly equal, an `AssertionError` is thrown + * with a `message` property set equal to the value of the `message` parameter. If + * the `message` parameter is undefined, a default error message is assigned. If + * the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v1.2.0 + */ + function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Expects the function `fn` to throw an error. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * a validation object where each property will be tested for strict deep equality, + * or an instance of error where each property will be tested for strict deep + * equality including the non-enumerable `message` and `name` properties. When + * using an object, it is also possible to use a regular expression, when + * validating against a string property. See below for examples. + * + * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation + * fails. + * + * Custom validation object/error instance: + * + * ```js + * import assert from 'assert/strict'; + * + * const err = new TypeError('Wrong value'); + * err.code = 404; + * err.foo = 'bar'; + * err.info = { + * nested: true, + * baz: 'text' + * }; + * err.reg = /abc/i; + * + * assert.throws( + * () => { + * throw err; + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * info: { + * nested: true, + * baz: 'text' + * } + * // Only properties on the validation object will be tested for. + * // Using nested objects requires all properties to be present. Otherwise + * // the validation is going to fail. + * } + * ); + * + * // Using regular expressions to validate error properties: + * throws( + * () => { + * throw err; + * }, + * { + * // The `name` and `message` properties are strings and using regular + * // expressions on those will match against the string. If they fail, an + * // error is thrown. + * name: /^TypeError$/, + * message: /Wrong/, + * foo: 'bar', + * info: { + * nested: true, + * // It is not possible to use regular expressions for nested properties! + * baz: 'text' + * }, + * // The `reg` property contains a regular expression and only if the + * // validation object contains an identical regular expression, it is going + * // to pass. + * reg: /abc/i + * } + * ); + * + * // Fails due to the different `message` and `name` properties: + * throws( + * () => { + * const otherErr = new Error('Not found'); + * // Copy all enumerable properties from `err` to `otherErr`. + * for (const [key, value] of Object.entries(err)) { + * otherErr[key] = value; + * } + * throw otherErr; + * }, + * // The error's `message` and `name` properties will also be checked when using + * // an error as validation object. + * err + * ); + * ``` + * + * Validate instanceof using constructor: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * Error + * ); + * ``` + * + * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): + * + * Using a regular expression runs `.toString` on the error object, and will + * therefore also include the error name. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * /^Error: Wrong value$/ + * ); + * ``` + * + * Custom error validation: + * + * The function must return `true` to indicate all internal validations passed. + * It will otherwise fail with an `AssertionError`. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * (err) => { + * assert(err instanceof Error); + * assert(/value/.test(err)); + * // Avoid returning anything from validation functions besides `true`. + * // Otherwise, it's not clear what part of the validation failed. Instead, + * // throw an error about the specific validation that failed (as done in this + * // example) and add as much helpful debugging information to that error as + * // possible. + * return true; + * }, + * 'unexpected error' + * ); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same + * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using + * a string as the second argument gets considered: + * + * ```js + * import assert from 'assert/strict'; + * + * function throwingFirst() { + * throw new Error('First'); + * } + * + * function throwingSecond() { + * throw new Error('Second'); + * } + * + * function notThrowing() {} + * + * // The second argument is a string and the input function threw an Error. + * // The first case will not throw as it does not match for the error message + * // thrown by the input function! + * assert.throws(throwingFirst, 'Second'); + * // In the next example the message has no benefit over the message from the + * // error and since it is not clear if the user intended to actually match + * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. + * assert.throws(throwingSecond, 'Second'); + * // TypeError [ERR_AMBIGUOUS_ARGUMENT] + * + * // The string is only used (as message) in case the function does not throw: + * assert.throws(notThrowing, 'Second'); + * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second + * + * // If it was intended to match for the error message do this instead: + * // It does not throw because the error messages match. + * assert.throws(throwingSecond, /Second$/); + * + * // If the error message does not match, an AssertionError is thrown. + * assert.throws(throwingFirst, /Second$/); + * // AssertionError [ERR_ASSERTION] + * ``` + * + * Due to the confusing error-prone notation, avoid a string as the second + * argument. + * @since v0.1.21 + */ + function throws(block: () => unknown, message?: string | Error): void; + function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Asserts that the function `fn` does not throw an error. + * + * Using `assert.doesNotThrow()` is actually not useful because there + * is no benefit in catching an error and then rethrowing it. Instead, consider + * adding a comment next to the specific code path that should not throw and keep + * error messages as expressive as possible. + * + * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function. + * + * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a + * different type, or if the `error` parameter is undefined, the error is + * propagated back to the caller. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation + * function. See {@link throws} for more details. + * + * The following, for instance, will throw the `TypeError` because there is no + * matching error type in the assertion: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError + * ); + * ``` + * + * However, the following will result in an `AssertionError` with the message + * 'Got unwanted exception...': + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * TypeError + * ); + * ``` + * + * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * /Wrong value/, + * 'Whoops' + * ); + * // Throws: AssertionError: Got unwanted exception: Whoops + * ``` + * @since v0.1.21 + */ + function doesNotThrow(block: () => unknown, message?: string | Error): void; + function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Throws `value` if `value` is not `undefined` or `null`. This is useful when + * testing the `error` argument in callbacks. The stack trace contains all frames + * from the error passed to `ifError()` including the potential new frames for`ifError()` itself. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.ifError(null); + * // OK + * assert.ifError(0); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 + * assert.ifError('error'); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' + * assert.ifError(new Error()); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error + * + * // Create some random error frames. + * let err; + * (function errorFrame() { + * err = new Error('test error'); + * })(); + * + * (function ifErrorFrame() { + * assert.ifError(err); + * })(); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + * // at ifErrorFrame + * // at errorFrame + * ``` + * @since v0.1.97 + */ + function ifError(value: unknown): asserts value is null | undefined; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is rejected. + * + * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the + * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error + * handler is skipped. + * + * Besides the async nature to await the completion behaves identically to {@link throws}. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * an object where each property will be tested for, or an instance of error where + * each property will be tested for including the non-enumerable `message` and`name` properties. + * + * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject. + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * { + * name: 'TypeError', + * message: 'Wrong value' + * } + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * (err) => { + * assert.strictEqual(err.name, 'TypeError'); + * assert.strictEqual(err.message, 'Wrong value'); + * return true; + * } + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * assert.rejects( + * Promise.reject(new Error('Wrong value')), + * Error + * ).then(() => { + * // ... + * }); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the + * example in {@link throws} carefully if using a string as the second + * argument gets considered. + * @since v10.0.0 + */ + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is not rejected. + * + * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If + * the function does not return a promise, `assert.doesNotReject()` will return a + * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases + * the error handler is skipped. + * + * Using `assert.doesNotReject()` is actually not useful because there is little + * benefit in catching a rejection and then rejecting it again. Instead, consider + * adding a comment next to the specific code path that should not reject and keep + * error messages as expressive as possible. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation + * function. See {@link throws} for more details. + * + * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.doesNotReject( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) + * .then(() => { + * // ... + * }); + * ``` + * @since v10.0.0 + */ + function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise; + /** + * Expects the `string` input to match the regular expression. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.match('I will fail', /pass/); + * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... + * + * assert.match(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.match('I will pass', /pass/); + * // OK + * ``` + * + * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v13.6.0, v12.16.0 + */ + function match(value: string, regExp: RegExp, message?: string | Error): void; + /** + * Expects the `string` input not to match the regular expression. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotMatch('I will fail', /fail/); + * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... + * + * assert.doesNotMatch(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.doesNotMatch('I will pass', /different/); + * // OK + * ``` + * + * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v13.6.0, v12.16.0 + */ + function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; + const strict: Omit & { + (value: unknown, message?: string | Error): asserts value; + equal: typeof strictEqual; + notEqual: typeof notStrictEqual; + deepEqual: typeof deepStrictEqual; + notDeepEqual: typeof notDeepStrictEqual; + // Mapped types and assertion functions are incompatible? + // TS2775: Assertions require every name in the call target + // to be declared with an explicit type annotation. + ok: typeof ok; + strictEqual: typeof strictEqual; + deepStrictEqual: typeof deepStrictEqual; + ifError: typeof ifError; + strict: typeof strict; + }; + } + export = assert; +} +declare module 'node:assert' { + import assert = require('assert'); + export = assert; +} diff --git a/node_modules/@types/node/ts4.8/assert/strict.d.ts b/node_modules/@types/node/ts4.8/assert/strict.d.ts new file mode 100644 index 0000000..b4319b9 --- /dev/null +++ b/node_modules/@types/node/ts4.8/assert/strict.d.ts @@ -0,0 +1,8 @@ +declare module 'assert/strict' { + import { strict } from 'node:assert'; + export = strict; +} +declare module 'node:assert/strict' { + import { strict } from 'node:assert'; + export = strict; +} diff --git a/node_modules/@types/node/ts4.8/async_hooks.d.ts b/node_modules/@types/node/ts4.8/async_hooks.d.ts new file mode 100644 index 0000000..0bf4739 --- /dev/null +++ b/node_modules/@types/node/ts4.8/async_hooks.d.ts @@ -0,0 +1,501 @@ +/** + * The `async_hooks` module provides an API to track asynchronous resources. It + * can be accessed using: + * + * ```js + * import async_hooks from 'async_hooks'; + * ``` + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js) + */ +declare module 'async_hooks' { + /** + * ```js + * import { executionAsyncId } from 'async_hooks'; + * + * console.log(executionAsyncId()); // 1 - bootstrap + * fs.open(path, 'r', (err, fd) => { + * console.log(executionAsyncId()); // 6 - open() + * }); + * ``` + * + * The ID returned from `executionAsyncId()` is related to execution timing, not + * causality (which is covered by `triggerAsyncId()`): + * + * ```js + * const server = net.createServer((conn) => { + * // Returns the ID of the server, not of the new connection, because the + * // callback runs in the execution scope of the server's MakeCallback(). + * async_hooks.executionAsyncId(); + * + * }).listen(port, () => { + * // Returns the ID of a TickObject (process.nextTick()) because all + * // callbacks passed to .listen() are wrapped in a nextTick(). + * async_hooks.executionAsyncId(); + * }); + * ``` + * + * Promise contexts may not get precise `executionAsyncIds` by default. + * See the section on `promise execution tracking`. + * @since v8.1.0 + * @return The `asyncId` of the current execution context. Useful to track when something calls. + */ + function executionAsyncId(): number; + /** + * Resource objects returned by `executionAsyncResource()` are most often internal + * Node.js handle objects with undocumented APIs. Using any functions or properties + * on the object is likely to crash your application and should be avoided. + * + * Using `executionAsyncResource()` in the top-level execution context will + * return an empty object as there is no handle or request object to use, + * but having an object representing the top-level can be helpful. + * + * ```js + * import { open } from 'fs'; + * import { executionAsyncId, executionAsyncResource } from 'async_hooks'; + * + * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} + * open(new URL(import.meta.url), 'r', (err, fd) => { + * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap + * }); + * ``` + * + * This can be used to implement continuation local storage without the + * use of a tracking `Map` to store the metadata: + * + * ```js + * import { createServer } from 'http'; + * import { + * executionAsyncId, + * executionAsyncResource, + * createHook + * } from 'async_hooks'; + * const sym = Symbol('state'); // Private symbol to avoid pollution + * + * createHook({ + * init(asyncId, type, triggerAsyncId, resource) { + * const cr = executionAsyncResource(); + * if (cr) { + * resource[sym] = cr[sym]; + * } + * } + * }).enable(); + * + * const server = createServer((req, res) => { + * executionAsyncResource()[sym] = { state: req.url }; + * setTimeout(function() { + * res.end(JSON.stringify(executionAsyncResource()[sym])); + * }, 100); + * }).listen(3000); + * ``` + * @since v13.9.0, v12.17.0 + * @return The resource representing the current execution. Useful to store data within the resource. + */ + function executionAsyncResource(): object; + /** + * ```js + * const server = net.createServer((conn) => { + * // The resource that caused (or triggered) this callback to be called + * // was that of the new connection. Thus the return value of triggerAsyncId() + * // is the asyncId of "conn". + * async_hooks.triggerAsyncId(); + * + * }).listen(port, () => { + * // Even though all callbacks passed to .listen() are wrapped in a nextTick() + * // the callback itself exists because the call to the server's .listen() + * // was made. So the return value would be the ID of the server. + * async_hooks.triggerAsyncId(); + * }); + * ``` + * + * Promise contexts may not get valid `triggerAsyncId`s by default. See + * the section on `promise execution tracking`. + * @return The ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + interface HookCallbacks { + /** + * Called when a class is constructed that has the possibility to emit an asynchronous event. + * @param asyncId a unique ID for the async resource + * @param type the type of the async resource + * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created + * @param resource reference to the resource representing the async operation, needs to be released during destroy + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; + /** + * When an asynchronous operation is initiated or completes a callback is called to notify the user. + * The before callback is called just before said callback is executed. + * @param asyncId the unique identifier assigned to the resource about to execute the callback. + */ + before?(asyncId: number): void; + /** + * Called immediately after the callback specified in before is completed. + * @param asyncId the unique identifier assigned to the resource which has executed the callback. + */ + after?(asyncId: number): void; + /** + * Called when a promise has resolve() called. This may not be in the same execution id + * as the promise itself. + * @param asyncId the unique id for the promise that was resolve()d. + */ + promiseResolve?(asyncId: number): void; + /** + * Called after the resource corresponding to asyncId is destroyed + * @param asyncId a unique ID for the async resource + */ + destroy?(asyncId: number): void; + } + interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + /** + * Registers functions to be called for different lifetime events of each async + * operation. + * + * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the + * respective asynchronous event during a resource's lifetime. + * + * All callbacks are optional. For example, if only resource cleanup needs to + * be tracked, then only the `destroy` callback needs to be passed. The + * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section. + * + * ```js + * import { createHook } from 'async_hooks'; + * + * const asyncHook = createHook({ + * init(asyncId, type, triggerAsyncId, resource) { }, + * destroy(asyncId) { } + * }); + * ``` + * + * The callbacks will be inherited via the prototype chain: + * + * ```js + * class MyAsyncCallbacks { + * init(asyncId, type, triggerAsyncId, resource) { } + * destroy(asyncId) {} + * } + * + * class MyAddedCallbacks extends MyAsyncCallbacks { + * before(asyncId) { } + * after(asyncId) { } + * } + * + * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); + * ``` + * + * Because promises are asynchronous resources whose lifecycle is tracked + * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises. + * @since v8.1.0 + * @param callbacks The `Hook Callbacks` to register + * @return Instance used for disabling and enabling hooks + */ + function createHook(callbacks: HookCallbacks): AsyncHook; + interface AsyncResourceOptions { + /** + * The ID of the execution context that created this async event. + * @default executionAsyncId() + */ + triggerAsyncId?: number | undefined; + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * @default false + */ + requireManualDestroy?: boolean | undefined; + } + /** + * The class `AsyncResource` is designed to be extended by the embedder's async + * resources. Using this, users can easily trigger the lifetime events of their + * own resources. + * + * The `init` hook will trigger when an `AsyncResource` is instantiated. + * + * The following is an overview of the `AsyncResource` API. + * + * ```js + * import { AsyncResource, executionAsyncId } from 'async_hooks'; + * + * // AsyncResource() is meant to be extended. Instantiating a + * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * // async_hook.executionAsyncId() is used. + * const asyncResource = new AsyncResource( + * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false } + * ); + * + * // Run a function in the execution context of the resource. This will + * // * establish the context of the resource + * // * trigger the AsyncHooks before callbacks + * // * call the provided function `fn` with the supplied arguments + * // * trigger the AsyncHooks after callbacks + * // * restore the original execution context + * asyncResource.runInAsyncScope(fn, thisArg, ...args); + * + * // Call AsyncHooks destroy callbacks. + * asyncResource.emitDestroy(); + * + * // Return the unique ID assigned to the AsyncResource instance. + * asyncResource.asyncId(); + * + * // Return the trigger ID for the AsyncResource instance. + * asyncResource.triggerAsyncId(); + * ``` + */ + class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type The type of async event. + * @param triggerAsyncId The ID of the execution context that created + * this async event (default: `executionAsyncId()`), or an + * AsyncResourceOptions object (since v9.3.0) + */ + constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); + /** + * Binds the given function to the current execution context. + * + * The returned function will have an `asyncResource` property referencing + * the `AsyncResource` to which the function is bound. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current execution context. + * @param type An optional name to associate with the underlying `AsyncResource`. + */ + static bind any, ThisArg>( + fn: Func, + type?: string, + thisArg?: ThisArg + ): Func & { + asyncResource: AsyncResource; + }; + /** + * Binds the given function to execute to this `AsyncResource`'s scope. + * + * The returned function will have an `asyncResource` property referencing + * the `AsyncResource` to which the function is bound. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current `AsyncResource`. + */ + bind any>( + fn: Func + ): Func & { + asyncResource: AsyncResource; + }; + /** + * Call the provided function with the provided arguments in the execution context + * of the async resource. This will establish the context, trigger the AsyncHooks + * before callbacks, call the function, trigger the AsyncHooks after callbacks, and + * then restore the original execution context. + * @since v9.6.0 + * @param fn The function to call in the execution context of this async resource. + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + * @return A reference to `asyncResource`. + */ + emitDestroy(): this; + /** + * @return The unique `asyncId` assigned to the resource. + */ + asyncId(): number; + /** + * + * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. + */ + triggerAsyncId(): number; + } + /** + * This class creates stores that stay coherent through asynchronous operations. + * + * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe + * implementation that involves significant optimizations that are non-obvious to + * implement. + * + * The following example uses `AsyncLocalStorage` to build a simple logger + * that assigns IDs to incoming HTTP requests and includes them in messages + * logged within each request. + * + * ```js + * import http from 'http'; + * import { AsyncLocalStorage } from 'async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * function logWithId(msg) { + * const id = asyncLocalStorage.getStore(); + * console.log(`${id !== undefined ? id : '-'}:`, msg); + * } + * + * let idSeq = 0; + * http.createServer((req, res) => { + * asyncLocalStorage.run(idSeq++, () => { + * logWithId('start'); + * // Imagine any chain of async operations here + * setImmediate(() => { + * logWithId('finish'); + * res.end(); + * }); + * }); + * }).listen(8080); + * + * http.get('http://localhost:8080'); + * http.get('http://localhost:8080'); + * // Prints: + * // 0: start + * // 1: start + * // 0: finish + * // 1: finish + * ``` + * + * Each instance of `AsyncLocalStorage` maintains an independent storage context. + * Multiple instances can safely exist simultaneously without risk of interfering + * with each other's data. + * @since v13.10.0, v12.17.0 + */ + class AsyncLocalStorage { + /** + * Disables the instance of `AsyncLocalStorage`. All subsequent calls + * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. + * + * When calling `asyncLocalStorage.disable()`, all current contexts linked to the + * instance will be exited. + * + * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores + * provided by the `asyncLocalStorage`, as those objects are garbage collected + * along with the corresponding async resources. + * + * Use this method when the `asyncLocalStorage` is not in use anymore + * in the current process. + * @since v13.10.0, v12.17.0 + * @experimental + */ + disable(): void; + /** + * Returns the current store. + * If called outside of an asynchronous context initialized by + * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it + * returns `undefined`. + * @since v13.10.0, v12.17.0 + */ + getStore(): T | undefined; + /** + * Runs a function synchronously within a context and returns its + * return value. The store is not accessible outside of the callback function. + * The store is accessible to any asynchronous operations created within the + * callback. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `run()` too. + * The stacktrace is not impacted by this call and the context is exited. + * + * Example: + * + * ```js + * const store = { id: 2 }; + * try { + * asyncLocalStorage.run(store, () => { + * asyncLocalStorage.getStore(); // Returns the store object + * setTimeout(() => { + * asyncLocalStorage.getStore(); // Returns the store object + * }, 200); + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns undefined + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + */ + run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Runs a function synchronously outside of a context and returns its + * return value. The store is not accessible within the callback function or + * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `exit()` too. + * The stacktrace is not impacted by this call and the context is re-entered. + * + * Example: + * + * ```js + * // Within a call to run + * try { + * asyncLocalStorage.getStore(); // Returns the store object or value + * asyncLocalStorage.exit(() => { + * asyncLocalStorage.getStore(); // Returns undefined + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns the same object or value + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + * @experimental + */ + exit(callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Transitions into the context for the remainder of the current + * synchronous execution and then persists the store through any following + * asynchronous calls. + * + * Example: + * + * ```js + * const store = { id: 1 }; + * // Replaces previous store with the given store object + * asyncLocalStorage.enterWith(store); + * asyncLocalStorage.getStore(); // Returns the store object + * someAsyncOperation(() => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * ``` + * + * This transition will continue for the _entire_ synchronous execution. + * This means that if, for example, the context is entered within an event + * handler subsequent event handlers will also run within that context unless + * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons + * to use the latter method. + * + * ```js + * const store = { id: 1 }; + * + * emitter.on('my-event', () => { + * asyncLocalStorage.enterWith(store); + * }); + * emitter.on('my-event', () => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * + * asyncLocalStorage.getStore(); // Returns undefined + * emitter.emit('my-event'); + * asyncLocalStorage.getStore(); // Returns the same object + * ``` + * @since v13.11.0, v12.17.0 + * @experimental + */ + enterWith(store: T): void; + } +} +declare module 'node:async_hooks' { + export * from 'async_hooks'; +} diff --git a/node_modules/@types/node/ts4.8/buffer.d.ts b/node_modules/@types/node/ts4.8/buffer.d.ts new file mode 100644 index 0000000..ea859cd --- /dev/null +++ b/node_modules/@types/node/ts4.8/buffer.d.ts @@ -0,0 +1,2259 @@ +/** + * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many + * Node.js APIs support `Buffer`s. + * + * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and + * extends it with methods that cover additional use cases. Node.js APIs accept + * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well. + * + * While the `Buffer` class is available within the global scope, it is still + * recommended to explicitly reference it via an import or require statement. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Creates a zero-filled Buffer of length 10. + * const buf1 = Buffer.alloc(10); + * + * // Creates a Buffer of length 10, + * // filled with bytes which all have the value `1`. + * const buf2 = Buffer.alloc(10, 1); + * + * // Creates an uninitialized buffer of length 10. + * // This is faster than calling Buffer.alloc() but the returned + * // Buffer instance might contain old data that needs to be + * // overwritten using fill(), write(), or other functions that fill the Buffer's + * // contents. + * const buf3 = Buffer.allocUnsafe(10); + * + * // Creates a Buffer containing the bytes [1, 2, 3]. + * const buf4 = Buffer.from([1, 2, 3]); + * + * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries + * // are all truncated using `(value & 255)` to fit into the range 0–255. + * const buf5 = Buffer.from([257, 257.5, -255, '1']); + * + * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést': + * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation) + * // [116, 195, 169, 115, 116] (in decimal notation) + * const buf6 = Buffer.from('tést'); + * + * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. + * const buf7 = Buffer.from('tést', 'latin1'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/buffer.js) + */ +declare module 'buffer' { + import { BinaryLike } from 'node:crypto'; + import { ReadableStream as WebReadableStream } from 'node:stream/web'; + export const INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary'; + /** + * Re-encodes the given `Buffer` or `Uint8Array` instance from one character + * encoding to another. Returns a new `Buffer` instance. + * + * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if + * conversion from `fromEnc` to `toEnc` is not permitted. + * + * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. + * + * The transcoding process will use substitution characters if a given byte + * sequence cannot be adequately represented in the target encoding. For instance: + * + * ```js + * import { Buffer, transcode } from 'buffer'; + * + * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); + * console.log(newBuf.toString('ascii')); + * // Prints: '?' + * ``` + * + * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced + * with `?` in the transcoded `Buffer`. + * @since v7.1.0 + * @param source A `Buffer` or `Uint8Array` instance. + * @param fromEnc The current encoding. + * @param toEnc To target encoding. + */ + export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; + export const SlowBuffer: { + /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */ + new (size: number): Buffer; + prototype: Buffer; + }; + /** + * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using + * a prior call to `URL.createObjectURL()`. + * @since v16.7.0 + * @experimental + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + export function resolveObjectURL(id: string): Blob | undefined; + export { Buffer }; + /** + * @experimental + */ + export interface BlobOptions { + /** + * @default 'utf8' + */ + encoding?: BufferEncoding | undefined; + /** + * The Blob content-type. The intent is for `type` to convey + * the MIME media type of the data, however no validation of the type format + * is performed. + */ + type?: string | undefined; + } + /** + * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across + * multiple worker threads. + * @since v15.7.0, v14.18.0 + */ + export class Blob { + /** + * The total size of the `Blob` in bytes. + * @since v15.7.0, v14.18.0 + */ + readonly size: number; + /** + * The content-type of the `Blob`. + * @since v15.7.0, v14.18.0 + */ + readonly type: string; + /** + * Creates a new `Blob` object containing a concatenation of the given sources. + * + * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into + * the 'Blob' and can therefore be safely modified after the 'Blob' is created. + * + * String sources are also copied into the `Blob`. + */ + constructor(sources: Array, options?: BlobOptions); + /** + * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of + * the `Blob` data. + * @since v15.7.0, v14.18.0 + */ + arrayBuffer(): Promise; + /** + * Creates and returns a new `Blob` containing a subset of this `Blob` objects + * data. The original `Blob` is not altered. + * @since v15.7.0, v14.18.0 + * @param start The starting index. + * @param end The ending index. + * @param type The content-type for the new `Blob` + */ + slice(start?: number, end?: number, type?: string): Blob; + /** + * Returns a promise that fulfills with the contents of the `Blob` decoded as a + * UTF-8 string. + * @since v15.7.0, v14.18.0 + */ + text(): Promise; + /** + * Returns a new (WHATWG) `ReadableStream` that allows the content of the `Blob` to be read. + * @since v16.7.0 + */ + stream(): WebReadableStream; + } + export import atob = globalThis.atob; + export import btoa = globalThis.btoa; + + import { Blob as NodeBlob } from 'buffer'; + // This conditional type will be the existing global Blob in a browser, or + // the copy below in a Node environment. + type __Blob = typeof globalThis extends { onmessage: any, Blob: any } + ? {} : NodeBlob; + + global { + // Buffer class + type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex'; + type WithImplicitCoercion = + | T + | { + valueOf(): T; + }; + /** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' + */ + interface BufferConstructor { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new (str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new (size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new (array: Uint8Array): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new (array: ReadonlyArray): Buffer; + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. + */ + new (buffer: Buffer): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(arrayBuffer: WithImplicitCoercion, byteOffset?: number, length?: number): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param data data to create a new Buffer + */ + from(data: Uint8Array | ReadonlyArray): Buffer; + from(data: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + */ + from( + str: + | WithImplicitCoercion + | { + [Symbol.toPrimitive](hint: 'string'): string; + }, + encoding?: BufferEncoding + ): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns `true` if `obj` is a `Buffer`, `false` otherwise. + * + * ```js + * import { Buffer } from 'buffer'; + * + * Buffer.isBuffer(Buffer.alloc(10)); // true + * Buffer.isBuffer(Buffer.from('foo')); // true + * Buffer.isBuffer('a string'); // false + * Buffer.isBuffer([]); // false + * Buffer.isBuffer(new Uint8Array(1024)); // false + * ``` + * @since v0.1.101 + */ + isBuffer(obj: any): obj is Buffer; + /** + * Returns `true` if `encoding` is the name of a supported character encoding, + * or `false` otherwise. + * + * ```js + * import { Buffer } from 'buffer'; + * + * console.log(Buffer.isEncoding('utf8')); + * // Prints: true + * + * console.log(Buffer.isEncoding('hex')); + * // Prints: true + * + * console.log(Buffer.isEncoding('utf/8')); + * // Prints: false + * + * console.log(Buffer.isEncoding('')); + * // Prints: false + * ``` + * @since v0.9.1 + * @param encoding A character encoding name to check. + */ + isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Returns the byte length of a string when encoded using `encoding`. + * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account + * for the encoding that is used to convert the string into bytes. + * + * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. + * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the + * return value might be greater than the length of a `Buffer` created from the + * string. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const str = '\u00bd + \u00bc = \u00be'; + * + * console.log(`${str}: ${str.length} characters, ` + + * `${Buffer.byteLength(str, 'utf8')} bytes`); + * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes + * ``` + * + * When `string` is a + * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- + * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- + * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. + * @since v0.1.90 + * @param string A value to calculate the length of. + * @param [encoding='utf8'] If `string` is a string, this is its encoding. + * @return The number of bytes contained within `string`. + */ + byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it is coerced to an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: ReadonlyArray, totalLength?: number): Buffer; + /** + * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('1234'); + * const buf2 = Buffer.from('0123'); + * const arr = [buf1, buf2]; + * + * console.log(arr.sort(Buffer.compare)); + * // Prints: [ , ] + * // (This result is equal to: [buf2, buf1].) + * ``` + * @since v0.11.13 + * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. + */ + compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`,`Buffer.from(array)`, `Buffer.concat()`, and the + * deprecated`new Buffer(size)` constructor only when `size` is less than or equal + * to `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. A zero-length `Buffer` is created + * if `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This + * allows applications to avoid the garbage collection overhead of creating many + * individually allocated `Buffer` instances. This approach improves both + * performance and memory usage by eliminating the need to track and clean up as + * many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + /** + * This is the size (in bytes) of pre-allocated internal `Buffer` instances used + * for pooling. This value may be modified. + * @since v0.11.3 + */ + poolSize: number; + } + interface Buffer extends Uint8Array { + /** + * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did + * not contain enough space to fit the entire string, only part of `string` will be + * written. However, partially encoded characters will not be written. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(256); + * + * const len = buf.write('\u00bd + \u00bc = \u00be', 0); + * + * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); + * // Prints: 12 bytes: ½ + ¼ = ¾ + * + * const buffer = Buffer.alloc(10); + * + * const length = buffer.write('abcd', 8); + * + * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); + * // Prints: 2 bytes : ab + * ``` + * @since v0.1.90 + * @param string String to write to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write `string`. + * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). + * @param [encoding='utf8'] The character encoding of `string`. + * @return Number of bytes written. + */ + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + /** + * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. + * + * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, + * then each invalid byte is replaced with the replacement character `U+FFFD`. + * + * The maximum length of a string instance (in UTF-16 code units) is available + * as {@link constants.MAX_STRING_LENGTH}. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * console.log(buf1.toString('utf8')); + * // Prints: abcdefghijklmnopqrstuvwxyz + * console.log(buf1.toString('utf8', 0, 5)); + * // Prints: abcde + * + * const buf2 = Buffer.from('tést'); + * + * console.log(buf2.toString('hex')); + * // Prints: 74c3a97374 + * console.log(buf2.toString('utf8', 0, 3)); + * // Prints: té + * console.log(buf2.toString(undefined, 0, 3)); + * // Prints: té + * ``` + * @since v0.1.90 + * @param [encoding='utf8'] The character encoding to use. + * @param [start=0] The byte offset to start decoding at. + * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). + */ + toString(encoding?: BufferEncoding, start?: number, end?: number): string; + /** + * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls + * this function when stringifying a `Buffer` instance. + * + * `Buffer.from()` accepts objects in the format returned from this method. + * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); + * const json = JSON.stringify(buf); + * + * console.log(json); + * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} + * + * const copy = JSON.parse(json, (key, value) => { + * return value && value.type === 'Buffer' ? + * Buffer.from(value) : + * value; + * }); + * + * console.log(copy); + * // Prints: + * ``` + * @since v0.9.2 + */ + toJSON(): { + type: 'Buffer'; + data: number[]; + }; + /** + * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('414243', 'hex'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.equals(buf2)); + * // Prints: true + * console.log(buf1.equals(buf3)); + * // Prints: false + * ``` + * @since v0.11.13 + * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. + */ + equals(otherBuffer: Uint8Array): boolean; + /** + * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. + * Comparison is based on the actual sequence of bytes in each `Buffer`. + * + * * `0` is returned if `target` is the same as `buf` + * * `1` is returned if `target` should come _before_`buf` when sorted. + * * `-1` is returned if `target` should come _after_`buf` when sorted. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('BCD'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.compare(buf1)); + * // Prints: 0 + * console.log(buf1.compare(buf2)); + * // Prints: -1 + * console.log(buf1.compare(buf3)); + * // Prints: -1 + * console.log(buf2.compare(buf1)); + * // Prints: 1 + * console.log(buf2.compare(buf3)); + * // Prints: 1 + * console.log([buf1, buf2, buf3].sort(Buffer.compare)); + * // Prints: [ , , ] + * // (This result is equal to: [buf1, buf3, buf2].) + * ``` + * + * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); + * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); + * + * console.log(buf1.compare(buf2, 5, 9, 0, 4)); + * // Prints: 0 + * console.log(buf1.compare(buf2, 0, 6, 4)); + * // Prints: -1 + * console.log(buf1.compare(buf2, 5, 6, 5)); + * // Prints: 1 + * ``` + * + * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. + * @since v0.11.13 + * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. + * @param [targetStart=0] The offset within `target` at which to begin comparison. + * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). + * @param [sourceStart=0] The offset within `buf` at which to begin comparison. + * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). + */ + compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1; + /** + * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. + * + * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available + * for all TypedArrays, including Node.js `Buffer`s, although it takes + * different function arguments. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create two `Buffer` instances. + * const buf1 = Buffer.allocUnsafe(26); + * const buf2 = Buffer.allocUnsafe(26).fill('!'); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. + * buf1.copy(buf2, 8, 16, 20); + * // This is equivalent to: + * // buf2.set(buf1.subarray(16, 20), 8); + * + * console.log(buf2.toString('ascii', 0, 25)); + * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! + * ``` + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a `Buffer` and copy data from one region to an overlapping region + * // within the same `Buffer`. + * + * const buf = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf[i] = i + 97; + * } + * + * buf.copy(buf, 0, 4, 10); + * + * console.log(buf.toString()); + * // Prints: efghijghijklmnopqrstuvwxyz + * ``` + * @since v0.1.90 + * @param target A `Buffer` or {@link Uint8Array} to copy into. + * @param [targetStart=0] The offset within `target` at which to begin writing. + * @param [sourceStart=0] The offset within `buf` from which to begin copying. + * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). + * @return The number of bytes copied. + */ + copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64BE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64LE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64LE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * This function is also available under the `writeBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64BE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * + * This function is also available under the `writeBigUint64LE` alias. + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64LE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64LE(value: bigint, offset?: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintLE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntLE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntLE + * @since v14.9.0, v12.19.0 + */ + writeUintLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintBE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntBE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntBE + * @since v14.9.0, v12.19.0 + */ + writeUintBE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than a signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a + * signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntBE(value: number, offset: number, byteLength: number): number; + /** + * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64BE(0)); + * // Prints: 4294967295n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64BE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + readBigUint64BE(offset?: number): bigint; + /** + * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64LE(0)); + * // Prints: 18446744069414584320n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64LE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + readBigUint64LE(offset?: number): bigint; + /** + * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64BE(offset?: number): bigint; + /** + * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64LE(offset?: number): bigint; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintLE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntLE(0, 6).toString(16)); + * // Prints: ab9078563412 + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntLE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntLE + * @since v14.9.0, v12.19.0 + */ + readUintLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintBE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readUIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntBE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntBE + * @since v14.9.0, v12.19.0 + */ + readUintBE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntLE(0, 6).toString(16)); + * // Prints: -546f87a9cbee + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * console.log(buf.readIntBE(1, 0).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntBE(offset: number, byteLength: number): number; + /** + * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint8` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, -2]); + * + * console.log(buf.readUInt8(0)); + * // Prints: 1 + * console.log(buf.readUInt8(1)); + * // Prints: 254 + * console.log(buf.readUInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readUInt8(offset?: number): number; + /** + * @alias Buffer.readUInt8 + * @since v14.9.0, v12.19.0 + */ + readUint8(offset?: number): number; + /** + * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16LE(0).toString(16)); + * // Prints: 3412 + * console.log(buf.readUInt16LE(1).toString(16)); + * // Prints: 5634 + * console.log(buf.readUInt16LE(2).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16LE(offset?: number): number; + /** + * @alias Buffer.readUInt16LE + * @since v14.9.0, v12.19.0 + */ + readUint16LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16BE(0).toString(16)); + * // Prints: 1234 + * console.log(buf.readUInt16BE(1).toString(16)); + * // Prints: 3456 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16BE(offset?: number): number; + /** + * @alias Buffer.readUInt16BE + * @since v14.9.0, v12.19.0 + */ + readUint16BE(offset?: number): number; + /** + * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32LE(0).toString(16)); + * // Prints: 78563412 + * console.log(buf.readUInt32LE(1).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32LE(offset?: number): number; + /** + * @alias Buffer.readUInt32LE + * @since v14.9.0, v12.19.0 + */ + readUint32LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32BE(0).toString(16)); + * // Prints: 12345678 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32BE(offset?: number): number; + /** + * @alias Buffer.readUInt32BE + * @since v14.9.0, v12.19.0 + */ + readUint32BE(offset?: number): number; + /** + * Reads a signed 8-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([-1, 5]); + * + * console.log(buf.readInt8(0)); + * // Prints: -1 + * console.log(buf.readInt8(1)); + * // Prints: 5 + * console.log(buf.readInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readInt8(offset?: number): number; + /** + * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16LE(0)); + * // Prints: 1280 + * console.log(buf.readInt16LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16LE(offset?: number): number; + /** + * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16BE(offset?: number): number; + /** + * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32LE(0)); + * // Prints: 83886080 + * console.log(buf.readInt32LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32LE(offset?: number): number; + /** + * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32BE(offset?: number): number; + /** + * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatLE(0)); + * // Prints: 1.539989614439558e-36 + * console.log(buf.readFloatLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatLE(offset?: number): number; + /** + * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatBE(0)); + * // Prints: 2.387939260590663e-38 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatBE(offset?: number): number; + /** + * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleLE(0)); + * // Prints: 5.447603722011605e-270 + * console.log(buf.readDoubleLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleLE(offset?: number): number; + /** + * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleBE(0)); + * // Prints: 8.20788039913184e-304 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleBE(offset?: number): number; + reverse(): this; + /** + * Interprets `buf` as an array of unsigned 16-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap16(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap16(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * + * One convenient use of `buf.swap16()` is to perform a fast in-place conversion + * between UTF-16 little-endian and UTF-16 big-endian: + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); + * buf.swap16(); // Convert to big-endian UTF-16 text. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap16(): Buffer; + /** + * Interprets `buf` as an array of unsigned 32-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap32(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap32(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap32(): Buffer; + /** + * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. + * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap64(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap64(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v6.3.0 + * @return A reference to `buf`. + */ + swap64(): Buffer; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a + * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything + * other than an unsigned 8-bit integer. + * + * This function is also available under the `writeUint8` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt8(0x3, 0); + * buf.writeUInt8(0x4, 1); + * buf.writeUInt8(0x23, 2); + * buf.writeUInt8(0x42, 3); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeUInt8(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt8 + * @since v14.9.0, v12.19.0 + */ + writeUint8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 16-bit integer. + * + * This function is also available under the `writeUint16LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16LE(0xdead, 0); + * buf.writeUInt16LE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16LE + * @since v14.9.0, v12.19.0 + */ + writeUint16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 16-bit integer. + * + * This function is also available under the `writeUint16BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16BE(0xdead, 0); + * buf.writeUInt16BE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16BE + * @since v14.9.0, v12.19.0 + */ + writeUint16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 32-bit integer. + * + * This function is also available under the `writeUint32LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32LE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32LE + * @since v14.9.0, v12.19.0 + */ + writeUint32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 32-bit integer. + * + * This function is also available under the `writeUint32BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32BE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32BE + * @since v14.9.0, v12.19.0 + */ + writeUint32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a valid + * signed 8-bit integer. Behavior is undefined when `value` is anything other than + * a signed 8-bit integer. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt8(2, 0); + * buf.writeInt8(-2, 1); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeInt8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16LE(0x0304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16BE(0x0102, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32LE(0x05060708, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32BE(0x01020304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatLE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatBE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatBE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleLE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleBE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleBE(value: number, offset?: number): number; + /** + * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, + * the entire `buf` will be filled: + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Fill a `Buffer` with the ASCII character 'h'. + * + * const b = Buffer.allocUnsafe(50).fill('h'); + * + * console.log(b.toString()); + * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh + * ``` + * + * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or + * integer. If the resulting integer is greater than `255` (decimal), `buf` will be + * filled with `value & 255`. + * + * If the final write of a `fill()` operation falls on a multi-byte character, + * then only the bytes of that character that fit into `buf` are written: + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Fill a `Buffer` with character that takes up two bytes in UTF-8. + * + * console.log(Buffer.allocUnsafe(5).fill('\u0222')); + * // Prints: + * ``` + * + * If `value` contains invalid characters, it is truncated; if no valid + * fill data remains, an exception is thrown: + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(5); + * + * console.log(buf.fill('a')); + * // Prints: + * console.log(buf.fill('aazz', 'hex')); + * // Prints: + * console.log(buf.fill('zz', 'hex')); + * // Throws an exception. + * ``` + * @since v0.5.0 + * @param value The value with which to fill `buf`. + * @param [offset=0] Number of bytes to skip before starting to fill `buf`. + * @param [end=buf.length] Where to stop filling `buf` (not inclusive). + * @param [encoding='utf8'] The encoding for `value` if `value` is a string. + * @return A reference to `buf`. + */ + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + /** + * If `value` is: + * + * * a string, `value` is interpreted according to the character encoding in`encoding`. + * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety. + * To compare a partial `Buffer`, use `buf.subarray`. + * * a number, `value` will be interpreted as an unsigned 8-bit integer + * value between `0` and `255`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.indexOf('this')); + * // Prints: 0 + * console.log(buf.indexOf('is')); + * // Prints: 2 + * console.log(buf.indexOf(Buffer.from('a buffer'))); + * // Prints: 8 + * console.log(buf.indexOf(97)); + * // Prints: 8 (97 is the decimal ASCII value for 'a') + * console.log(buf.indexOf(Buffer.from('a buffer example'))); + * // Prints: -1 + * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: 8 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); + * // Prints: 4 + * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); + * // Prints: 6 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. If the result + * of coercion is `NaN` or `0`, then the entire buffer will be searched. This + * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.indexOf(99.9)); + * console.log(b.indexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN or 0. + * // Prints: 1, searching the whole buffer. + * console.log(b.indexOf('b', undefined)); + * console.log(b.indexOf('b', {})); + * console.log(b.indexOf('b', null)); + * console.log(b.indexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer` and `byteOffset` is less + * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. + * @since v1.5.0 + * @param value What to search for. + * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. + * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. + */ + indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + /** + * Identical to `buf.indexOf()`, except the last occurrence of `value` is found + * rather than the first occurrence. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this buffer is a buffer'); + * + * console.log(buf.lastIndexOf('this')); + * // Prints: 0 + * console.log(buf.lastIndexOf('buffer')); + * // Prints: 17 + * console.log(buf.lastIndexOf(Buffer.from('buffer'))); + * // Prints: 17 + * console.log(buf.lastIndexOf(97)); + * // Prints: 15 (97 is the decimal ASCII value for 'a') + * console.log(buf.lastIndexOf(Buffer.from('yolo'))); + * // Prints: -1 + * console.log(buf.lastIndexOf('buffer', 5)); + * // Prints: 5 + * console.log(buf.lastIndexOf('buffer', 4)); + * // Prints: -1 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); + * // Prints: 6 + * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); + * // Prints: 4 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. Any arguments + * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. + * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.lastIndexOf(99.9)); + * console.log(b.lastIndexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN. + * // Prints: 1, searching the whole buffer. + * console.log(b.lastIndexOf('b', undefined)); + * console.log(b.lastIndexOf('b', {})); + * + * // Passing a byteOffset that coerces to 0. + * // Prints: -1, equivalent to passing 0. + * console.log(b.lastIndexOf('b', null)); + * console.log(b.lastIndexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. + * @since v6.0.0 + * @param value What to search for. + * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. + * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. + */ + lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents + * of `buf`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Log the entire contents of a `Buffer`. + * + * const buf = Buffer.from('buffer'); + * + * for (const pair of buf.entries()) { + * console.log(pair); + * } + * // Prints: + * // [0, 98] + * // [1, 117] + * // [2, 102] + * // [3, 102] + * // [4, 101] + * // [5, 114] + * ``` + * @since v1.1.0 + */ + entries(): IterableIterator<[number, number]>; + /** + * Equivalent to `buf.indexOf() !== -1`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.includes('this')); + * // Prints: true + * console.log(buf.includes('is')); + * // Prints: true + * console.log(buf.includes(Buffer.from('a buffer'))); + * // Prints: true + * console.log(buf.includes(97)); + * // Prints: true (97 is the decimal ASCII value for 'a') + * console.log(buf.includes(Buffer.from('a buffer example'))); + * // Prints: false + * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: true + * console.log(buf.includes('this', 4)); + * // Prints: false + * ``` + * @since v5.3.0 + * @param value What to search for. + * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is its encoding. + * @return `true` if `value` was found in `buf`, `false` otherwise. + */ + includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * for (const key of buf.keys()) { + * console.log(key); + * } + * // Prints: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * ``` + * @since v1.1.0 + */ + keys(): IterableIterator; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is + * called automatically when a `Buffer` is used in a `for..of` statement. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * for (const value of buf.values()) { + * console.log(value); + * } + * // Prints: + * // 98 + * // 117 + * // 102 + * // 102 + * // 101 + * // 114 + * + * for (const value of buf) { + * console.log(value); + * } + * // Prints: + * // 98 + * // 117 + * // 102 + * // 102 + * // 101 + * // 114 + * ``` + * @since v1.1.0 + */ + values(): IterableIterator; + } + var Buffer: BufferConstructor; + /** + * Decodes a string of Base64-encoded data into bytes, and encodes those bytes + * into a string using Latin-1 (ISO-8859-1). + * + * The `data` may be any JavaScript-value that can be coerced into a string. + * + * **This function is only provided for compatibility with legacy web platform APIs** + * **and should never be used in new code, because they use strings to represent** + * **binary data and predate the introduction of typed arrays in JavaScript.** + * **For code running using Node.js APIs, converting between base64-encoded strings** + * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** + * @since v15.13.0, v14.17.0 + * @deprecated Use `Buffer.from(data, 'base64')` instead. + * @param data The Base64-encoded input string. + */ + function atob(data: string): string; + /** + * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes + * into a string using Base64. + * + * The `data` may be any JavaScript-value that can be coerced into a string. + * + * **This function is only provided for compatibility with legacy web platform APIs** + * **and should never be used in new code, because they use strings to represent** + * **binary data and predate the introduction of typed arrays in JavaScript.** + * **For code running using Node.js APIs, converting between base64-encoded strings** + * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** + * @since v15.13.0, v14.17.0 + * @deprecated Use `buf.toString('base64')` instead. + * @param data An ASCII (Latin1) string. + */ + function btoa(data: string): string; + + interface Blob extends __Blob {} + /** + * `Blob` class is a global reference for `require('node:buffer').Blob` + * https://nodejs.org/api/buffer.html#class-blob + * @since v18.0.0 + */ + var Blob: typeof globalThis extends { + onmessage: any; + Blob: infer T; + } + ? T + : typeof NodeBlob; + } +} +declare module 'node:buffer' { + export * from 'buffer'; +} diff --git a/node_modules/@types/node/ts4.8/child_process.d.ts b/node_modules/@types/node/ts4.8/child_process.d.ts new file mode 100644 index 0000000..c537d6d --- /dev/null +++ b/node_modules/@types/node/ts4.8/child_process.d.ts @@ -0,0 +1,1369 @@ +/** + * The `child_process` module provides the ability to spawn subprocesses in + * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability + * is primarily provided by the {@link spawn} function: + * + * ```js + * const { spawn } = require('child_process'); + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * ls.on('close', (code) => { + * console.log(`child process exited with code ${code}`); + * }); + * ``` + * + * By default, pipes for `stdin`, `stdout`, and `stderr` are established between + * the parent Node.js process and the spawned subprocess. These pipes have + * limited (and platform-specific) capacity. If the subprocess writes to + * stdout in excess of that limit without the output being captured, the + * subprocess blocks waiting for the pipe buffer to accept more data. This is + * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed. + * + * The command lookup is performed using the `options.env.PATH` environment + * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is + * used. If `options.env` is set without `PATH`, lookup on Unix is performed + * on a default search path search of `/usr/bin:/bin` (see your operating system's + * manual for execvpe/execvp), on Windows the current processes environment + * variable `PATH` is used. + * + * On Windows, environment variables are case-insensitive. Node.js + * lexicographically sorts the `env` keys and uses the first one that + * case-insensitively matches. Only first (in lexicographic order) entry will be + * passed to the subprocess. This might lead to issues on Windows when passing + * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`. + * + * The {@link spawn} method spawns the child process asynchronously, + * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks + * the event loop until the spawned process either exits or is terminated. + * + * For convenience, the `child_process` module provides a handful of synchronous + * and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on + * top of {@link spawn} or {@link spawnSync}. + * + * * {@link exec}: spawns a shell and runs a command within that + * shell, passing the `stdout` and `stderr` to a callback function when + * complete. + * * {@link execFile}: similar to {@link exec} except + * that it spawns the command directly without first spawning a shell by + * default. + * * {@link fork}: spawns a new Node.js process and invokes a + * specified module with an IPC communication channel established that allows + * sending messages between parent and child. + * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop. + * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop. + * + * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, + * the synchronous methods can have significant impact on performance due to + * stalling the event loop while spawned processes complete. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/child_process.js) + */ +declare module 'child_process' { + import { ObjectEncodingOptions } from 'node:fs'; + import { EventEmitter, Abortable } from 'node:events'; + import * as net from 'node:net'; + import { Writable, Readable, Stream, Pipe } from 'node:stream'; + import { URL } from 'node:url'; + type Serializable = string | object | number | boolean | bigint; + type SendHandle = net.Socket | net.Server; + /** + * Instances of the `ChildProcess` represent spawned child processes. + * + * Instances of `ChildProcess` are not intended to be created directly. Rather, + * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create + * instances of `ChildProcess`. + * @since v2.2.0 + */ + class ChildProcess extends EventEmitter { + /** + * A `Writable Stream` that represents the child process's `stdin`. + * + * If a child process waits to read all of its input, the child will not continue + * until this stream has been closed via `end()`. + * + * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will + * refer to the same value. + * + * The `subprocess.stdin` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ + stdin: Writable | null; + /** + * A `Readable Stream` that represents the child process's `stdout`. + * + * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will + * refer to the same value. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn('ls'); + * + * subprocess.stdout.on('data', (data) => { + * console.log(`Received chunk ${data}`); + * }); + * ``` + * + * The `subprocess.stdout` property can be `null` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ + stdout: Readable | null; + /** + * A `Readable Stream` that represents the child process's `stderr`. + * + * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will + * refer to the same value. + * + * The `subprocess.stderr` property can be `null` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ + stderr: Readable | null; + /** + * The `subprocess.channel` property is a reference to the child's IPC channel. If + * no IPC channel currently exists, this property is `undefined`. + * @since v7.1.0 + */ + readonly channel?: Pipe | null | undefined; + /** + * A sparse array of pipes to the child process, corresponding with positions in + * the `stdio` option passed to {@link spawn} that have been set + * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`, + * respectively. + * + * In the following example, only the child's fd `1` (stdout) is configured as a + * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values + * in the array are `null`. + * + * ```js + * const assert = require('assert'); + * const fs = require('fs'); + * const child_process = require('child_process'); + * + * const subprocess = child_process.spawn('ls', { + * stdio: [ + * 0, // Use parent's stdin for child. + * 'pipe', // Pipe child's stdout to parent. + * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. + * ] + * }); + * + * assert.strictEqual(subprocess.stdio[0], null); + * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); + * + * assert(subprocess.stdout); + * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); + * + * assert.strictEqual(subprocess.stdio[2], null); + * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); + * ``` + * + * The `subprocess.stdio` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.7.10 + */ + readonly stdio: [ + Writable | null, + // stdin + Readable | null, + // stdout + Readable | null, + // stderr + Readable | Writable | null | undefined, + // extra + Readable | Writable | null | undefined // extra + ]; + /** + * The `subprocess.killed` property indicates whether the child process + * successfully received a signal from `subprocess.kill()`. The `killed` property + * does not indicate that the child process has been terminated. + * @since v0.5.10 + */ + readonly killed: boolean; + /** + * Returns the process identifier (PID) of the child process. If the child process + * fails to spawn due to errors, then the value is `undefined` and `error` is + * emitted. + * + * ```js + * const { spawn } = require('child_process'); + * const grep = spawn('grep', ['ssh']); + * + * console.log(`Spawned child pid: ${grep.pid}`); + * grep.stdin.end(); + * ``` + * @since v0.1.90 + */ + readonly pid?: number | undefined; + /** + * The `subprocess.connected` property indicates whether it is still possible to + * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages. + * @since v0.7.2 + */ + readonly connected: boolean; + /** + * The `subprocess.exitCode` property indicates the exit code of the child process. + * If the child process is still running, the field will be `null`. + */ + readonly exitCode: number | null; + /** + * The `subprocess.signalCode` property indicates the signal received by + * the child process if any, else `null`. + */ + readonly signalCode: NodeJS.Signals | null; + /** + * The `subprocess.spawnargs` property represents the full list of command-line + * arguments the child process was launched with. + */ + readonly spawnargs: string[]; + /** + * The `subprocess.spawnfile` property indicates the executable file name of + * the child process that is launched. + * + * For {@link fork}, its value will be equal to `process.execPath`. + * For {@link spawn}, its value will be the name of + * the executable file. + * For {@link exec}, its value will be the name of the shell + * in which the child process is launched. + */ + readonly spawnfile: string; + /** + * The `subprocess.kill()` method sends a signal to the child process. If no + * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function + * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. + * + * ```js + * const { spawn } = require('child_process'); + * const grep = spawn('grep', ['ssh']); + * + * grep.on('close', (code, signal) => { + * console.log( + * `child process terminated due to receipt of signal ${signal}`); + * }); + * + * // Send SIGHUP to process. + * grep.kill('SIGHUP'); + * ``` + * + * The `ChildProcess` object may emit an `'error'` event if the signal + * cannot be delivered. Sending a signal to a child process that has already exited + * is not an error but may have unforeseen consequences. Specifically, if the + * process identifier (PID) has been reassigned to another process, the signal will + * be delivered to that process instead which can have unexpected results. + * + * While the function is called `kill`, the signal delivered to the child process + * may not actually terminate the process. + * + * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. + * + * On Windows, where POSIX signals do not exist, the `signal` argument will be + * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`). + * See `Signal Events` for more details. + * + * On Linux, child processes of child processes will not be terminated + * when attempting to kill their parent. This is likely to happen when running a + * new process in a shell or with the use of the `shell` option of `ChildProcess`: + * + * ```js + * 'use strict'; + * const { spawn } = require('child_process'); + * + * const subprocess = spawn( + * 'sh', + * [ + * '-c', + * `node -e "setInterval(() => { + * console.log(process.pid, 'is alive') + * }, 500);"`, + * ], { + * stdio: ['inherit', 'inherit', 'inherit'] + * } + * ); + * + * setTimeout(() => { + * subprocess.kill(); // Does not terminate the Node.js process in the shell. + * }, 2000); + * ``` + * @since v0.1.90 + */ + kill(signal?: NodeJS.Signals | number): boolean; + /** + * When an IPC channel has been established between the parent and child ( + * i.e. when using {@link fork}), the `subprocess.send()` method can + * be used to send messages to the child process. When the child process is a + * Node.js instance, these messages can be received via the `'message'` event. + * + * The message goes through serialization and parsing. The resulting + * message might not be the same as what is originally sent. + * + * For example, in the parent script: + * + * ```js + * const cp = require('child_process'); + * const n = cp.fork(`${__dirname}/sub.js`); + * + * n.on('message', (m) => { + * console.log('PARENT got message:', m); + * }); + * + * // Causes the child to print: CHILD got message: { hello: 'world' } + * n.send({ hello: 'world' }); + * ``` + * + * And then the child script, `'sub.js'` might look like this: + * + * ```js + * process.on('message', (m) => { + * console.log('CHILD got message:', m); + * }); + * + * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } + * process.send({ foo: 'bar', baz: NaN }); + * ``` + * + * Child Node.js processes will have a `process.send()` method of their own + * that allows the child to send messages back to the parent. + * + * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages + * containing a `NODE_` prefix in the `cmd` property are reserved for use within + * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js. + * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice. + * + * The optional `sendHandle` argument that may be passed to `subprocess.send()` is + * for passing a TCP server or socket object to the child process. The child will + * receive the object as the second argument passed to the callback function + * registered on the `'message'` event. Any data that is received + * and buffered in the socket will not be sent to the child. + * + * The optional `callback` is a function that is invoked after the message is + * sent but before the child may have received it. The function is called with a + * single argument: `null` on success, or an `Error` object on failure. + * + * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can + * happen, for instance, when the child process has already exited. + * + * `subprocess.send()` will return `false` if the channel has closed or when the + * backlog of unsent messages exceeds a threshold that makes it unwise to send + * more. Otherwise, the method returns `true`. The `callback` function can be + * used to implement flow control. + * + * #### Example: sending a server object + * + * The `sendHandle` argument can be used, for instance, to pass the handle of + * a TCP server object to the child process as illustrated in the example below: + * + * ```js + * const subprocess = require('child_process').fork('subprocess.js'); + * + * // Open up the server object and send the handle. + * const server = require('net').createServer(); + * server.on('connection', (socket) => { + * socket.end('handled by parent'); + * }); + * server.listen(1337, () => { + * subprocess.send('server', server); + * }); + * ``` + * + * The child would then receive the server object as: + * + * ```js + * process.on('message', (m, server) => { + * if (m === 'server') { + * server.on('connection', (socket) => { + * socket.end('handled by child'); + * }); + * } + * }); + * ``` + * + * Once the server is now shared between the parent and child, some connections + * can be handled by the parent and some by the child. + * + * While the example above uses a server created using the `net` module, `dgram`module servers use exactly the same workflow with the exceptions of listening on + * a `'message'` event instead of `'connection'` and using `server.bind()` instead + * of `server.listen()`. This is, however, currently only supported on Unix + * platforms. + * + * #### Example: sending a socket object + * + * Similarly, the `sendHandler` argument can be used to pass the handle of a + * socket to the child process. The example below spawns two children that each + * handle connections with "normal" or "special" priority: + * + * ```js + * const { fork } = require('child_process'); + * const normal = fork('subprocess.js', ['normal']); + * const special = fork('subprocess.js', ['special']); + * + * // Open up the server and send sockets to child. Use pauseOnConnect to prevent + * // the sockets from being read before they are sent to the child process. + * const server = require('net').createServer({ pauseOnConnect: true }); + * server.on('connection', (socket) => { + * + * // If this is special priority... + * if (socket.remoteAddress === '74.125.127.100') { + * special.send('socket', socket); + * return; + * } + * // This is normal priority. + * normal.send('socket', socket); + * }); + * server.listen(1337); + * ``` + * + * The `subprocess.js` would receive the socket handle as the second argument + * passed to the event callback function: + * + * ```js + * process.on('message', (m, socket) => { + * if (m === 'socket') { + * if (socket) { + * // Check that the client socket exists. + * // It is possible for the socket to be closed between the time it is + * // sent and the time it is received in the child process. + * socket.end(`Request handled with ${process.argv[2]} priority`); + * } + * } + * }); + * ``` + * + * Do not use `.maxConnections` on a socket that has been passed to a subprocess. + * The parent cannot track when the socket is destroyed. + * + * Any `'message'` handlers in the subprocess should verify that `socket` exists, + * as the connection may have been closed during the time it takes to send the + * connection to the child. + * @since v0.5.9 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: Serializable, callback?: (error: Error | null) => void): boolean; + send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; + send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean; + /** + * Closes the IPC channel between parent and child, allowing the child to exit + * gracefully once there are no other connections keeping it alive. After calling + * this method the `subprocess.connected` and `process.connected` properties in + * both the parent and child (respectively) will be set to `false`, and it will be + * no longer possible to pass messages between the processes. + * + * The `'disconnect'` event will be emitted when there are no messages in the + * process of being received. This will most often be triggered immediately after + * calling `subprocess.disconnect()`. + * + * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked + * within the child process to close the IPC channel as well. + * @since v0.7.2 + */ + disconnect(): void; + /** + * By default, the parent will wait for the detached child to exit. To prevent the + * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not + * include the child in its reference count, allowing the parent to exit + * independently of the child, unless there is an established IPC channel between + * the child and the parent. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore' + * }); + * + * subprocess.unref(); + * ``` + * @since v0.7.10 + */ + unref(): void; + /** + * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will + * restore the removed reference count for the child process, forcing the parent + * to wait for the child to exit before exiting itself. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore' + * }); + * + * subprocess.unref(); + * subprocess.ref(); + * ``` + * @since v0.7.10 + */ + ref(): void; + /** + * events.EventEmitter + * 1. close + * 2. disconnect + * 3. error + * 4. exit + * 5. message + * 6. spawn + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: 'disconnect', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + addListener(event: 'spawn', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: 'disconnect'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean; + emit(event: 'spawn', listener: () => void): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: 'disconnect', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + on(event: 'spawn', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: 'disconnect', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + once(event: 'spawn', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: 'disconnect', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependListener(event: 'spawn', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependOnceListener(event: 'disconnect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependOnceListener(event: 'spawn', listener: () => void): this; + } + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, + Readable, + Readable, + // stderr + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined // extra, no modification + ]; + } + // return this object when stdio option is a tuple of 3 + interface ChildProcessByStdio extends ChildProcess { + stdin: I; + stdout: O; + stderr: E; + readonly stdio: [ + I, + O, + E, + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined // extra, no modification + ]; + } + interface MessageOptions { + keepOpen?: boolean | undefined; + } + type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit'; + type StdioOptions = IOType | Array; + type SerializationType = 'json' | 'advanced'; + interface MessagingOptions extends Abortable { + /** + * Specify the kind of serialization used for sending messages between processes. + * @default 'json' + */ + serialization?: SerializationType | undefined; + /** + * The signal value to be used when the spawned process will be killed by the abort signal. + * @default 'SIGTERM' + */ + killSignal?: NodeJS.Signals | number | undefined; + /** + * In milliseconds the maximum amount of time the process is allowed to run. + */ + timeout?: number | undefined; + } + interface ProcessEnvOptions { + uid?: number | undefined; + gid?: number | undefined; + cwd?: string | URL | undefined; + env?: NodeJS.ProcessEnv | undefined; + } + interface CommonOptions extends ProcessEnvOptions { + /** + * @default false + */ + windowsHide?: boolean | undefined; + /** + * @default 0 + */ + timeout?: number | undefined; + } + interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { + argv0?: string | undefined; + stdio?: StdioOptions | undefined; + shell?: boolean | string | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + interface SpawnOptions extends CommonSpawnOptions { + detached?: boolean | undefined; + } + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: StdioPipeNamed | StdioPipe[] | undefined; + } + type StdioNull = 'inherit' | 'ignore' | Stream; + type StdioPipeNamed = 'pipe' | 'overlapped'; + type StdioPipe = undefined | null | StdioPipeNamed; + interface SpawnOptionsWithStdioTuple extends SpawnOptions { + stdio: [Stdin, Stdout, Stderr]; + } + /** + * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults + * to an empty array. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * A third argument may be used to specify additional options, with these defaults: + * + * ```js + * const defaults = { + * cwd: undefined, + * env: process.env + * }; + * ``` + * + * Use `cwd` to specify the working directory from which the process is spawned. + * If not given, the default is to inherit the current working directory. If given, + * but the path does not exist, the child process emits an `ENOENT` error + * and exits immediately. `ENOENT` is also emitted when the command + * does not exist. + * + * Use `env` to specify environment variables that will be visible to the new + * process, the default is `process.env`. + * + * `undefined` values in `env` will be ignored. + * + * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the + * exit code: + * + * ```js + * const { spawn } = require('child_process'); + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * ls.on('close', (code) => { + * console.log(`child process exited with code ${code}`); + * }); + * ``` + * + * Example: A very elaborate way to run `ps ax | grep ssh` + * + * ```js + * const { spawn } = require('child_process'); + * const ps = spawn('ps', ['ax']); + * const grep = spawn('grep', ['ssh']); + * + * ps.stdout.on('data', (data) => { + * grep.stdin.write(data); + * }); + * + * ps.stderr.on('data', (data) => { + * console.error(`ps stderr: ${data}`); + * }); + * + * ps.on('close', (code) => { + * if (code !== 0) { + * console.log(`ps process exited with code ${code}`); + * } + * grep.stdin.end(); + * }); + * + * grep.stdout.on('data', (data) => { + * console.log(data.toString()); + * }); + * + * grep.stderr.on('data', (data) => { + * console.error(`grep stderr: ${data}`); + * }); + * + * grep.on('close', (code) => { + * if (code !== 0) { + * console.log(`grep process exited with code ${code}`); + * } + * }); + * ``` + * + * Example of checking for failed `spawn`: + * + * ```js + * const { spawn } = require('child_process'); + * const subprocess = spawn('bad_command'); + * + * subprocess.on('error', (err) => { + * console.error('Failed to start subprocess.'); + * }); + * ``` + * + * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process + * title while others (Windows, SunOS) will use `command`. + * + * Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent, + * retrieve it with the`process.argv0` property instead. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { spawn } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const grep = spawn('grep', ['ssh'], { signal }); + * grep.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * ``` + * @since v0.1.90 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptions): ChildProcess; + // overloads of spawn with 'args' + function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess; + interface ExecOptions extends CommonOptions { + shell?: string | undefined; + signal?: AbortSignal | undefined; + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + } + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: BufferEncoding | null; // specify `null`. + } + interface ExecException extends Error { + cmd?: string | undefined; + killed?: boolean | undefined; + code?: number | undefined; + signal?: NodeJS.Signals | undefined; + } + /** + * Spawns a shell then executes the `command` within that shell, buffering any + * generated output. The `command` string passed to the exec function is processed + * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) + * need to be dealt with accordingly: + * + * ```js + * const { exec } = require('child_process'); + * + * exec('"/path/to/test file/test.sh" arg1 arg2'); + * // Double quotes are used so that the space in the path is not interpreted as + * // a delimiter of multiple arguments. + * + * exec('echo "The \\$HOME variable is $HOME"'); + * // The $HOME variable is escaped in the first instance, but not in the second. + * ``` + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * + * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The + * `error.code` property will be + * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the + * process. + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * ```js + * const { exec } = require('child_process'); + * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { + * if (error) { + * console.error(`exec error: ${error}`); + * return; + * } + * console.log(`stdout: ${stdout}`); + * console.error(`stderr: ${stderr}`); + * }); + * ``` + * + * 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. + * + * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace + * the existing process and uses a shell to execute the command. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * const util = require('util'); + * const exec = util.promisify(require('child_process').exec); + * + * async function lsExample() { + * const { stdout, stderr } = await exec('ls'); + * console.log('stdout:', stdout); + * console.error('stderr:', stderr); + * } + * lsExample(); + * ``` + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { exec } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = exec('grep ssh', { signal }, (error) => { + * console.log(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.90 + * @param command The command to run, with space-separated arguments. + * @param callback called with the output when process terminates. + */ + function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function exec( + command: string, + options: { + encoding: 'buffer' | null; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void + ): ChildProcess; + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function exec( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void + ): ChildProcess; + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function exec( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void + ): ChildProcess; + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function exec( + command: string, + options: (ObjectEncodingOptions & ExecOptions) | undefined | null, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void + ): ChildProcess; + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: { + encoding: 'buffer' | null; + } & ExecOptions + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options?: (ObjectEncodingOptions & ExecOptions) | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + } + interface ExecFileOptions extends CommonOptions, Abortable { + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + windowsVerbatimArguments?: boolean | undefined; + shell?: boolean | string | undefined; + signal?: AbortSignal | undefined; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: 'buffer' | null; + } + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + type ExecFileException = ExecException & NodeJS.ErrnoException; + /** + * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified + * executable `file` is spawned directly as a new process making it slightly more + * efficient than {@link exec}. + * + * The same options as {@link exec} are supported. Since a shell is + * not spawned, behaviors such as I/O redirection and file globbing are not + * supported. + * + * ```js + * const { execFile } = require('child_process'); + * const child = execFile('node', ['--version'], (error, stdout, stderr) => { + * if (error) { + * throw error; + * } + * console.log(stdout); + * }); + * ``` + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * const util = require('util'); + * const execFile = util.promisify(require('child_process').execFile); + * async function getVersion() { + * const { stdout } = await execFile('node', ['--version']); + * console.log(stdout); + * } + * getVersion(); + * ``` + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { execFile } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = execFile('node', ['--version'], { signal }, (error) => { + * console.log(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.91 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @param callback Called with the output when process terminates. + */ + function execFile(file: string): ChildProcess; + function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess; + function execFile(file: string, args?: ReadonlyArray | null): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess; + // no `options` definitely means stdout/stderr are `string`. + function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void + ): ChildProcess; + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void + ): ChildProcess; + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void + ): ChildProcess; + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptions, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null + ): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null + ): ChildProcess; + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithBufferEncoding + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithBufferEncoding + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithStringEncoding + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithStringEncoding + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithOtherEncoding + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithOtherEncoding + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + } + interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable { + execPath?: string | undefined; + execArgv?: string[] | undefined; + silent?: boolean | undefined; + stdio?: StdioOptions | undefined; + detached?: boolean | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + /** + * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. + * Like {@link spawn}, a `ChildProcess` object is returned. The + * returned `ChildProcess` will have an additional communication channel + * built-in that allows messages to be passed back and forth between the parent and + * child. See `subprocess.send()` for details. + * + * Keep in mind that spawned Node.js child processes are + * independent of the parent with exception of the IPC communication channel + * that is established between the two. Each process has its own memory, with + * their own V8 instances. Because of the additional resource allocations + * required, spawning a large number of child Node.js processes is not + * recommended. + * + * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative + * execution path to be used. + * + * Node.js processes launched with a custom `execPath` will communicate with the + * parent process using the file descriptor (fd) identified using the + * environment variable `NODE_CHANNEL_FD` on the child process. + * + * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the + * current process. + * + * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * if (process.argv[2] === 'child') { + * setTimeout(() => { + * console.log(`Hello from ${process.argv[2]}!`); + * }, 1_000); + * } else { + * const { fork } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = fork(__filename, ['child'], { signal }); + * child.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * } + * ``` + * @since v0.5.0 + * @param modulePath The module to run in the child. + * @param args List of string arguments. + */ + function fork(modulePath: string, options?: ForkOptions): ChildProcess; + function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; + interface SpawnSyncOptions extends CommonSpawnOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | 'buffer' | null | undefined; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding?: 'buffer' | null | undefined; + } + interface SpawnSyncReturns { + pid: number; + output: Array; + stdout: T; + stderr: T; + status: number | null; + signal: NodeJS.Signals | null; + error?: Error | undefined; + } + /** + * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the process intercepts and handles the `SIGTERM` signal + * and doesn't exit, the parent process will wait until the child process has + * exited. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns; + interface CommonExecOptions extends CommonOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + stdio?: StdioOptions | undefined; + killSignal?: NodeJS.Signals | number | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | 'buffer' | null | undefined; + } + interface ExecSyncOptions extends CommonExecOptions { + shell?: string | undefined; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding?: 'buffer' | null | undefined; + } + /** + * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process + * has exited. + * + * If the process times out or has a non-zero exit code, this method will throw. + * The `Error` object will contain the entire result from {@link spawnSync}. + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @return The stdout from the command. + */ + function execSync(command: string): Buffer; + function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer; + function execSync(command: string, options?: ExecSyncOptions): string | Buffer; + interface ExecFileSyncOptions extends CommonExecOptions { + shell?: boolean | string | undefined; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding?: 'buffer' | null; // specify `null`. + } + /** + * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not + * return until the child process has fully closed. When a timeout has been + * encountered and `killSignal` is sent, the method won't return until the process + * has completely exited. + * + * If the child process intercepts and handles the `SIGTERM` signal and + * does not exit, the parent process will still wait until the child process has + * exited. + * + * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @return The stdout from the command. + */ + function execFileSync(file: string): Buffer; + function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer; + function execFileSync(file: string, args: ReadonlyArray): Buffer; + function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): string | Buffer; +} +declare module 'node:child_process' { + export * from 'child_process'; +} diff --git a/node_modules/@types/node/ts4.8/cluster.d.ts b/node_modules/@types/node/ts4.8/cluster.d.ts new file mode 100644 index 0000000..37dbc57 --- /dev/null +++ b/node_modules/@types/node/ts4.8/cluster.d.ts @@ -0,0 +1,410 @@ +/** + * Clusters of Node.js processes can be used to run multiple instances of Node.js + * that can distribute workloads among their application threads. When process + * isolation is not needed, use the `worker_threads` module instead, which + * allows running multiple application threads within a single Node.js instance. + * + * The cluster module allows easy creation of child processes that all share + * server ports. + * + * ```js + * import cluster from 'cluster'; + * import http from 'http'; + * import { cpus } from 'os'; + * import process from 'process'; + * + * const numCPUs = cpus().length; + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('exit', (worker, code, signal) => { + * console.log(`worker ${worker.process.pid} died`); + * }); + * } else { + * // Workers can share any TCP connection + * // In this case it is an HTTP server + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * + * console.log(`Worker ${process.pid} started`); + * } + * ``` + * + * Running Node.js will now share port 8000 between the workers: + * + * ```console + * $ node server.js + * Primary 3596 is running + * Worker 4324 started + * Worker 4520 started + * Worker 6056 started + * Worker 5644 started + * ``` + * + * On Windows, it is not yet possible to set up a named pipe server in a worker. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/cluster.js) + */ +declare module 'cluster' { + import * as child from 'node:child_process'; + import EventEmitter = require('node:events'); + import * as net from 'node:net'; + export interface ClusterSettings { + execArgv?: string[] | undefined; // default: process.execArgv + exec?: string | undefined; + args?: string[] | undefined; + silent?: boolean | undefined; + stdio?: any[] | undefined; + uid?: number | undefined; + gid?: number | undefined; + inspectPort?: number | (() => number) | undefined; + } + export interface Address { + address: string; + port: number; + addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6" + } + /** + * A `Worker` object contains all public information and method about a worker. + * In the primary it can be obtained using `cluster.workers`. In a worker + * it can be obtained using `cluster.worker`. + * @since v0.7.0 + */ + export class Worker extends EventEmitter { + /** + * Each new worker is given its own unique id, this id is stored in the`id`. + * + * While a worker is alive, this is the key that indexes it in`cluster.workers`. + * @since v0.8.0 + */ + id: number; + /** + * All workers are created using `child_process.fork()`, the returned object + * from this function is stored as `.process`. In a worker, the global `process`is stored. + * + * See: `Child Process module`. + * + * Workers will call `process.exit(0)` if the `'disconnect'` event occurs + * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against + * accidental disconnection. + * @since v0.7.0 + */ + process: child.ChildProcess; + /** + * Send a message to a worker or primary, optionally with a handle. + * + * In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`. + * + * In a worker, this sends a message to the primary. It is identical to`process.send()`. + * + * This example will echo back all messages from the primary: + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * worker.send('hi there'); + * + * } else if (cluster.isWorker) { + * process.on('message', (msg) => { + * process.send(msg); + * }); + * } + * ``` + * @since v0.7.0 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: child.Serializable, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean; + /** + * This function will kill the worker. In the primary worker, it does this by + * disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`. + * + * The `kill()` function kills the worker process without waiting for a graceful + * disconnect, it has the same behavior as `worker.process.kill()`. + * + * This method is aliased as `worker.destroy()` for backwards compatibility. + * + * In a worker, `process.kill()` exists, but it is not this function; + * it is `kill()`. + * @since v0.9.12 + * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. + */ + kill(signal?: string): void; + destroy(signal?: string): void; + /** + * In a worker, this function will close all servers, wait for the `'close'` event + * on those servers, and then disconnect the IPC channel. + * + * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself. + * + * Causes `.exitedAfterDisconnect` to be set. + * + * After a server is closed, it will no longer accept new connections, + * but connections may be accepted by any other listening worker. Existing + * connections will be allowed to close as usual. When no more connections exist, + * see `server.close()`, the IPC channel to the worker will close allowing it + * to die gracefully. + * + * The above applies _only_ to server connections, client connections are not + * automatically closed by workers, and disconnect does not wait for them to close + * before exiting. + * + * In a worker, `process.disconnect` exists, but it is not this function; + * it is `disconnect()`. + * + * Because long living server connections may block workers from disconnecting, it + * may be useful to send a message, so application specific actions may be taken to + * close them. It also may be useful to implement a timeout, killing a worker if + * the `'disconnect'` event has not been emitted after some time. + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * let timeout; + * + * worker.on('listening', (address) => { + * worker.send('shutdown'); + * worker.disconnect(); + * timeout = setTimeout(() => { + * worker.kill(); + * }, 2000); + * }); + * + * worker.on('disconnect', () => { + * clearTimeout(timeout); + * }); + * + * } else if (cluster.isWorker) { + * const net = require('net'); + * const server = net.createServer((socket) => { + * // Connections never end + * }); + * + * server.listen(8000); + * + * process.on('message', (msg) => { + * if (msg === 'shutdown') { + * // Initiate graceful close of any connections to server + * } + * }); + * } + * ``` + * @since v0.7.7 + * @return A reference to `worker`. + */ + disconnect(): void; + /** + * This function returns `true` if the worker is connected to its primary via its + * IPC channel, `false` otherwise. A worker is connected to its primary after it + * has been created. It is disconnected after the `'disconnect'` event is emitted. + * @since v0.11.14 + */ + isConnected(): boolean; + /** + * This function returns `true` if the worker's process has terminated (either + * because of exiting or being signaled). Otherwise, it returns `false`. + * + * ```js + * import cluster from 'cluster'; + * import http from 'http'; + * import { cpus } from 'os'; + * import process from 'process'; + * + * const numCPUs = cpus().length; + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('fork', (worker) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * + * cluster.on('exit', (worker, code, signal) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * } else { + * // Workers can share any TCP connection. In this case, it is an HTTP server. + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end(`Current process\n ${process.pid}`); + * process.kill(process.pid); + * }).listen(8000); + * } + * ``` + * @since v0.11.14 + */ + isDead(): boolean; + /** + * This property is `true` if the worker exited due to `.disconnect()`. + * If the worker exited any other way, it is `false`. If the + * worker has not exited, it is `undefined`. + * + * The boolean `worker.exitedAfterDisconnect` allows distinguishing between + * voluntary and accidental exit, the primary may choose not to respawn a worker + * based on this value. + * + * ```js + * cluster.on('exit', (worker, code, signal) => { + * if (worker.exitedAfterDisconnect === true) { + * console.log('Oh, it was just voluntary – no need to worry'); + * } + * }); + * + * // kill worker + * worker.kill(); + * ``` + * @since v6.0.0 + */ + exitedAfterDisconnect: boolean; + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'disconnect', listener: () => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'exit', listener: (code: number, signal: string) => void): this; + addListener(event: 'listening', listener: (address: Address) => void): this; + addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: 'online', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'disconnect'): boolean; + emit(event: 'error', error: Error): boolean; + emit(event: 'exit', code: number, signal: string): boolean; + emit(event: 'listening', address: Address): boolean; + emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean; + emit(event: 'online'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'disconnect', listener: () => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'exit', listener: (code: number, signal: string) => void): this; + on(event: 'listening', listener: (address: Address) => void): this; + on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: 'online', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'disconnect', listener: () => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'exit', listener: (code: number, signal: string) => void): this; + once(event: 'listening', listener: (address: Address) => void): this; + once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: 'online', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'disconnect', listener: () => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'exit', listener: (code: number, signal: string) => void): this; + prependListener(event: 'listening', listener: (address: Address) => void): this; + prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: 'online', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'disconnect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this; + prependOnceListener(event: 'listening', listener: (address: Address) => void): this; + prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: 'online', listener: () => void): this; + } + export interface Cluster extends EventEmitter { + disconnect(callback?: () => void): void; + fork(env?: any): Worker; + /** @deprecated since v16.0.0 - use isPrimary. */ + readonly isMaster: boolean; + readonly isPrimary: boolean; + readonly isWorker: boolean; + schedulingPolicy: number; + readonly settings: ClusterSettings; + /** @deprecated since v16.0.0 - use setupPrimary. */ + setupMaster(settings?: ClusterSettings): void; + /** + * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings. + */ + setupPrimary(settings?: ClusterSettings): void; + readonly worker?: Worker | undefined; + readonly workers?: NodeJS.Dict | undefined; + readonly SCHED_NONE: number; + readonly SCHED_RR: number; + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'disconnect', listener: (worker: Worker) => void): this; + addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: 'fork', listener: (worker: Worker) => void): this; + addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: 'online', listener: (worker: Worker) => void): this; + addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'disconnect', worker: Worker): boolean; + emit(event: 'exit', worker: Worker, code: number, signal: string): boolean; + emit(event: 'fork', worker: Worker): boolean; + emit(event: 'listening', worker: Worker, address: Address): boolean; + emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + emit(event: 'online', worker: Worker): boolean; + emit(event: 'setup', settings: ClusterSettings): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'disconnect', listener: (worker: Worker) => void): this; + on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: 'fork', listener: (worker: Worker) => void): this; + on(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: 'online', listener: (worker: Worker) => void): this; + on(event: 'setup', listener: (settings: ClusterSettings) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'disconnect', listener: (worker: Worker) => void): this; + once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: 'fork', listener: (worker: Worker) => void): this; + once(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: 'online', listener: (worker: Worker) => void): this; + once(event: 'setup', listener: (settings: ClusterSettings) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'disconnect', listener: (worker: Worker) => void): this; + prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: 'fork', listener: (worker: Worker) => void): this; + prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this; + prependListener(event: 'online', listener: (worker: Worker) => void): this; + prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; + prependOnceListener(event: 'online', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; + } + const cluster: Cluster; + export default cluster; +} +declare module 'node:cluster' { + export * from 'cluster'; + export { default as default } from 'cluster'; +} diff --git a/node_modules/@types/node/ts4.8/console.d.ts b/node_modules/@types/node/ts4.8/console.d.ts new file mode 100644 index 0000000..16c9137 --- /dev/null +++ b/node_modules/@types/node/ts4.8/console.d.ts @@ -0,0 +1,412 @@ +/** + * The `console` module provides a simple debugging console that is similar to the + * JavaScript console mechanism provided by web browsers. + * + * The module exports two specific components: + * + * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream. + * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`. + * + * _**Warning**_: The global console object's methods are neither consistently + * synchronous like the browser APIs they resemble, nor are they consistently + * asynchronous like all other Node.js streams. See the `note on process I/O` for + * more information. + * + * Example using the global `console`: + * + * ```js + * console.log('hello world'); + * // Prints: hello world, to stdout + * console.log('hello %s', 'world'); + * // Prints: hello world, to stdout + * console.error(new Error('Whoops, something bad happened')); + * // Prints error message and stack trace to stderr: + * // Error: Whoops, something bad happened + * // at [eval]:5:15 + * // at Script.runInThisContext (node:vm:132:18) + * // at Object.runInThisContext (node:vm:309:38) + * // at node:internal/process/execution:77:19 + * // at [eval]-wrapper:6:22 + * // at evalScript (node:internal/process/execution:76:60) + * // at node:internal/main/eval_string:23:3 + * + * const name = 'Will Robinson'; + * console.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to stderr + * ``` + * + * Example using the `Console` class: + * + * ```js + * const out = getStreamSomehow(); + * const err = getStreamSomehow(); + * const myConsole = new console.Console(out, err); + * + * myConsole.log('hello world'); + * // Prints: hello world, to out + * myConsole.log('hello %s', 'world'); + * // Prints: hello world, to out + * myConsole.error(new Error('Whoops, something bad happened')); + * // Prints: [Error: Whoops, something bad happened], to err + * + * const name = 'Will Robinson'; + * myConsole.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to err + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js) + */ +declare module 'console' { + import console = require('node:console'); + export = console; +} +declare module 'node:console' { + import { InspectOptions } from 'node:util'; + global { + // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build + interface Console { + Console: console.ConsoleConstructor; + /** + * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only + * writes a message and does not otherwise affect execution. The output always + * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`. + * + * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens. + * + * ```js + * console.assert(true, 'does nothing'); + * + * console.assert(false, 'Whoops %s work', 'didn\'t'); + * // Assertion failed: Whoops didn't work + * + * console.assert(); + * // Assertion failed + * ``` + * @since v0.1.101 + * @param value The value tested for being truthy. + * @param message All arguments besides `value` are used as error message. + */ + assert(value: any, message?: string, ...optionalParams: any[]): void; + /** + * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the + * TTY. When `stdout` is not a TTY, this method does nothing. + * + * The specific operation of `console.clear()` can vary across operating systems + * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the + * current terminal viewport for the Node.js + * binary. + * @since v8.3.0 + */ + clear(): void; + /** + * Maintains an internal counter specific to `label` and outputs to `stdout` the + * number of times `console.count()` has been called with the given `label`. + * + * ```js + * > console.count() + * default: 1 + * undefined + * > console.count('default') + * default: 2 + * undefined + * > console.count('abc') + * abc: 1 + * undefined + * > console.count('xyz') + * xyz: 1 + * undefined + * > console.count('abc') + * abc: 2 + * undefined + * > console.count() + * default: 3 + * undefined + * > + * ``` + * @since v8.3.0 + * @param label The display label for the counter. + */ + count(label?: string): void; + /** + * Resets the internal counter specific to `label`. + * + * ```js + * > console.count('abc'); + * abc: 1 + * undefined + * > console.countReset('abc'); + * undefined + * > console.count('abc'); + * abc: 1 + * undefined + * > + * ``` + * @since v8.3.0 + * @param label The display label for the counter. + */ + countReset(label?: string): void; + /** + * The `console.debug()` function is an alias for {@link log}. + * @since v8.0.0 + */ + debug(message?: any, ...optionalParams: any[]): void; + /** + * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`. + * This function bypasses any custom `inspect()` function defined on `obj`. + * @since v0.1.101 + */ + dir(obj: any, options?: InspectOptions): void; + /** + * This method calls `console.log()` passing it the arguments received. + * This method does not produce any XML formatting. + * @since v8.0.0 + */ + dirxml(...data: any[]): void; + /** + * Prints to `stderr` with newline. Multiple arguments can be passed, with the + * first used as the primary message and all additional used as substitution + * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`). + * + * ```js + * const code = 5; + * console.error('error #%d', code); + * // Prints: error #5, to stderr + * console.error('error', code); + * // Prints: error 5, to stderr + * ``` + * + * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string + * values are concatenated. See `util.format()` for more information. + * @since v0.1.100 + */ + error(message?: any, ...optionalParams: any[]): void; + /** + * Increases indentation of subsequent lines by spaces for `groupIndentation`length. + * + * If one or more `label`s are provided, those are printed first without the + * additional indentation. + * @since v8.5.0 + */ + group(...label: any[]): void; + /** + * An alias for {@link group}. + * @since v8.5.0 + */ + groupCollapsed(...label: any[]): void; + /** + * Decreases indentation of subsequent lines by spaces for `groupIndentation`length. + * @since v8.5.0 + */ + groupEnd(): void; + /** + * The `console.info()` function is an alias for {@link log}. + * @since v0.1.100 + */ + info(message?: any, ...optionalParams: any[]): void; + /** + * Prints to `stdout` with newline. Multiple arguments can be passed, with the + * first used as the primary message and all additional used as substitution + * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`). + * + * ```js + * const count = 5; + * console.log('count: %d', count); + * // Prints: count: 5, to stdout + * console.log('count:', count); + * // Prints: count: 5, to stdout + * ``` + * + * See `util.format()` for more information. + * @since v0.1.100 + */ + log(message?: any, ...optionalParams: any[]): void; + /** + * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just + * logging the argument if it can’t be parsed as tabular. + * + * ```js + * // These can't be parsed as tabular data + * console.table(Symbol()); + * // Symbol() + * + * console.table(undefined); + * // undefined + * + * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]); + * // ┌─────────┬─────┬─────┐ + * // │ (index) │ a │ b │ + * // ├─────────┼─────┼─────┤ + * // │ 0 │ 1 │ 'Y' │ + * // │ 1 │ 'Z' │ 2 │ + * // └─────────┴─────┴─────┘ + * + * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); + * // ┌─────────┬─────┐ + * // │ (index) │ a │ + * // ├─────────┼─────┤ + * // │ 0 │ 1 │ + * // │ 1 │ 'Z' │ + * // └─────────┴─────┘ + * ``` + * @since v10.0.0 + * @param properties Alternate properties for constructing the table. + */ + table(tabularData: any, properties?: ReadonlyArray): void; + /** + * Starts a timer that can be used to compute the duration of an operation. Timers + * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in + * suitable time units to `stdout`. For example, if the elapsed + * time is 3869ms, `console.timeEnd()` displays "3.869s". + * @since v0.1.104 + */ + time(label?: string): void; + /** + * Stops a timer that was previously started by calling {@link time} and + * prints the result to `stdout`: + * + * ```js + * console.time('100-elements'); + * for (let i = 0; i < 100; i++) {} + * console.timeEnd('100-elements'); + * // prints 100-elements: 225.438ms + * ``` + * @since v0.1.104 + */ + timeEnd(label?: string): void; + /** + * For a timer that was previously started by calling {@link time}, prints + * the elapsed time and other `data` arguments to `stdout`: + * + * ```js + * console.time('process'); + * const value = expensiveProcess1(); // Returns 42 + * console.timeLog('process', value); + * // Prints "process: 365.227ms 42". + * doExpensiveProcess2(value); + * console.timeEnd('process'); + * ``` + * @since v10.7.0 + */ + timeLog(label?: string, ...data: any[]): void; + /** + * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code. + * + * ```js + * console.trace('Show me'); + * // Prints: (stack trace will vary based on where trace is called) + * // Trace: Show me + * // at repl:2:9 + * // at REPLServer.defaultEval (repl.js:248:27) + * // at bound (domain.js:287:14) + * // at REPLServer.runBound [as eval] (domain.js:300:12) + * // at REPLServer. (repl.js:412:12) + * // at emitOne (events.js:82:20) + * // at REPLServer.emit (events.js:169:7) + * // at REPLServer.Interface._onLine (readline.js:210:10) + * // at REPLServer.Interface._line (readline.js:549:8) + * // at REPLServer.Interface._ttyWrite (readline.js:826:14) + * ``` + * @since v0.1.104 + */ + trace(message?: any, ...optionalParams: any[]): void; + /** + * The `console.warn()` function is an alias for {@link error}. + * @since v0.1.100 + */ + warn(message?: any, ...optionalParams: any[]): void; + // --- Inspector mode only --- + /** + * This method does not display anything unless used in the inspector. + * Starts a JavaScript CPU profile with an optional label. + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector. + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Adds an event with the label `label` to the Timeline panel of the inspector. + */ + timeStamp(label?: string): void; + } + /** + * The `console` module provides a simple debugging console that is similar to the + * JavaScript console mechanism provided by web browsers. + * + * The module exports two specific components: + * + * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream. + * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`. + * + * _**Warning**_: The global console object's methods are neither consistently + * synchronous like the browser APIs they resemble, nor are they consistently + * asynchronous like all other Node.js streams. See the `note on process I/O` for + * more information. + * + * Example using the global `console`: + * + * ```js + * console.log('hello world'); + * // Prints: hello world, to stdout + * console.log('hello %s', 'world'); + * // Prints: hello world, to stdout + * console.error(new Error('Whoops, something bad happened')); + * // Prints error message and stack trace to stderr: + * // Error: Whoops, something bad happened + * // at [eval]:5:15 + * // at Script.runInThisContext (node:vm:132:18) + * // at Object.runInThisContext (node:vm:309:38) + * // at node:internal/process/execution:77:19 + * // at [eval]-wrapper:6:22 + * // at evalScript (node:internal/process/execution:76:60) + * // at node:internal/main/eval_string:23:3 + * + * const name = 'Will Robinson'; + * console.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to stderr + * ``` + * + * Example using the `Console` class: + * + * ```js + * const out = getStreamSomehow(); + * const err = getStreamSomehow(); + * const myConsole = new console.Console(out, err); + * + * myConsole.log('hello world'); + * // Prints: hello world, to out + * myConsole.log('hello %s', 'world'); + * // Prints: hello world, to out + * myConsole.error(new Error('Whoops, something bad happened')); + * // Prints: [Error: Whoops, something bad happened], to err + * + * const name = 'Will Robinson'; + * myConsole.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to err + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js) + */ + namespace console { + interface ConsoleConstructorOptions { + stdout: NodeJS.WritableStream; + stderr?: NodeJS.WritableStream | undefined; + ignoreErrors?: boolean | undefined; + colorMode?: boolean | 'auto' | undefined; + inspectOptions?: InspectOptions | undefined; + /** + * Set group indentation + * @default 2 + */ + groupIndentation?: number | undefined; + } + interface ConsoleConstructor { + prototype: Console; + new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; + new (options: ConsoleConstructorOptions): Console; + } + } + var console: Console; + } + export = globalThis.console; +} diff --git a/node_modules/@types/node/ts4.8/constants.d.ts b/node_modules/@types/node/ts4.8/constants.d.ts new file mode 100644 index 0000000..208020d --- /dev/null +++ b/node_modules/@types/node/ts4.8/constants.d.ts @@ -0,0 +1,18 @@ +/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ +declare module 'constants' { + import { constants as osConstants, SignalConstants } from 'node:os'; + import { constants as cryptoConstants } from 'node:crypto'; + import { constants as fsConstants } from 'node:fs'; + + const exp: typeof osConstants.errno & + typeof osConstants.priority & + SignalConstants & + typeof cryptoConstants & + typeof fsConstants; + export = exp; +} + +declare module 'node:constants' { + import constants = require('constants'); + export = constants; +} diff --git a/node_modules/@types/node/ts4.8/crypto.d.ts b/node_modules/@types/node/ts4.8/crypto.d.ts new file mode 100644 index 0000000..20d960c --- /dev/null +++ b/node_modules/@types/node/ts4.8/crypto.d.ts @@ -0,0 +1,3964 @@ +/** + * The `crypto` module provides cryptographic functionality that includes a set of + * wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions. + * + * ```js + * const { createHmac } = await import('crypto'); + * + * const secret = 'abcdefg'; + * const hash = createHmac('sha256', secret) + * .update('I love cupcakes') + * .digest('hex'); + * console.log(hash); + * // Prints: + * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/crypto.js) + */ +declare module 'crypto' { + import * as stream from 'node:stream'; + import { PeerCertificate } from 'node:tls'; + /** + * SPKAC is a Certificate Signing Request mechanism originally implemented by + * Netscape and was specified formally as part of [HTML5's `keygen` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen). + * + * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects + * should not use this element anymore. + * + * The `crypto` module provides the `Certificate` class for working with SPKAC + * data. The most common usage is handling output generated by the HTML5`` element. Node.js uses [OpenSSL's SPKAC + * implementation](https://www.openssl.org/docs/man1.1.0/apps/openssl-spkac.html) internally. + * @since v0.11.8 + */ + class Certificate { + /** + * ```js + * const { Certificate } = await import('crypto'); + * const spkac = getSpkacSomehow(); + * const challenge = Certificate.exportChallenge(spkac); + * console.log(challenge.toString('utf8')); + * // Prints: the challenge as a UTF8 string + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportChallenge(spkac: BinaryLike): Buffer; + /** + * ```js + * const { Certificate } = await import('crypto'); + * const spkac = getSpkacSomehow(); + * const publicKey = Certificate.exportPublicKey(spkac); + * console.log(publicKey); + * // Prints: the public key as + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; + /** + * ```js + * import { Buffer } from 'buffer'; + * const { Certificate } = await import('crypto'); + * + * const spkac = getSpkacSomehow(); + * console.log(Certificate.verifySpkac(Buffer.from(spkac))); + * // Prints: true or false + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return `true` if the given `spkac` data structure is valid, `false` otherwise. + */ + static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; + /** + * @deprecated + * @param spkac + * @returns The challenge component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportChallenge(spkac: BinaryLike): Buffer; + /** + * @deprecated + * @param spkac + * @param encoding The encoding of the spkac string. + * @returns The public key component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; + /** + * @deprecated + * @param spkac + * @returns `true` if the given `spkac` data structure is valid, + * `false` otherwise. + */ + verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; + } + namespace constants { + // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants + const OPENSSL_VERSION_NUMBER: number; + /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ + const SSL_OP_ALL: number; + /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */ + const SSL_OP_CISCO_ANYCONNECT: number; + /** Instructs OpenSSL to turn on cookie exchange. */ + const SSL_OP_COOKIE_EXCHANGE: number; + /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */ + const SSL_OP_EPHEMERAL_RSA: number; + /** Allows initial connection to servers that do not support RI. */ + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + const SSL_OP_MICROSOFT_SESS_ID_BUG: number; + /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */ + const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + const SSL_OP_NETSCAPE_CA_DN_BUG: number; + const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + /** Instructs OpenSSL to disable support for SSL/TLS compression. */ + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_QUERY_MTU: number; + /** Instructs OpenSSL to always start a new session when performing renegotiation. */ + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_PKCS1_CHECK_1: number; + const SSL_OP_PKCS1_CHECK_2: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */ + const SSL_OP_SINGLE_DH_USE: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */ + const SSL_OP_SINGLE_ECDH_USE: number; + const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + const SSL_OP_TLS_BLOCK_PADDING_BUG: number; + const SSL_OP_TLS_D5_BUG: number; + /** Instructs OpenSSL to disable version rollback attack detection. */ + const SSL_OP_TLS_ROLLBACK_BUG: number; + const ENGINE_METHOD_RSA: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_EC: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + const ALPN_ENABLED: number; + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ + const RSA_PSS_SALTLEN_DIGEST: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ + const RSA_PSS_SALTLEN_MAX_SIGN: number; + /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ + const RSA_PSS_SALTLEN_AUTO: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ + const defaultCoreCipherList: string; + /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ + const defaultCipherList: string; + } + interface HashOptions extends stream.TransformOptions { + /** + * For XOF hash functions such as `shake256`, the + * outputLength option can be used to specify the desired output length in bytes. + */ + outputLength?: number | undefined; + } + /** @deprecated since v10.0.0 */ + const fips: boolean; + /** + * Creates and returns a `Hash` object that can be used to generate hash digests + * using the given `algorithm`. Optional `options` argument controls stream + * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option + * can be used to specify the desired output length in bytes. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * Example: generating the sha256 sum of a file + * + * ```js + * import { + * createReadStream + * } from 'fs'; + * import { argv } from 'process'; + * const { + * createHash + * } = await import('crypto'); + * + * const filename = argv[2]; + * + * const hash = createHash('sha256'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hash.update(data); + * else { + * console.log(`${hash.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.92 + * @param options `stream.transform` options + */ + function createHash(algorithm: string, options?: HashOptions): Hash; + /** + * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. + * Optional `options` argument controls stream behavior. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is + * a `KeyObject`, its type must be `secret`. + * + * Example: generating the sha256 HMAC of a file + * + * ```js + * import { + * createReadStream + * } from 'fs'; + * import { argv } from 'process'; + * const { + * createHmac + * } = await import('crypto'); + * + * const filename = argv[2]; + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hmac.update(data); + * else { + * console.log(`${hmac.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac; + // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings + type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary'; + type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1'; + type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2'; + type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding; + type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid'; + /** + * The `Hash` class is a utility for creating hash digests of data. It can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed hash digest on the readable side, or + * * Using the `hash.update()` and `hash.digest()` methods to produce the + * computed hash. + * + * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hash` objects as streams: + * + * ```js + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hash.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * } + * }); + * + * hash.write('some data to hash'); + * hash.end(); + * ``` + * + * Example: Using `Hash` and piped streams: + * + * ```js + * import { createReadStream } from 'fs'; + * import { stdout } from 'process'; + * const { createHash } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * const input = createReadStream('test.js'); + * input.pipe(hash).setEncoding('hex').pipe(stdout); + * ``` + * + * Example: Using the `hash.update()` and `hash.digest()` methods: + * + * ```js + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('some data to hash'); + * console.log(hash.digest('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * ``` + * @since v0.1.92 + */ + class Hash extends stream.Transform { + private constructor(); + /** + * Creates a new `Hash` object that contains a deep copy of the internal state + * of the current `Hash` object. + * + * The optional `options` argument controls stream behavior. For XOF hash + * functions such as `'shake256'`, the `outputLength` option can be used to + * specify the desired output length in bytes. + * + * An error is thrown when an attempt is made to copy the `Hash` object after + * its `hash.digest()` method has been called. + * + * ```js + * // Calculate a rolling hash. + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('one'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('two'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('three'); + * console.log(hash.copy().digest('hex')); + * + * // Etc. + * ``` + * @since v13.1.0 + * @param options `stream.transform` options + */ + copy(options?: stream.TransformOptions): Hash; + /** + * Updates the hash content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Hash; + update(data: string, inputEncoding: Encoding): Hash; + /** + * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). + * If `encoding` is provided a string will be returned; otherwise + * a `Buffer` is returned. + * + * The `Hash` object can not be used again after `hash.digest()` method has been + * called. Multiple calls will cause an error to be thrown. + * @since v0.1.92 + * @param encoding The `encoding` of the return value. + */ + digest(): Buffer; + digest(encoding: BinaryToTextEncoding): string; + } + /** + * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can + * be used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed HMAC digest on the readable side, or + * * Using the `hmac.update()` and `hmac.digest()` methods to produce the + * computed HMAC digest. + * + * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hmac` objects as streams: + * + * ```js + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hmac.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * } + * }); + * + * hmac.write('some data to hash'); + * hmac.end(); + * ``` + * + * Example: Using `Hmac` and piped streams: + * + * ```js + * import { createReadStream } from 'fs'; + * import { stdout } from 'process'; + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream('test.js'); + * input.pipe(hmac).pipe(stdout); + * ``` + * + * Example: Using the `hmac.update()` and `hmac.digest()` methods: + * + * ```js + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.update('some data to hash'); + * console.log(hmac.digest('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * ``` + * @since v0.1.94 + */ + class Hmac extends stream.Transform { + private constructor(); + /** + * Updates the `Hmac` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Hmac; + update(data: string, inputEncoding: Encoding): Hmac; + /** + * Calculates the HMAC digest of all of the data passed using `hmac.update()`. + * If `encoding` is + * provided a string is returned; otherwise a `Buffer` is returned; + * + * The `Hmac` object can not be used again after `hmac.digest()` has been + * called. Multiple calls to `hmac.digest()` will result in an error being thrown. + * @since v0.1.94 + * @param encoding The `encoding` of the return value. + */ + digest(): Buffer; + digest(encoding: BinaryToTextEncoding): string; + } + type KeyObjectType = 'secret' | 'public' | 'private'; + interface KeyExportOptions { + type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1'; + format: T; + cipher?: string | undefined; + passphrase?: string | Buffer | undefined; + } + interface JwkKeyExportOptions { + format: 'jwk'; + } + interface JsonWebKey { + crv?: string | undefined; + d?: string | undefined; + dp?: string | undefined; + dq?: string | undefined; + e?: string | undefined; + k?: string | undefined; + kty?: string | undefined; + n?: string | undefined; + p?: string | undefined; + q?: string | undefined; + qi?: string | undefined; + x?: string | undefined; + y?: string | undefined; + [key: string]: unknown; + } + interface AsymmetricKeyDetails { + /** + * Key size in bits (RSA, DSA). + */ + modulusLength?: number | undefined; + /** + * Public exponent (RSA). + */ + publicExponent?: bigint | undefined; + /** + * Name of the message digest (RSA-PSS). + */ + hashAlgorithm?: string | undefined; + /** + * Name of the message digest used by MGF1 (RSA-PSS). + */ + mgf1HashAlgorithm?: string | undefined; + /** + * Minimal salt length in bytes (RSA-PSS). + */ + saltLength?: number | undefined; + /** + * Size of q in bits (DSA). + */ + divisorLength?: number | undefined; + /** + * Name of the curve (EC). + */ + namedCurve?: string | undefined; + } + /** + * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, + * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` + * objects are not to be created directly using the `new`keyword. + * + * Most applications should consider using the new `KeyObject` API instead of + * passing keys as strings or `Buffer`s due to improved security features. + * + * `KeyObject` instances can be passed to other threads via `postMessage()`. + * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to + * be listed in the `transferList` argument. + * @since v11.6.0 + */ + class KeyObject { + private constructor(); + /** + * Example: Converting a `CryptoKey` instance to a `KeyObject`: + * + * ```js + * const { webcrypto, KeyObject } = await import('crypto'); + * const { subtle } = webcrypto; + * + * const key = await subtle.generateKey({ + * name: 'HMAC', + * hash: 'SHA-256', + * length: 256 + * }, true, ['sign', 'verify']); + * + * const keyObject = KeyObject.from(key); + * console.log(keyObject.symmetricKeySize); + * // Prints: 32 (symmetric key size in bytes) + * ``` + * @since v15.0.0 + */ + static from(key: webcrypto.CryptoKey): KeyObject; + /** + * For asymmetric keys, this property represents the type of the key. Supported key + * types are: + * + * * `'rsa'` (OID 1.2.840.113549.1.1.1) + * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10) + * * `'dsa'` (OID 1.2.840.10040.4.1) + * * `'ec'` (OID 1.2.840.10045.2.1) + * * `'x25519'` (OID 1.3.101.110) + * * `'x448'` (OID 1.3.101.111) + * * `'ed25519'` (OID 1.3.101.112) + * * `'ed448'` (OID 1.3.101.113) + * * `'dh'` (OID 1.2.840.113549.1.3.1) + * + * This property is `undefined` for unrecognized `KeyObject` types and symmetric + * keys. + * @since v11.6.0 + */ + asymmetricKeyType?: KeyType | undefined; + /** + * For asymmetric keys, this property represents the size of the embedded key in + * bytes. This property is `undefined` for symmetric keys. + */ + asymmetricKeySize?: number | undefined; + /** + * This property exists only on asymmetric keys. Depending on the type of the key, + * this object contains information about the key. None of the information obtained + * through this property can be used to uniquely identify a key or to compromise + * the security of the key. + * + * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, + * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be + * set. + * + * Other key details might be exposed via this API using additional attributes. + * @since v15.7.0 + */ + asymmetricKeyDetails?: AsymmetricKeyDetails | undefined; + /** + * For symmetric keys, the following encoding options can be used: + * + * For public keys, the following encoding options can be used: + * + * For private keys, the following encoding options can be used: + * + * The result type depends on the selected encoding format, when PEM the + * result is a string, when DER it will be a buffer containing the data + * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. + * + * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are + * ignored. + * + * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of + * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be + * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for + * encrypted private keys. Since PKCS#8 defines its own + * encryption mechanism, PEM-level encryption is not supported when encrypting + * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for + * PKCS#1 and SEC1 encryption. + * @since v11.6.0 + */ + export(options: KeyExportOptions<'pem'>): string | Buffer; + export(options?: KeyExportOptions<'der'>): Buffer; + export(options?: JwkKeyExportOptions): JsonWebKey; + /** + * For secret keys, this property represents the size of the key in bytes. This + * property is `undefined` for asymmetric keys. + * @since v11.6.0 + */ + symmetricKeySize?: number | undefined; + /** + * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys + * or `'private'` for private (asymmetric) keys. + * @since v11.6.0 + */ + type: KeyObjectType; + } + type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305'; + type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm'; + type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb'; + type BinaryLike = string | NodeJS.ArrayBufferView; + type CipherKey = BinaryLike | KeyObject; + interface CipherCCMOptions extends stream.TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends stream.TransformOptions { + authTagLength?: number | undefined; + } + interface CipherOCBOptions extends stream.TransformOptions { + authTagLength: number; + } + /** + * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`. + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `password` is used to derive the cipher key and initialization vector (IV). + * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`. + * + * The implementation of `crypto.createCipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode + * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when + * they are used in order to avoid the risk of IV reuse that causes + * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead. + * @param options `stream.transform` options + */ + function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; + /** + * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and + * initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a + * given IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM; + function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB; + function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM; + function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher; + /** + * Instances of the `Cipher` class are used to encrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain unencrypted + * data is written to produce encrypted data on the readable side, or + * * Using the `cipher.update()` and `cipher.final()` methods to produce + * the encrypted data. + * + * The {@link createCipher} or {@link createCipheriv} methods are + * used to create `Cipher` instances. `Cipher` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Cipher` objects as streams: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * // Once we have the key and iv, we can create and use the cipher... + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = ''; + * cipher.setEncoding('hex'); + * + * cipher.on('data', (chunk) => encrypted += chunk); + * cipher.on('end', () => console.log(encrypted)); + * + * cipher.write('some clear text data'); + * cipher.end(); + * }); + * }); + * ``` + * + * Example: Using `Cipher` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'fs'; + * + * import { + * pipeline + * } from 'stream'; + * + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.js'); + * const output = createWriteStream('test.enc'); + * + * pipeline(input, cipher, output, (err) => { + * if (err) throw err; + * }); + * }); + * }); + * ``` + * + * Example: Using the `cipher.update()` and `cipher.final()` methods: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); + * encrypted += cipher.final('hex'); + * console.log(encrypted); + * }); + * }); + * ``` + * @since v0.1.94 + */ + class Cipher extends stream.Transform { + private constructor(); + /** + * Updates the cipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`, + * `TypedArray`, or `DataView`, then`inputEncoding` is ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being + * thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the data. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: BinaryLike): Buffer; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; + /** + * Once the `cipher.final()` method has been called, the `Cipher` object can no + * longer be used to encrypt data. Attempts to call `cipher.final()` more than + * once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): Buffer; + final(outputEncoding: BufferEncoding): string; + /** + * When using block encryption algorithms, the `Cipher` class will automatically + * add padding to the input data to the appropriate block size. To disable the + * default padding call `cipher.setAutoPadding(false)`. + * + * When `autoPadding` is `false`, the length of the entire input data must be a + * multiple of the cipher's block size or `cipher.final()` will throw an error. + * Disabling automatic padding is useful for non-standard padding, for instance + * using `0x0` instead of PKCS padding. + * + * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(autoPadding?: boolean): this; + } + interface CipherCCM extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options: { + plaintextLength: number; + } + ): this; + getAuthTag(): Buffer; + } + interface CipherGCM extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; + getAuthTag(): Buffer; + } + interface CipherOCB extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; + getAuthTag(): Buffer; + } + /** + * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead. + * @param options `stream.transform` options + */ + function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; + /** + * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags + * to those with the specified length. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a given + * IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM; + function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB; + function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher; + /** + * Instances of the `Decipher` class are used to decrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain encrypted + * data is written to produce unencrypted data on the readable side, or + * * Using the `decipher.update()` and `decipher.final()` methods to + * produce the unencrypted data. + * + * The {@link createDecipher} or {@link createDecipheriv} methods are + * used to create `Decipher` instances. `Decipher` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Decipher` objects as streams: + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Key length is dependent on the algorithm. In this case for aes192, it is + * // 24 bytes (192 bits). + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * let decrypted = ''; + * decipher.on('readable', () => { + * while (null !== (chunk = decipher.read())) { + * decrypted += chunk.toString('utf8'); + * } + * }); + * decipher.on('end', () => { + * console.log(decrypted); + * // Prints: some clear text data + * }); + * + * // Encrypted with same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * decipher.write(encrypted, 'hex'); + * decipher.end(); + * ``` + * + * Example: Using `Decipher` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'fs'; + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.enc'); + * const output = createWriteStream('test.js'); + * + * input.pipe(decipher).pipe(output); + * ``` + * + * Example: Using the `decipher.update()` and `decipher.final()` methods: + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * // Encrypted using same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + * decrypted += decipher.final('utf8'); + * console.log(decrypted); + * // Prints: some clear text data + * ``` + * @since v0.1.94 + */ + class Decipher extends stream.Transform { + private constructor(); + /** + * Updates the decipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is + * ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error + * being thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: NodeJS.ArrayBufferView): Buffer; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; + /** + * Once the `decipher.final()` method has been called, the `Decipher` object can + * no longer be used to decrypt data. Attempts to call `decipher.final()` more + * than once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): Buffer; + final(outputEncoding: BufferEncoding): string; + /** + * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and + * removing padding. + * + * Turning auto padding off will only work if the input data's length is a + * multiple of the ciphers block size. + * + * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(auto_padding?: boolean): this; + } + interface DecipherCCM extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options: { + plaintextLength: number; + } + ): this; + } + interface DecipherGCM extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; + } + interface DecipherOCB extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; + } + interface PrivateKeyInput { + key: string | Buffer; + format?: KeyFormat | undefined; + type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined; + passphrase?: string | Buffer | undefined; + } + interface PublicKeyInput { + key: string | Buffer; + format?: KeyFormat | undefined; + type?: 'pkcs1' | 'spki' | undefined; + } + /** + * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKey + * } = await import('crypto'); + * + * generateKey('hmac', { length: 64 }, (err, key) => { + * if (err) throw err; + * console.log(key.export().toString('hex')); // 46e..........620 + * }); + * ``` + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKey( + type: 'hmac' | 'aes', + options: { + length: number; + }, + callback: (err: Error | null, key: KeyObject) => void + ): void; + /** + * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKeySync + * } = await import('crypto'); + * + * const key = generateKeySync('hmac', { length: 64 }); + * console.log(key.export().toString('hex')); // e89..........41e + * ``` + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKeySync( + type: 'hmac' | 'aes', + options: { + length: number; + } + ): KeyObject; + interface JsonWebKeyInput { + key: JsonWebKey; + format: 'jwk'; + } + /** + * Creates and returns a new key object containing a private key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above. + * + * If the private key is encrypted, a `passphrase` must be specified. The length + * of the passphrase is limited to 1024 bytes. + * @since v11.6.0 + */ + function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject; + /** + * Creates and returns a new key object containing a public key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key; + * otherwise, `key` must be an object with the properties described above. + * + * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. + * + * Because public keys can be derived from private keys, a private key may be + * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the + * returned `KeyObject` will be `'public'` and that the private key cannot be + * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned + * and it will be impossible to extract the private key from the returned object. + * @since v11.6.0 + */ + function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject; + /** + * Creates and returns a new key object containing a secret key for symmetric + * encryption or `Hmac`. + * @since v11.6.0 + * @param encoding The string encoding when `key` is a string. + */ + function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; + function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; + /** + * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. + * Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Sign` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createSign(algorithm: string, options?: stream.WritableOptions): Sign; + type DSAEncoding = 'der' | 'ieee-p1363'; + interface SigningOptions { + /** + * @See crypto.constants.RSA_PKCS1_PADDING + */ + padding?: number | undefined; + saltLength?: number | undefined; + dsaEncoding?: DSAEncoding | undefined; + } + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} + interface SignKeyObjectInput extends SigningOptions { + key: KeyObject; + } + interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} + interface VerifyKeyObjectInput extends SigningOptions { + key: KeyObject; + } + type KeyLike = string | Buffer | KeyObject; + /** + * The `Sign` class is a utility for generating signatures. It can be used in one + * of two ways: + * + * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or + * * Using the `sign.update()` and `sign.sign()` methods to produce the + * signature. + * + * The {@link createSign} method is used to create `Sign` instances. The + * argument is the string name of the hash function to use. `Sign` objects are not + * to be created directly using the `new` keyword. + * + * Example: Using `Sign` and `Verify` objects as streams: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify + * } = await import('crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('ec', { + * namedCurve: 'sect239k1' + * }); + * + * const sign = createSign('SHA256'); + * sign.write('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey, 'hex'); + * + * const verify = createVerify('SHA256'); + * verify.write('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature, 'hex')); + * // Prints: true + * ``` + * + * Example: Using the `sign.update()` and `verify.update()` methods: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify + * } = await import('crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('rsa', { + * modulusLength: 2048, + * }); + * + * const sign = createSign('SHA256'); + * sign.update('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey); + * + * const verify = createVerify('SHA256'); + * verify.update('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature)); + * // Prints: true + * ``` + * @since v0.1.92 + */ + class Sign extends stream.Writable { + private constructor(); + /** + * Updates the `Sign` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): this; + update(data: string, inputEncoding: Encoding): this; + /** + * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the following additional properties can be passed: + * + * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * The `Sign` object can not be again used after `sign.sign()` method has been + * called. Multiple calls to `sign.sign()` will result in an error being thrown. + * @since v0.1.92 + */ + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string; + } + /** + * Creates and returns a `Verify` object that uses the given algorithm. + * Use {@link getHashes} to obtain an array of names of the available + * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior. + * + * In some cases, a `Verify` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; + /** + * The `Verify` class is a utility for verifying signatures. It can be used in one + * of two ways: + * + * * As a writable `stream` where written data is used to validate against the + * supplied signature, or + * * Using the `verify.update()` and `verify.verify()` methods to verify + * the signature. + * + * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword. + * + * See `Sign` for examples. + * @since v0.1.92 + */ + class Verify extends stream.Writable { + private constructor(); + /** + * Updates the `Verify` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `inputEncoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Verify; + update(data: string, inputEncoding: Encoding): Verify; + /** + * Verifies the provided data using the given `object` and `signature`. + * + * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an + * object, the following additional properties can be passed: + * + * The `signature` argument is the previously calculated signature for the data, in + * the `signatureEncoding`. + * If a `signatureEncoding` is specified, the `signature` is expected to be a + * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * The `verify` object can not be used again after `verify.verify()` has been + * called. Multiple calls to `verify.verify()` will result in an error being + * thrown. + * + * Because public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.1.92 + */ + verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean; + verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean; + } + /** + * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an + * optional specific `generator`. + * + * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used. + * + * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise + * a `Buffer`, `TypedArray`, or `DataView` is expected. + * + * If `generatorEncoding` is specified, `generator` is expected to be a string; + * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. + * @since v0.11.12 + * @param primeEncoding The `encoding` of the `prime` string. + * @param [generator=2] + * @param generatorEncoding The `encoding` of the `generator` string. + */ + function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; + function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman; + /** + * The `DiffieHellman` class is a utility for creating Diffie-Hellman key + * exchanges. + * + * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. + * + * ```js + * import assert from 'assert'; + * + * const { + * createDiffieHellman + * } = await import('crypto'); + * + * // Generate Alice's keys... + * const alice = createDiffieHellman(2048); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * // OK + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * ``` + * @since v0.5.0 + */ + class DiffieHellman { + private constructor(); + /** + * Generates private and public Diffie-Hellman key values, and returns + * the public key in the specified `encoding`. This key should be + * transferred to the other party. + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + generateKeys(): Buffer; + generateKeys(encoding: BinaryToTextEncoding): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using the specified `inputEncoding`, and secret is + * encoded using specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. + * @since v0.5.0 + * @param inputEncoding The `encoding` of an `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman prime in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrime(): Buffer; + getPrime(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman generator in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getGenerator(): Buffer; + getGenerator(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman public key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPublicKey(): Buffer; + getPublicKey(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman private key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrivateKey(): Buffer; + getPrivateKey(encoding: BinaryToTextEncoding): string; + /** + * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected + * to be a string. If no `encoding` is provided, `publicKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `publicKey` string. + */ + setPublicKey(publicKey: NodeJS.ArrayBufferView): void; + setPublicKey(publicKey: string, encoding: BufferEncoding): void; + /** + * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected + * to be a string. If no `encoding` is provided, `privateKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BufferEncoding): void; + /** + * A bit field containing any warnings and/or errors resulting from a check + * performed during initialization of the `DiffieHellman` object. + * + * The following values are valid for this property (as defined in `constants`module): + * + * * `DH_CHECK_P_NOT_SAFE_PRIME` + * * `DH_CHECK_P_NOT_PRIME` + * * `DH_UNABLE_TO_CHECK_GENERATOR` + * * `DH_NOT_SUITABLE_GENERATOR` + * @since v0.11.12 + */ + verifyError: number; + } + /** + * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. + * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. + * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. + * + * ```js + * const { createDiffieHellmanGroup } = await import('node:crypto'); + * const dh = createDiffieHellmanGroup('modp1'); + * ``` + * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): + * ```bash + * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h + * modp1 # 768 bits + * modp2 # 1024 bits + * modp5 # 1536 bits + * modp14 # 2048 bits + * modp15 # etc. + * modp16 + * modp17 + * modp18 + * ``` + * @since v0.7.5 + */ + const DiffieHellmanGroup: DiffieHellmanGroupConstructor; + interface DiffieHellmanGroupConstructor { + new(name: string): DiffieHellmanGroup; + (name: string): DiffieHellmanGroup; + readonly prototype: DiffieHellmanGroup; + } + type DiffieHellmanGroup = Omit; + /** + * Creates a predefined `DiffieHellmanGroup` key exchange object. The + * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`, + * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The + * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing + * the keys (with `diffieHellman.setPublicKey()`, for example). The + * advantage of using this method is that the parties do not have to + * generate nor exchange a group modulus beforehand, saving both processor + * and communication time. + * + * Example (obtaining a shared secret): + * + * ```js + * const { + * getDiffieHellman + * } = await import('crypto'); + * const alice = getDiffieHellman('modp14'); + * const bob = getDiffieHellman('modp14'); + * + * alice.generateKeys(); + * bob.generateKeys(); + * + * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + * + * // aliceSecret and bobSecret should be the same + * console.log(aliceSecret === bobSecret); + * ``` + * @since v0.7.5 + */ + function getDiffieHellman(groupName: string): DiffieHellmanGroup; + /** + * An alias for {@link getDiffieHellman} + * @since v0.9.3 + */ + function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; + /** + * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`. + * + * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be + * thrown if any of the input arguments specify invalid values or types. + * + * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated, + * please specify a `digest` explicitly. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2 + * } = await import('crypto'); + * + * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * ``` + * + * The `crypto.DEFAULT_ENCODING` property can be used to change the way the`derivedKey` is passed to the callback. This property, however, has been + * deprecated and use should be avoided. + * + * ```js + * import crypto from 'crypto'; + * crypto.DEFAULT_ENCODING = 'hex'; + * crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey); // '3745e48...aa39b34' + * }); + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * @since v0.5.5 + */ + function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void; + /** + * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`. + * + * If an error occurs an `Error` will be thrown, otherwise the derived key will be + * returned as a `Buffer`. + * + * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated, + * please specify a `digest` explicitly. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2Sync + * } = await import('crypto'); + * + * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); + * console.log(key.toString('hex')); // '3745e48...08d59ae' + * ``` + * + * The `crypto.DEFAULT_ENCODING` property may be used to change the way the`derivedKey` is returned. This property, however, is deprecated and use + * should be avoided. + * + * ```js + * import crypto from 'crypto'; + * crypto.DEFAULT_ENCODING = 'hex'; + * const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512'); + * console.log(key); // '3745e48...aa39b34' + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * @since v0.9.3 + */ + function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer; + /** + * Generates cryptographically strong pseudorandom data. The `size` argument + * is a number indicating the number of bytes to generate. + * + * If a `callback` function is provided, the bytes are generated asynchronously + * and the `callback` function is invoked with two arguments: `err` and `buf`. + * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes. + * + * ```js + * // Asynchronous + * const { + * randomBytes + * } = await import('crypto'); + * + * randomBytes(256, (err, buf) => { + * if (err) throw err; + * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); + * }); + * ``` + * + * If the `callback` function is not provided, the random bytes are generated + * synchronously and returned as a `Buffer`. An error will be thrown if + * there is a problem generating the bytes. + * + * ```js + * // Synchronous + * const { + * randomBytes + * } = await import('crypto'); + * + * const buf = randomBytes(256); + * console.log( + * `${buf.length} bytes of random data: ${buf.toString('hex')}`); + * ``` + * + * The `crypto.randomBytes()` method will not complete until there is + * sufficient entropy available. + * This should normally never take longer than a few milliseconds. The only time + * when generating the random bytes may conceivably block for a longer period of + * time is right after boot, when the whole system is still low on entropy. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomBytes()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomBytes` requests when doing so as part of fulfilling a client + * request. + * @since v0.5.8 + * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. + * @return if the `callback` function is not provided. + */ + function randomBytes(size: number): Buffer; + function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + function pseudoRandomBytes(size: number): Buffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + /** + * Return a random integer `n` such that `min <= n < max`. This + * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). + * + * The range (`max - min`) must be less than 2^48. `min` and `max` must + * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + * + * If the `callback` function is not provided, the random integer is + * generated synchronously. + * + * ```js + * // Asynchronous + * const { + * randomInt + * } = await import('crypto'); + * + * randomInt(3, (err, n) => { + * if (err) throw err; + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * }); + * ``` + * + * ```js + * // Synchronous + * const { + * randomInt + * } = await import('crypto'); + * + * const n = randomInt(3); + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * ``` + * + * ```js + * // With `min` argument + * const { + * randomInt + * } = await import('crypto'); + * + * const n = randomInt(1, 7); + * console.log(`The dice rolled: ${n}`); + * ``` + * @since v14.10.0, v12.19.0 + * @param [min=0] Start of random range (inclusive). + * @param max End of random range (exclusive). + * @param callback `function(err, n) {}`. + */ + function randomInt(max: number): number; + function randomInt(min: number, max: number): number; + function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; + function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; + /** + * Synchronous version of {@link randomFill}. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFillSync } = await import('crypto'); + * + * const buf = Buffer.alloc(10); + * console.log(randomFillSync(buf).toString('hex')); + * + * randomFillSync(buf, 5); + * console.log(buf.toString('hex')); + * + * // The above is equivalent to the following: + * randomFillSync(buf, 5, 5); + * console.log(buf.toString('hex')); + * ``` + * + * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFillSync } = await import('crypto'); + * + * const a = new Uint32Array(10); + * console.log(Buffer.from(randomFillSync(a).buffer, + * a.byteOffset, a.byteLength).toString('hex')); + * + * const b = new DataView(new ArrayBuffer(10)); + * console.log(Buffer.from(randomFillSync(b).buffer, + * b.byteOffset, b.byteLength).toString('hex')); + * + * const c = new ArrayBuffer(10); + * console.log(Buffer.from(randomFillSync(c)).toString('hex')); + * ``` + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @return The object passed as `buffer` argument. + */ + function randomFillSync(buffer: T, offset?: number, size?: number): T; + /** + * This function is similar to {@link randomBytes} but requires the first + * argument to be a `Buffer` that will be filled. It also + * requires that a callback is passed in. + * + * If the `callback` function is not provided, an error will be thrown. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFill } = await import('crypto'); + * + * const buf = Buffer.alloc(10); + * randomFill(buf, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * randomFill(buf, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * // The above is equivalent to the following: + * randomFill(buf, 5, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * ``` + * + * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`. + * + * While this includes instances of `Float32Array` and `Float64Array`, this + * function should not be used to generate random floating-point numbers. The + * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array + * contains finite numbers only, they are not drawn from a uniform random + * distribution and have no meaningful lower or upper bounds. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFill } = await import('crypto'); + * + * const a = new Uint32Array(10); + * randomFill(a, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const b = new DataView(new ArrayBuffer(10)); + * randomFill(b, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const c = new ArrayBuffer(10); + * randomFill(c, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf).toString('hex')); + * }); + * ``` + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomFill()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomFill` requests when doing so as part of fulfilling a client + * request. + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @param callback `function(err, buf) {}`. + */ + function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void; + interface ScryptOptions { + cost?: number | undefined; + blockSize?: number | undefined; + parallelization?: number | undefined; + N?: number | undefined; + r?: number | undefined; + p?: number | undefined; + maxmem?: number | undefined; + } + /** + * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the + * callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scrypt + * } = await import('crypto'); + * + * // Using the factory defaults. + * scrypt('password', 'salt', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * // Using a custom N parameter. Must be a power of two. + * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' + * }); + * ``` + * @since v10.5.0 + */ + function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void; + function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void; + /** + * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scryptSync + * } = await import('crypto'); + * // Using the factory defaults. + * + * const key1 = scryptSync('password', 'salt', 64); + * console.log(key1.toString('hex')); // '3745e48...08d59ae' + * // Using a custom N parameter. Must be a power of two. + * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); + * console.log(key2.toString('hex')); // '3745e48...aa39b34' + * ``` + * @since v10.5.0 + */ + function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; + interface RsaPublicKey { + key: KeyLike; + padding?: number | undefined; + } + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string | undefined; + /** + * @default 'sha1' + */ + oaepHash?: string | undefined; + oaepLabel?: NodeJS.TypedArray | undefined; + padding?: number | undefined; + } + /** + * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using + * the corresponding private key, for example using {@link privateDecrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.11.14 + */ + function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Decrypts `buffer` with `key`.`buffer` was previously encrypted using + * the corresponding private key, for example using {@link privateEncrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v1.1.0 + */ + function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using + * the corresponding public key, for example using {@link publicEncrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. + * @since v0.11.14 + */ + function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using + * the corresponding public key, for example using {@link publicDecrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. + * @since v1.1.0 + */ + function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * ```js + * const { + * getCiphers + * } = await import('crypto'); + * + * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] + * ``` + * @since v0.9.3 + * @return An array with the names of the supported cipher algorithms. + */ + function getCiphers(): string[]; + /** + * ```js + * const { + * getCurves + * } = await import('crypto'); + * + * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] + * ``` + * @since v2.3.0 + * @return An array with the names of the supported elliptic curves. + */ + function getCurves(): string[]; + /** + * @since v10.0.0 + * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. + */ + function getFips(): 1 | 0; + /** + * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available. + * @since v10.0.0 + * @param bool `true` to enable FIPS mode. + */ + function setFips(bool: boolean): void; + /** + * ```js + * const { + * getHashes + * } = await import('crypto'); + * + * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] + * ``` + * @since v0.9.3 + * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. + */ + function getHashes(): string[]; + /** + * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) + * key exchanges. + * + * Instances of the `ECDH` class can be created using the {@link createECDH} function. + * + * ```js + * import assert from 'assert'; + * + * const { + * createECDH + * } = await import('crypto'); + * + * // Generate Alice's keys... + * const alice = createECDH('secp521r1'); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createECDH('secp521r1'); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * // OK + * ``` + * @since v0.11.14 + */ + class ECDH { + private constructor(); + /** + * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the + * format specified by `format`. The `format` argument specifies point encoding + * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is + * interpreted using the specified `inputEncoding`, and the returned key is encoded + * using the specified `outputEncoding`. + * + * Use {@link getCurves} to obtain a list of available curve names. + * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display + * the name and description of each available elliptic curve. + * + * If `format` is not specified the point will be returned in `'uncompressed'`format. + * + * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * Example (uncompressing a key): + * + * ```js + * const { + * createECDH, + * ECDH + * } = await import('crypto'); + * + * const ecdh = createECDH('secp256k1'); + * ecdh.generateKeys(); + * + * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); + * + * const uncompressedKey = ECDH.convertKey(compressedKey, + * 'secp256k1', + * 'hex', + * 'hex', + * 'uncompressed'); + * + * // The converted key and the uncompressed public key should be the same + * console.log(uncompressedKey === ecdh.getPublicKey('hex')); + * ``` + * @since v10.0.0 + * @param inputEncoding The `encoding` of the `key` string. + * @param outputEncoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: BinaryToTextEncoding, + outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url', + format?: 'uncompressed' | 'compressed' | 'hybrid' + ): Buffer | string; + /** + * Generates private and public EC Diffie-Hellman key values, and returns + * the public key in the specified `format` and `encoding`. This key should be + * transferred to the other party. + * + * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. + * + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + generateKeys(): Buffer; + generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using specified `inputEncoding`, and the returned secret + * is encoded using the specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`. + * + * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. + * + * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is + * usually supplied from a remote user over an insecure network, + * be sure to handle this exception accordingly. + * @since v0.11.14 + * @param inputEncoding The `encoding` of the `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string; + /** + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @return The EC Diffie-Hellman in the specified `encoding`. + */ + getPrivateKey(): Buffer; + getPrivateKey(encoding: BinaryToTextEncoding): string; + /** + * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. + * + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param [encoding] The `encoding` of the return value. + * @param [format='uncompressed'] + * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. + */ + getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer; + getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; + /** + * Sets the EC Diffie-Hellman private key. + * If `encoding` is provided, `privateKey` is expected + * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * If `privateKey` is not valid for the curve specified when the `ECDH` object was + * created, an error is thrown. Upon setting the private key, the associated + * public point (key) is also generated and set in the `ECDH` object. + * @since v0.11.14 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; + } + /** + * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a + * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent + * OpenSSL releases, `openssl ecparam -list_curves` will also display the name + * and description of each available elliptic curve. + * @since v0.11.14 + */ + function createECDH(curveName: string): ECDH; + /** + * This function is based on a constant-time algorithm. + * Returns true if `a` is equal to `b`, without leaking timing information that + * would allow an attacker to guess one of the values. This is suitable for + * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). + * + * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they + * must have the same byte length. An error is thrown if `a` and `b` have + * different byte lengths. + * + * If at least one of `a` and `b` is a `TypedArray` with more than one byte per + * entry, such as `Uint16Array`, the result will be computed using the platform + * byte order. + * + * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code + * is timing-safe. Care should be taken to ensure that the surrounding code does + * not introduce timing vulnerabilities. + * @since v6.6.0 + */ + function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; + /** @deprecated since v10.0.0 */ + const DEFAULT_ENCODING: BufferEncoding; + type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448'; + type KeyFormat = 'pem' | 'der' | 'jwk'; + interface BasePrivateKeyEncodingOptions { + format: T; + cipher?: string | undefined; + passphrase?: string | undefined; + } + interface KeyPairKeyObjectResult { + publicKey: KeyObject; + privateKey: KeyObject; + } + interface ED25519KeyPairKeyObjectOptions {} + interface ED448KeyPairKeyObjectOptions {} + interface X25519KeyPairKeyObjectOptions {} + interface X448KeyPairKeyObjectOptions {} + interface ECKeyPairKeyObjectOptions { + /** + * Name of the curve to use + */ + namedCurve: string; + } + interface RSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + } + interface RSAPSSKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + /** + * Name of the message digest + */ + hashAlgorithm?: string; + /** + * Name of the message digest used by MGF1 + */ + mgf1HashAlgorithm?: string; + /** + * Minimal salt length in bytes + */ + saltLength?: string; + } + interface DSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + } + interface RSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs1' | 'pkcs8'; + }; + } + interface RSAPSSKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + /** + * Name of the message digest + */ + hashAlgorithm?: string; + /** + * Name of the message digest used by MGF1 + */ + mgf1HashAlgorithm?: string; + /** + * Minimal salt length in bytes + */ + saltLength?: string; + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface DSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface ECKeyPairOptions { + /** + * Name of the curve to use. + */ + namedCurve: string; + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'sec1' | 'pkcs8'; + }; + } + interface ED25519KeyPairOptions { + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface ED448KeyPairOptions { + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface X25519KeyPairOptions { + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface X448KeyPairOptions { + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface KeyPairSyncResult { + publicKey: T1; + privateKey: T2; + } + /** + * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, + * Ed25519, Ed448, X25519, X448, and DH are currently supported. + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * When encoding public keys, it is recommended to use `'spki'`. When encoding + * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, + * and to keep the passphrase confidential. + * + * ```js + * const { + * generateKeyPairSync + * } = await import('crypto'); + * + * const { + * publicKey, + * privateKey, + * } = generateKeyPairSync('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem' + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret' + * } + * }); + * ``` + * + * The return value `{ publicKey, privateKey }` represents the generated key pair. + * When PEM encoding was selected, the respective key will be a string, otherwise + * it will be a buffer containing the data encoded as DER. + * @since v10.12.0 + * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. + */ + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + /** + * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, + * Ed25519, Ed448, X25519, X448, and DH are currently supported. + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage: + * + * ```js + * const { + * generateKeyPair + * } = await import('crypto'); + * + * generateKeyPair('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem' + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret' + * } + * }, (err, publicKey, privateKey) => { + * // Handle errors and use the generated key pair. + * }); + * ``` + * + * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. + * @since v10.12.0 + * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. + */ + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + namespace generateKeyPair { + function __promisify__( + type: 'rsa', + options: RSAKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'rsa', + options: RSAKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'rsa', + options: RSAKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'rsa', + options: RSAKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'dsa', + options: DSAKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'dsa', + options: DSAKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'dsa', + options: DSAKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'dsa', + options: DSAKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'ec', + options: ECKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'ec', + options: ECKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'ec', + options: ECKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'ec', + options: ECKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'ed25519', + options: ED25519KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'ed25519', + options: ED25519KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'ed25519', + options: ED25519KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'ed25519', + options: ED25519KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'ed448', + options: ED448KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'ed448', + options: ED448KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'ed448', + options: ED448KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'ed448', + options: ED448KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'x25519', + options: X25519KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'x25519', + options: X25519KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'x25519', + options: X25519KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'x25519', + options: X25519KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'x448', + options: X448KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'x448', + options: X448KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'x448', + options: X448KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'x448', + options: X448KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise; + } + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to {@link createPrivateKey}. If it is an object, the following + * additional properties can be passed: + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; + function sign( + algorithm: string | null | undefined, + data: NodeJS.ArrayBufferView, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, + callback: (error: Error | null, data: Buffer) => void + ): void; + /** + * Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the + * key type (especially Ed25519 and Ed448). + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to {@link createPublicKey}. If it is an object, the following + * additional properties can be passed: + * + * The `signature` argument is the previously calculated signature for the `data`. + * + * Because public keys can be derived from private keys, a private key or a public + * key may be passed for `key`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean; + function verify( + algorithm: string | null | undefined, + data: NodeJS.ArrayBufferView, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, + signature: NodeJS.ArrayBufferView, + callback: (error: Error | null, result: boolean) => void + ): void; + /** + * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`. + * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES). + * @since v13.9.0, v12.17.0 + */ + function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer; + type CipherMode = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts'; + interface CipherInfoOptions { + /** + * A test key length. + */ + keyLength?: number | undefined; + /** + * A test IV length. + */ + ivLength?: number | undefined; + } + interface CipherInfo { + /** + * The name of the cipher. + */ + name: string; + /** + * The nid of the cipher. + */ + nid: number; + /** + * The block size of the cipher in bytes. + * This property is omitted when mode is 'stream'. + */ + blockSize?: number | undefined; + /** + * The expected or default initialization vector length in bytes. + * This property is omitted if the cipher does not use an initialization vector. + */ + ivLength?: number | undefined; + /** + * The expected or default key length in bytes. + */ + keyLength: number; + /** + * The cipher mode. + */ + mode: CipherMode; + } + /** + * Returns information about a given cipher. + * + * Some ciphers accept variable length keys and initialization vectors. By default, + * the `crypto.getCipherInfo()` method will return the default values for these + * ciphers. To test if a given key length or iv length is acceptable for given + * cipher, use the `keyLength` and `ivLength` options. If the given values are + * unacceptable, `undefined` will be returned. + * @since v15.0.0 + * @param nameOrNid The name or nid of the cipher to query. + */ + function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; + /** + * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. The successfully generated `derivedKey` will + * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any + * of the input arguments specify invalid values or types. + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * hkdf + * } = await import('crypto'); + * + * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * }); + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. It must be at least one byte in length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdf(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void; + /** + * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The + * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes. + * + * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). + * + * An error will be thrown if any of the input arguments specify invalid values or + * types, or if the derived key cannot be generated. + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * hkdfSync + * } = await import('crypto'); + * + * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. It must be at least one byte in length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdfSync(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer; + interface SecureHeapUsage { + /** + * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag. + */ + total: number; + /** + * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag. + */ + min: number; + /** + * The total number of bytes currently allocated from the secure heap. + */ + used: number; + /** + * The calculated ratio of `used` to `total` allocated bytes. + */ + utilization: number; + } + /** + * @since v15.6.0 + */ + function secureHeapUsed(): SecureHeapUsage; + interface RandomUUIDOptions { + /** + * By default, to improve performance, + * Node.js will pre-emptively generate and persistently cache enough + * random data to generate up to 128 random UUIDs. To generate a UUID + * without using the cache, set `disableEntropyCache` to `true`. + * + * @default `false` + */ + disableEntropyCache?: boolean | undefined; + } + /** + * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a + * cryptographic pseudorandom number generator. + * @since v15.6.0, v14.17.0 + */ + function randomUUID(options?: RandomUUIDOptions): string; + interface X509CheckOptions { + /** + * @default 'always' + */ + subject?: 'always' | 'default' | 'never'; + /** + * @default true + */ + wildcards?: boolean; + /** + * @default true + */ + partialWildcards?: boolean; + /** + * @default false + */ + multiLabelWildcards?: boolean; + /** + * @default false + */ + singleLabelSubdomains?: boolean; + } + /** + * Encapsulates an X509 certificate and provides read-only access to + * its information. + * + * ```js + * const { X509Certificate } = await import('crypto'); + * + * const x509 = new X509Certificate('{... pem encoded cert ...}'); + * + * console.log(x509.subject); + * ``` + * @since v15.6.0 + */ + class X509Certificate { + /** + * Will be \`true\` if this is a Certificate Authority (CA) certificate. + * @since v15.6.0 + */ + readonly ca: boolean; + /** + * The SHA-1 fingerprint of this certificate. + * + * Because SHA-1 is cryptographically broken and because the security of SHA-1 is + * significantly worse than that of algorithms that are commonly used to sign + * certificates, consider using `x509.fingerprint256` instead. + * @since v15.6.0 + */ + readonly fingerprint: string; + /** + * The SHA-256 fingerprint of this certificate. + * @since v15.6.0 + */ + readonly fingerprint256: string; + /** + * The SHA-512 fingerprint of this certificate. + * @since v16.14.0 + */ + readonly fingerprint512: string; + /** + * The complete subject of this certificate. + * @since v15.6.0 + */ + readonly subject: string; + /** + * The subject alternative name specified for this certificate or `undefined` + * if not available. + * @since v15.6.0 + */ + readonly subjectAltName: string | undefined; + /** + * The information access content of this certificate or `undefined` if not + * available. + * @since v15.6.0 + */ + readonly infoAccess: string | undefined; + /** + * An array detailing the key usages for this certificate. + * @since v15.6.0 + */ + readonly keyUsage: string[]; + /** + * The issuer identification included in this certificate. + * @since v15.6.0 + */ + readonly issuer: string; + /** + * The issuer certificate or `undefined` if the issuer certificate is not + * available. + * @since v15.9.0 + */ + readonly issuerCertificate?: X509Certificate | undefined; + /** + * The public key `KeyObject` for this certificate. + * @since v15.6.0 + */ + readonly publicKey: KeyObject; + /** + * A `Buffer` containing the DER encoding of this certificate. + * @since v15.6.0 + */ + readonly raw: Buffer; + /** + * The serial number of this certificate. + * + * Serial numbers are assigned by certificate authorities and do not uniquely + * identify certificates. Consider using `x509.fingerprint256` as a unique + * identifier instead. + * @since v15.6.0 + */ + readonly serialNumber: string; + /** + * The date/time from which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validFrom: string; + /** + * The date/time until which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validTo: string; + constructor(buffer: BinaryLike); + /** + * Checks whether the certificate matches the given email address. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any email addresses. + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching email + * address, the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns `email` if the certificate matches, `undefined` if it does not. + */ + checkEmail(email: string, options?: Pick): string | undefined; + /** + * Checks whether the certificate matches the given host name. + * + * If the certificate matches the given host name, the matching subject name is + * returned. The returned name might be an exact match (e.g., `foo.example.com`) + * or it might contain wildcards (e.g., `*.example.com`). Because host name + * comparisons are case-insensitive, the returned subject name might also differ + * from the given `name` in capitalization. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching DNS name, + * the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. + */ + checkHost(name: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether the certificate matches the given IP address (IPv4 or IPv6). + * + * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they + * must match the given `ip` address exactly. Other subject alternative names as + * well as the subject field of the certificate are ignored. + * @since v15.6.0 + * @return Returns `ip` if the certificate matches, `undefined` if it does not. + */ + checkIP(ip: string): string | undefined; + /** + * Checks whether this certificate was issued by the given `otherCert`. + * @since v15.6.0 + */ + checkIssued(otherCert: X509Certificate): boolean; + /** + * Checks whether the public key for this certificate is consistent with + * the given private key. + * @since v15.6.0 + * @param privateKey A private key. + */ + checkPrivateKey(privateKey: KeyObject): boolean; + /** + * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded + * certificate. + * @since v15.6.0 + */ + toJSON(): string; + /** + * Returns information about this certificate using the legacy `certificate object` encoding. + * @since v15.6.0 + */ + toLegacyObject(): PeerCertificate; + /** + * Returns the PEM-encoded certificate. + * @since v15.6.0 + */ + toString(): string; + /** + * Verifies that this certificate was signed by the given public key. + * Does not perform any other validation checks on the certificate. + * @since v15.6.0 + * @param publicKey A public key. + */ + verify(publicKey: KeyObject): boolean; + } + type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint; + interface GeneratePrimeOptions { + add?: LargeNumberLike | undefined; + rem?: LargeNumberLike | undefined; + /** + * @default false + */ + safe?: boolean | undefined; + bigint?: boolean | undefined; + } + interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { + bigint: true; + } + interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { + bigint?: false | undefined; + } + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void; + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrimeSync(size: number): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; + interface CheckPrimeOptions { + /** + * The number of Miller-Rabin probabilistic primality iterations to perform. + * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. + * Care must be used when selecting a number of checks. + * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. + * + * @default 0 + */ + checks?: number | undefined; + } + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + */ + function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; + function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void; + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. + */ + function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; + /** + * Load and set the `engine` for some or all OpenSSL functions (selected by flags). + * + * `engine` could be either an id or a path to the engine's shared library. + * + * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. + * The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): + * + * - `crypto.constants.ENGINE_METHOD_RSA` + * - `crypto.constants.ENGINE_METHOD_DSA` + * - `crypto.constants.ENGINE_METHOD_DH` + * - `crypto.constants.ENGINE_METHOD_RAND` + * - `crypto.constants.ENGINE_METHOD_EC` + * - `crypto.constants.ENGINE_METHOD_CIPHERS` + * - `crypto.constants.ENGINE_METHOD_DIGESTS` + * - `crypto.constants.ENGINE_METHOD_PKEY_METHS` + * - `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` + * - `crypto.constants.ENGINE_METHOD_ALL` + * - `crypto.constants.ENGINE_METHOD_NONE` + * + * The flags below are deprecated in OpenSSL-1.1.0. + * + * - `crypto.constants.ENGINE_METHOD_ECDH` + * - `crypto.constants.ENGINE_METHOD_ECDSA` + * - `crypto.constants.ENGINE_METHOD_STORE` + * @since v0.11.11 + * @param [flags=crypto.constants.ENGINE_METHOD_ALL] + */ + function setEngine(engine: string, flags?: number): void; + /** + * A convenient alias for `crypto.webcrypto.getRandomValues()`. + * This implementation is not compliant with the Web Crypto spec, + * to write web-compatible code use `crypto.webcrypto.getRandomValues()` instead. + * @since v17.4.0 + * @returns Returns `typedArray`. + */ + function getRandomValues(typedArray: T): T; + /** + * A convenient alias for `crypto.webcrypto.subtle`. + * @since v17.4.0 + */ + const subtle: webcrypto.SubtleCrypto; + /** + * An implementation of the Web Crypto API standard. + * + * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. + * @since v15.0.0 + */ + const webcrypto: webcrypto.Crypto; + namespace webcrypto { + type BufferSource = ArrayBufferView | ArrayBuffer; + type KeyFormat = 'jwk' | 'pkcs8' | 'raw' | 'spki'; + type KeyType = 'private' | 'public' | 'secret'; + type KeyUsage = 'decrypt' | 'deriveBits' | 'deriveKey' | 'encrypt' | 'sign' | 'unwrapKey' | 'verify' | 'wrapKey'; + type AlgorithmIdentifier = Algorithm | string; + type HashAlgorithmIdentifier = AlgorithmIdentifier; + type NamedCurve = string; + type BigInteger = Uint8Array; + interface AesCbcParams extends Algorithm { + iv: BufferSource; + } + interface AesCtrParams extends Algorithm { + counter: BufferSource; + length: number; + } + interface AesDerivedKeyParams extends Algorithm { + length: number; + } + interface AesGcmParams extends Algorithm { + additionalData?: BufferSource; + iv: BufferSource; + tagLength?: number; + } + interface AesKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface AesKeyGenParams extends Algorithm { + length: number; + } + interface Algorithm { + name: string; + } + interface EcKeyAlgorithm extends KeyAlgorithm { + namedCurve: NamedCurve; + } + interface EcKeyGenParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcKeyImportParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcdhKeyDeriveParams extends Algorithm { + public: CryptoKey; + } + interface EcdsaParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface Ed448Params extends Algorithm { + context?: BufferSource; + } + interface HkdfParams extends Algorithm { + hash: HashAlgorithmIdentifier; + info: BufferSource; + salt: BufferSource; + } + interface HmacImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface HmacKeyAlgorithm extends KeyAlgorithm { + hash: KeyAlgorithm; + length: number; + } + interface HmacKeyGenParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface JsonWebKey { + alg?: string; + crv?: string; + d?: string; + dp?: string; + dq?: string; + e?: string; + ext?: boolean; + k?: string; + key_ops?: string[]; + kty?: string; + n?: string; + oth?: RsaOtherPrimesInfo[]; + p?: string; + q?: string; + qi?: string; + use?: string; + x?: string; + y?: string; + } + interface KeyAlgorithm { + name: string; + } + interface Pbkdf2Params extends Algorithm { + hash: HashAlgorithmIdentifier; + iterations: number; + salt: BufferSource; + } + interface RsaHashedImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { + hash: KeyAlgorithm; + } + interface RsaHashedKeyGenParams extends RsaKeyGenParams { + hash: HashAlgorithmIdentifier; + } + interface RsaKeyAlgorithm extends KeyAlgorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaKeyGenParams extends Algorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaOaepParams extends Algorithm { + label?: BufferSource; + } + interface RsaOtherPrimesInfo { + d?: string; + r?: string; + t?: string; + } + interface RsaPssParams extends Algorithm { + saltLength: number; + } + /** + * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class. + * `Crypto` is a singleton that provides access to the remainder of the crypto API. + * @since v15.0.0 + */ + interface Crypto { + /** + * Provides access to the `SubtleCrypto` API. + * @since v15.0.0 + */ + readonly subtle: SubtleCrypto; + /** + * Generates cryptographically strong random values. + * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned. + * + * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted. + * + * An error will be thrown if the given `typedArray` is larger than 65,536 bytes. + * @since v15.0.0 + */ + getRandomValues>(typedArray: T): T; + /** + * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID. + * The UUID is generated using a cryptographic pseudorandom number generator. + * @since v16.7.0 + */ + randomUUID(): string; + CryptoKey: CryptoKeyConstructor; + } + // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable. + interface CryptoKeyConstructor { + /** Illegal constructor */ + (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user. + readonly length: 0; + readonly name: 'CryptoKey'; + readonly prototype: CryptoKey; + } + /** + * @since v15.0.0 + */ + interface CryptoKey { + /** + * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters. + * @since v15.0.0 + */ + readonly algorithm: KeyAlgorithm; + /** + * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`. + * @since v15.0.0 + */ + readonly extractable: boolean; + /** + * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key. + * @since v15.0.0 + */ + readonly type: KeyType; + /** + * An array of strings identifying the operations for which the key may be used. + * + * The possible usages are: + * - `'encrypt'` - The key may be used to encrypt data. + * - `'decrypt'` - The key may be used to decrypt data. + * - `'sign'` - The key may be used to generate digital signatures. + * - `'verify'` - The key may be used to verify digital signatures. + * - `'deriveKey'` - The key may be used to derive a new key. + * - `'deriveBits'` - The key may be used to derive bits. + * - `'wrapKey'` - The key may be used to wrap another key. + * - `'unwrapKey'` - The key may be used to unwrap another key. + * + * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`). + * @since v15.0.0 + */ + readonly usages: KeyUsage[]; + } + /** + * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair. + * @since v15.0.0 + */ + interface CryptoKeyPair { + /** + * A {@link CryptoKey} whose type will be `'private'`. + * @since v15.0.0 + */ + privateKey: CryptoKey; + /** + * A {@link CryptoKey} whose type will be `'public'`. + * @since v15.0.0 + */ + publicKey: CryptoKey; + } + /** + * @since v15.0.0 + */ + interface SubtleCrypto { + /** + * Using the method and parameters specified in `algorithm` and the keying material provided by `key`, + * `subtle.decrypt()` attempts to decipher the provided `data`. If successful, + * the returned promise will be resolved with an `` containing the plaintext result. + * + * The algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * @since v15.0.0 + */ + decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; + /** + * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`, + * `subtle.deriveBits()` attempts to generate `length` bits. + * The Node.js implementation requires that when `length` is a number it must be multiple of `8`. + * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed + * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms. + * If successful, the returned promise will be resolved with an `` containing the generated data. + * + * The algorithms currently supported include: + * + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HKDF'` + * - `'PBKDF2'` + * @since v15.0.0 + */ + deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise; + deriveBits(algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + /** + * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`, + * `subtle.deriveKey()` attempts to generate a new ` based on the method and parameters in `derivedKeyAlgorithm`. + * + * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material, + * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input. + * + * The algorithms currently supported include: + * + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HKDF'` + * - `'PBKDF2'` + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + deriveKey( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, + baseKey: CryptoKey, + derivedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, + extractable: boolean, + keyUsages: ReadonlyArray + ): Promise; + /** + * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`. + * If successful, the returned promise is resolved with an `` containing the computed digest. + * + * If `algorithm` is provided as a ``, it must be one of: + * + * - `'SHA-1'` + * - `'SHA-256'` + * - `'SHA-384'` + * - `'SHA-512'` + * + * If `algorithm` is provided as an ``, it must have a `name` property whose value is one of the above. + * @since v15.0.0 + */ + digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise; + /** + * Using the method and parameters specified by `algorithm` and the keying material provided by `key`, + * `subtle.encrypt()` attempts to encipher `data`. If successful, + * the returned promise is resolved with an `` containing the encrypted result. + * + * The algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * @since v15.0.0 + */ + encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; + /** + * Exports the given key into the specified format, if supported. + * + * If the `` is not extractable, the returned promise will reject. + * + * When `format` is either `'pkcs8'` or `'spki'` and the export is successful, + * the returned promise will be resolved with an `` containing the exported key data. + * + * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a + * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification. + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @returns `` containing ``. + * @since v15.0.0 + */ + exportKey(format: 'jwk', key: CryptoKey): Promise; + exportKey(format: Exclude, key: CryptoKey): Promise; + /** + * Using the method and parameters provided in `algorithm`, + * `subtle.generateKey()` attempts to generate new keying material. + * Depending the method used, the method may generate either a single `` or a ``. + * + * The `` (public and private key) generating algorithms supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'RSA-OAEP'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * The `` (secret key) generating algorithms supported include: + * + * - `'HMAC'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; + generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; + /** + * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format` + * to create a `` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments. + * If the import is successful, the returned promise will be resolved with the created ``. + * + * If importing a `'PBKDF2'` key, `extractable` must be `false`. + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + importKey( + format: 'jwk', + keyData: JsonWebKey, + algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, + extractable: boolean, + keyUsages: ReadonlyArray + ): Promise; + importKey( + format: Exclude, + keyData: BufferSource, + algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, + extractable: boolean, + keyUsages: KeyUsage[] + ): Promise; + /** + * Using the method and parameters given by `algorithm` and the keying material provided by `key`, + * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful, + * the returned promise is resolved with an `` containing the generated signature. + * + * The algorithms currently supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'HMAC'` + * @since v15.0.0 + */ + sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, data: BufferSource): Promise; + /** + * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. + * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `` instance. + * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input) + * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs. + * If successful, the returned promise is resolved with a `` object. + * + * The wrapping algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * + * The unwrapped key algorithms supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'RSA-OAEP'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HMAC'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + unwrapKey( + format: KeyFormat, + wrappedKey: BufferSource, + unwrappingKey: CryptoKey, + unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, + unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, + extractable: boolean, + keyUsages: KeyUsage[] + ): Promise; + /** + * Using the method and parameters given in `algorithm` and the keying material provided by `key`, + * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`. + * The returned promise is resolved with either `true` or `false`. + * + * The algorithms currently supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'HMAC'` + * @since v15.0.0 + */ + verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise; + /** + * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. + * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`, + * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`. + * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments, + * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs. + * If successful, the returned promise will be resolved with an `` containing the encrypted key data. + * + * The wrapping algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @since v15.0.0 + */ + wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise; + } + } +} +declare module 'node:crypto' { + export * from 'crypto'; +} diff --git a/node_modules/@types/node/ts4.8/dgram.d.ts b/node_modules/@types/node/ts4.8/dgram.d.ts new file mode 100644 index 0000000..247328d --- /dev/null +++ b/node_modules/@types/node/ts4.8/dgram.d.ts @@ -0,0 +1,545 @@ +/** + * The `dgram` module provides an implementation of UDP datagram sockets. + * + * ```js + * import dgram from 'dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.log(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dgram.js) + */ +declare module 'dgram' { + import { AddressInfo } from 'node:net'; + import * as dns from 'node:dns'; + import { EventEmitter, Abortable } from 'node:events'; + interface RemoteInfo { + address: string; + family: 'IPv4' | 'IPv6'; + port: number; + size: number; + } + interface BindOptions { + port?: number | undefined; + address?: string | undefined; + exclusive?: boolean | undefined; + fd?: number | undefined; + } + type SocketType = 'udp4' | 'udp6'; + interface SocketOptions extends Abortable { + type: SocketType; + reuseAddr?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + recvBufferSize?: number | undefined; + sendBufferSize?: number | undefined; + lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined; + } + /** + * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram + * messages. When `address` and `port` are not passed to `socket.bind()` the + * method will bind the socket to the "all interfaces" address on a random port + * (it does the right thing for both `udp4` and `udp6` sockets). The bound address + * and port can be retrieved using `socket.address().address` and `socket.address().port`. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket: + * + * ```js + * const controller = new AbortController(); + * const { signal } = controller; + * const server = dgram.createSocket({ type: 'udp4', signal }); + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * // Later, when you want to close the server. + * controller.abort(); + * ``` + * @since v0.11.13 + * @param options Available options are: + * @param callback Attached as a listener for `'message'` events. Optional. + */ + function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + /** + * Encapsulates the datagram functionality. + * + * New instances of `dgram.Socket` are created using {@link createSocket}. + * The `new` keyword is not to be used to create `dgram.Socket` instances. + * @since v0.1.99 + */ + class Socket extends EventEmitter { + /** + * Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not + * specified, the operating system will choose + * one interface and will add membership to it. To add membership to every + * available interface, call `addMembership` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * + * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: + * + * ```js + * import cluster from 'cluster'; + * import dgram from 'dgram'; + * + * if (cluster.isPrimary) { + * cluster.fork(); // Works ok. + * cluster.fork(); // Fails with EADDRINUSE. + * } else { + * const s = dgram.createSocket('udp4'); + * s.bind(1234, () => { + * s.addMembership('224.0.0.114'); + * }); + * } + * ``` + * @since v0.6.9 + */ + addMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * Returns an object containing the address information for a socket. + * For UDP sockets, this object will contain `address`, `family` and `port`properties. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.99 + */ + address(): AddressInfo; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address`. If `port` is not + * specified or is `0`, the operating system will attempt to bind to a + * random port. If `address` is not specified, the operating system will + * attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is + * called. + * + * Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * Example of a UDP server listening on port 41234: + * + * ```js + * import dgram from 'dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.log(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @since v0.1.99 + * @param callback with no parameters. Called when binding is complete. + */ + bind(port?: number, address?: string, callback?: () => void): this; + bind(port?: number, callback?: () => void): this; + bind(callback?: () => void): this; + bind(options: BindOptions, callback?: () => void): this; + /** + * Close the underlying socket and stop listening for data on it. If a callback is + * provided, it is added as a listener for the `'close'` event. + * @since v0.1.99 + * @param callback Called when the socket has been closed. + */ + close(callback?: () => void): this; + /** + * Associates the `dgram.Socket` to a remote address and port. Every + * message sent by this handle is automatically sent to that destination. Also, + * the socket will only receive messages from that remote peer. + * Trying to call `connect()` on an already connected socket will result + * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not + * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) + * will be used by default. Once the connection is complete, a `'connect'` event + * is emitted and the optional `callback` function is called. In case of failure, + * the `callback` is called or, failing this, an `'error'` event is emitted. + * @since v12.0.0 + * @param callback Called when the connection is completed or on error. + */ + connect(port: number, address?: string, callback?: () => void): void; + connect(port: number, callback: () => void): void; + /** + * A synchronous function that disassociates a connected `dgram.Socket` from + * its remote address. Trying to call `disconnect()` on an unbound or already + * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. + * @since v12.0.0 + */ + disconnect(): void; + /** + * Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the + * kernel when the socket is closed or the process terminates, so most apps will + * never have reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v0.6.9 + */ + dropMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_RCVBUF` socket receive buffer size in bytes. + */ + getRecvBufferSize(): number; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_SNDBUF` socket send buffer size in bytes. + */ + getSendBufferSize(): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active. The `socket.ref()` method adds the socket back to the reference + * counting and restores the default behavior. + * + * Calling `socket.ref()` multiples times will have no additional effect. + * + * The `socket.ref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + ref(): this; + /** + * Returns an object containing the `address`, `family`, and `port` of the remote + * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception + * if the socket is not connected. + * @since v12.0.0 + */ + remoteAddress(): AddressInfo; + /** + * Broadcasts a datagram on the socket. + * For connectionless sockets, the destination `port` and `address` must be + * specified. Connected sockets, on the other hand, will use their associated + * remote endpoint, so the `port` and `address` arguments must not be set. + * + * The `msg` argument contains the message to be sent. + * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, + * any `TypedArray` or a `DataView`, + * the `offset` and `length` specify the offset within the `Buffer` where the + * message begins and the number of bytes in the message, respectively. + * If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that + * contain multi-byte characters, `offset` and `length` will be calculated with + * respect to `byte length` and not the character position. + * If `msg` is an array, `offset` and `length` must not be specified. + * + * The `address` argument is a string. If the value of `address` is a host name, + * DNS will be used to resolve the address of the host. If `address` is not + * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default. + * + * If the socket has not been previously bound with a call to `bind`, the socket + * is assigned a random port number and is bound to the "all interfaces" address + * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) + * + * An optional `callback` function may be specified to as a way of reporting + * DNS errors or for determining when it is safe to reuse the `buf` object. + * DNS lookups delay the time to send for at least one tick of the + * Node.js event loop. + * + * The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be + * passed as the first argument to the `callback`. If a `callback` is not given, + * the error is emitted as an `'error'` event on the `socket` object. + * + * Offset and length are optional but both _must_ be set if either are used. + * They are supported only when the first argument is a `Buffer`, a `TypedArray`, + * or a `DataView`. + * + * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. + * + * Example of sending a UDP packet to a port on `localhost`; + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.send(message, 41234, 'localhost', (err) => { + * client.close(); + * }); + * ``` + * + * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('Some '); + * const buf2 = Buffer.from('bytes'); + * const client = dgram.createSocket('udp4'); + * client.send([buf1, buf2], 41234, (err) => { + * client.close(); + * }); + * ``` + * + * Sending multiple buffers might be faster or slower depending on the + * application and operating system. Run benchmarks to + * determine the optimal strategy on a case-by-case basis. Generally speaking, + * however, sending multiple buffers is faster. + * + * Example of sending a UDP packet using a socket connected to a port on`localhost`: + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.connect(41234, 'localhost', (err) => { + * client.send(message, (err) => { + * client.close(); + * }); + * }); + * ``` + * @since v0.1.99 + * @param msg Message to be sent. + * @param offset Offset in the buffer where the message starts. + * @param length Number of bytes in the message. + * @param port Destination port. + * @param address Destination host name or IP address. + * @param callback Called when the message has been sent. + */ + send(msg: string | Uint8Array | ReadonlyArray, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array | ReadonlyArray, port?: number, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array | ReadonlyArray, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void; + /** + * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP + * packets may be sent to a local interface's broadcast address. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.6.9 + */ + setBroadcast(flag: boolean): void; + /** + * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC + * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ + * _with a scope index is written as `'IP%scope'` where scope is an interface name_ + * _or interface number._ + * + * Sets the default outgoing multicast interface of the socket to a chosen + * interface or back to system interface selection. The `multicastInterface` must + * be a valid string representation of an IP from the socket's family. + * + * For IPv4 sockets, this should be the IP configured for the desired physical + * interface. All packets sent to multicast on the socket will be sent on the + * interface determined by the most recent successful use of this call. + * + * For IPv6 sockets, `multicastInterface` should include a scope to indicate the + * interface as in the examples that follow. In IPv6, individual `send` calls can + * also use explicit scope in addresses, so only packets sent to a multicast + * address without specifying an explicit scope are affected by the most recent + * successful use of this call. + * + * This method throws `EBADF` if called on an unbound socket. + * + * #### Example: IPv6 outgoing multicast interface + * + * On most systems, where scope format uses the interface name: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%eth1'); + * }); + * ``` + * + * On Windows, where scope format uses an interface number: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%2'); + * }); + * ``` + * + * #### Example: IPv4 outgoing multicast interface + * + * All systems use an IP of the host on the desired physical interface: + * + * ```js + * const socket = dgram.createSocket('udp4'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('10.0.0.2'); + * }); + * ``` + * @since v8.6.0 + */ + setMulticastInterface(multicastInterface: string): void; + /** + * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, + * multicast packets will also be received on the local interface. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastLoopback(flag: boolean): boolean; + /** + * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for + * "Time to Live", in this context it specifies the number of IP hops that a + * packet is allowed to travel through, specifically for multicast traffic. Each + * router or gateway that forwards a packet decrements the TTL. If the TTL is + * decremented to 0 by a router, it will not be forwarded. + * + * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastTTL(ttl: number): number; + /** + * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setRecvBufferSize(size: number): void; + /** + * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setSendBufferSize(size: number): void; + /** + * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", + * in this context it specifies the number of IP hops that a packet is allowed to + * travel through. Each router or gateway that forwards a packet decrements the + * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. + * Changing TTL values is typically done for network probes or when multicasting. + * + * The `ttl` argument may be between 1 and 255\. The default on most systems + * is 64. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.101 + */ + setTTL(ttl: number): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active, allowing the process to exit even if the socket is still + * listening. + * + * Calling `socket.unref()` multiple times will have no addition effect. + * + * The `socket.unref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + unref(): this; + /** + * Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket + * option. If the `multicastInterface` argument + * is not specified, the operating system will choose one interface and will add + * membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * @since v13.1.0, v12.16.0 + */ + addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is + * automatically called by the kernel when the + * socket is closed or the process terminates, so most apps will never have + * reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v13.1.0, v12.16.0 + */ + dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. error + * 4. listening + * 5. message + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connect', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'connect'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit(event: 'message', msg: Buffer, rinfo: RemoteInfo): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connect', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connect', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connect', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + } +} +declare module 'node:dgram' { + export * from 'dgram'; +} diff --git a/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts b/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts new file mode 100644 index 0000000..3dcaa03 --- /dev/null +++ b/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts @@ -0,0 +1,153 @@ +/** + * The `diagnostics_channel` module provides an API to create named channels + * to report arbitrary message data for diagnostics purposes. + * + * It can be accessed using: + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * ``` + * + * It is intended that a module writer wanting to report diagnostics messages + * will create one or many top-level channels to report messages through. + * Channels may also be acquired at runtime but it is not encouraged + * due to the additional overhead of doing so. Channels may be exported for + * convenience, but as long as the name is known it can be acquired anywhere. + * + * If you intend for your module to produce diagnostics data for others to + * consume it is recommended that you include documentation of what named + * channels are used along with the shape of the message data. Channel names + * should generally include the module name to avoid collisions with data from + * other modules. + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js) + */ +declare module 'diagnostics_channel' { + /** + * Check if there are active subscribers to the named channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * if (diagnostics_channel.hasSubscribers('my-channel')) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return If there are active subscribers + */ + function hasSubscribers(name: string | symbol): boolean; + /** + * This is the primary entry-point for anyone wanting to interact with a named + * channel. It produces a channel object which is optimized to reduce overhead at + * publish time as much as possible. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return The named channel object + */ + function channel(name: string | symbol): Channel; + type ChannelListener = (message: unknown, name: string | symbol) => void; + /** + * The class `Channel` represents an individual named channel within the data + * pipeline. It is use to track subscribers and to publish messages when there + * are subscribers present. It exists as a separate object to avoid channel + * lookups at publish time, enabling very fast publish speeds and allowing + * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly + * with `new Channel(name)` is not supported. + * @since v15.1.0, v14.17.0 + */ + class Channel { + readonly name: string | symbol; + /** + * Check if there are active subscribers to this channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * if (channel.hasSubscribers) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + */ + readonly hasSubscribers: boolean; + private constructor(name: string | symbol); + /** + * Publish a message to any subscribers to the channel. This will + * trigger message handlers synchronously so they will execute within + * the same context. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.publish({ + * some: 'message' + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param message The message to send to the channel subscribers + */ + publish(message: unknown): void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.subscribe((message, name) => { + * // Received data + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The handler to receive channel messages + */ + subscribe(onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * function onMessage(message, name) { + * // Received data + * } + * + * channel.subscribe(onMessage); + * + * channel.unsubscribe(onMessage); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + unsubscribe(onMessage: ChannelListener): void; + } +} +declare module 'node:diagnostics_channel' { + export * from 'diagnostics_channel'; +} diff --git a/node_modules/@types/node/ts4.8/dns.d.ts b/node_modules/@types/node/ts4.8/dns.d.ts new file mode 100644 index 0000000..305367b --- /dev/null +++ b/node_modules/@types/node/ts4.8/dns.d.ts @@ -0,0 +1,659 @@ +/** + * The `dns` module enables name resolution. For example, use it to look up IP + * addresses of host names. + * + * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the + * DNS protocol for lookups. {@link lookup} uses the operating system + * facilities to perform name resolution. It may not need to perform any network + * communication. To perform name resolution the way other applications on the same + * system do, use {@link lookup}. + * + * ```js + * const dns = require('dns'); + * + * dns.lookup('example.org', (err, address, family) => { + * console.log('address: %j family: IPv%s', address, family); + * }); + * // address: "93.184.216.34" family: IPv4 + * ``` + * + * All other functions in the `dns` module connect to an actual DNS server to + * perform name resolution. They will always use the network to perform DNS + * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform + * DNS queries, bypassing other name-resolution facilities. + * + * ```js + * const dns = require('dns'); + * + * dns.resolve4('archive.org', (err, addresses) => { + * if (err) throw err; + * + * console.log(`addresses: ${JSON.stringify(addresses)}`); + * + * addresses.forEach((a) => { + * dns.reverse(a, (err, hostnames) => { + * if (err) { + * throw err; + * } + * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); + * }); + * }); + * }); + * ``` + * + * See the `Implementation considerations section` for more information. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js) + */ +declare module 'dns' { + import * as dnsPromises from 'node:dns/promises'; + // Supported getaddrinfo flags. + export const ADDRCONFIG: number; + export const V4MAPPED: number; + /** + * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as + * well as IPv4 mapped IPv6 addresses. + */ + export const ALL: number; + export interface LookupOptions { + family?: number | undefined; + hints?: number | undefined; + all?: boolean | undefined; + /** + * @default true + */ + verbatim?: boolean | undefined; + } + export interface LookupOneOptions extends LookupOptions { + all?: false | undefined; + } + export interface LookupAllOptions extends LookupOptions { + all: true; + } + export interface LookupAddress { + address: string; + family: number; + } + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the + * properties `address` and `family`. + * + * On error, `err` is an `Error` object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. + * The implementation uses an operating system facility that can associate names + * with addresses, and vice versa. This implementation can have subtle but + * important consequences on the behavior of any Node.js program. Please take some + * time to consult the `Implementation considerations section` before using`dns.lookup()`. + * + * Example usage: + * + * ```js + * const dns = require('dns'); + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * dns.lookup('example.com', options, (err, address, family) => + * console.log('address: %j family: IPv%s', address, family)); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dns.lookup('example.com', options, (err, addresses) => + * console.log('addresses: %j', addresses)); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * ``` + * + * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties. + * @since v0.1.90 + */ + export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void; + export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void; + export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; + function __promisify__(hostname: string, options: LookupOptions): Promise; + } + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown. + * + * On an error, `err` is an `Error` object, where `err.code` is the error code. + * + * ```js + * const dns = require('dns'); + * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { + * console.log(hostname, service); + * // Prints: localhost ssh + * }); + * ``` + * + * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties. + * @since v0.11.14 + */ + export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void; + export namespace lookupService { + function __promisify__( + address: string, + port: number + ): Promise<{ + hostname: string; + service: string; + }>; + } + export interface ResolveOptions { + ttl: boolean; + } + export interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + export interface RecordWithTtl { + address: string; + ttl: number; + } + /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */ + export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; + export interface AnyARecord extends RecordWithTtl { + type: 'A'; + } + export interface AnyAaaaRecord extends RecordWithTtl { + type: 'AAAA'; + } + export interface CaaRecord { + critial: number; + issue?: string | undefined; + issuewild?: string | undefined; + iodef?: string | undefined; + contactemail?: string | undefined; + contactphone?: string | undefined; + } + export interface MxRecord { + priority: number; + exchange: string; + } + export interface AnyMxRecord extends MxRecord { + type: 'MX'; + } + export interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + export interface AnyNaptrRecord extends NaptrRecord { + type: 'NAPTR'; + } + export interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + export interface AnySoaRecord extends SoaRecord { + type: 'SOA'; + } + export interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + export interface AnySrvRecord extends SrvRecord { + type: 'SRV'; + } + export interface AnyTxtRecord { + type: 'TXT'; + entries: string[]; + } + export interface AnyNsRecord { + type: 'NS'; + value: string; + } + export interface AnyPtrRecord { + type: 'PTR'; + value: string; + } + export interface AnyCnameRecord { + type: 'CNAME'; + value: string; + } + export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource + * records. The type and structure of individual results varies based on `rrtype`: + * + * + * + * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`. + * @since v0.1.27 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void; + export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + export function resolve( + hostname: string, + rrtype: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void + ): void; + export namespace resolve { + function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise; + function __promisify__(hostname: string, rrtype: 'ANY'): Promise; + function __promisify__(hostname: string, rrtype: 'MX'): Promise; + function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise; + function __promisify__(hostname: string, rrtype: 'SOA'): Promise; + function __promisify__(hostname: string, rrtype: 'SRV'): Promise; + function __promisify__(hostname: string, rrtype: 'TXT'): Promise; + function __promisify__(hostname: string, rrtype: string): Promise; + } + /** + * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + export namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv6 addresses. + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + export namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function + * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`). + * @since v0.3.2 + */ + export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function + * will contain an array of certification authority authorization records + * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void; + export namespace resolveCaa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v0.1.27 + */ + export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + export namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of + * objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100 + * } + * ``` + * @since v0.9.12 + */ + export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + export namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`). + * @since v0.1.90 + */ + export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * be an array of strings containing the reply records. + * @since v6.0.0 + */ + export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. The `address` argument passed to the `callback` function will + * be an object with the following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600 + * } + * ``` + * @since v0.11.10 + */ + export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void; + export namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * be an array of objects with the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com' + * } + * ``` + * @since v0.1.27 + */ + export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + export namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a + * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v0.1.27 + */ + export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + export namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * The `ret` argument passed to the `callback` function will be an array containing + * various types of records. Each object has a property `type` that indicates the + * type of the current record. And depending on the `type`, additional properties + * will be present on the object: + * + * + * + * Here is an example of the `ret` object passed to the callback: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ] + * ``` + * + * DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC + * 8482](https://tools.ietf.org/html/rfc8482). + */ + export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + export namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, `err` is an `Error` object, where `err.code` is + * one of the `DNS error codes`. + * @since v0.1.16 + */ + export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dns.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dns.setServers()` method must not be called while a DNS query is in + * progress. + * + * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v0.11.3 + * @param servers array of `RFC 5952` formatted addresses + */ + export function setServers(servers: ReadonlyArray): void; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v0.11.3 + */ + export function getServers(): string[]; + /** + * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be: + * + * * `ipv4first`: sets default `verbatim` `false`. + * * `verbatim`: sets default `verbatim` `true`. + * + * The default is `ipv4first` and {@link setDefaultResultOrder} have higher + * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default + * dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'` or `'verbatim'`. + */ + export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void; + // Error codes + export const NODATA: string; + export const FORMERR: string; + export const SERVFAIL: string; + export const NOTFOUND: string; + export const NOTIMP: string; + export const REFUSED: string; + export const BADQUERY: string; + export const BADNAME: string; + export const BADFAMILY: string; + export const BADRESP: string; + export const CONNREFUSED: string; + export const TIMEOUT: string; + export const EOF: string; + export const FILE: string; + export const NOMEM: string; + export const DESTRUCTION: string; + export const BADSTR: string; + export const BADFLAGS: string; + export const NONAME: string; + export const BADHINTS: string; + export const NOTINITIALIZED: string; + export const LOADIPHLPAPI: string; + export const ADDRGETNETWORKPARAMS: string; + export const CANCELLED: string; + export interface ResolverOptions { + timeout?: number | undefined; + /** + * @default 4 + */ + tries?: number; + } + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using `resolver.setServers()` does not affect + * other resolvers: + * + * ```js + * const { Resolver } = require('dns'); + * const resolver = new Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org', (err, addresses) => { + * // ... + * }); + * ``` + * + * The following methods from the `dns` module are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v8.3.0 + */ + export class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default, and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } + export { dnsPromises as promises }; +} +declare module 'node:dns' { + export * from 'dns'; +} diff --git a/node_modules/@types/node/ts4.8/dns/promises.d.ts b/node_modules/@types/node/ts4.8/dns/promises.d.ts new file mode 100644 index 0000000..77cd807 --- /dev/null +++ b/node_modules/@types/node/ts4.8/dns/promises.d.ts @@ -0,0 +1,370 @@ +/** + * The `dns.promises` API provides an alternative set of asynchronous DNS methods + * that return `Promise` objects rather than using callbacks. The API is accessible + * via `require('dns').promises` or `require('dns/promises')`. + * @since v10.6.0 + */ +declare module 'dns/promises' { + import { + LookupAddress, + LookupOneOptions, + LookupAllOptions, + LookupOptions, + AnyRecord, + CaaRecord, + MxRecord, + NaptrRecord, + SoaRecord, + SrvRecord, + ResolveWithTtlOptions, + RecordWithTtl, + ResolveOptions, + ResolverOptions, + } from 'node:dns'; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v10.6.0 + */ + function getServers(): string[]; + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dnsPromises.lookup()` does not necessarily have anything to do with the DNS + * protocol. The implementation uses an operating system facility that can + * associate names with addresses, and vice versa. This implementation can have + * subtle but important consequences on the behavior of any Node.js program. Please + * take some time to consult the `Implementation considerations section` before + * using `dnsPromises.lookup()`. + * + * Example usage: + * + * ```js + * const dns = require('dns'); + * const dnsPromises = dns.promises; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('address: %j family: IPv%s', result.address, result.family); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * }); + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('addresses: %j', result); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * }); + * ``` + * @since v10.6.0 + */ + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code. + * + * ```js + * const dnsPromises = require('dns').promises; + * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { + * console.log(result.hostname, result.service); + * // Prints: localhost ssh + * }); + * ``` + * @since v10.6.0 + */ + function lookupService( + address: string, + port: number + ): Promise<{ + hostname: string; + service: string; + }>; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. When successful, the `Promise` is resolved with an + * array of resource records. The type and structure of individual results vary + * based on `rrtype`: + * + * + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`. + * @since v10.6.0 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: 'A'): Promise; + function resolve(hostname: string, rrtype: 'AAAA'): Promise; + function resolve(hostname: string, rrtype: 'ANY'): Promise; + function resolve(hostname: string, rrtype: 'CAA'): Promise; + function resolve(hostname: string, rrtype: 'CNAME'): Promise; + function resolve(hostname: string, rrtype: 'MX'): Promise; + function resolve(hostname: string, rrtype: 'NAPTR'): Promise; + function resolve(hostname: string, rrtype: 'NS'): Promise; + function resolve(hostname: string, rrtype: 'PTR'): Promise; + function resolve(hostname: string, rrtype: 'SOA'): Promise; + function resolve(hostname: string, rrtype: 'SRV'): Promise; + function resolve(hostname: string, rrtype: 'TXT'): Promise; + function resolve(hostname: string, rrtype: string): Promise; + /** + * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4 + * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6 + * addresses. + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * On success, the `Promise` is resolved with an array containing various types of + * records. Each object has a property `type` that indicates the type of the + * current record. And depending on the `type`, additional properties will be + * present on the object: + * + * + * + * Here is an example of the result object: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ] + * ``` + * @since v10.6.0 + */ + function resolveAny(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, + * the `Promise` is resolved with an array of objects containing available + * certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, + * the `Promise` is resolved with an array of canonical name records available for + * the `hostname` (e.g. `['bar.example.com']`). + * @since v10.6.0 + */ + function resolveCname(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects + * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v10.6.0 + */ + function resolveMx(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array + * of objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100 + * } + * ``` + * @since v10.6.0 + */ + function resolveNaptr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server + * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). + * @since v10.6.0 + */ + function resolveNs(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings + * containing the reply records. + * @since v10.6.0 + */ + function resolvePtr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. On success, the `Promise` is resolved with an object with the + * following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600 + * } + * ``` + * @since v10.6.0 + */ + function resolveSoa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with + * the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com' + * } + * ``` + * @since v10.6.0 + */ + function resolveSrv(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. On success, the `Promise` is resolved with a two-dimensional array + * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v10.6.0 + */ + function resolveTxt(hostname: string): Promise; + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`. + * @since v10.6.0 + */ + function reverse(ip: string): Promise; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dnsPromises.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dnsPromises.setServers()` method must not be called while a DNS query is in + * progress. + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v10.6.0 + * @param servers array of `RFC 5952` formatted addresses + */ + function setServers(servers: ReadonlyArray): void; + /** + * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be: + * + * * `ipv4first`: sets default `verbatim` `false`. + * * `verbatim`: sets default `verbatim` `true`. + * + * The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have + * higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the + * default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void; + class Resolver { + constructor(options?: ResolverOptions); + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module 'node:dns/promises' { + export * from 'dns/promises'; +} diff --git a/node_modules/@types/node/ts4.8/dom-events.d.ts b/node_modules/@types/node/ts4.8/dom-events.d.ts new file mode 100644 index 0000000..b9c1c3a --- /dev/null +++ b/node_modules/@types/node/ts4.8/dom-events.d.ts @@ -0,0 +1,126 @@ +export {}; // Don't export anything! + +//// DOM-like Events +// NB: The Event / EventTarget / EventListener implementations below were copied +// from lib.dom.d.ts, then edited to reflect Node's documentation at +// https://nodejs.org/api/events.html#class-eventtarget. +// Please read that link to understand important implementation differences. + +// This conditional type will be the existing global Event in a browser, or +// the copy below in a Node environment. +type __Event = typeof globalThis extends { onmessage: any, Event: any } +? {} +: { + /** This is not used in Node.js and is provided purely for completeness. */ + readonly bubbles: boolean; + /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */ + cancelBubble: () => void; + /** True if the event was created with the cancelable option */ + readonly cancelable: boolean; + /** This is not used in Node.js and is provided purely for completeness. */ + readonly composed: boolean; + /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */ + composedPath(): [EventTarget?] + /** Alias for event.target. */ + readonly currentTarget: EventTarget | null; + /** Is true if cancelable is true and event.preventDefault() has been called. */ + readonly defaultPrevented: boolean; + /** This is not used in Node.js and is provided purely for completeness. */ + readonly eventPhase: 0 | 2; + /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */ + readonly isTrusted: boolean; + /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */ + preventDefault(): void; + /** This is not used in Node.js and is provided purely for completeness. */ + returnValue: boolean; + /** Alias for event.target. */ + readonly srcElement: EventTarget | null; + /** Stops the invocation of event listeners after the current one completes. */ + stopImmediatePropagation(): void; + /** This is not used in Node.js and is provided purely for completeness. */ + stopPropagation(): void; + /** The `EventTarget` dispatching the event */ + readonly target: EventTarget | null; + /** The millisecond timestamp when the Event object was created. */ + readonly timeStamp: number; + /** Returns the type of event, e.g. "click", "hashchange", or "submit". */ + readonly type: string; +}; + +// See comment above explaining conditional type +type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any } +? {} +: { + /** + * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value. + * + * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched. + * + * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification. + * Specifically, the `capture` option is used as part of the key when registering a `listener`. + * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`. + */ + addEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: AddEventListenerOptions | boolean, + ): void; + /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ + dispatchEvent(event: Event): boolean; + /** Removes the event listener in target's event listener list with the same type, callback, and options. */ + removeEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: EventListenerOptions | boolean, + ): void; +}; + +interface EventInit { + bubbles?: boolean; + cancelable?: boolean; + composed?: boolean; +} + +interface EventListenerOptions { + /** Not directly used by Node.js. Added for API completeness. Default: `false`. */ + capture?: boolean; +} + +interface AddEventListenerOptions extends EventListenerOptions { + /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */ + once?: boolean; + /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */ + passive?: boolean; +} + +interface EventListener { + (evt: Event): void; +} + +interface EventListenerObject { + handleEvent(object: Event): void; +} + +import {} from 'events'; // Make this an ambient declaration +declare global { + /** An event which takes place in the DOM. */ + interface Event extends __Event {} + var Event: typeof globalThis extends { onmessage: any, Event: infer T } + ? T + : { + prototype: __Event; + new (type: string, eventInitDict?: EventInit): __Event; + }; + + /** + * EventTarget is a DOM interface implemented by objects that can + * receive events and may have listeners for them. + */ + interface EventTarget extends __EventTarget {} + var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T } + ? T + : { + prototype: __EventTarget; + new (): __EventTarget; + }; +} diff --git a/node_modules/@types/node/ts4.8/domain.d.ts b/node_modules/@types/node/ts4.8/domain.d.ts new file mode 100644 index 0000000..fafe68a --- /dev/null +++ b/node_modules/@types/node/ts4.8/domain.d.ts @@ -0,0 +1,170 @@ +/** + * **This module is pending deprecation.** Once a replacement API has been + * finalized, this module will be fully deprecated. Most developers should + * **not** have cause to use this module. Users who absolutely must have + * the functionality that domains provide may rely on it for the time being + * but should expect to have to migrate to a different solution + * in the future. + * + * Domains provide a way to handle multiple different IO operations as a + * single group. If any of the event emitters or callbacks registered to a + * domain emit an `'error'` event, or throw an error, then the domain object + * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to + * exit immediately with an error code. + * @deprecated Since v1.4.2 - Deprecated + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js) + */ +declare module 'domain' { + import EventEmitter = require('node:events'); + /** + * The `Domain` class encapsulates the functionality of routing errors and + * uncaught exceptions to the active `Domain` object. + * + * To handle the errors that it catches, listen to its `'error'` event. + */ + class Domain extends EventEmitter { + /** + * An array of timers and event emitters that have been explicitly added + * to the domain. + */ + members: Array; + /** + * The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly + * pushes the domain onto the domain + * stack managed by the domain module (see {@link exit} for details on the + * domain stack). The call to `enter()` delimits the beginning of a chain of + * asynchronous calls and I/O operations bound to a domain. + * + * Calling `enter()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + enter(): void; + /** + * The `exit()` method exits the current domain, popping it off the domain stack. + * Any time execution is going to switch to the context of a different chain of + * asynchronous calls, it's important to ensure that the current domain is exited. + * The call to `exit()` delimits either the end of or an interruption to the chain + * of asynchronous calls and I/O operations bound to a domain. + * + * If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain. + * + * Calling `exit()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + exit(): void; + /** + * Run the supplied function in the context of the domain, implicitly + * binding all event emitters, timers, and lowlevel requests that are + * created in that context. Optionally, arguments can be passed to + * the function. + * + * This is the most basic way to use a domain. + * + * ```js + * const domain = require('domain'); + * const fs = require('fs'); + * const d = domain.create(); + * d.on('error', (er) => { + * console.error('Caught error!', er); + * }); + * d.run(() => { + * process.nextTick(() => { + * setTimeout(() => { // Simulating some various async stuff + * fs.open('non-existent file', 'r', (er, fd) => { + * if (er) throw er; + * // proceed... + * }); + * }, 100); + * }); + * }); + * ``` + * + * In this example, the `d.on('error')` handler will be triggered, rather + * than crashing the program. + */ + run(fn: (...args: any[]) => T, ...args: any[]): T; + /** + * Explicitly adds an emitter to the domain. If any event handlers called by + * the emitter throw an error, or if the emitter emits an `'error'` event, it + * will be routed to the domain's `'error'` event, just like with implicit + * binding. + * + * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by + * the domain `'error'` handler. + * + * If the Timer or `EventEmitter` was already bound to a domain, it is removed + * from that one, and bound to this one instead. + * @param emitter emitter or timer to be added to the domain + */ + add(emitter: EventEmitter | NodeJS.Timer): void; + /** + * The opposite of {@link add}. Removes domain handling from the + * specified emitter. + * @param emitter emitter or timer to be removed from the domain + */ + remove(emitter: EventEmitter | NodeJS.Timer): void; + /** + * The returned function will be a wrapper around the supplied callback + * function. When the returned function is called, any errors that are + * thrown will be routed to the domain's `'error'` event. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.bind((er, data) => { + * // If this throws, it will also be passed to the domain. + * return cb(er, data ? JSON.parse(data) : null); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The bound function + */ + bind(callback: T): T; + /** + * This method is almost identical to {@link bind}. However, in + * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. + * + * In this way, the common `if (err) return callback(err);` pattern can be replaced + * with a single error handler in a single place. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.intercept((data) => { + * // Note, the first argument is never passed to the + * // callback since it is assumed to be the 'Error' argument + * // and thus intercepted by the domain. + * + * // If this throws, it will also be passed to the domain + * // so the error-handling logic can be moved to the 'error' + * // event on the domain instead of being repeated throughout + * // the program. + * return cb(null, JSON.parse(data)); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The intercepted function + */ + intercept(callback: T): T; + } + function create(): Domain; +} +declare module 'node:domain' { + export * from 'domain'; +} diff --git a/node_modules/@types/node/ts4.8/events.d.ts b/node_modules/@types/node/ts4.8/events.d.ts new file mode 100644 index 0000000..4633df1 --- /dev/null +++ b/node_modules/@types/node/ts4.8/events.d.ts @@ -0,0 +1,678 @@ +/** + * Much of the Node.js core API is built around an idiomatic asynchronous + * event-driven architecture in which certain kinds of objects (called "emitters") + * emit named events that cause `Function` objects ("listeners") to be called. + * + * For instance: a `net.Server` object emits an event each time a peer + * connects to it; a `fs.ReadStream` emits an event when the file is opened; + * a `stream` emits an event whenever data is available to be read. + * + * All objects that emit events are instances of the `EventEmitter` class. These + * objects expose an `eventEmitter.on()` function that allows one or more + * functions to be attached to named events emitted by the object. Typically, + * event names are camel-cased strings but any valid JavaScript property key + * can be used. + * + * When the `EventEmitter` object emits an event, all of the functions attached + * to that specific event are called _synchronously_. Any values returned by the + * called listeners are _ignored_ and discarded. + * + * The following example shows a simple `EventEmitter` instance with a single + * listener. The `eventEmitter.on()` method is used to register listeners, while + * the `eventEmitter.emit()` method is used to trigger the event. + * + * ```js + * const EventEmitter = require('events'); + * + * class MyEmitter extends EventEmitter {} + * + * const myEmitter = new MyEmitter(); + * myEmitter.on('event', () => { + * console.log('an event occurred!'); + * }); + * myEmitter.emit('event'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js) + */ +declare module 'events' { + // NOTE: This class is in the docs but is **not actually exported** by Node. + // If https://github.com/nodejs/node/issues/39903 gets resolved and Node + // actually starts exporting the class, uncomment below. + + // import { EventListener, EventListenerObject } from '__dom-events'; + // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */ + // interface NodeEventTarget extends EventTarget { + // /** + // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API. + // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget. + // */ + // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this; + // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */ + // eventNames(): string[]; + // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */ + // listenerCount(type: string): number; + // /** Node.js-specific alias for `eventTarget.removeListener()`. */ + // off(type: string, listener: EventListener | EventListenerObject): this; + // /** Node.js-specific alias for `eventTarget.addListener()`. */ + // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this; + // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */ + // once(type: string, listener: EventListener | EventListenerObject): this; + // /** + // * Node.js-specific extension to the `EventTarget` class. + // * If `type` is specified, removes all registered listeners for `type`, + // * otherwise removes all registered listeners. + // */ + // removeAllListeners(type: string): this; + // /** + // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`. + // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`. + // */ + // removeListener(type: string, listener: EventListener | EventListenerObject): this; + // } + + interface EventEmitterOptions { + /** + * Enables automatic capturing of promise rejection. + */ + captureRejections?: boolean | undefined; + } + // Any EventTarget with a Node-style `once` function + interface _NodeEventTarget { + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + } + // Any EventTarget with a DOM-style `addEventListener` + interface _DOMEventTarget { + addEventListener( + eventName: string, + listener: (...args: any[]) => void, + opts?: { + once: boolean; + } + ): any; + } + interface StaticEventEmitterOptions { + signal?: AbortSignal | undefined; + } + interface EventEmitter extends NodeJS.EventEmitter {} + /** + * The `EventEmitter` class is defined and exposed by the `events` module: + * + * ```js + * const EventEmitter = require('events'); + * ``` + * + * All `EventEmitter`s emit the event `'newListener'` when new listeners are + * added and `'removeListener'` when existing listeners are removed. + * + * It supports the following option: + * @since v0.1.26 + */ + class EventEmitter { + constructor(options?: EventEmitterOptions); + /** + * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given + * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. + * The `Promise` will resolve with an array of all the arguments emitted to the + * given event. + * + * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event + * semantics and does not listen to the `'error'` event. + * + * ```js + * const { once, EventEmitter } = require('events'); + * + * async function run() { + * const ee = new EventEmitter(); + * + * process.nextTick(() => { + * ee.emit('myevent', 42); + * }); + * + * const [value] = await once(ee, 'myevent'); + * console.log(value); + * + * const err = new Error('kaboom'); + * process.nextTick(() => { + * ee.emit('error', err); + * }); + * + * try { + * await once(ee, 'myevent'); + * } catch (err) { + * console.log('error happened', err); + * } + * } + * + * run(); + * ``` + * + * The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the + * '`error'` event itself, then it is treated as any other kind of event without + * special handling: + * + * ```js + * const { EventEmitter, once } = require('events'); + * + * const ee = new EventEmitter(); + * + * once(ee, 'error') + * .then(([err]) => console.log('ok', err.message)) + * .catch((err) => console.log('error', err.message)); + * + * ee.emit('error', new Error('boom')); + * + * // Prints: ok boom + * ``` + * + * An `AbortSignal` can be used to cancel waiting for the event: + * + * ```js + * const { EventEmitter, once } = require('events'); + * + * const ee = new EventEmitter(); + * const ac = new AbortController(); + * + * async function foo(emitter, event, signal) { + * try { + * await once(emitter, event, { signal }); + * console.log('event emitted!'); + * } catch (error) { + * if (error.name === 'AbortError') { + * console.error('Waiting for the event was canceled!'); + * } else { + * console.error('There was an error', error.message); + * } + * } + * } + * + * foo(ee, 'foo', ac.signal); + * ac.abort(); // Abort waiting for the event + * ee.emit('foo'); // Prints: Waiting for the event was canceled! + * ``` + * @since v11.13.0, v10.16.0 + */ + static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise; + static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise; + /** + * ```js + * const { on, EventEmitter } = require('events'); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo')) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * ``` + * + * Returns an `AsyncIterator` that iterates `eventName` events. It will throw + * if the `EventEmitter` emits `'error'`. It removes all listeners when + * exiting the loop. The `value` returned by each iteration is an array + * composed of the emitted event arguments. + * + * An `AbortSignal` can be used to cancel waiting on events: + * + * ```js + * const { on, EventEmitter } = require('events'); + * const ac = new AbortController(); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo', { signal: ac.signal })) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * + * process.nextTick(() => ac.abort()); + * ``` + * @since v13.6.0, v12.16.0 + * @param eventName The name of the event being listened for + * @return that iterates `eventName` events emitted by the `emitter` + */ + static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator; + /** + * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`. + * + * ```js + * const { EventEmitter, listenerCount } = require('events'); + * const myEmitter = new EventEmitter(); + * myEmitter.on('event', () => {}); + * myEmitter.on('event', () => {}); + * console.log(listenerCount(myEmitter, 'event')); + * // Prints: 2 + * ``` + * @since v0.9.12 + * @deprecated Since v3.2.0 - Use `listenerCount` instead. + * @param emitter The emitter to query + * @param eventName The event name + */ + static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the event listeners for the + * event target. This is useful for debugging and diagnostic purposes. + * + * ```js + * const { getEventListeners, EventEmitter } = require('events'); + * + * { + * const ee = new EventEmitter(); + * const listener = () => console.log('Events are fun'); + * ee.on('foo', listener); + * getEventListeners(ee, 'foo'); // [listener] + * } + * { + * const et = new EventTarget(); + * const listener = () => console.log('Events are fun'); + * et.addEventListener('foo', listener); + * getEventListeners(et, 'foo'); // [listener] + * } + * ``` + * @since v15.2.0, v14.17.0 + */ + static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[]; + /** + * ```js + * const { + * setMaxListeners, + * EventEmitter + * } = require('events'); + * + * const target = new EventTarget(); + * const emitter = new EventEmitter(); + * + * setMaxListeners(5, target, emitter); + * ``` + * @since v15.4.0 + * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. + * @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} + * objects. + */ + static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void; + /** + * This symbol shall be used to install a listener for only monitoring `'error'` + * events. Listeners installed using this symbol are called before the regular + * `'error'` listeners are called. + * + * Installing a listener using this symbol does not change the behavior once an + * `'error'` event is emitted, therefore the process will still crash if no + * regular `'error'` listener is installed. + */ + static readonly errorMonitor: unique symbol; + static readonly captureRejectionSymbol: unique symbol; + /** + * Sets or gets the default captureRejection value for all emitters. + */ + // TODO: These should be described using static getter/setter pairs: + static captureRejections: boolean; + static defaultMaxListeners: number; + } + import internal = require('node:events'); + namespace EventEmitter { + // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4 + export { internal as EventEmitter }; + export interface Abortable { + /** + * When provided the corresponding `AbortController` can be used to cancel an asynchronous action. + */ + signal?: AbortSignal | undefined; + } + } + global { + namespace NodeJS { + interface EventEmitter { + /** + * Alias for `emitter.on(eventName, listener)`. + * @since v0.1.26 + */ + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds the `listener` function to the end of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * const myEE = new EventEmitter(); + * myEE.on('foo', () => console.log('a')); + * myEE.prependListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.1.101 + * @param eventName The name of the event. + * @param listener The callback function + */ + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds a **one-time**`listener` function for the event named `eventName`. The + * next time `eventName` is triggered, this listener is removed and then invoked. + * + * ```js + * server.once('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * const myEE = new EventEmitter(); + * myEE.once('foo', () => console.log('a')); + * myEE.prependOnceListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.3.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Removes the specified `listener` from the listener array for the event named`eventName`. + * + * ```js + * const callback = (stream) => { + * console.log('someone connected!'); + * }; + * server.on('connection', callback); + * // ... + * server.removeListener('connection', callback); + * ``` + * + * `removeListener()` will remove, at most, one instance of a listener from the + * listener array. If any single listener has been added multiple times to the + * listener array for the specified `eventName`, then `removeListener()` must be + * called multiple times to remove each instance. + * + * Once an event is emitted, all listeners attached to it at the + * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution + * will not remove them from`emit()` in progress. Subsequent events behave as expected. + * + * ```js + * const myEmitter = new MyEmitter(); + * + * const callbackA = () => { + * console.log('A'); + * myEmitter.removeListener('event', callbackB); + * }; + * + * const callbackB = () => { + * console.log('B'); + * }; + * + * myEmitter.on('event', callbackA); + * + * myEmitter.on('event', callbackB); + * + * // callbackA removes listener callbackB but it will still be called. + * // Internal listener array at time of emit [callbackA, callbackB] + * myEmitter.emit('event'); + * // Prints: + * // A + * // B + * + * // callbackB is now removed. + * // Internal listener array [callbackA] + * myEmitter.emit('event'); + * // Prints: + * // A + * ``` + * + * Because listeners are managed using an internal array, calling this will + * change the position indices of any listener registered _after_ the listener + * being removed. This will not impact the order in which listeners are called, + * but it means that any copies of the listener array as returned by + * the `emitter.listeners()` method will need to be recreated. + * + * When a single function has been added as a handler multiple times for a single + * event (as in the example below), `removeListener()` will remove the most + * recently added instance. In the example the `once('ping')`listener is removed: + * + * ```js + * const ee = new EventEmitter(); + * + * function pong() { + * console.log('pong'); + * } + * + * ee.on('ping', pong); + * ee.once('ping', pong); + * ee.removeListener('ping', pong); + * + * ee.emit('ping'); + * ee.emit('ping'); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Alias for `emitter.removeListener()`. + * @since v10.0.0 + */ + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Removes all listeners, or those of the specified `eventName`. + * + * It is bad practice to remove listeners added elsewhere in the code, + * particularly when the `EventEmitter` instance was created by some other + * component or module (e.g. sockets or file streams). + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeAllListeners(event?: string | symbol): this; + /** + * By default `EventEmitter`s will print a warning if more than `10` listeners are + * added for a particular event. This is a useful default that helps finding + * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be + * modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners. + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.3.5 + */ + setMaxListeners(n: number): this; + /** + * Returns the current max listener value for the `EventEmitter` which is either + * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}. + * @since v1.0.0 + */ + getMaxListeners(): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * console.log(util.inspect(server.listeners('connection'))); + * // Prints: [ [Function] ] + * ``` + * @since v0.1.26 + */ + listeners(eventName: string | symbol): Function[]; + /** + * Returns a copy of the array of listeners for the event named `eventName`, + * including any wrappers (such as those created by `.once()`). + * + * ```js + * const emitter = new EventEmitter(); + * emitter.once('log', () => console.log('log once')); + * + * // Returns a new Array with a function `onceWrapper` which has a property + * // `listener` which contains the original listener bound above + * const listeners = emitter.rawListeners('log'); + * const logFnWrapper = listeners[0]; + * + * // Logs "log once" to the console and does not unbind the `once` event + * logFnWrapper.listener(); + * + * // Logs "log once" to the console and removes the listener + * logFnWrapper(); + * + * emitter.on('log', () => console.log('log persistently')); + * // Will return a new Array with a single function bound by `.on()` above + * const newListeners = emitter.rawListeners('log'); + * + * // Logs "log persistently" twice + * newListeners[0](); + * emitter.emit('log'); + * ``` + * @since v9.4.0 + */ + rawListeners(eventName: string | symbol): Function[]; + /** + * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments + * to each. + * + * Returns `true` if the event had listeners, `false` otherwise. + * + * ```js + * const EventEmitter = require('events'); + * const myEmitter = new EventEmitter(); + * + * // First listener + * myEmitter.on('event', function firstListener() { + * console.log('Helloooo! first listener'); + * }); + * // Second listener + * myEmitter.on('event', function secondListener(arg1, arg2) { + * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); + * }); + * // Third listener + * myEmitter.on('event', function thirdListener(...args) { + * const parameters = args.join(', '); + * console.log(`event with parameters ${parameters} in third listener`); + * }); + * + * console.log(myEmitter.listeners('event')); + * + * myEmitter.emit('event', 1, 2, 3, 4, 5); + * + * // Prints: + * // [ + * // [Function: firstListener], + * // [Function: secondListener], + * // [Function: thirdListener] + * // ] + * // Helloooo! first listener + * // event with parameters 1, 2 in second listener + * // event with parameters 1, 2, 3, 4, 5 in third listener + * ``` + * @since v0.1.26 + */ + emit(eventName: string | symbol, ...args: any[]): boolean; + /** + * Returns the number of listeners listening to the event named `eventName`. + * @since v3.2.0 + * @param eventName The name of the event being listened for + */ + listenerCount(eventName: string | symbol): number; + /** + * Adds the `listener` function to the _beginning_ of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.prependListener('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this + * listener is removed, and then invoked. + * + * ```js + * server.prependOnceListener('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Returns an array listing the events for which the emitter has registered + * listeners. The values in the array are strings or `Symbol`s. + * + * ```js + * const EventEmitter = require('events'); + * const myEE = new EventEmitter(); + * myEE.on('foo', () => {}); + * myEE.on('bar', () => {}); + * + * const sym = Symbol('symbol'); + * myEE.on(sym, () => {}); + * + * console.log(myEE.eventNames()); + * // Prints: [ 'foo', 'bar', Symbol(symbol) ] + * ``` + * @since v6.0.0 + */ + eventNames(): Array; + } + } + } + export = EventEmitter; +} +declare module 'node:events' { + import events = require('events'); + export = events; +} diff --git a/node_modules/@types/node/ts4.8/fs.d.ts b/node_modules/@types/node/ts4.8/fs.d.ts new file mode 100644 index 0000000..75c53fb --- /dev/null +++ b/node_modules/@types/node/ts4.8/fs.d.ts @@ -0,0 +1,3872 @@ +/** + * The `fs` module enables interacting with the file system in a + * way modeled on standard POSIX functions. + * + * To use the promise-based APIs: + * + * ```js + * import * as fs from 'fs/promises'; + * ``` + * + * To use the callback and sync APIs: + * + * ```js + * import * as fs from 'fs'; + * ``` + * + * All file system operations have synchronous, callback, and promise-based + * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/fs.js) + */ +declare module 'fs' { + import * as stream from 'node:stream'; + import { Abortable, EventEmitter } from 'node:events'; + import { URL } from 'node:url'; + import * as promises from 'node:fs/promises'; + export { promises }; + /** + * Valid types for path values in "fs". + */ + export type PathLike = string | Buffer | URL; + export type PathOrFileDescriptor = PathLike | number; + export type TimeLike = string | number | Date; + export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; + export type BufferEncodingOption = + | 'buffer' + | { + encoding: 'buffer'; + }; + export interface ObjectEncodingOptions { + encoding?: BufferEncoding | null | undefined; + } + export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; + export type OpenMode = number | string; + export type Mode = number | string; + export interface StatsBase { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: T; + ino: T; + mode: T; + nlink: T; + uid: T; + gid: T; + rdev: T; + size: T; + blksize: T; + blocks: T; + atimeMs: T; + mtimeMs: T; + ctimeMs: T; + birthtimeMs: T; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + } + export interface Stats extends StatsBase {} + /** + * A `fs.Stats` object provides information about a file. + * + * Objects returned from {@link stat}, {@link lstat} and {@link fstat} and + * their synchronous counterparts are of this type. + * If `bigint` in the `options` passed to those methods is true, the numeric values + * will be `bigint` instead of `number`, and the object will contain additional + * nanosecond-precision properties suffixed with `Ns`. + * + * ```console + * Stats { + * dev: 2114, + * ino: 48064969, + * mode: 33188, + * nlink: 1, + * uid: 85, + * gid: 100, + * rdev: 0, + * size: 527, + * blksize: 4096, + * blocks: 8, + * atimeMs: 1318289051000.1, + * mtimeMs: 1318289051000.1, + * ctimeMs: 1318289051000.1, + * birthtimeMs: 1318289051000.1, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * + * `bigint` version: + * + * ```console + * BigIntStats { + * dev: 2114n, + * ino: 48064969n, + * mode: 33188n, + * nlink: 1n, + * uid: 85n, + * gid: 100n, + * rdev: 0n, + * size: 527n, + * blksize: 4096n, + * blocks: 8n, + * atimeMs: 1318289051000n, + * mtimeMs: 1318289051000n, + * ctimeMs: 1318289051000n, + * birthtimeMs: 1318289051000n, + * atimeNs: 1318289051000000000n, + * mtimeNs: 1318289051000000000n, + * ctimeNs: 1318289051000000000n, + * birthtimeNs: 1318289051000000000n, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * @since v0.1.21 + */ + export class Stats {} + /** + * A representation of a directory entry, which can be a file or a subdirectory + * within the directory, as returned by reading from an `fs.Dir`. The + * directory entry is a combination of the file name and file type pairs. + * + * Additionally, when {@link readdir} or {@link readdirSync} is called with + * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. + * @since v10.10.0 + */ + export class Dirent { + /** + * Returns `true` if the `fs.Dirent` object describes a regular file. + * @since v10.10.0 + */ + isFile(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a file system + * directory. + * @since v10.10.0 + */ + isDirectory(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a block device. + * @since v10.10.0 + */ + isBlockDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a character device. + * @since v10.10.0 + */ + isCharacterDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a symbolic link. + * @since v10.10.0 + */ + isSymbolicLink(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a first-in-first-out + * (FIFO) pipe. + * @since v10.10.0 + */ + isFIFO(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a socket. + * @since v10.10.0 + */ + isSocket(): boolean; + /** + * The file name that this `fs.Dirent` object refers to. The type of this + * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. + * @since v10.10.0 + */ + name: string; + } + /** + * A class representing a directory stream. + * + * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. + * + * ```js + * import { opendir } from 'fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + */ + export class Dir implements AsyncIterable { + /** + * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. + * @since v12.12.0 + */ + readonly path: string; + /** + * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. + */ + [Symbol.asyncIterator](): AsyncIterableIterator; + /** + * Asynchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * + * A promise is returned that will be resolved after the resource has been + * closed. + * @since v12.12.0 + */ + close(): Promise; + close(cb: NoParamCallback): void; + /** + * Synchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * @since v12.12.0 + */ + closeSync(): void; + /** + * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. + * + * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + * @return containing {fs.Dirent|null} + */ + read(): Promise; + read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; + /** + * Synchronously read the next directory entry as an `fs.Dirent`. See the + * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. + * + * If there are no more directory entries to read, `null` will be returned. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + */ + readSync(): Dirent | null; + } + /** + * Class: fs.StatWatcher + * @since v14.3.0, v12.20.0 + * Extends `EventEmitter` + * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. + */ + export interface StatWatcher extends EventEmitter { + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.StatWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.StatWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } + export interface FSWatcher extends EventEmitter { + /** + * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. + * @since v0.5.8 + */ + close(): void; + /** + * events.EventEmitter + * 1. change + * 2. error + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'close', listener: () => void): this; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'close', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'close', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + } + /** + * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function. + * @since v0.1.93 + */ + export class ReadStream extends stream.Readable { + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes that have been read so far. + * @since v6.4.0 + */ + bytesRead: number; + /** + * The path to the file the stream is reading from as specified in the first + * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a + * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0, v10.16.0 + */ + pending: boolean; + /** + * events.EventEmitter + * 1. open + * 2. close + * 3. ready + */ + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'open', listener: (fd: number) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'open', listener: (fd: number) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'open', listener: (fd: number) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'open', listener: (fd: number) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'open', listener: (fd: number) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * * Extends `stream.Writable` + * + * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function. + * @since v0.1.93 + */ + export class WriteStream extends stream.Writable { + /** + * Closes `writeStream`. Optionally accepts a + * callback that will be executed once the `writeStream`is closed. + * @since v0.9.4 + */ + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes written so far. Does not include data that is still queued + * for writing. + * @since v0.4.7 + */ + bytesWritten: number; + /** + * The path to the file the stream is writing to as specified in the first + * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a + * `Buffer`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0 + */ + pending: boolean; + /** + * events.EventEmitter + * 1. open + * 2. close + * 3. ready + */ + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'open', listener: (fd: number) => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'open', listener: (fd: number) => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'open', listener: (fd: number) => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'open', listener: (fd: number) => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'open', listener: (fd: number) => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * Asynchronously rename file at `oldPath` to the pathname provided + * as `newPath`. In the case that `newPath` already exists, it will + * be overwritten. If there is a directory at `newPath`, an error will + * be raised instead. No arguments other than a possible exception are + * given to the completion callback. + * + * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). + * + * ```js + * import { rename } from 'fs'; + * + * rename('oldFile.txt', 'newFile.txt', (err) => { + * if (err) throw err; + * console.log('Rename complete!'); + * }); + * ``` + * @since v0.0.2 + */ + export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + export namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + /** + * Renames the file from `oldPath` to `newPath`. Returns `undefined`. + * + * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. + * @since v0.1.21 + */ + export function renameSync(oldPath: PathLike, newPath: PathLike): void; + /** + * Truncates the file. No arguments other than a possible exception are + * given to the completion callback. A file descriptor can also be passed as the + * first argument. In this case, `fs.ftruncate()` is called. + * + * ```js + * import { truncate } from 'fs'; + * // Assuming that 'path/file.txt' is a regular file. + * truncate('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was truncated'); + * }); + * ``` + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * + * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. + * @since v0.8.6 + * @param [len=0] + */ + export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void; + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function truncate(path: PathLike, callback: NoParamCallback): void; + export namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number | null): Promise; + } + /** + * Truncates the file. Returns `undefined`. A file descriptor can also be + * passed as the first argument. In this case, `fs.ftruncateSync()` is called. + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * @since v0.8.6 + * @param [len=0] + */ + export function truncateSync(path: PathLike, len?: number | null): void; + /** + * Truncates the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. + * + * If the file referred to by the file descriptor was larger than `len` bytes, only + * the first `len` bytes will be retained in the file. + * + * For example, the following program retains only the first four bytes of the + * file: + * + * ```js + * import { open, close, ftruncate } from 'fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('temp.txt', 'r+', (err, fd) => { + * if (err) throw err; + * + * try { + * ftruncate(fd, 4, (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * if (err) throw err; + * } + * }); + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v0.8.6 + * @param [len=0] + */ + export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void; + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + export function ftruncate(fd: number, callback: NoParamCallback): void; + export namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number | null): Promise; + } + /** + * Truncates the file descriptor. Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link ftruncate}. + * @since v0.8.6 + * @param [len=0] + */ + export function ftruncateSync(fd: number, len?: number | null): void; + /** + * Asynchronously changes owner and group of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + export namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Synchronously changes owner and group of a file. Returns `undefined`. + * This is the synchronous version of {@link chown}. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + export function chownSync(path: PathLike, uid: number, gid: number): void; + /** + * Sets the owner of the file. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; + export namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + /** + * Sets the owner of the file. Returns `undefined`. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + export function fchownSync(fd: number, uid: number, gid: number): void; + /** + * Set the owner of the symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. + */ + export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + export namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Set the owner for the path. Returns `undefined`. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + export function lchownSync(path: PathLike, uid: number, gid: number): void; + /** + * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic + * link, then the link is not dereferenced: instead, the timestamps of the + * symbolic link itself are changed. + * + * No arguments other than a possible exception are given to the completion + * callback. + * @since v14.5.0, v12.19.0 + */ + export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace lutimes { + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, + * with the difference that if the path refers to a symbolic link, then the link is not + * dereferenced: instead, the timestamps of the symbolic link itself are changed. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Change the file system timestamps of the symbolic link referenced by `path`. + * Returns `undefined`, or throws an exception when parameters are incorrect or + * the operation fails. This is the synchronous version of {@link lutimes}. + * @since v14.5.0, v12.19.0 + */ + export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Asynchronously changes the permissions of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * + * ```js + * import { chmod } from 'fs'; + * + * chmod('my_file.txt', 0o775, (err) => { + * if (err) throw err; + * console.log('The permissions for file "my_file.txt" have been changed!'); + * }); + * ``` + * @since v0.1.30 + */ + export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + export namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link chmod}. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * @since v0.6.7 + */ + export function chmodSync(path: PathLike, mode: Mode): void; + /** + * Sets the permissions on the file. No arguments other than a possible exception + * are given to the completion callback. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; + export namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: Mode): Promise; + } + /** + * Sets the permissions on the file. Returns `undefined`. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchmodSync(fd: number, mode: Mode): void; + /** + * Changes the permissions on a symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + /** @deprecated */ + export namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * Changes the permissions on a symbolic link. Returns `undefined`. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + export function lchmodSync(path: PathLike, mode: Mode): void; + /** + * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * + * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. + * Instead, user code should open/read/write the file directly and handle the + * error raised if the file is not available. + * + * To check if a file exists without manipulating it afterwards, {@link access} is recommended. + * + * For example, given the following directory structure: + * + * ```text + * - txtDir + * -- file.txt + * - app.js + * ``` + * + * The next program will check for the stats of the given paths: + * + * ```js + * import { stat } from 'fs'; + * + * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + * + * for (let i = 0; i < pathsToCheck.length; i++) { + * stat(pathsToCheck[i], (err, stats) => { + * console.log(stats.isDirectory()); + * console.log(stats); + * }); + * } + * ``` + * + * The resulting output will resemble: + * + * ```console + * true + * Stats { + * dev: 16777220, + * mode: 16877, + * nlink: 3, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214262, + * size: 96, + * blocks: 0, + * atimeMs: 1561174653071.963, + * mtimeMs: 1561174614583.3518, + * ctimeMs: 1561174626623.5366, + * birthtimeMs: 1561174126937.2893, + * atime: 2019-06-22T03:37:33.072Z, + * mtime: 2019-06-22T03:36:54.583Z, + * ctime: 2019-06-22T03:37:06.624Z, + * birthtime: 2019-06-22T03:28:46.937Z + * } + * false + * Stats { + * dev: 16777220, + * mode: 33188, + * nlink: 1, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214074, + * size: 8, + * blocks: 8, + * atimeMs: 1561174616618.8555, + * mtimeMs: 1561174614584, + * ctimeMs: 1561174614583.8145, + * birthtimeMs: 1561174007710.7478, + * atime: 2019-06-22T03:36:56.619Z, + * mtime: 2019-06-22T03:36:54.584Z, + * ctime: 2019-06-22T03:36:54.584Z, + * birthtime: 2019-06-22T03:26:47.711Z + * } + * ``` + * @since v0.0.2 + */ + export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function stat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; + export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; + export namespace stat { + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + } + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + export interface StatSyncFn extends Function { + (path: PathLike, options?: undefined): Stats; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + } + ): Stats | undefined; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + throwIfNoEntry: false; + } + ): BigIntStats | undefined; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + } + ): Stats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + } + ): BigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: boolean; + throwIfNoEntry?: false | undefined; + } + ): Stats | BigIntStats; + (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; + } + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export const statSync: StatSyncFn; + /** + * Invokes the callback with the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function fstat( + fd: number, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function fstat( + fd: number, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; + export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; + export namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + fd: number, + options: StatOptions & { + bigint: true; + } + ): Promise; + function __promisify__(fd: number, options?: StatOptions): Promise; + } + /** + * Retrieves the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + export function fstatSync( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Stats; + export function fstatSync( + fd: number, + options: StatOptions & { + bigint: true; + } + ): BigIntStats; + export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; + /** + * Retrieves the `fs.Stats` for the symbolic link referred to by the path. + * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic + * link, then the link itself is stat-ed, not the file that it refers to. + * + * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. + * @since v0.1.30 + */ + export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function lstat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function lstat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; + export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; + export namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + } + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export const lstatSync: StatSyncFn; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than + * a possible + * exception are given to the completion callback. + * @since v0.1.31 + */ + export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + export namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; + } + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.31 + */ + export function linkSync(existingPath: PathLike, newPath: PathLike): void; + /** + * Creates the link called `path` pointing to `target`. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. + * + * The `type` argument is only available on Windows and ignored on other platforms. + * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is + * not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If + * the `target` does not exist, `'file'` will be used. Windows junction points + * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. + * + * Relative targets are relative to the link’s parent directory. + * + * ```js + * import { symlink } from 'fs'; + * + * symlink('./mew', './mewtwo', callback); + * ``` + * + * The above example creates a symbolic link `mewtwo` which points to `mew` in the + * same directory: + * + * ```bash + * $ tree . + * . + * ├── mew + * └── mewtwo -> ./mew + * ``` + * @since v0.1.31 + */ + export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void; + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; + export namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + type Type = 'dir' | 'file' | 'junction'; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link symlink}. + * @since v0.1.31 + */ + export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + /** + * Reads the contents of the symbolic link referred to by `path`. The callback gets + * two arguments `(err, linkString)`. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path passed to the callback. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; + export namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + } + /** + * Returns the symbolic link's string value. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + export function readlinkSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer; + /** + * Asynchronously computes the canonical pathname by resolving `.`, `..` and + * symbolic links. + * + * A canonical pathname is not necessarily unique. Hard links and bind mounts can + * expose a file system entity through many pathnames. + * + * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: + * + * 1. No case conversion is performed on case-insensitive file systems. + * 2. The maximum number of symbolic links is platform-independent and generally + * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. + * + * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd`to resolve relative paths. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * If `path` resolves to a socket or a pipe, the function will return a system + * dependent name for that object. + * @since v0.1.31 + */ + export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + export namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). + * + * The `callback` gets two arguments `(err, resolvedPath)`. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v9.2.0 + */ + function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + } + /** + * Returns the resolved pathname. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link realpath}. + * @since v0.1.31 + */ + export function realpathSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer; + export namespace realpathSync { + function native(path: PathLike, options?: EncodingOption): string; + function native(path: PathLike, options: BufferEncodingOption): Buffer; + function native(path: PathLike, options?: EncodingOption): string | Buffer; + } + /** + * Asynchronously removes a file or symbolic link. No arguments other than a + * possible exception are given to the completion callback. + * + * ```js + * import { unlink } from 'fs'; + * // Assuming that 'path/file.txt' is a regular file. + * unlink('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was deleted'); + * }); + * ``` + * + * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a + * directory, use {@link rmdir}. + * + * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. + * @since v0.0.2 + */ + export function unlink(path: PathLike, callback: NoParamCallback): void; + export namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. + * @since v0.1.21 + */ + export function unlinkSync(path: PathLike): void; + export interface RmDirOptions { + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning + * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file. + * Use `fs.rm(path, { recursive: true, force: true })` instead. + * + * If `true`, perform a recursive directory removal. In + * recursive mode, operations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given + * to the completion callback. + * + * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on + * Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. + * @since v0.0.2 + */ + export function rmdir(path: PathLike, callback: NoParamCallback): void; + export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void; + export namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, options?: RmDirOptions): Promise; + } + /** + * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. + * + * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error + * on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. + * @since v0.1.21 + */ + export function rmdirSync(path: PathLike, options?: RmDirOptions): void; + export interface RmOptions { + /** + * When `true`, exceptions will be ignored if `path` does not exist. + * @default false + */ + force?: boolean | undefined; + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * If `true`, perform a recursive directory removal. In + * recursive mode, operations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm`utility). No arguments other than a possible exception are given to the + * completion callback. + * @since v14.14.0 + */ + export function rm(path: PathLike, callback: NoParamCallback): void; + export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; + export namespace rm { + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). + */ + function __promisify__(path: PathLike, options?: RmOptions): Promise; + } + /** + * Synchronously removes files and directories (modeled on the standard POSIX `rm`utility). Returns `undefined`. + * @since v14.14.0 + */ + export function rmSync(path: PathLike, options?: RmOptions): void; + export interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * If a folder was created, the path to the first created folder will be returned. + * @default false + */ + recursive?: boolean | undefined; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777 + */ + mode?: Mode | undefined; + } + /** + * Asynchronously creates a directory. + * + * The callback is given a possible exception and, if `recursive` is `true`, the + * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was + * created. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fs.mkdir()` when `path` is a directory that + * exists results in an error only + * when `recursive` is false. + * + * ```js + * import { mkdir } from 'fs'; + * + * // Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist. + * mkdir('/tmp/a/apple', { recursive: true }, (err) => { + * if (err) throw err; + * }); + * ``` + * + * On Windows, using `fs.mkdir()` on the root directory even with recursion will + * result in an error: + * + * ```js + * import { mkdir } from 'fs'; + * + * mkdir('/', { recursive: true }, (err) => { + * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] + * }); + * ``` + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.8 + */ + export function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdir( + path: PathLike, + options: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + | undefined, + callback: NoParamCallback + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void; + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function mkdir(path: PathLike, callback: NoParamCallback): void; + export namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; + } + /** + * Synchronously creates a directory. Returns `undefined`, or if `recursive` is`true`, the first directory path created. + * This is the synchronous version of {@link mkdir}. + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.21 + */ + export function mkdirSync( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): string | undefined; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdirSync( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): void; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; + /** + * Creates a unique temporary directory. + * + * Generates six random characters to be appended behind a required`prefix` to create a unique temporary directory. Due to platform + * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, + * notably the BSDs, can return more than six random characters, and replace + * trailing `X` characters in `prefix` with random characters. + * + * The created directory path is passed as a string to the callback's second + * parameter. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'fs'; + * + * mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 + * }); + * ``` + * + * The `fs.mkdtemp()` method will append the six randomly selected characters + * directly to the `prefix` string. For instance, given a directory `/tmp`, if the + * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator + * (`require('path').sep`). + * + * ```js + * import { tmpdir } from 'os'; + * import { mkdtemp } from 'fs'; + * + * // The parent directory for the new temporary directory + * const tmpDir = tmpdir(); + * + * // This method is *INCORRECT*: + * mkdtemp(tmpDir, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmpabc123`. + * // A new temporary directory is created at the file system root + * // rather than *within* the /tmp directory. + * }); + * + * // This method is *CORRECT*: + * import { sep } from 'path'; + * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmp/abc123`. + * // A new temporary directory is created within + * // the /tmp directory. + * }); + * ``` + * @since v5.10.0 + */ + export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp( + prefix: string, + options: + | 'buffer' + | { + encoding: 'buffer'; + }, + callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + export namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + } + /** + * Returns the created directory path. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link mkdtemp}. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v5.10.0 + */ + export function mkdtempSync(prefix: string, options?: EncodingOption): string; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer; + /** + * Reads the contents of a directory. The callback gets two arguments `(err, files)`where `files` is an array of the names of the files in the directory excluding`'.'` and `'..'`. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. + * @since v0.1.8 + */ + export function readdir( + path: PathLike, + options: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer', + callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir( + path: PathLike, + options: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + export function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void + ): void; + export namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | null + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options: + | 'buffer' + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Promise; + } + /** + * Reads the contents of the directory. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames returned. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. + * @since v0.1.21 + */ + export function readdirSync( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | null + ): string[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer' + ): Buffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): string[] | Buffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + export function readdirSync( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Dirent[]; + /** + * Closes the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.0.2 + */ + export function close(fd: number, callback?: NoParamCallback): void; + export namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Closes the file descriptor. Returns `undefined`. + * + * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.1.21 + */ + export function closeSync(fd: number): void; + /** + * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. + * + * `mode` sets the file mode (permission and sticky bits), but only if the file was + * created. On Windows, only the write permission can be manipulated; see {@link chmod}. + * + * The callback gets two arguments `(err, fd)`. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * + * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. + * @since v0.0.2 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] + */ + export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param [flags='r'] See `support of file system `flags``. + */ + export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + + export namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; + } + /** + * Returns an integer representing the file descriptor. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link open}. + * @since v0.1.21 + * @param [flags='r'] + * @param [mode=0o666] + */ + export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time in seconds,`Date`s, or a numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown. + * @since v0.4.2 + */ + export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link utimes}. + * @since v0.4.2 + */ + export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Change the file system timestamps of the object referenced by the supplied file + * descriptor. See {@link utimes}. + * @since v0.4.2 + */ + export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Synchronous version of {@link futimes}. Returns `undefined`. + * @since v0.4.2 + */ + export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other + * than a possible exception are given to the completion callback. + * @since v0.1.96 + */ + export function fsync(fd: number, callback: NoParamCallback): void; + export namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.96 + */ + export function fsyncSync(fd: number): void; + /** + * Write `buffer` to the file specified by `fd`. + * + * `offset` determines the part of the buffer to be written, and `length` is + * an integer specifying the number of bytes to write. + * + * `position` refers to the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). + * + * The callback will be given three arguments `(err, bytesWritten, buffer)` where`bytesWritten` specifies how many _bytes_ were written from `buffer`. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesWritten` and `buffer` properties. + * + * It is unsafe to use `fs.write()` multiple times on the same file without waiting + * for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v0.0.2 + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + export function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function write( + fd: number, + string: string, + position: number | undefined | null, + encoding: BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + */ + export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + export namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link write}. + * @since v0.1.21 + * @return The number of bytes written. + */ + export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number; + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number; + export type ReadPosition = number | bigint; + export interface ReadSyncOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `length of buffer` + */ + length?: number | undefined; + /** + * @default null + */ + position?: ReadPosition | null | undefined; + } + export interface ReadAsyncOptions extends ReadSyncOptions { + buffer?: TBuffer; + } + /** + * Read data from the file specified by `fd`. + * + * The callback is given the three arguments, `(err, bytesRead, buffer)`. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffer` properties. + * @since v0.0.2 + * @param buffer The buffer that the data will be written to. + * @param offset The position in `buffer` to write the data to. + * @param length The number of bytes to read. + * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If + * `position` is an integer, the file position will be unchanged. + */ + export function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void + ): void; + /** + * Similar to the above `fs.read` function, this version takes an optional `options` object. + * If not otherwise specified in an `options` object, + * `buffer` defaults to `Buffer.alloc(16384)`, + * `offset` defaults to `0`, + * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 + * `position` defaults to `null` + * @since v12.17.0, 13.11.0 + */ + export function read( + fd: number, + options: ReadAsyncOptions, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void + ): void; + export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void; + export namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: number | null + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__( + fd: number, + options: ReadAsyncOptions + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__(fd: number): Promise<{ + bytesRead: number; + buffer: NodeJS.ArrayBufferView; + }>; + } + /** + * Returns the number of `bytesRead`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link read}. + * @since v0.1.21 + */ + export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number; + /** + * Similar to the above `fs.readSync` function, this version takes an optional `options` object. + * If no `options` object is specified, it will default with the above values. + */ + export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number; + /** + * Asynchronously reads the entire contents of a file. + * + * ```js + * import { readFile } from 'fs'; + * + * readFile('/etc/passwd', (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * + * The callback is passed two arguments `(err, data)`, where `data` is the + * contents of the file. + * + * If no encoding is specified, then the raw buffer is returned. + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { readFile } from 'fs'; + * + * readFile('/etc/passwd', 'utf8', callback); + * ``` + * + * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an + * error will be returned. On FreeBSD, a representation of the directory's contents + * will be returned. + * + * ```js + * import { readFile } from 'fs'; + * + * // macOS, Linux, and Windows + * readFile('', (err, data) => { + * // => [Error: EISDIR: illegal operation on a directory, read ] + * }); + * + * // FreeBSD + * readFile('', (err, data) => { + * // => null, + * }); + * ``` + * + * It is possible to abort an ongoing request using an `AbortSignal`. If a + * request is aborted the callback is called with an `AbortError`: + * + * ```js + * import { readFile } from 'fs'; + * + * const controller = new AbortController(); + * const signal = controller.signal; + * readFile(fileInfo[0].name, { signal }, (err, buf) => { + * // ... + * }); + * // When you want to abort the request + * controller.abort(); + * ``` + * + * The `fs.readFile()` function buffers the entire file. To minimize memory costs, + * when possible prefer streaming via `fs.createReadStream()`. + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * @since v0.1.29 + * @param path filename or file descriptor + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | ({ + encoding?: null | undefined; + flag?: string | undefined; + } & Abortable) + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | ({ + encoding: BufferEncoding; + flag?: string | undefined; + } & Abortable) + | BufferEncoding, + callback: (err: NodeJS.ErrnoException | null, data: string) => void + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | (ObjectEncodingOptions & { + flag?: string | undefined; + } & Abortable) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + */ + export function readFile(path: PathOrFileDescriptor, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; + export namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null + ): Promise; + } + /** + * Returns the contents of the `path`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readFile}. + * + * If the `encoding` option is specified then this function returns a + * string. Otherwise it returns a buffer. + * + * Similar to {@link readFile}, when the path is a directory, the behavior of`fs.readFileSync()` is platform-specific. + * + * ```js + * import { readFileSync } from 'fs'; + * + * // macOS, Linux, and Windows + * readFileSync(''); + * // => [Error: EISDIR: illegal operation on a directory, read ] + * + * // FreeBSD + * readFileSync(''); // => + * ``` + * @since v0.1.8 + * @param path filename or file descriptor + */ + export function readFileSync( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null + ): Buffer; + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding + ): string; + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null + ): string | Buffer; + export type WriteFileOptions = + | (ObjectEncodingOptions & + Abortable & { + mode?: Mode | undefined; + flag?: string | undefined; + }) + | BufferEncoding + | null; + /** + * When `file` is a filename, asynchronously writes data to the file, replacing the + * file if it already exists. `data` can be a string or a buffer. + * + * When `file` is a file descriptor, the behavior is similar to calling`fs.write()` directly (which is recommended). See the notes below on using + * a file descriptor. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { writeFile } from 'fs'; + * import { Buffer } from 'buffer'; + * + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, (err) => { + * if (err) throw err; + * console.log('The file has been saved!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { writeFile } from 'fs'; + * + * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); + * ``` + * + * It is unsafe to use `fs.writeFile()` multiple times on the same file without + * waiting for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that + * performs multiple `write` calls internally to write the buffer passed to it. + * For performance sensitive code consider using {@link createWriteStream}. + * + * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'fs'; + * import { Buffer } from 'buffer'; + * + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, { signal }, (err) => { + * // When a request is aborted - the callback is called with an AbortError + * }); + * // When the request should be aborted + * controller.abort(); + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v0.1.29 + * @param file filename or file descriptor + */ + export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void; + export namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise; + } + /** + * Returns `undefined`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writeFile}. + * @since v0.1.29 + * @param file filename or file descriptor + */ + export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFile } from 'fs'; + * + * appendFile('message.txt', 'data to append', (err) => { + * if (err) throw err; + * console.log('The "data to append" was appended to file!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFile } from 'fs'; + * + * appendFile('message.txt', 'data to append', 'utf8', callback); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { open, close, appendFile } from 'fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('message.txt', 'a', (err, fd) => { + * if (err) throw err; + * + * try { + * appendFile(fd, 'data to append', 'utf8', (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * throw err; + * } + * }); + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void; + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; + export namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): Promise; + } + /** + * Synchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFileSync } from 'fs'; + * + * try { + * appendFileSync('message.txt', 'data to append'); + * console.log('The "data to append" was appended to file!'); + * } catch (err) { + * // Handle the error + * } + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFileSync } from 'fs'; + * + * appendFileSync('message.txt', 'data to append', 'utf8'); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { openSync, closeSync, appendFileSync } from 'fs'; + * + * let fd; + * + * try { + * fd = openSync('message.txt', 'a'); + * appendFileSync(fd, 'data to append', 'utf8'); + * } catch (err) { + * // Handle the error + * } finally { + * if (fd !== undefined) + * closeSync(fd); + * } + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void; + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + export interface WatchFileOptions { + bigint?: boolean | undefined; + persistent?: boolean | undefined; + interval?: number | undefined; + } + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + export function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint?: false | undefined; + }) + | undefined, + listener: (curr: Stats, prev: Stats) => void + ): StatWatcher; + export function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint: true; + }) + | undefined, + listener: (curr: BigIntStats, prev: BigIntStats) => void + ): StatWatcher; + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): StatWatcher; + /** + * Stop watching for changes on `filename`. If `listener` is specified, only that + * particular listener is removed. Otherwise, _all_ listeners are removed, + * effectively stopping watching of `filename`. + * + * Calling `fs.unwatchFile()` with a filename that is not being watched is a + * no-op, not an error. + * + * Using {@link watch} is more efficient than `fs.watchFile()` and`fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()`and `fs.unwatchFile()` when possible. + * @since v0.1.31 + * @param listener Optional, a listener previously attached using `fs.watchFile()` + */ + export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void; + export interface WatchOptions extends Abortable { + encoding?: BufferEncoding | 'buffer' | undefined; + persistent?: boolean | undefined; + recursive?: boolean | undefined; + } + export type WatchEventType = 'rename' | 'change'; + export type WatchListener = (event: WatchEventType, filename: T) => void; + /** + * Watch for changes on `filename`, where `filename` is either a file or a + * directory. + * + * The second argument is optional. If `options` is provided as a string, it + * specifies the `encoding`. Otherwise `options` should be passed as an object. + * + * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file + * which triggered the event. + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of`eventType`. + * + * If a `signal` is passed, aborting the corresponding AbortController will close + * the returned `fs.FSWatcher`. + * @since v0.5.10 + * @param listener + */ + export function watch( + filename: PathLike, + options: + | (WatchOptions & { + encoding: 'buffer'; + }) + | 'buffer', + listener?: WatchListener + ): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch(filename: PathLike, options?: WatchOptions | BufferEncoding | null, listener?: WatchListener): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch(filename: PathLike, options: WatchOptions | string, listener?: WatchListener): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function watch(filename: PathLike, listener?: WatchListener): FSWatcher; + /** + * Test whether or not the given path exists by checking with the file system. + * Then call the `callback` argument with either true or false: + * + * ```js + * import { exists } from 'fs'; + * + * exists('/etc/passwd', (e) => { + * console.log(e ? 'it exists' : 'no passwd!'); + * }); + * ``` + * + * **The parameters for this callback are not consistent with other Node.js** + * **callbacks.** Normally, the first parameter to a Node.js callback is an `err`parameter, optionally followed by other parameters. The `fs.exists()` callback + * has only one boolean parameter. This is one reason `fs.access()` is recommended + * instead of `fs.exists()`. + * + * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file does not exist. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { exists, open, close } from 'fs'; + * + * exists('myfile', (e) => { + * if (e) { + * console.error('myfile already exists'); + * } else { + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { open, close, exists } from 'fs'; + * + * exists('myfile', (e) => { + * if (e) { + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } else { + * console.error('myfile does not exist'); + * } + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for existence and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the existence of a file only if the file won’t be + * used directly, for example when its existence is a signal from another + * process. + * @since v0.0.2 + * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. + */ + export function exists(path: PathLike, callback: (exists: boolean) => void): void; + /** @deprecated */ + export namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Returns `true` if the path exists, `false` otherwise. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link exists}. + * + * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback`parameter to `fs.exists()` accepts parameters that are inconsistent with other + * Node.js callbacks. `fs.existsSync()` does not use a callback. + * + * ```js + * import { existsSync } from 'fs'; + * + * if (existsSync('/etc/passwd')) + * console.log('The path exists.'); + * ``` + * @since v0.1.21 + */ + export function existsSync(path: PathLike): boolean; + export namespace constants { + // File Access Constants + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + // File Copy Constants + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + // File Open Constants + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + // File Type Constants + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + // File Mode Constants + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + /** + * When set, a memory file mapping is used to access the file. This flag + * is available on Windows operating systems only. On other operating systems, + * this flag is ignored. + */ + const UV_FS_O_FILEMAP: number; + } + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * The final argument, `callback`, is a callback function that is invoked with + * a possible error argument. If any of the accessibility checks fail, the error + * argument will be an `Error` object. The following examples check if`package.json` exists, and if it is readable or writable. + * + * ```js + * import { access, constants } from 'fs'; + * + * const file = 'package.json'; + * + * // Check if the file exists in the current directory. + * access(file, constants.F_OK, (err) => { + * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); + * }); + * + * // Check if the file is readable. + * access(file, constants.R_OK, (err) => { + * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); + * }); + * + * // Check if the file is writable. + * access(file, constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); + * }); + * + * // Check if the file is readable and writable. + * access(file, constants.R_OK | constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); + * }); + * ``` + * + * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file is not accessible. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'fs'; + * + * access('myfile', (err) => { + * if (!err) { + * console.error('myfile already exists'); + * return; + * } + * + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'fs'; + * access('myfile', (err) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for accessibility and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the accessibility of a file only if the file will not be + * used directly, for example when its accessibility is a signal from another + * process. + * + * On Windows, access-control policies (ACLs) on a directory may limit access to + * a file or directory. The `fs.access()` function, however, does not check the + * ACL and therefore may report that a path is accessible even if the ACL restricts + * the user from reading or writing to it. + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function access(path: PathLike, callback: NoParamCallback): void; + export namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + /** + * Synchronously tests a user's permissions for the file or directory specified + * by `path`. The `mode` argument is an optional integer that specifies the + * accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and + * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, + * the method will return `undefined`. + * + * ```js + * import { accessSync, constants } from 'fs'; + * + * try { + * accessSync('etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can read/write'); + * } catch (err) { + * console.error('no access!'); + * } + * ``` + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + export function accessSync(path: PathLike, mode?: number): void; + interface StreamOptions { + flags?: string | undefined; + encoding?: BufferEncoding | undefined; + fd?: number | promises.FileHandle | undefined; + mode?: number | undefined; + autoClose?: boolean | undefined; + /** + * @default false + */ + emitClose?: boolean | undefined; + start?: number | undefined; + highWaterMark?: number | undefined; + } + interface ReadStreamOptions extends StreamOptions { + end?: number | undefined; + } + /** + * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 kb. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is + * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the + * current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use + * the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. + * + * If `fd` points to a character device that only supports blocking reads + * (such as keyboard or sound card), read operations do not finish until data is + * available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option, it is possible to override the corresponding `fs`implementations for `open`, `read`, and `close`. When providing the `fs` option, + * an override for `read` is required. If no `fd` is provided, an override for`open` is also required. If `autoClose` is `true`, an override for `close` is + * also required. + * + * ```js + * import { createReadStream } from 'fs'; + * + * // Create a stream from some character device. + * const stream = createReadStream('/dev/input/event0'); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * `mode` sets the file mode (permission and sticky bits), but only if the + * file was created. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { createReadStream } from 'fs'; + * + * createReadStream('sample.txt', { start: 90, end: 99 }); + * ``` + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` option to be set to `r+` rather than the + * default `w`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev` and `close`. Overriding `write()`without `writev()` can reduce + * performance as some optimizations (`_writev()`) + * will be disabled. When providing the `fs` option, overrides for at least one of`write` and `writev` are required. If no `fd` option is supplied, an override + * for `open` is also required. If `autoClose` is `true`, an override for `close`is also required. + * + * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s + * should be passed to `net.Socket`. + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other + * than a possible + * exception are given to the completion callback. + * @since v0.1.96 + */ + export function fdatasync(fd: number, callback: NoParamCallback): void; + export namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. + * @since v0.1.96 + */ + export function fdatasyncSync(fd: number): void; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. No arguments other than a possible exception are given to the + * callback function. Node.js makes no guarantees about the atomicity of the copy + * operation. If an error occurs after the destination file has been opened for + * writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFile, constants } from 'fs'; + * + * function callback(err) { + * if (err) throw err; + * console.log('source.txt was copied to destination.txt'); + * } + * + * // destination.txt will be created or overwritten by default. + * copyFile('source.txt', 'destination.txt', callback); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; + export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; + export namespace copyFile { + function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; + } + /** + * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. Returns `undefined`. Node.js makes no guarantees about the + * atomicity of the copy operation. If an error occurs after the destination file + * has been opened for writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFileSync, constants } from 'fs'; + * + * // destination.txt will be created or overwritten by default. + * copyFileSync('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; + /** + * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`. + * + * `position` is the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. + * + * The callback will be given three arguments: `err`, `bytesWritten`, and`buffers`. `bytesWritten` is how many bytes were written from `buffers`. + * + * If this method is `util.promisify()` ed, it returns a promise for an`Object` with `bytesWritten` and `buffers` properties. + * + * It is unsafe to use `fs.writev()` multiple times on the same file without + * waiting for the callback. For this scenario, use {@link createWriteStream}. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + */ + export function writev(fd: number, buffers: ReadonlyArray, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void; + export function writev( + fd: number, + buffers: ReadonlyArray, + position: number, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void + ): void; + export interface WriteVResult { + bytesWritten: number; + buffers: NodeJS.ArrayBufferView[]; + } + export namespace writev { + function __promisify__(fd: number, buffers: ReadonlyArray, position?: number): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writev}. + * @since v12.9.0 + * @return The number of bytes written. + */ + export function writevSync(fd: number, buffers: ReadonlyArray, position?: number): number; + /** + * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s + * using `readv()`. + * + * `position` is the offset from the beginning of the file from where data + * should be read. If `typeof position !== 'number'`, the data will be read + * from the current position. + * + * The callback will be given three arguments: `err`, `bytesRead`, and`buffers`. `bytesRead` is how many bytes were read from the file. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffers` properties. + * @since v13.13.0, v12.17.0 + */ + export function readv(fd: number, buffers: ReadonlyArray, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void): void; + export function readv( + fd: number, + buffers: ReadonlyArray, + position: number, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void + ): void; + export interface ReadVResult { + bytesRead: number; + buffers: NodeJS.ArrayBufferView[]; + } + export namespace readv { + function __promisify__(fd: number, buffers: ReadonlyArray, position?: number): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readv}. + * @since v13.13.0, v12.17.0 + * @return The number of bytes read. + */ + export function readvSync(fd: number, buffers: ReadonlyArray, position?: number): number; + export interface OpenDirOptions { + encoding?: BufferEncoding | undefined; + /** + * Number of directory entries that are buffered + * internally when reading from the directory. Higher values lead to better + * performance but higher memory usage. + * @default 32 + */ + bufferSize?: number | undefined; + } + /** + * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; + /** + * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for + * more details. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + export function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + export namespace opendir { + function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; + } + export interface BigIntStats extends StatsBase { + atimeNs: bigint; + mtimeNs: bigint; + ctimeNs: bigint; + birthtimeNs: bigint; + } + export interface BigIntOptions { + bigint: true; + } + export interface StatOptions { + bigint?: boolean | undefined; + } + export interface StatSyncOptions extends StatOptions { + throwIfNoEntry?: boolean | undefined; + } + interface CopyOptionsBase { + /** + * Dereference symlinks + * @default false + */ + dereference?: boolean; + /** + * When `force` is `false`, and the destination + * exists, throw an error. + * @default false + */ + errorOnExist?: boolean; + /** + * Overwrite existing file or directory. _The copy + * operation will ignore errors if you set this to false and the destination + * exists. Use the `errorOnExist` option to change this behavior. + * @default true + */ + force?: boolean; + /** + * When `true` timestamps from `src` will + * be preserved. + * @default false + */ + preserveTimestamps?: boolean; + /** + * Copy directories recursively. + * @default false + */ + recursive?: boolean; + /** + * When true, path resolution for symlinks will be skipped + * @default false + */ + verbatimSymlinks?: boolean; + } + export interface CopyOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?(source: string, destination: string): boolean | Promise; + } + export interface CopySyncOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?(source: string, destination: string): boolean; + } + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + export function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void; + export function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; + /** + * Synchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; +} +declare module 'node:fs' { + export * from 'fs'; +} diff --git a/node_modules/@types/node/ts4.8/fs/promises.d.ts b/node_modules/@types/node/ts4.8/fs/promises.d.ts new file mode 100644 index 0000000..aca2fd5 --- /dev/null +++ b/node_modules/@types/node/ts4.8/fs/promises.d.ts @@ -0,0 +1,1138 @@ +/** + * The `fs/promises` API provides asynchronous file system methods that return + * promises. + * + * The promise APIs use the underlying Node.js threadpool to perform file + * system operations off the event loop thread. These operations are not + * synchronized or threadsafe. Care must be taken when performing multiple + * concurrent modifications on the same file or data corruption may occur. + * @since v10.0.0 + */ +declare module 'fs/promises' { + import { Abortable } from 'node:events'; + import { Stream } from 'node:stream'; + import { ReadableStream } from 'node:stream/web'; + import { + BigIntStats, + BufferEncodingOption, + constants as fsConstants, + CopyOptions, + Dir, + Dirent, + MakeDirectoryOptions, + Mode, + ObjectEncodingOptions, + OpenDirOptions, + OpenMode, + PathLike, + ReadStream, + ReadVResult, + RmDirOptions, + RmOptions, + StatOptions, + Stats, + TimeLike, + WatchEventType, + WatchOptions, + WriteStream, + WriteVResult, + } from 'node:fs'; + import { Interface as ReadlineInterface } from 'node:readline'; + + interface FileChangeInfo { + eventType: WatchEventType; + filename: T; + } + interface FlagAndOpenMode { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } + interface FileReadResult { + bytesRead: number; + buffer: T; + } + interface FileReadOptions { + /** + * @default `Buffer.alloc(0xffff)` + */ + buffer?: T; + /** + * @default 0 + */ + offset?: number | null; + /** + * @default `buffer.byteLength` + */ + length?: number | null; + position?: number | null; + } + interface CreateReadStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + end?: number | undefined; + highWaterMark?: number | undefined; + } + interface CreateWriteStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + } + // TODO: Add `EventEmitter` close + interface FileHandle { + /** + * The numeric file descriptor managed by the {FileHandle} object. + * @since v10.0.0 + */ + readonly fd: number; + /** + * Alias of `filehandle.writeFile()`. + * + * When operating on file handles, the mode cannot be changed from what it was set + * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise; + /** + * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). + * @since v10.0.0 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + * @return Fulfills with `undefined` upon success. + */ + chown(uid: number, gid: number): Promise; + /** + * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). + * @since v10.0.0 + * @param mode the file mode bit mask. + * @return Fulfills with `undefined` upon success. + */ + chmod(mode: Mode): Promise; + /** + * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 kb. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is + * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from + * the current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If the `FileHandle` points to a character device that only supports blocking + * reads (such as keyboard or sound card), read operations do not finish until data + * is available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * ```js + * import { open } from 'fs/promises'; + * + * const fd = await open('/dev/input/event0'); + * // Create a stream from some character device. + * const stream = fd.createReadStream(); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { open } from 'fs/promises'; + * + * const fd = await open('sample.txt'); + * fd.createReadStream({ start: 90, end: 99 }); + * ``` + * @since v16.11.0 + */ + createReadStream(options?: CreateReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` `open` option to be set to `r+` rather than + * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * @since v16.11.0 + */ + createWriteStream(options?: CreateWriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. + * + * Unlike `filehandle.sync` this method does not flush modified metadata. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + datasync(): Promise; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fufills with `undefined` upon success. + */ + sync(): Promise; + /** + * Reads data from the file and stores that in the given buffer. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * @since v10.0.0 + * @param buffer A buffer that will be filled with the file data read. + * @param offset The location in the buffer at which to start filling. + * @param length The number of bytes to read. + * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an + * integer, the current file position will remain unchanged. + * @return Fulfills upon success with an object with two properties: + */ + read(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise>; + read(options?: FileReadOptions): Promise>; + /** + * Returns a `ReadableStream` that may be used to read the files data. + * + * An error will be thrown if this method is called more than once or is called after the `FileHandle` is closed + * or closing. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const chunk of file.readableWebStream()) + * console.log(chunk); + * + * await file.close(); + * ``` + * + * While the `ReadableStream` will read the file to completion, it will not close the `FileHandle` automatically. User code must still call the `fileHandle.close()` method. + * + * @since v17.0.0 + * @experimental + */ + readableWebStream(): ReadableStream; + /** + * Asynchronously reads the entire contents of a file. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support reading. + * + * If one or more `filehandle.read()` calls are made on a file handle and then a`filehandle.readFile()` call is made, the data will be read from the current + * position till the end of the file. It doesn't always read from the beginning + * of the file. + * @since v10.0.0 + * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the + * data will be a string. + */ + readFile( + options?: { + encoding?: null | undefined; + flag?: OpenMode | undefined; + } | null + ): Promise; + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile( + options: + | { + encoding: BufferEncoding; + flag?: OpenMode | undefined; + } + | BufferEncoding + ): Promise; + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile( + options?: + | (ObjectEncodingOptions & { + flag?: OpenMode | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Convenience method to create a `readline` interface and stream over the file. For example: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const line of file.readLines()) { + * console.log(line); + * } + * ``` + * + * @since v18.11.0 + * @param options See `filehandle.createReadStream()` for the options. + */ + readLines(options?: CreateReadStreamOptions): ReadlineInterface; + /** + * @since v10.0.0 + * @return Fulfills with an {fs.Stats} for the file. + */ + stat( + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + stat( + opts: StatOptions & { + bigint: true; + } + ): Promise; + stat(opts?: StatOptions): Promise; + /** + * Truncates the file. + * + * If the file was larger than `len` bytes, only the first `len` bytes will be + * retained in the file. + * + * The following example retains only the first four bytes of the file: + * + * ```js + * import { open } from 'fs/promises'; + * + * let filehandle = null; + * try { + * filehandle = await open('temp.txt', 'r+'); + * await filehandle.truncate(4); + * } finally { + * await filehandle?.close(); + * } + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + truncate(len?: number): Promise; + /** + * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success. + * @since v10.0.0 + */ + utimes(atime: TimeLike, mtime: TimeLike): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * The promise is resolved with no arguments upon success. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support writing. + * + * It is unsafe to use `filehandle.writeFile()` multiple times on the same file + * without waiting for the promise to be resolved (or rejected). + * + * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the + * current position till the end of the file. It doesn't always write from the + * beginning of the file. + * @since v10.0.0 + */ + writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise; + /** + * Write `buffer` to the file. + * + * The promise is resolved with an object containing two properties: + * + * It is unsafe to use `filehandle.write()` multiple times on the same file + * without waiting for the promise to be resolved (or rejected). For this + * scenario, use `filehandle.createWriteStream()`. + * + * On Linux, positional writes do not work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v10.0.0 + * @param [offset=0] The start position from within `buffer` where the data to write begins. + * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. + * @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position. + * See the POSIX pwrite(2) documentation for more detail. + */ + write( + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + data: string, + position?: number | null, + encoding?: BufferEncoding | null + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + /** + * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. + * + * The promise is resolved with an object containing a two properties: + * + * It is unsafe to call `writev()` multiple times on the same file without waiting + * for the promise to be resolved (or rejected). + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param position The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current + * position. + */ + writev(buffers: ReadonlyArray, position?: number): Promise; + /** + * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s + * @since v13.13.0, v12.17.0 + * @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. + * @return Fulfills upon success an object containing two properties: + */ + readv(buffers: ReadonlyArray, position?: number): Promise; + /** + * Closes the file handle after waiting for any pending operation on the handle to + * complete. + * + * ```js + * import { open } from 'fs/promises'; + * + * let filehandle; + * try { + * filehandle = await open('thefile.txt', 'r'); + * } finally { + * await filehandle?.close(); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + close(): Promise; + } + + const constants: typeof fsConstants; + + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If the accessibility check is successful, the promise is resolved with no + * value. If any of the accessibility checks fail, the promise is rejected + * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and + * written by the current process. + * + * ```js + * import { access } from 'fs/promises'; + * import { constants } from 'fs'; + * + * try { + * await access('/etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can access'); + * } catch { + * console.error('cannot access'); + * } + * ``` + * + * Using `fsPromises.access()` to check for the accessibility of a file before + * calling `fsPromises.open()` is not recommended. Doing so introduces a race + * condition, since other processes may change the file's state between the two + * calls. Instead, user code should open/read/write the file directly and handle + * the error raised if the file is not accessible. + * @since v10.0.0 + * @param [mode=fs.constants.F_OK] + * @return Fulfills with `undefined` upon success. + */ + function access(path: PathLike, mode?: number): Promise; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. + * + * No guarantees are made about the atomicity of the copy operation. If an + * error occurs after the destination file has been opened for writing, an attempt + * will be made to remove the destination. + * + * ```js + * import { constants } from 'fs'; + * import { copyFile } from 'fs/promises'; + * + * try { + * await copyFile('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.log('The file could not be copied'); + * } + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * try { + * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.log('The file could not be copied'); + * } + * ``` + * @since v10.0.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. + * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) + * @return Fulfills with `undefined` upon success. + */ + function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; + /** + * Opens a `FileHandle`. + * + * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * @since v10.0.0 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. + * @return Fulfills with a {FileHandle} object. + */ + function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; + /** + * Renames `oldPath` to `newPath`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + /** + * Truncates (shortens or extends the length) of the content at `path` to `len`bytes. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + function truncate(path: PathLike, len?: number): Promise; + /** + * Removes the directory identified by `path`. + * + * Using `fsPromises.rmdir()` on a file (not a directory) results in the + * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR`error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rmdir(path: PathLike, options?: RmDirOptions): Promise; + /** + * Removes files and directories (modeled on the standard POSIX `rm` utility). + * @since v14.14.0 + * @return Fulfills with `undefined` upon success. + */ + function rm(path: PathLike, options?: RmOptions): Promise; + /** + * Asynchronously creates a directory. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fsPromises.mkdir()` when `path` is a directory + * that exists results in a + * rejection only when `recursive` is false. + * @since v10.0.0 + * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; + /** + * Reads the contents of a directory. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned + * will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects. + * + * ```js + * import { readdir } from 'fs/promises'; + * + * try { + * const files = await readdir(path); + * for (const file of files) + * console.log(file); + * } catch (err) { + * console.error(err); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer' + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Promise; + /** + * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is + * resolved with the`linkString` upon success. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, the link path + * returned will be passed as a `Buffer` object. + * @since v10.0.0 + * @return Fulfills with the `linkString` upon success. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise; + /** + * Creates a symbolic link. + * + * The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. Windows junction points require the destination path + * to be absolute. When using `'junction'`, the `target` argument will + * automatically be normalized to absolute path. + * @since v10.0.0 + * @param [type='file'] + * @return Fulfills with `undefined` upon success. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + /** + * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, + * in which case the link itself is stat-ed, not the file that it refers to. + * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. + */ + function lstat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function lstat( + path: PathLike, + opts: StatOptions & { + bigint: true; + } + ): Promise; + function lstat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given `path`. + */ + function stat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + } + ): Promise; + function stat(path: PathLike, opts?: StatOptions): Promise; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + /** + * If `path` refers to a symbolic link, then the link is removed without affecting + * the file or directory to which that link refers. If the `path` refers to a file + * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function unlink(path: PathLike): Promise; + /** + * Changes the permissions of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the permissions on a symbolic link. + * + * This method is only implemented on macOS. + * @deprecated Since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the ownership on a symbolic link. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a + * symbolic link, then the link is not dereferenced: instead, the timestamps of + * the symbolic link itself are changed. + * @since v14.5.0, v12.19.0 + * @return Fulfills with `undefined` upon success. + */ + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Changes the ownership of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time, `Date`s, or a + * numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path. If the `encoding` is set to `'buffer'`, the path returned will be + * passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v10.0.0 + * @return Fulfills with the resolved path upon success. + */ + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Creates a unique temporary directory. A unique directory name is generated by + * appending six random characters to the end of the provided `prefix`. Due to + * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some + * platforms, notably the BSDs, can return more than six random characters, and + * replace trailing `X` characters in `prefix` with random characters. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'fs/promises'; + * + * try { + * await mkdtemp(path.join(os.tmpdir(), 'foo-')); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * The `fsPromises.mkdtemp()` method will append the six randomly selected + * characters directly to the `prefix` string. For instance, given a directory`/tmp`, if the intention is to create a temporary directory _within_`/tmp`, the`prefix` must end with a trailing + * platform-specific path separator + * (`require('path').sep`). + * @since v10.0.0 + * @return Fulfills with a string containing the filesystem path of the newly created temporary directory. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * If `options` is a string, then it specifies the encoding. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * Any specified `FileHandle` has to support writing. + * + * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file + * without waiting for the promise to be settled. + * + * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience + * method that performs multiple `write` calls internally to write the buffer + * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. + * + * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'fs/promises'; + * import { Buffer } from 'buffer'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * const promise = writeFile('message.txt', data, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v10.0.0 + * @param file filename or `FileHandle` + * @return Fulfills with `undefined` upon success. + */ + function writeFile( + file: PathLike | FileHandle, + data: string | NodeJS.ArrayBufferView | Iterable | AsyncIterable | Stream, + options?: + | (ObjectEncodingOptions & { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } & Abortable) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * The `path` may be specified as a `FileHandle` that has been opened + * for appending (using `fsPromises.open()`). + * @since v10.0.0 + * @param path filename or {FileHandle} + * @return Fulfills with `undefined` upon success. + */ + function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise; + /** + * Asynchronously reads the entire contents of a file. + * + * If no encoding is specified (using `options.encoding`), the data is returned + * as a `Buffer` object. Otherwise, the data will be a string. + * + * If `options` is a string, then it specifies the encoding. + * + * When the `path` is a directory, the behavior of `fsPromises.readFile()` is + * platform-specific. On macOS, Linux, and Windows, the promise will be rejected + * with an error. On FreeBSD, a representation of the directory's contents will be + * returned. + * + * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a + * request is aborted the promise returned is rejected with an `AbortError`: + * + * ```js + * import { readFile } from 'fs/promises'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const promise = readFile(fileName, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * Any specified `FileHandle` has to support reading. + * @since v10.0.0 + * @param path filename or `FileHandle` + * @return Fulfills with the contents of the file. + */ + function readFile( + path: PathLike | FileHandle, + options?: + | ({ + encoding?: null | undefined; + flag?: OpenMode | undefined; + } & Abortable) + | null + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | FileHandle, + options: + | ({ + encoding: BufferEncoding; + flag?: OpenMode | undefined; + } & Abortable) + | BufferEncoding + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | FileHandle, + options?: + | (ObjectEncodingOptions & + Abortable & { + flag?: OpenMode | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * + * Example using async iteration: + * + * ```js + * import { opendir } from 'fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + * @return Fulfills with an {fs.Dir}. + */ + function opendir(path: PathLike, options?: OpenDirOptions): Promise; + /** + * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. + * + * ```js + * const { watch } = require('fs/promises'); + * + * const ac = new AbortController(); + * const { signal } = ac; + * setTimeout(() => ac.abort(), 10000); + * + * (async () => { + * try { + * const watcher = watch(__filename, { signal }); + * for await (const event of watcher) + * console.log(event); + * } catch (err) { + * if (err.name === 'AbortError') + * return; + * throw err; + * } + * })(); + * ``` + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. + * @since v15.9.0, v14.18.0 + * @return of objects with the properties: + */ + function watch( + filename: PathLike, + options: + | (WatchOptions & { + encoding: 'buffer'; + }) + | 'buffer' + ): AsyncIterable>; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable>; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable> | AsyncIterable>; + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + * @return Fulfills with `undefined` upon success. + */ + function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; +} +declare module 'node:fs/promises' { + export * from 'fs/promises'; +} diff --git a/node_modules/@types/node/ts4.8/globals.d.ts b/node_modules/@types/node/ts4.8/globals.d.ts new file mode 100644 index 0000000..f401d95 --- /dev/null +++ b/node_modules/@types/node/ts4.8/globals.d.ts @@ -0,0 +1,294 @@ +// Declare "static" methods in Error +interface ErrorConstructor { + /** Create .stack property on a target object */ + captureStackTrace(targetObject: object, constructorOpt?: Function): void; + + /** + * Optional override for formatting stack traces + * + * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces + */ + prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; + + stackTraceLimit: number; +} + +/*-----------------------------------------------* + * * + * GLOBAL * + * * + ------------------------------------------------*/ + +// For backwards compability +interface NodeRequire extends NodeJS.Require { } +interface RequireResolve extends NodeJS.RequireResolve { } +interface NodeModule extends NodeJS.Module { } + +declare var process: NodeJS.Process; +declare var console: Console; + +declare var __filename: string; +declare var __dirname: string; + +declare var require: NodeRequire; +declare var module: NodeModule; + +// Same as module.exports +declare var exports: any; + +/** + * Only available if `--expose-gc` is passed to the process. + */ +declare var gc: undefined | (() => void); + +//#region borrowed +// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib +/** A controller object that allows you to abort one or more DOM requests as and when desired. */ +interface AbortController { + /** + * Returns the AbortSignal object associated with this object. + */ + + readonly signal: AbortSignal; + /** + * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. + */ + abort(): void; +} + +/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */ +interface AbortSignal extends EventTarget { + /** + * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. + */ + readonly aborted: boolean; +} + +declare var AbortController: { + prototype: AbortController; + new(): AbortController; +}; + +declare var AbortSignal: { + prototype: AbortSignal; + new(): AbortSignal; + // TODO: Add abort() static +}; +//#endregion borrowed + +//#region ArrayLike.at() +interface RelativeIndexable { + /** + * Takes an integer value and returns the item at that index, + * allowing for positive and negative integers. + * Negative integers count back from the last item in the array. + */ + at(index: number): T | undefined; +} +interface String extends RelativeIndexable {} +interface Array extends RelativeIndexable {} +interface Int8Array extends RelativeIndexable {} +interface Uint8Array extends RelativeIndexable {} +interface Uint8ClampedArray extends RelativeIndexable {} +interface Int16Array extends RelativeIndexable {} +interface Uint16Array extends RelativeIndexable {} +interface Int32Array extends RelativeIndexable {} +interface Uint32Array extends RelativeIndexable {} +interface Float32Array extends RelativeIndexable {} +interface Float64Array extends RelativeIndexable {} +interface BigInt64Array extends RelativeIndexable {} +interface BigUint64Array extends RelativeIndexable {} +//#endregion ArrayLike.at() end + +/** + * @since v17.0.0 + * + * Creates a deep clone of an object. + */ +declare function structuredClone( + value: T, + transfer?: { transfer: ReadonlyArray }, +): T; + +/*----------------------------------------------* +* * +* GLOBAL INTERFACES * +* * +*-----------------------------------------------*/ +declare namespace NodeJS { + interface CallSite { + /** + * Value of "this" + */ + getThis(): unknown; + + /** + * Type of "this" as a string. + * This is the name of the function stored in the constructor field of + * "this", if available. Otherwise the object's [[Class]] internal + * property. + */ + getTypeName(): string | null; + + /** + * Current function + */ + getFunction(): Function | undefined; + + /** + * Name of the current function, typically its name property. + * If a name property is not available an attempt will be made to try + * to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + * Name of the property [of "this" or one of its prototypes] that holds + * the current function + */ + getMethodName(): string | null; + + /** + * Name of the script [if this function was defined in a script] + */ + getFileName(): string | null; + + /** + * Current line number [if this function was defined in a script] + */ + getLineNumber(): number | null; + + /** + * Current column number [if this function was defined in a script] + */ + getColumnNumber(): number | null; + + /** + * A call site object representing the location where eval was called + * [if this function was created using a call to eval] + */ + getEvalOrigin(): string | undefined; + + /** + * Is this a toplevel invocation, that is, is "this" the global object? + */ + isToplevel(): boolean; + + /** + * Does this call take place in code defined by a call to eval? + */ + isEval(): boolean; + + /** + * Is this call in native V8 code? + */ + isNative(): boolean; + + /** + * Is this a constructor call? + */ + isConstructor(): boolean; + } + + interface ErrnoException extends Error { + errno?: number | undefined; + code?: string | undefined; + path?: string | undefined; + syscall?: string | undefined; + } + + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: BufferEncoding): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean | undefined; }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): this; + end(data: string | Uint8Array, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; + } + + interface ReadWriteStream extends ReadableStream, WritableStream { } + + interface RefCounted { + ref(): this; + unref(): this; + } + + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float32Array + | Float64Array; + type ArrayBufferView = TypedArray | DataView; + + interface Require { + (id: string): any; + resolve: RequireResolve; + cache: Dict; + /** + * @deprecated + */ + extensions: RequireExtensions; + main: Module | undefined; + } + + interface RequireResolve { + (id: string, options?: { paths?: string[] | undefined; }): string; + paths(request: string): string[] | null; + } + + interface RequireExtensions extends Dict<(m: Module, filename: string) => any> { + '.js': (m: Module, filename: string) => any; + '.json': (m: Module, filename: string) => any; + '.node': (m: Module, filename: string) => any; + } + interface Module { + /** + * `true` if the module is running during the Node.js preload + */ + isPreloading: boolean; + exports: any; + require: Require; + id: string; + filename: string; + loaded: boolean; + /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */ + parent: Module | null | undefined; + children: Module[]; + /** + * @since v11.14.0 + * + * The directory name of the module. This is usually the same as the path.dirname() of the module.id. + */ + path: string; + paths: string[]; + } + + interface Dict { + [key: string]: T | undefined; + } + + interface ReadOnlyDict { + readonly [key: string]: T | undefined; + } +} diff --git a/node_modules/@types/node/ts4.8/globals.global.d.ts b/node_modules/@types/node/ts4.8/globals.global.d.ts new file mode 100644 index 0000000..ef1198c --- /dev/null +++ b/node_modules/@types/node/ts4.8/globals.global.d.ts @@ -0,0 +1 @@ +declare var global: typeof globalThis; diff --git a/node_modules/@types/node/ts4.8/http.d.ts b/node_modules/@types/node/ts4.8/http.d.ts new file mode 100644 index 0000000..e14de6c --- /dev/null +++ b/node_modules/@types/node/ts4.8/http.d.ts @@ -0,0 +1,1651 @@ +/** + * To use the HTTP server and client one must `require('http')`. + * + * The HTTP interfaces in Node.js are designed to support many features + * of the protocol which have been traditionally difficult to use. + * In particular, large, possibly chunk-encoded, messages. The interface is + * careful to never buffer entire requests or responses, so the + * user is able to stream data. + * + * HTTP message headers are represented by an object like this: + * + * ```js + * { 'content-length': '123', + * 'content-type': 'text/plain', + * 'connection': 'keep-alive', + * 'host': 'example.com', + * 'accept': '*' } + * ``` + * + * Keys are lowercased. Values are not modified. + * + * In order to support the full spectrum of possible HTTP applications, the Node.js + * HTTP API is very low-level. It deals with stream handling and message + * parsing only. It parses a message into headers and body but it does not + * parse the actual headers or the body. + * + * See `message.headers` for details on how duplicate headers are handled. + * + * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For + * example, the previous message header object might have a `rawHeaders`list like the following: + * + * ```js + * [ 'ConTent-Length', '123456', + * 'content-LENGTH', '123', + * 'content-type', 'text/plain', + * 'CONNECTION', 'keep-alive', + * 'Host', 'example.com', + * 'accepT', '*' ] + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http.js) + */ +declare module 'http' { + import * as stream from 'node:stream'; + import { URL } from 'node:url'; + import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net'; + import { LookupOptions } from 'node:dns'; + // incoming headers will never contain number + interface IncomingHttpHeaders extends NodeJS.Dict { + accept?: string | undefined; + 'accept-language'?: string | undefined; + 'accept-patch'?: string | undefined; + 'accept-ranges'?: string | undefined; + 'access-control-allow-credentials'?: string | undefined; + 'access-control-allow-headers'?: string | undefined; + 'access-control-allow-methods'?: string | undefined; + 'access-control-allow-origin'?: string | undefined; + 'access-control-expose-headers'?: string | undefined; + 'access-control-max-age'?: string | undefined; + 'access-control-request-headers'?: string | undefined; + 'access-control-request-method'?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + 'alt-svc'?: string | undefined; + authorization?: string | undefined; + 'cache-control'?: string | undefined; + connection?: string | undefined; + 'content-disposition'?: string | undefined; + 'content-encoding'?: string | undefined; + 'content-language'?: string | undefined; + 'content-length'?: string | undefined; + 'content-location'?: string | undefined; + 'content-range'?: string | undefined; + 'content-type'?: string | undefined; + cookie?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + 'if-match'?: string | undefined; + 'if-modified-since'?: string | undefined; + 'if-none-match'?: string | undefined; + 'if-unmodified-since'?: string | undefined; + 'last-modified'?: string | undefined; + location?: string | undefined; + origin?: string | undefined; + pragma?: string | undefined; + 'proxy-authenticate'?: string | undefined; + 'proxy-authorization'?: string | undefined; + 'public-key-pins'?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + 'retry-after'?: string | undefined; + 'sec-websocket-accept'?: string | undefined; + 'sec-websocket-extensions'?: string | undefined; + 'sec-websocket-key'?: string | undefined; + 'sec-websocket-protocol'?: string | undefined; + 'sec-websocket-version'?: string | undefined; + 'set-cookie'?: string[] | undefined; + 'strict-transport-security'?: string | undefined; + tk?: string | undefined; + trailer?: string | undefined; + 'transfer-encoding'?: string | undefined; + upgrade?: string | undefined; + 'user-agent'?: string | undefined; + vary?: string | undefined; + via?: string | undefined; + warning?: string | undefined; + 'www-authenticate'?: string | undefined; + } + // outgoing headers allows numbers (as they are converted internally to strings) + type OutgoingHttpHeader = number | string | string[]; + interface OutgoingHttpHeaders extends NodeJS.Dict {} + interface ClientRequestArgs { + _defaultAgent?: Agent | undefined; + agent?: Agent | boolean | undefined; + auth?: string | null | undefined; + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 + createConnection?: + | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket) + | undefined; + defaultPort?: number | string | undefined; + family?: number | undefined; + headers?: OutgoingHttpHeaders | undefined; + hints?: LookupOptions['hints']; + host?: string | null | undefined; + hostname?: string | null | undefined; + insecureHTTPParser?: boolean | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + lookup?: LookupFunction | undefined; + /** + * @default 16384 + */ + maxHeaderSize?: number | undefined; + method?: string | undefined; + path?: string | null | undefined; + port?: number | string | null | undefined; + protocol?: string | null | undefined; + setHost?: boolean | undefined; + signal?: AbortSignal | undefined; + socketPath?: string | undefined; + timeout?: number | undefined; + uniqueHeaders?: Array | undefined; + } + interface ServerOptions< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > { + /** + * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. + */ + IncomingMessage?: Request | undefined; + /** + * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. + */ + ServerResponse?: Response | undefined; + /** + * Sets the timeout value in milliseconds for receiving the entire request from the client. + * @see Server.requestTimeout for more information. + * @default 300000 + * @since v18.0.0 + */ + requestTimeout?: number | undefined; + /** + * The number of milliseconds of inactivity a server needs to wait for additional incoming data, + * after it has finished writing the last response, before a socket will be destroyed. + * @see Server.keepAliveTimeout for more information. + * @default 5000 + * @since v18.0.0 + */ + keepAliveTimeout?: number | undefined; + /** + * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. + * @default 30000 + */ + connectionsCheckingInterval?: number | undefined; + /** + * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. + * Using the insecure parser should be avoided. + * See --insecure-http-parser for more information. + * @default false + */ + insecureHTTPParser?: boolean | undefined; + /** + * Optionally overrides the value of + * `--max-http-header-size` for requests received by this server, i.e. + * the maximum length of request headers in bytes. + * @default 16384 + * @since v13.3.0 + */ + maxHeaderSize?: number | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default true + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * A list of response headers that should be sent only once. + * If the header's value is an array, the items will be joined using `; `. + */ + uniqueHeaders?: Array | undefined; + } + type RequestListener< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > = (req: InstanceType, res: InstanceType & { req: InstanceType }) => void; + /** + * @since v0.1.17 + */ + class Server< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > extends NetServer { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + /** + * Sets the timeout value for sockets, and emits a `'timeout'` event on + * the Server object, passing the socket as an argument, if a timeout + * occurs. + * + * If there is a `'timeout'` event listener on the Server object, then it + * will be called with the timed-out socket as an argument. + * + * By default, the Server does not timeout sockets. However, if a callback + * is assigned to the Server's `'timeout'` event, timeouts must be handled + * explicitly. + * @since v0.9.12 + * @param [msecs=0 (no timeout)] + */ + setTimeout(msecs?: number, callback?: () => void): this; + setTimeout(callback: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @since v0.7.0 + */ + maxHeadersCount: number | null; + /** + * The maximum number of requests socket can handle + * before closing keep alive connection. + * + * A value of `0` will disable the limit. + * + * When the limit is reached it will set the `Connection` header value to `close`, + * but will not actually close the connection, subsequent requests sent + * after the limit is reached will get `503 Service Unavailable` as a response. + * @since v16.10.0 + */ + maxRequestsPerSocket: number | null; + /** + * The number of milliseconds of inactivity before a socket is presumed + * to have timed out. + * + * A value of `0` will disable the timeout behavior on incoming connections. + * + * The socket timeout logic is set up on connection, so changing this + * value only affects new connections to the server, not any existing connections. + * @since v0.9.12 + */ + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP + * headers. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v11.3.0, v10.14.0 + */ + headersTimeout: number; + /** + * The number of milliseconds of inactivity a server needs to wait for additional + * incoming data, after it has finished writing the last response, before a socket + * will be destroyed. If the server receives new data before the keep-alive + * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`. + * + * A value of `0` will disable the keep-alive timeout behavior on incoming + * connections. + * A value of `0` makes the http server behave similarly to Node.js versions prior + * to 8.0.0, which did not have a keep-alive timeout. + * + * The socket timeout logic is set up on connection, so changing this value only + * affects new connections to the server, not any existing connections. + * @since v8.0.0 + */ + keepAliveTimeout: number; + /** + * Sets the timeout value in milliseconds for receiving the entire request from + * the client. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v14.11.0 + */ + requestTimeout: number; + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Socket) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'checkContinue', listener: RequestListener): this; + addListener(event: 'checkExpectation', listener: RequestListener): this; + addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + addListener( + event: 'connect', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + addListener(event: 'request', listener: RequestListener): this; + addListener( + event: 'upgrade', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + emit(event: string, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Socket): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit( + event: 'checkContinue', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit( + event: 'checkExpectation', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean; + emit(event: 'connect', req: InstanceType, socket: stream.Duplex, head: Buffer): boolean; + emit( + event: 'request', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: 'upgrade', req: InstanceType, socket: stream.Duplex, head: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Socket) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'checkContinue', listener: RequestListener): this; + on(event: 'checkExpectation', listener: RequestListener): this; + on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + on(event: 'connect', listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void): this; + on(event: 'request', listener: RequestListener): this; + on(event: 'upgrade', listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Socket) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'checkContinue', listener: RequestListener): this; + once(event: 'checkExpectation', listener: RequestListener): this; + once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + once( + event: 'connect', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + once(event: 'request', listener: RequestListener): this; + once( + event: 'upgrade', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Socket) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'checkContinue', listener: RequestListener): this; + prependListener(event: 'checkExpectation', listener: RequestListener): this; + prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + prependListener( + event: 'connect', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependListener(event: 'request', listener: RequestListener): this; + prependListener( + event: 'upgrade', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'checkContinue', listener: RequestListener): this; + prependOnceListener(event: 'checkExpectation', listener: RequestListener): this; + prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + prependOnceListener( + event: 'connect', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: 'request', listener: RequestListener): this; + prependOnceListener( + event: 'upgrade', + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + } + /** + * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract of outgoing message from + * the perspective of the participants of HTTP transaction. + * @since v0.1.17 + */ + class OutgoingMessage extends stream.Writable { + readonly req: Request; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + /** + * @deprecated Use `writableEnded` instead. + */ + finished: boolean; + /** + * Read-only. `true` if the headers were sent, otherwise `false`. + * @since v0.9.3 + */ + readonly headersSent: boolean; + /** + * Aliases of `outgoingMessage.socket` + * @since v0.3.0 + * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. + */ + readonly connection: Socket | null; + /** + * Reference to the underlying socket. Usually, users will not want to access + * this property. + * + * After calling `outgoingMessage.end()`, this property will be nulled. + * @since v0.3.0 + */ + readonly socket: Socket | null; + constructor(); + /** + * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter. + * @since v0.9.12 + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * Sets a single header value for the header object. + * @since v0.4.0 + * @param name Header name + * @param value Header value + */ + setHeader(name: string, value: number | string | ReadonlyArray): this; + /** + * Gets the value of HTTP header with the given name. If such a name doesn't + * exist in message, it will be `undefined`. + * @since v0.4.0 + * @param name Name of header + */ + getHeader(name: string): number | string | string[] | undefined; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow + * copy is used, array values may be mutated without additional calls to + * various header-related HTTP module methods. The keys of the returned + * object are the header names and the values are the respective header + * values. All header names are lowercase. + * + * The object returned by the `outgoingMessage.getHeaders()` method does + * not prototypically inherit from the JavaScript Object. This means that + * typical Object methods such as `obj.toString()`, `obj.hasOwnProperty()`, + * and others are not defined and will not work. + * + * ```js + * outgoingMessage.setHeader('Foo', 'bar'); + * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = outgoingMessage.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v7.7.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns an array of names of headers of the outgoing outgoingMessage. All + * names are lowercase. + * @since v7.7.0 + */ + getHeaderNames(): string[]; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name is case-insensitive. + * + * ```js + * const hasContentType = outgoingMessage.hasHeader('content-type'); + * ``` + * @since v7.7.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that is queued for implicit sending. + * + * ```js + * outgoingMessage.removeHeader('Content-Encoding'); + * ``` + * @since v0.4.0 + * @param name Header name + */ + removeHeader(name: string): void; + /** + * Adds HTTP trailers (headers but at the end of the message) to the message. + * + * Trailers are **only** be emitted if the message is chunked encoded. If not, + * the trailer will be silently discarded. + * + * HTTP requires the `Trailer` header to be sent to emit trailers, + * with a list of header fields in its value, e.g. + * + * ```js + * message.writeHead(200, { 'Content-Type': 'text/plain', + * 'Trailer': 'Content-MD5' }); + * message.write(fileData); + * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); + * message.end(); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.3.0 + */ + addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; + /** + * Compulsorily flushes the message headers + * + * For efficiency reason, Node.js normally buffers the message headers + * until `outgoingMessage.end()` is called or the first chunk of message data + * is written. It then tries to pack the headers and data into a single TCP + * packet. + * + * It is usually desired (it saves a TCP round-trip), but not when the first + * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the request. + * @since v1.6.0 + */ + flushHeaders(): void; + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v0.1.17 + */ + class ServerResponse extends OutgoingMessage { + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v0.4.0 + */ + statusCode: number; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status message that will be sent to the client when + * the headers get flushed. If this is left as `undefined` then the standard + * message for the status code will be used. + * + * ```js + * response.statusMessage = 'Not found'; + * ``` + * + * After response header was sent to the client, this property indicates the + * status message which was sent out. + * @since v0.11.8 + */ + statusMessage: string; + constructor(req: Request); + assignSocket(socket: Socket): void; + detachSocket(socket: Socket): void; + /** + * Sends an HTTP/1.1 100 Continue message to the client, indicating that + * the request body should be sent. See the `'checkContinue'` event on`Server`. + * @since v0.3.0 + */ + writeContinue(callback?: () => void): void; + /** + * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. The optional `callback` argument will be called when + * the response message has been written. + * + * Example: + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * 'x-trace-id': 'id for diagnostics' + * }); + * + * const earlyHintsCallback = () => console.log('early hints message sent'); + * response.writeEarlyHints({ + * 'link': earlyHintsLinks + * }, earlyHintsCallback); + * ``` + * + * @since v18.11.0 + * @param hints An object containing the values of headers + * @param callback Will be called when the response message has been written + */ + writeEarlyHints(hints: Record, callback?: () => void): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * Optionally one can give a human-readable `statusMessage` as the second + * argument. + * + * `headers` may be an `Array` where the keys and values are in the same list. + * It is _not_ a list of tuples. So, the even-numbered offsets are key values, + * and the odd-numbered offsets are the associated values. The array is in the same + * format as `request.rawHeaders`. + * + * Returns a reference to the `ServerResponse`, so that calls can be chained. + * + * ```js + * const body = 'hello world'; + * response + * .writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain' + * }) + * .end(body); + * ``` + * + * This method must only be called once on a message and it must + * be called before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * If this method is called and `response.setHeader()` has not been called, + * it will directly write the supplied header values onto the network channel + * without caching internally, and the `response.getHeader()` on the header + * will not yield the expected result. If progressive population of headers is + * desired with potential future retrieval and modification, use `response.setHeader()` instead. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * `Content-Length` is given in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js + * does not check whether `Content-Length` and the length of the body which has + * been transmitted are equal or not. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.1.30 + */ + writeHead( + statusCode: number, + statusMessage?: string, + headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], + ): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + /** + * Sends an HTTP/1.1 102 Processing message to the client, indicating that + * the request body should be sent. + * @since v10.0.0 + */ + writeProcessing(): void; + } + interface InformationEvent { + statusCode: number; + statusMessage: string; + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + } + /** + * This object is created internally and returned from {@link request}. It + * represents an _in-progress_ request whose header has already been queued. The + * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will + * be sent along with the first data chunk or when calling `request.end()`. + * + * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response + * headers have been received. The `'response'` event is executed with one + * argument which is an instance of {@link IncomingMessage}. + * + * During the `'response'` event, one can add listeners to the + * response object; particularly to listen for the `'data'` event. + * + * If no `'response'` handler is added, then the response will be + * entirely discarded. However, if a `'response'` event handler is added, + * then the data from the response object **must** be consumed, either by + * calling `response.read()` whenever there is a `'readable'` event, or + * by adding a `'data'` handler, or by calling the `.resume()` method. + * Until the data is consumed, the `'end'` event will not fire. Also, until + * the data is read it will consume memory that can eventually lead to a + * 'process out of memory' error. + * + * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered. + * + * Node.js does not check whether Content-Length and the length of the + * body which has been transmitted are equal or not. + * @since v0.1.17 + */ + class ClientRequest extends OutgoingMessage { + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v0.11.14 + * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead. + */ + aborted: boolean; + /** + * The request host. + * @since v14.5.0, v12.19.0 + */ + host: string; + /** + * The request protocol. + * @since v14.5.0, v12.19.0 + */ + protocol: string; + /** + * When sending request through a keep-alive enabled agent, the underlying socket + * might be reused. But if server closes connection at unfortunate time, client + * may run into a 'ECONNRESET' error. + * + * ```js + * const http = require('http'); + * + * // Server has a 5 seconds keep-alive timeout by default + * http + * .createServer((req, res) => { + * res.write('hello\n'); + * res.end(); + * }) + * .listen(3000); + * + * setInterval(() => { + * // Adapting a keep-alive agent + * http.get('http://localhost:3000', { agent }, (res) => { + * res.on('data', (data) => { + * // Do nothing + * }); + * }); + * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout + * ``` + * + * By marking a request whether it reused socket or not, we can do + * automatic error retry base on it. + * + * ```js + * const http = require('http'); + * const agent = new http.Agent({ keepAlive: true }); + * + * function retriableRequest() { + * const req = http + * .get('http://localhost:3000', { agent }, (res) => { + * // ... + * }) + * .on('error', (err) => { + * // Check if retry is needed + * if (req.reusedSocket && err.code === 'ECONNRESET') { + * retriableRequest(); + * } + * }); + * } + * + * retriableRequest(); + * ``` + * @since v13.0.0, v12.16.0 + */ + reusedSocket: boolean; + /** + * Limits maximum response headers count. If set to 0, no limit will be applied. + */ + maxHeadersCount: number; + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + /** + * The request method. + * @since v0.1.97 + */ + method: string; + /** + * The request path. + * @since v0.4.0 + */ + path: string; + /** + * Marks the request as aborting. Calling this will cause remaining data + * in the response to be dropped and the socket to be destroyed. + * @since v0.3.8 + * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. + */ + abort(): void; + onSocket(socket: Socket): void; + /** + * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. + * @since v0.5.9 + * @param timeout Milliseconds before a request times out. + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. + * @since v0.5.9 + */ + setNoDelay(noDelay?: boolean): void; + /** + * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. + * @since v0.5.9 + */ + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + /** + * Returns an array containing the unique names of the current outgoing raw + * headers. Header names are returned with their exact casing being set. + * + * ```js + * request.setHeader('Foo', 'bar'); + * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = request.getRawHeaderNames(); + * // headerNames === ['Foo', 'Set-Cookie'] + * ``` + * @since v15.13.0, v14.17.0 + */ + getRawHeaderNames(): string[]; + /** + * @deprecated + */ + addListener(event: 'abort', listener: () => void): this; + addListener( + event: 'connect', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + addListener(event: 'continue', listener: () => void): this; + addListener(event: 'information', listener: (info: InformationEvent) => void): this; + addListener(event: 'response', listener: (response: IncomingMessage) => void): this; + addListener(event: 'socket', listener: (socket: Socket) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener( + event: 'upgrade', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ + on(event: 'abort', listener: () => void): this; + on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + on(event: 'continue', listener: () => void): this; + on(event: 'information', listener: (info: InformationEvent) => void): this; + on(event: 'response', listener: (response: IncomingMessage) => void): this; + on(event: 'socket', listener: (socket: Socket) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ + once(event: 'abort', listener: () => void): this; + once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + once(event: 'continue', listener: () => void): this; + once(event: 'information', listener: (info: InformationEvent) => void): this; + once(event: 'response', listener: (response: IncomingMessage) => void): this; + once(event: 'socket', listener: (socket: Socket) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ + prependListener(event: 'abort', listener: () => void): this; + prependListener( + event: 'connect', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + prependListener(event: 'continue', listener: () => void): this; + prependListener(event: 'information', listener: (info: InformationEvent) => void): this; + prependListener(event: 'response', listener: (response: IncomingMessage) => void): this; + prependListener(event: 'socket', listener: (socket: Socket) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener( + event: 'upgrade', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ + prependOnceListener(event: 'abort', listener: () => void): this; + prependOnceListener( + event: 'connect', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + prependOnceListener(event: 'continue', listener: () => void): this; + prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this; + prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this; + prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener( + event: 'upgrade', + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to + * access response + * status, headers and data. + * + * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to + * parse and emit the incoming HTTP headers and payload, as the underlying socket + * may be reused multiple times in case of keep-alive. + * @since v0.1.17 + */ + class IncomingMessage extends stream.Readable { + constructor(socket: Socket); + /** + * The `message.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. + */ + aborted: boolean; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. + * Probably either `'1.1'` or `'1.0'`. + * + * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second. + * @since v0.1.1 + */ + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + /** + * The `message.complete` property will be `true` if a complete HTTP message has + * been received and successfully parsed. + * + * This property is particularly useful as a means of determining if a client or + * server fully transmitted a message before a connection was terminated: + * + * ```js + * const req = http.request({ + * host: '127.0.0.1', + * port: 8080, + * method: 'POST' + * }, (res) => { + * res.resume(); + * res.on('end', () => { + * if (!res.complete) + * console.error( + * 'The connection was terminated while the message was still being sent'); + * }); + * }); + * ``` + * @since v0.3.0 + */ + complete: boolean; + /** + * Alias for `message.socket`. + * @since v0.1.90 + * @deprecated Since v16.0.0 - Use `socket`. + */ + connection: Socket; + /** + * The `net.Socket` object associated with the connection. + * + * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the + * client's authentication details. + * + * This property is guaranteed to be an instance of the `net.Socket` class, + * a subclass of `stream.Duplex`, unless the user specified a socket + * type other than `net.Socket` or internally nulled. + * @since v0.3.0 + */ + socket: Socket; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.getHeaders()); + * ``` + * + * Duplicates in raw headers are handled in the following ways, depending on the + * header name: + * + * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`, + * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded. + * * `set-cookie` is always an array. Duplicates are added to the array. + * * For duplicate `cookie` headers, the values are joined together with '; '. + * * For all other headers, the values are joined together with ', '. + * @since v0.1.5 + */ + headers: IncomingHttpHeaders; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v0.11.6 + */ + rawHeaders: string[]; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v0.3.0 + */ + trailers: NodeJS.Dict; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v0.11.6 + */ + rawTrailers: string[]; + /** + * Calls `message.socket.setTimeout(msecs, callback)`. + * @since v0.5.9 + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * **Only valid for request obtained from {@link Server}.** + * + * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. + * @since v0.1.1 + */ + method?: string | undefined; + /** + * **Only valid for request obtained from {@link Server}.** + * + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. Take the following request: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * To parse the URL into its parts: + * + * ```js + * new URL(request.url, `http://${request.getHeaders().host}`); + * ``` + * + * When `request.url` is `'/status?name=ryan'` and`request.getHeaders().host` is `'localhost:3000'`: + * + * ```console + * $ node + * > new URL(request.url, `http://${request.getHeaders().host}`) + * URL { + * href: 'http://localhost:3000/status?name=ryan', + * origin: 'http://localhost:3000', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'localhost:3000', + * hostname: 'localhost', + * port: '3000', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v0.1.90 + */ + url?: string | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The 3-digit HTTP response status code. E.G. `404`. + * @since v0.1.1 + */ + statusCode?: number | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. + * @since v0.11.10 + */ + statusMessage?: string | undefined; + /** + * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed + * as an argument to any listeners on the event. + * @since v0.3.0 + */ + destroy(error?: Error): this; + } + interface AgentOptions extends Partial { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean | undefined; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number | undefined; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number | undefined; + /** + * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. + */ + maxTotalSockets?: number | undefined; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number | undefined; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number | undefined; + /** + * Scheduling strategy to apply when picking the next free socket to use. + * @default `lifo` + */ + scheduling?: 'fifo' | 'lifo' | undefined; + } + /** + * An `Agent` is responsible for managing connection persistence + * and reuse for HTTP clients. It maintains a queue of pending requests + * for a given host and port, reusing a single socket connection for each + * until the queue is empty, at which time the socket is either destroyed + * or put into a pool where it is kept to be used again for requests to the + * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`. + * + * Pooled connections have TCP Keep-Alive enabled for them, but servers may + * still close idle connections, in which case they will be removed from the + * pool and a new connection will be made when a new HTTP request is made for + * that host and port. Servers may also refuse to allow multiple requests + * over the same connection, in which case the connection will have to be + * remade for every request and cannot be pooled. The `Agent` will still make + * the requests to that server, but each one will occur over a new connection. + * + * When a connection is closed by the client or the server, it is removed + * from the pool. Any unused sockets in the pool will be unrefed so as not + * to keep the Node.js process running when there are no outstanding requests. + * (see `socket.unref()`). + * + * It is good practice, to `destroy()` an `Agent` instance when it is no + * longer in use, because unused sockets consume OS resources. + * + * Sockets are removed from an agent when the socket emits either + * a `'close'` event or an `'agentRemove'` event. When intending to keep one + * HTTP request open for a long time without keeping it in the agent, something + * like the following may be done: + * + * ```js + * http.get(options, (res) => { + * // Do stuff + * }).on('socket', (socket) => { + * socket.emit('agentRemove'); + * }); + * ``` + * + * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options + * will be used + * for the client connection. + * + * `agent:false`: + * + * ```js + * http.get({ + * hostname: 'localhost', + * port: 80, + * path: '/', + * agent: false // Create a new agent just for this one request + * }, (res) => { + * // Do stuff with response + * }); + * ``` + * @since v0.3.4 + */ + class Agent { + /** + * By default set to 256\. For agents with `keepAlive` enabled, this + * sets the maximum number of sockets that will be left open in the free + * state. + * @since v0.11.7 + */ + maxFreeSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open per origin. Origin is the returned value of `agent.getName()`. + * @since v0.3.6 + */ + maxSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open. Unlike `maxSockets`, this parameter applies across all origins. + * @since v14.5.0, v12.19.0 + */ + maxTotalSockets: number; + /** + * An object which contains arrays of sockets currently awaiting use by + * the agent when `keepAlive` is enabled. Do not modify. + * + * Sockets in the `freeSockets` list will be automatically destroyed and + * removed from the array on `'timeout'`. + * @since v0.11.4 + */ + readonly freeSockets: NodeJS.ReadOnlyDict; + /** + * An object which contains arrays of sockets currently in use by the + * agent. Do not modify. + * @since v0.3.6 + */ + readonly sockets: NodeJS.ReadOnlyDict; + /** + * An object which contains queues of requests that have not yet been assigned to + * sockets. Do not modify. + * @since v0.5.9 + */ + readonly requests: NodeJS.ReadOnlyDict; + constructor(opts?: AgentOptions); + /** + * Destroy any sockets that are currently in use by the agent. + * + * It is usually not necessary to do this. However, if using an + * agent with `keepAlive` enabled, then it is best to explicitly shut down + * the agent when it is no longer needed. Otherwise, + * sockets might stay open for quite a long time before the server + * terminates them. + * @since v0.11.4 + */ + destroy(): void; + } + const METHODS: string[]; + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + /** + * Returns a new instance of {@link Server}. + * + * The `requestListener` is a function which is automatically + * added to the `'request'` event. + * @since v0.1.13 + */ + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + >(requestListener?: RequestListener): Server; + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + >( + options: ServerOptions, + requestListener?: RequestListener, + ): Server; + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs {} + /** + * `options` in `socket.connect()` are also supported. + * + * Node.js maintains several connections per server to make HTTP requests. + * This function allows one to transparently issue requests. + * + * `url` can be a string or a `URL` object. If `url` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence. + * + * The optional `callback` parameter will be added as a one-time listener for + * the `'response'` event. + * + * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * const http = require('http'); + * + * const postData = JSON.stringify({ + * 'msg': 'Hello World!' + * }); + * + * const options = { + * hostname: 'www.google.com', + * port: 80, + * path: '/upload', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'Content-Length': Buffer.byteLength(postData) + * } + * }; + * + * const req = http.request(options, (res) => { + * console.log(`STATUS: ${res.statusCode}`); + * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); + * res.setEncoding('utf8'); + * res.on('data', (chunk) => { + * console.log(`BODY: ${chunk}`); + * }); + * res.on('end', () => { + * console.log('No more data in response.'); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(`problem with request: ${e.message}`); + * }); + * + * // Write data to request body + * req.write(postData); + * req.end(); + * ``` + * + * In the example `req.end()` was called. With `http.request()` one + * must always call `req.end()` to signify the end of the request - + * even if there is no data being written to the request body. + * + * If any error is encountered during the request (be that with DNS resolution, + * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted + * on the returned request object. As with all `'error'` events, if no listeners + * are registered the error will be thrown. + * + * There are a few special headers that should be noted. + * + * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to + * the server should be persisted until the next request. + * * Sending a 'Content-Length' header will disable the default chunked encoding. + * * Sending an 'Expect' header will immediately send the request headers. + * Usually, when sending 'Expect: 100-continue', both a timeout and a listener + * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more + * information. + * * Sending an Authorization header will override using the `auth` option + * to compute basic authentication. + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('http://abc:xyz@example.com'); + * + * const req = http.request(options, (res) => { + * // ... + * }); + * ``` + * + * In a successful request, the following events will be emitted in the following + * order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * (`'data'` will not be emitted at all if the response body is empty, for + * instance, in most redirects) + * * `'end'` on the `res` object + * * `'close'` + * + * In the case of a connection error, the following events will be emitted: + * + * * `'socket'` + * * `'error'` + * * `'close'` + * + * In the case of a premature connection close before the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * In the case of a premature connection close after the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (connection closed here) + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * If `req.destroy()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.destroy()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.destroy()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.destroy()` called here) + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * If `req.abort()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.abort()` called here) + * * `'abort'` + * * `'close'` + * + * If `req.abort()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.abort()` called here) + * * `'abort'` + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.abort()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.abort()` called here) + * * `'abort'` + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * Setting the `timeout` option or using the `setTimeout()` function will + * not abort the request or do anything besides add a `'timeout'` event. + * + * Passing an `AbortSignal` and then calling `abort` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the + * request itself. + * @since v0.3.6 + */ + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: IncomingMessage) => void, + ): ClientRequest; + /** + * Since most requests are GET requests without bodies, Node.js provides this + * convenience method. The only difference between this method and {@link request} is that it sets the method to GET and calls `req.end()`automatically. The callback must take care to consume the + * response + * data for reasons stated in {@link ClientRequest} section. + * + * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. + * + * JSON fetching example: + * + * ```js + * http.get('http://localhost:8000/', (res) => { + * const { statusCode } = res; + * const contentType = res.headers['content-type']; + * + * let error; + * // Any 2xx status code signals a successful response but + * // here we're only checking for 200. + * if (statusCode !== 200) { + * error = new Error('Request Failed.\n' + + * `Status Code: ${statusCode}`); + * } else if (!/^application\/json/.test(contentType)) { + * error = new Error('Invalid content-type.\n' + + * `Expected application/json but received ${contentType}`); + * } + * if (error) { + * console.error(error.message); + * // Consume response data to free up memory + * res.resume(); + * return; + * } + * + * res.setEncoding('utf8'); + * let rawData = ''; + * res.on('data', (chunk) => { rawData += chunk; }); + * res.on('end', () => { + * try { + * const parsedData = JSON.parse(rawData); + * console.log(parsedData); + * } catch (e) { + * console.error(e.message); + * } + * }); + * }).on('error', (e) => { + * console.error(`Got error: ${e.message}`); + * }); + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!' + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. Properties that are inherited from the prototype are ignored. + */ + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + + /** + * Performs the low-level validations on the provided name that are done when `res.setHeader(name, value)` is called. + * Passing illegal value as name will result in a TypeError being thrown, identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. + * @param name Header name + * @since v14.3.0 + */ + function validateHeaderName(name: string): void; + /** + * Performs the low-level validations on the provided value that are done when `res.setHeader(name, value)` is called. + * Passing illegal value as value will result in a TypeError being thrown. + * - Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. + * - Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. + * @param name Header name + * @param value Header value + * @since v14.3.0 + */ + function validateHeaderValue(name: string, value: string): void; + + /** + * Set the maximum number of idle HTTP parsers. Default: 1000. + * @param count + * @since v18.8.0, v16.18.0 + */ + function setMaxIdleHTTPParsers(count: number): void; + + let globalAgent: Agent; + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. + */ + const maxHeaderSize: number; +} +declare module 'node:http' { + export * from 'http'; +} diff --git a/node_modules/@types/node/ts4.8/http2.d.ts b/node_modules/@types/node/ts4.8/http2.d.ts new file mode 100644 index 0000000..0e36826 --- /dev/null +++ b/node_modules/@types/node/ts4.8/http2.d.ts @@ -0,0 +1,2134 @@ +/** + * The `http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. It + * can be accessed using: + * + * ```js + * const http2 = require('http2'); + * ``` + * @since v8.4.0 + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http2.js) + */ +declare module 'http2' { + import EventEmitter = require('node:events'); + import * as fs from 'node:fs'; + import * as net from 'node:net'; + import * as stream from 'node:stream'; + import * as tls from 'node:tls'; + import * as url from 'node:url'; + import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http'; + export { OutgoingHttpHeaders } from 'node:http'; + export interface IncomingHttpStatusHeader { + ':status'?: number | undefined; + } + export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ':path'?: string | undefined; + ':method'?: string | undefined; + ':authority'?: string | undefined; + ':scheme'?: string | undefined; + } + // Http2Stream + export interface StreamPriorityOptions { + exclusive?: boolean | undefined; + parent?: number | undefined; + weight?: number | undefined; + silent?: boolean | undefined; + } + export interface StreamState { + localWindowSize?: number | undefined; + state?: number | undefined; + localClose?: number | undefined; + remoteClose?: number | undefined; + sumDependencyWeight?: number | undefined; + weight?: number | undefined; + } + export interface ServerStreamResponseOptions { + endStream?: boolean | undefined; + waitForTrailers?: boolean | undefined; + } + export interface StatOptions { + offset: number; + length: number; + } + export interface ServerStreamFileResponseOptions { + statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean; + waitForTrailers?: boolean | undefined; + offset?: number | undefined; + length?: number | undefined; + } + export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?(err: NodeJS.ErrnoException): void; + } + export interface Http2Stream extends stream.Duplex { + /** + * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, + * the `'aborted'` event will have been emitted. + * @since v8.4.0 + */ + readonly aborted: boolean; + /** + * This property shows the number of characters currently buffered to be written. + * See `net.Socket.bufferSize` for details. + * @since v11.2.0, v10.16.0 + */ + readonly bufferSize: number; + /** + * Set to `true` if the `Http2Stream` instance has been closed. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer + * usable. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Set to `true` if the `END_STREAM` flag was set in the request or response + * HEADERS frame received, indicating that no additional data should be received + * and the readable side of the `Http2Stream` will be closed. + * @since v10.11.0 + */ + readonly endAfterHeaders: boolean; + /** + * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined`if the stream identifier has not yet been assigned. + * @since v8.4.0 + */ + readonly id?: number | undefined; + /** + * Set to `true` if the `Http2Stream` instance has not yet been assigned a + * numeric stream identifier. + * @since v9.4.0 + */ + readonly pending: boolean; + /** + * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is + * destroyed after either receiving an `RST_STREAM` frame from the connected peer, + * calling `http2stream.close()`, or `http2stream.destroy()`. Will be`undefined` if the `Http2Stream` has not been closed. + * @since v8.4.0 + */ + readonly rstCode: number; + /** + * An object containing the outbound headers sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentHeaders: OutgoingHttpHeaders; + /** + * An array of objects containing the outbound informational (additional) headers + * sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; + /** + * An object containing the outbound trailers sent for this `HttpStream`. + * @since v9.5.0 + */ + readonly sentTrailers?: OutgoingHttpHeaders | undefined; + /** + * A reference to the `Http2Session` instance that owns this `Http2Stream`. The + * value will be `undefined` after the `Http2Stream` instance is destroyed. + * @since v8.4.0 + */ + readonly session: Http2Session; + /** + * Provides miscellaneous information about the current state of the`Http2Stream`. + * + * A current state of this `Http2Stream`. + * @since v8.4.0 + */ + readonly state: StreamState; + /** + * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the + * connected HTTP/2 peer. + * @since v8.4.0 + * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. + * @param callback An optional function registered to listen for the `'close'` event. + */ + close(code?: number, callback?: () => void): void; + /** + * Updates the priority for this `Http2Stream` instance. + * @since v8.4.0 + */ + priority(options: StreamPriorityOptions): void; + /** + * ```js + * const http2 = require('http2'); + * const client = http2.connect('http://example.org:8000'); + * const { NGHTTP2_CANCEL } = http2.constants; + * const req = client.request({ ':path': '/' }); + * + * // Cancel the stream if there's no activity after 5 seconds + * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); + * ``` + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method + * will cause the `Http2Stream` to be immediately closed and must only be + * called after the `'wantTrailers'` event has been emitted. When sending a + * request or sending a response, the `options.waitForTrailers` option must be set + * in order to keep the `Http2Stream` open after the final `DATA` frame so that + * trailers can be sent. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond(undefined, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ xyz: 'abc' }); + * }); + * stream.end('Hello World'); + * }); + * ``` + * + * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header + * fields (e.g. `':method'`, `':path'`, etc). + * @since v10.0.0 + */ + sendTrailers(headers: OutgoingHttpHeaders): void; + addListener(event: 'aborted', listener: () => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'streamClosed', listener: (code: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'wantTrailers', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'aborted'): boolean; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: Buffer | string): boolean; + emit(event: 'drain'): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'frameError', frameType: number, errorCode: number): boolean; + emit(event: 'pipe', src: stream.Readable): boolean; + emit(event: 'unpipe', src: stream.Readable): boolean; + emit(event: 'streamClosed', code: number): boolean; + emit(event: 'timeout'): boolean; + emit(event: 'trailers', trailers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'wantTrailers'): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'aborted', listener: () => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: 'streamClosed', listener: (code: number) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'wantTrailers', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'aborted', listener: () => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: 'streamClosed', listener: (code: number) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'wantTrailers', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'aborted', listener: () => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'streamClosed', listener: (code: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'wantTrailers', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'aborted', listener: () => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'streamClosed', listener: (code: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'wantTrailers', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ClientHttp2Stream extends Http2Stream { + addListener(event: 'continue', listener: () => {}): this; + addListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'continue'): boolean; + emit(event: 'headers', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: 'push', headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'response', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'continue', listener: () => {}): this; + on(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'continue', listener: () => {}): this; + once(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'continue', listener: () => {}): this; + prependListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'continue', listener: () => {}): this; + prependOnceListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ServerHttp2Stream extends Http2Stream { + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote + * client's most recent `SETTINGS` frame. Will be `true` if the remote peer + * accepts push streams, `false` otherwise. Settings are the same for every`Http2Stream` in the same `Http2Session`. + * @since v8.4.0 + */ + readonly pushAllowed: boolean; + /** + * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. + * @since v8.4.0 + */ + additionalHeaders(headers: OutgoingHttpHeaders): void; + /** + * Initiates a push stream. The callback is invoked with the new `Http2Stream`instance created for the push stream passed as the second argument, or an`Error` passed as the first argument. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { + * if (err) throw err; + * pushStream.respond({ ':status': 200 }); + * pushStream.end('some pushed data'); + * }); + * stream.end('some data'); + * }); + * ``` + * + * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass + * a `weight` value to `http2stream.priority` with the `silent` option set to`true` to enable server-side bandwidth balancing between concurrent streams. + * + * Calling `http2stream.pushStream()` from within a pushed stream is not permitted + * and will throw an error. + * @since v8.4.0 + * @param callback Callback that is called once the push stream has been initiated. + */ + pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + /** + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.end('some data'); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * stream.end('some data'); + * }); + * ``` + * @since v8.4.0 + */ + respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; + /** + * Initiates a response whose data is read from the given file descriptor. No + * validation is performed on the given file descriptor. If an error occurs while + * attempting to read data using the file descriptor, the `Http2Stream` will be + * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8' + * }; + * stream.respondWithFD(fd, headers); + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given fd. If the `statCheck` function is provided, the`http2stream.respondWithFD()` method will perform an `fs.fstat()` call to + * collect details on the provided file descriptor. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The file descriptor or `FileHandle` is not closed when the stream is closed, + * so it will need to be closed manually once it is no longer needed. + * Using the same file descriptor concurrently for multiple streams + * is not supported and may result in data loss. Re-using a file descriptor + * after a stream has finished is supported. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code _must_ call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8' + * }; + * stream.respondWithFD(fd, headers, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * @since v8.4.0 + * @param fd A readable file descriptor. + */ + respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void; + /** + * Sends a regular file as the response. The `path` must specify a regular file + * or an `'error'` event will be emitted on the `Http2Stream` object. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given file: + * + * If an error occurs while attempting to read the file data, the `Http2Stream`will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR`code. If the `onError` callback is + * defined, then it will be called. Otherwise + * the stream will be destroyed. + * + * Example using a file path: + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * headers['last-modified'] = stat.mtime.toUTCString(); + * } + * + * function onError(err) { + * // stream.respond() can throw if the stream has been destroyed by + * // the other side. + * try { + * if (err.code === 'ENOENT') { + * stream.respond({ ':status': 404 }); + * } else { + * stream.respond({ ':status': 500 }); + * } + * } catch (err) { + * // Perform actual error handling. + * console.log(err); + * } + * stream.end(); + * } + * + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck, onError }); + * }); + * ``` + * + * The `options.statCheck` function may also be used to cancel the send operation + * by returning `false`. For instance, a conditional request may check the stat + * results to determine if the file has been modified to return an appropriate`304` response: + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * // Check the stat here... + * stream.respond({ ':status': 304 }); + * return false; // Cancel the send operation + * } + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck }); + * }); + * ``` + * + * The `content-length` header field will be automatically set. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The `options.onError` function may also be used to handle all the errors + * that could happen before the delivery of the file is initiated. The + * default behavior is to destroy the stream. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * }); + * ``` + * @since v8.4.0 + */ + respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void; + } + // Http2Session + export interface Settings { + headerTableSize?: number | undefined; + enablePush?: boolean | undefined; + initialWindowSize?: number | undefined; + maxFrameSize?: number | undefined; + maxConcurrentStreams?: number | undefined; + maxHeaderListSize?: number | undefined; + enableConnectProtocol?: boolean | undefined; + } + export interface ClientSessionRequestOptions { + endStream?: boolean | undefined; + exclusive?: boolean | undefined; + parent?: number | undefined; + weight?: number | undefined; + waitForTrailers?: boolean | undefined; + signal?: AbortSignal | undefined; + } + export interface SessionState { + effectiveLocalWindowSize?: number | undefined; + effectiveRecvDataLength?: number | undefined; + nextStreamID?: number | undefined; + localWindowSize?: number | undefined; + lastProcStreamID?: number | undefined; + remoteWindowSize?: number | undefined; + outboundQueueSize?: number | undefined; + deflateDynamicTableSize?: number | undefined; + inflateDynamicTableSize?: number | undefined; + } + export interface Http2Session extends EventEmitter { + /** + * Value will be `undefined` if the `Http2Session` is not yet connected to a + * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or + * will return the value of the connected `TLSSocket`'s own `alpnProtocol`property. + * @since v9.4.0 + */ + readonly alpnProtocol?: string | undefined; + /** + * Will be `true` if this `Http2Session` instance has been closed, otherwise`false`. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Will be `true` if this `Http2Session` instance is still connecting, will be set + * to `false` before emitting `connect` event and/or calling the `http2.connect`callback. + * @since v10.0.0 + */ + readonly connecting: boolean; + /** + * Will be `true` if this `Http2Session` instance has been destroyed and must no + * longer be used, otherwise `false`. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Value is `undefined` if the `Http2Session` session socket has not yet been + * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, + * and `false` if the `Http2Session` is connected to any other kind of socket + * or stream. + * @since v9.4.0 + */ + readonly encrypted?: boolean | undefined; + /** + * A prototype-less object describing the current local settings of this`Http2Session`. The local settings are local to _this_`Http2Session` instance. + * @since v8.4.0 + */ + readonly localSettings: Settings; + /** + * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property + * will return an `Array` of origins for which the `Http2Session` may be + * considered authoritative. + * + * The `originSet` property is only available when using a secure TLS connection. + * @since v9.4.0 + */ + readonly originSet?: string[] | undefined; + /** + * Indicates whether the `Http2Session` is currently waiting for acknowledgment of + * a sent `SETTINGS` frame. Will be `true` after calling the`http2session.settings()` method. Will be `false` once all sent `SETTINGS`frames have been acknowledged. + * @since v8.4.0 + */ + readonly pendingSettingsAck: boolean; + /** + * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer. + * @since v8.4.0 + */ + readonly remoteSettings: Settings; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * limits available methods to ones safe to use with HTTP/2. + * + * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw + * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. + * + * `setTimeout` method will be called on this `Http2Session`. + * + * All other interactions will be routed directly to the socket. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * Provides miscellaneous information about the current state of the`Http2Session`. + * + * An object describing the current status of this `Http2Session`. + * @since v8.4.0 + */ + readonly state: SessionState; + /** + * The `http2session.type` will be equal to`http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a + * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a + * client. + * @since v8.4.0 + */ + readonly type: number; + /** + * Gracefully closes the `Http2Session`, allowing any existing streams to + * complete on their own and preventing new `Http2Stream` instances from being + * created. Once closed, `http2session.destroy()`_might_ be called if there + * are no open `Http2Stream` instances. + * + * If specified, the `callback` function is registered as a handler for the`'close'` event. + * @since v9.4.0 + */ + close(callback?: () => void): void; + /** + * Immediately terminates the `Http2Session` and the associated `net.Socket` or`tls.TLSSocket`. + * + * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error`is not undefined, an `'error'` event will be emitted immediately before the`'close'` event. + * + * If there are any remaining open `Http2Streams` associated with the`Http2Session`, those will also be destroyed. + * @since v8.4.0 + * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. + * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. + */ + destroy(error?: Error, code?: number): void; + /** + * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. + * @since v9.4.0 + * @param code An HTTP/2 error code + * @param lastStreamID The numeric ID of the last processed `Http2Stream` + * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. + */ + goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; + /** + * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must + * be provided. The method will return `true` if the `PING` was sent, `false`otherwise. + * + * The maximum number of outstanding (unacknowledged) pings is determined by the`maxOutstandingPings` configuration option. The default maximum is 10. + * + * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView`containing 8 bytes of data that will be transmitted with the `PING` and + * returned with the ping acknowledgment. + * + * The callback will be invoked with three arguments: an error argument that will + * be `null` if the `PING` was successfully acknowledged, a `duration` argument + * that reports the number of milliseconds elapsed since the ping was sent and the + * acknowledgment was received, and a `Buffer` containing the 8-byte `PING`payload. + * + * ```js + * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { + * if (!err) { + * console.log(`Ping acknowledged in ${duration} milliseconds`); + * console.log(`With payload '${payload.toString()}'`); + * } + * }); + * ``` + * + * If the `payload` argument is not specified, the default payload will be the + * 64-bit timestamp (little endian) marking the start of the `PING` duration. + * @since v8.9.3 + * @param payload Optional ping payload. + */ + ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + /** + * Calls `ref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ + ref(): void; + /** + * Sets the local endpoint's window size. + * The `windowSize` is the total window size to set, not + * the delta. + * + * ```js + * const http2 = require('http2'); + * + * const server = http2.createServer(); + * const expectedWindowSize = 2 ** 20; + * server.on('connect', (session) => { + * + * // Set local window size to be 2 ** 20 + * session.setLocalWindowSize(expectedWindowSize); + * }); + * ``` + * @since v15.3.0, v14.18.0 + */ + setLocalWindowSize(windowSize: number): void; + /** + * Used to set a callback function that is called when there is no activity on + * the `Http2Session` after `msecs` milliseconds. The given `callback` is + * registered as a listener on the `'timeout'` event. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Updates the current local settings for this `Http2Session` and sends a new`SETTINGS` frame to the connected HTTP/2 peer. + * + * Once called, the `http2session.pendingSettingsAck` property will be `true`while the session is waiting for the remote peer to acknowledge the new + * settings. + * + * The new settings will not become effective until the `SETTINGS` acknowledgment + * is received and the `'localSettings'` event is emitted. It is possible to send + * multiple `SETTINGS` frames while acknowledgment is still pending. + * @since v8.4.0 + * @param callback Callback that is called once the session is connected or right away if the session is already connected. + */ + settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void; + /** + * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ + unref(): void; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + addListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + addListener(event: 'localSettings', listener: (settings: Settings) => void): this; + addListener(event: 'ping', listener: () => void): this; + addListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'close'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'frameError', frameType: number, errorCode: number, streamID: number): boolean; + emit(event: 'goaway', errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; + emit(event: 'localSettings', settings: Settings): boolean; + emit(event: 'ping'): boolean; + emit(event: 'remoteSettings', settings: Settings): boolean; + emit(event: 'timeout'): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'close', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + on(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + on(event: 'localSettings', listener: (settings: Settings) => void): this; + on(event: 'ping', listener: () => void): this; + on(event: 'remoteSettings', listener: (settings: Settings) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + once(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + once(event: 'localSettings', listener: (settings: Settings) => void): this; + once(event: 'ping', listener: () => void): this; + once(event: 'remoteSettings', listener: (settings: Settings) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependListener(event: 'localSettings', listener: (settings: Settings) => void): this; + prependListener(event: 'ping', listener: () => void): this; + prependListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependOnceListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependOnceListener(event: 'localSettings', listener: (settings: Settings) => void): this; + prependOnceListener(event: 'ping', listener: () => void): this; + prependOnceListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ClientHttp2Session extends Http2Session { + /** + * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an + * HTTP/2 request to the connected server. + * + * When a `ClientHttp2Session` is first created, the socket may not yet be + * connected. if `clienthttp2session.request()` is called during this time, the + * actual request will be deferred until the socket is ready to go. + * If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown. + * + * This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`. + * + * ```js + * const http2 = require('http2'); + * const clientSession = http2.connect('https://localhost:1234'); + * const { + * HTTP2_HEADER_PATH, + * HTTP2_HEADER_STATUS + * } = http2.constants; + * + * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); + * req.on('response', (headers) => { + * console.log(headers[HTTP2_HEADER_STATUS]); + * req.on('data', (chunk) => { // .. }); + * req.on('end', () => { // .. }); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * is emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be called to send trailing + * headers to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * When `options.signal` is set with an `AbortSignal` and then `abort` on the + * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. + * + * The `:method` and `:path` pseudo-headers are not specified within `headers`, + * they respectively default to: + * + * * `:method` \= `'GET'` + * * `:path` \= `/` + * @since v8.4.0 + */ + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; + addListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + addListener(event: 'origin', listener: (origins: string[]) => void): this; + addListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'altsvc', alt: string, origin: string, stream: number): boolean; + emit(event: 'origin', origins: ReadonlyArray): boolean; + emit(event: 'connect', session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: 'stream', stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + on(event: 'origin', listener: (origins: string[]) => void): this; + on(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + once(event: 'origin', listener: (origins: string[]) => void): this; + once(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + prependListener(event: 'origin', listener: (origins: string[]) => void): this; + prependListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + prependOnceListener(event: 'origin', listener: (origins: string[]) => void): this; + prependOnceListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + export interface ServerHttp2Session extends Http2Session { + readonly server: Http2Server | Http2SecureServer; + /** + * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. + * + * ```js + * const http2 = require('http2'); + * + * const server = http2.createServer(); + * server.on('session', (session) => { + * // Set altsvc for origin https://example.org:80 + * session.altsvc('h2=":8000"', 'https://example.org:80'); + * }); + * + * server.on('stream', (stream) => { + * // Set altsvc for a specific stream + * stream.session.altsvc('h2=":8000"', stream.id); + * }); + * ``` + * + * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate + * service is associated with the origin of the given `Http2Stream`. + * + * The `alt` and origin string _must_ contain only ASCII bytes and are + * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given + * domain. + * + * When a string is passed for the `originOrStream` argument, it will be parsed as + * a URL and the origin will be derived. For instance, the origin for the + * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * @since v9.4.0 + * @param alt A description of the alternative service configuration as defined by `RFC 7838`. + * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the + * `http2stream.id` property. + */ + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + /** + * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client + * to advertise the set of origins for which the server is capable of providing + * authoritative responses. + * + * ```js + * const http2 = require('http2'); + * const options = getSecureOptionsSomehow(); + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * server.on('session', (session) => { + * session.origin('https://example.com', 'https://example.org'); + * }); + * ``` + * + * When a string is passed as an `origin`, it will be parsed as a URL and the + * origin will be derived. For instance, the origin for the HTTP URL`'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given + * string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as + * an `origin`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * + * Alternatively, the `origins` option may be used when creating a new HTTP/2 + * server using the `http2.createSecureServer()` method: + * + * ```js + * const http2 = require('http2'); + * const options = getSecureOptionsSomehow(); + * options.origins = ['https://example.com', 'https://example.org']; + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * ``` + * @since v10.12.0 + * @param origins One or more URL Strings passed as separate arguments. + */ + origin( + ...origins: Array< + | string + | url.URL + | { + origin: string; + } + > + ): void; + addListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'connect', session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + // Http2Server + export interface SessionOptions { + maxDeflateDynamicTableSize?: number | undefined; + maxSessionMemory?: number | undefined; + maxHeaderListPairs?: number | undefined; + maxOutstandingPings?: number | undefined; + maxSendHeaderBlockLength?: number | undefined; + paddingStrategy?: number | undefined; + peerMaxConcurrentStreams?: number | undefined; + settings?: Settings | undefined; + /** + * Specifies a timeout in milliseconds that + * a server should wait when an [`'unknownProtocol'`][] is emitted. If the + * socket has not been destroyed by that time the server will destroy it. + * @default 100000 + */ + unknownProtocolTimeout?: number | undefined; + selectPadding?(frameLen: number, maxFrameLen: number): number; + createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex; + } + export interface ClientSessionOptions extends SessionOptions { + maxReservedRemoteStreams?: number | undefined; + createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; + protocol?: 'http:' | 'https:' | undefined; + } + export interface ServerSessionOptions extends SessionOptions { + Http1IncomingMessage?: typeof IncomingMessage | undefined; + Http1ServerResponse?: typeof ServerResponse | undefined; + Http2ServerRequest?: typeof Http2ServerRequest | undefined; + Http2ServerResponse?: typeof Http2ServerResponse | undefined; + } + export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} + export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {} + export interface ServerOptions extends ServerSessionOptions {} + export interface SecureServerOptions extends SecureServerSessionOptions { + allowHTTP1?: boolean | undefined; + origins?: string[] | undefined; + } + interface HTTP2ServerCommon { + setTimeout(msec?: number, callback?: () => void): this; + /** + * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. + * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. + */ + updateSettings(settings: Settings): void; + } + export interface Http2Server extends net.Server, HTTP2ServerCommon { + addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + addListener(event: 'sessionError', listener: (err: Error) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'session', session: ServerHttp2Session): boolean; + emit(event: 'sessionError', err: Error): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'timeout'): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'session', listener: (session: ServerHttp2Session) => void): this; + on(event: 'sessionError', listener: (err: Error) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'session', listener: (session: ServerHttp2Session) => void): this; + once(event: 'sessionError', listener: (err: Error) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependListener(event: 'sessionError', listener: (err: Error) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon { + addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + addListener(event: 'sessionError', listener: (err: Error) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'session', session: ServerHttp2Session): boolean; + emit(event: 'sessionError', err: Error): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'timeout'): boolean; + emit(event: 'unknownProtocol', socket: tls.TLSSocket): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'session', listener: (session: ServerHttp2Session) => void): this; + on(event: 'sessionError', listener: (err: Error) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'session', listener: (session: ServerHttp2Session) => void): this; + once(event: 'sessionError', listener: (err: Error) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependListener(event: 'sessionError', listener: (err: Error) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, + * headers, and + * data. + * @since v8.4.0 + */ + export class Http2ServerRequest extends stream.Readable { + constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray); + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + */ + readonly aborted: boolean; + /** + * The request authority pseudo header field. Because HTTP/2 allows requests + * to set either `:authority` or `host`, this value is derived from`req.headers[':authority']` if present. Otherwise, it is derived from`req.headers['host']`. + * @since v8.4.0 + */ + readonly authority: string; + /** + * See `request.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * The `request.complete` property will be `true` if the request has + * been completed, aborted, or destroyed. + * @since v12.10.0 + */ + readonly complete: boolean; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * See `HTTP/2 Headers Object`. + * + * In HTTP/2, the request path, host name, protocol, and method are represented as + * special headers prefixed with the `:` character (e.g. `':path'`). These special + * headers will be included in the `request.headers` object. Care must be taken not + * to inadvertently modify these special headers or errors may occur. For instance, + * removing all headers from the request will cause errors to occur: + * + * ```js + * removeAllHeaders(request.headers); + * assert(request.url); // Fails because the :path header has been removed + * ``` + * @since v8.4.0 + */ + readonly headers: IncomingHttpHeaders; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. Returns`'2.0'`. + * + * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second. + * @since v8.4.0 + */ + readonly httpVersion: string; + readonly httpVersionMinor: number; + readonly httpVersionMajor: number; + /** + * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. + * @since v8.4.0 + */ + readonly method: string; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v8.4.0 + */ + readonly rawHeaders: string[]; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly rawTrailers: string[]; + /** + * The request scheme pseudo header field indicating the scheme + * portion of the target URL. + * @since v8.4.0 + */ + readonly scheme: string; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `request.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`request.stream`. + * + * `setTimeout` method will be called on `request.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. With TLS support, + * use `request.socket.getPeerCertificate()` to obtain the client's + * authentication details. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the request. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly trailers: IncomingHttpHeaders; + /** + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. If the request is: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * Then `request.url` will be: + * + * ```js + * '/status?name=ryan' + * ``` + * + * To parse the url into its parts, `new URL()` can be used: + * + * ```console + * $ node + * > new URL('/status?name=ryan', 'http://example.com') + * URL { + * href: 'http://example.com/status?name=ryan', + * origin: 'http://example.com', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'example.com', + * hostname: 'example.com', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v8.4.0 + */ + url: string; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + read(size?: number): Buffer | string | null; + addListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'aborted', hadError: boolean, code: number): boolean; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: Buffer | string): boolean; + emit(event: 'end'): boolean; + emit(event: 'readable'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v8.4.0 + */ + export class Http2ServerResponse extends stream.Writable { + constructor(stream: ServerHttp2Stream); + /** + * See `response.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * Boolean value that indicates whether the response has completed. Starts + * as `false`. After `response.end()` executes, the value will be `true`. + * @since v8.4.0 + * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. + */ + readonly finished: boolean; + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * A reference to the original HTTP2 request object. + * @since v15.7.0 + */ + readonly req: Http2ServerRequest; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `response.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`response.stream`. + * + * `setTimeout` method will be called on `response.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer((req, res) => { + * const ip = req.socket.remoteAddress; + * const port = req.socket.remotePort; + * res.end(`Your IP address is ${ip} and your source port is ${port}.`); + * }).listen(3000); + * ``` + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the response. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * When true, the Date header will be automatically generated and sent in + * the response if it is not already present in the headers. Defaults to true. + * + * This should only be disabled for testing; HTTP requires the Date header + * in responses. + * @since v8.4.0 + */ + sendDate: boolean; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v8.4.0 + */ + statusCode: number; + /** + * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns + * an empty string. + * @since v8.4.0 + */ + statusMessage: ''; + /** + * This method adds HTTP trailing headers (a header but at the end of the + * message) to the response. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + addTrailers(trailers: OutgoingHttpHeaders): void; + /** + * This method signals to the server that all of the response headers and body + * have been sent; that server should consider this message complete. + * The method, `response.end()`, MUST be called on each response. + * + * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. + * + * If `callback` is specified, it will be called when the response stream + * is finished. + * @since v8.4.0 + */ + end(callback?: () => void): this; + end(data: string | Uint8Array, callback?: () => void): this; + end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; + /** + * Reads out a header that has already been queued but not sent to the client. + * The name is case-insensitive. + * + * ```js + * const contentType = response.getHeader('content-type'); + * ``` + * @since v8.4.0 + */ + getHeader(name: string): string; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All header names are lowercase. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = response.getHeaderNames(); + * // headerNames === ['foo', 'set-cookie'] + * ``` + * @since v8.4.0 + */ + getHeaderNames(): string[]; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow copy + * is used, array values may be mutated without additional calls to various + * header-related http module methods. The keys of the returned object are the + * header names and the values are the respective header values. All header names + * are lowercase. + * + * The object returned by the `response.getHeaders()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = response.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v8.4.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name matching is case-insensitive. + * + * ```js + * const hasContentType = response.hasHeader('content-type'); + * ``` + * @since v8.4.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that has been queued for implicit sending. + * + * ```js + * response.removeHeader('Content-Encoding'); + * ``` + * @since v8.4.0 + */ + removeHeader(name: string): void; + /** + * Sets a single header value for implicit headers. If this header already exists + * in the to-be-sent headers, its value will be replaced. Use an array of strings + * here to send multiple headers with the same name. + * + * ```js + * response.setHeader('Content-Type', 'text/html; charset=utf-8'); + * ``` + * + * or + * + * ```js + * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * @since v8.4.0 + */ + setHeader(name: string, value: number | string | ReadonlyArray): void; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * If this method is called and `response.writeHead()` has not been called, + * it will switch to implicit header mode and flush the implicit headers. + * + * This sends a chunk of the response body. This method may + * be called multiple times to provide successive parts of the body. + * + * In the `http` module, the response body is omitted when the + * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. + * + * `chunk` can be a string or a buffer. If `chunk` is a string, + * the second parameter specifies how to encode it into a byte stream. + * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk + * of data is flushed. + * + * This is the raw HTTP body and has nothing to do with higher-level multi-part + * body encodings that may be used. + * + * The first time `response.write()` is called, it will send the buffered + * header information and the first chunk of the body to the client. The second + * time `response.write()` is called, Node.js assumes data will be streamed, + * and sends the new data separately. That is, the response is buffered up to the + * first chunk of the body. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. + * @since v8.4.0 + */ + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; + /** + * Sends a status `100 Continue` to the client, indicating that the request body + * should be sent. See the `'checkContinue'` event on `Http2Server` and`Http2SecureServer`. + * @since v8.4.0 + */ + writeContinue(): void; + /** + * Sends a status `103 Early Hints` to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. + * + * Example: + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * 'x-trace-id': 'id for diagnostics' + * }); + * ``` + * + * @since v18.11.0 + * @param hints An object containing the values of headers + */ + writeEarlyHints(hints: Record): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * + * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. + * + * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be + * passed as the second argument. However, because the `statusMessage` has no + * meaning within HTTP/2, the argument will have no effect and a process warning + * will be emitted. + * + * ```js + * const body = 'hello world'; + * response.writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain; charset=utf-8', + * }); + * ``` + * + * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a + * given encoding. On outbound messages, Node.js does not check if Content-Length + * and the length of the body being transmitted are equal or not. However, when + * receiving messages, Node.js will automatically reject messages when the`Content-Length` does not match the actual payload size. + * + * This method may be called at most one time on a message before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; + /** + * Call `http2stream.pushStream()` with the given headers, and wrap the + * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback + * parameter if successful. When `Http2ServerRequest` is closed, the callback is + * called with an error `ERR_HTTP2_INVALID_STREAM`. + * @since v8.4.0 + * @param headers An object describing the headers + * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of + * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method + */ + createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'close'): boolean; + emit(event: 'drain'): boolean; + emit(event: 'error', error: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'pipe', src: stream.Readable): boolean; + emit(event: 'unpipe', src: stream.Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + /** + * This symbol can be set as a property on the HTTP/2 headers object with + * an array value in order to provide a list of headers considered sensitive. + */ + export const sensitiveHeaders: symbol; + /** + * Returns an object containing the default settings for an `Http2Session`instance. This method returns a new object instance every time it is called + * so instances returned may be safely modified for use. + * @since v8.4.0 + */ + export function getDefaultSettings(): Settings; + /** + * Returns a `Buffer` instance containing serialized representation of the given + * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended + * for use with the `HTTP2-Settings` header field. + * + * ```js + * const http2 = require('http2'); + * + * const packed = http2.getPackedSettings({ enablePush: false }); + * + * console.log(packed.toString('base64')); + * // Prints: AAIAAAAA + * ``` + * @since v8.4.0 + */ + export function getPackedSettings(settings: Settings): Buffer; + /** + * Returns a `HTTP/2 Settings Object` containing the deserialized settings from + * the given `Buffer` as generated by `http2.getPackedSettings()`. + * @since v8.4.0 + * @param buf The packed settings. + */ + export function getUnpackedSettings(buf: Uint8Array): Settings; + /** + * Returns a `net.Server` instance that creates and manages `Http2Session`instances. + * + * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when + * communicating + * with browser clients. + * + * ```js + * const http2 = require('http2'); + * + * // Create an unencrypted HTTP/2 server. + * // Since there are no browsers known that support + * // unencrypted HTTP/2, the use of `http2.createSecureServer()` + * // is necessary when communicating with browser clients. + * const server = http2.createServer(); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200 + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(80); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + /** + * Returns a `tls.Server` instance that creates and manages `Http2Session`instances. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem') + * }; + * + * // Create a secure HTTP/2 server + * const server = http2.createSecureServer(options); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200 + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(80); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + /** + * Returns a `ClientHttp2Session` instance. + * + * ```js + * const http2 = require('http2'); + * const client = http2.connect('https://localhost:1234'); + * + * // Use the client + * + * client.close(); + * ``` + * @since v8.4.0 + * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port + * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. + * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. + */ + export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; + export function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void + ): ClientHttp2Session; +} +declare module 'node:http2' { + export * from 'http2'; +} diff --git a/node_modules/@types/node/ts4.8/https.d.ts b/node_modules/@types/node/ts4.8/https.d.ts new file mode 100644 index 0000000..bda367d --- /dev/null +++ b/node_modules/@types/node/ts4.8/https.d.ts @@ -0,0 +1,542 @@ +/** + * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a + * separate module. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js) + */ +declare module 'https' { + import { Duplex } from 'node:stream'; + import * as tls from 'node:tls'; + import * as http from 'node:http'; + import { URL } from 'node:url'; + type ServerOptions< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; + type RequestOptions = http.RequestOptions & + tls.SecureContextOptions & { + checkServerIdentity?: typeof tls.checkServerIdentity | undefined; + rejectUnauthorized?: boolean | undefined; // Defaults to true + servername?: string | undefined; // SNI TLS Extension + }; + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean | undefined; + maxCachedSessions?: number | undefined; + } + /** + * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. + * @since v0.4.5 + */ + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + } + interface Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > extends http.Server {} + /** + * See `http.Server` for more information. + * @since v0.3.4 + */ + class Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor( + options: ServerOptions, + requestListener?: http.RequestListener, + ); + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + addListener( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + addListener( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + addListener( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Duplex) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'checkContinue', listener: http.RequestListener): this; + addListener(event: 'checkExpectation', listener: http.RequestListener): this; + addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + addListener( + event: 'connect', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + addListener(event: 'request', listener: http.RequestListener): this; + addListener( + event: 'upgrade', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + emit(event: string, ...args: any[]): boolean; + emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean; + emit( + event: 'newSession', + sessionId: Buffer, + sessionData: Buffer, + callback: (err: Error, resp: Buffer) => void, + ): boolean; + emit( + event: 'OCSPRequest', + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ): boolean; + emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; + emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean; + emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean; + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Duplex): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit( + event: 'checkContinue', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit( + event: 'checkExpectation', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: 'clientError', err: Error, socket: Duplex): boolean; + emit(event: 'connect', req: InstanceType, socket: Duplex, head: Buffer): boolean; + emit( + event: 'request', + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: 'upgrade', req: InstanceType, socket: Duplex, head: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + on( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + on( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + on( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Duplex) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'checkContinue', listener: http.RequestListener): this; + on(event: 'checkExpectation', listener: http.RequestListener): this; + on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + on(event: 'connect', listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + on(event: 'request', listener: http.RequestListener): this; + on(event: 'upgrade', listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + once( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + once( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + once( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Duplex) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'checkContinue', listener: http.RequestListener): this; + once(event: 'checkExpectation', listener: http.RequestListener): this; + once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + once(event: 'connect', listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + once(event: 'request', listener: http.RequestListener): this; + once(event: 'upgrade', listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + prependListener( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + prependListener( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + prependListener( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Duplex) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'checkContinue', listener: http.RequestListener): this; + prependListener(event: 'checkExpectation', listener: http.RequestListener): this; + prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + prependListener( + event: 'connect', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependListener(event: 'request', listener: http.RequestListener): this; + prependListener( + event: 'upgrade', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener( + event: 'newSession', + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + prependOnceListener( + event: 'OCSPRequest', + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + prependOnceListener( + event: 'resumeSession', + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'checkContinue', listener: http.RequestListener): this; + prependOnceListener(event: 'checkExpectation', listener: http.RequestListener): this; + prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + prependOnceListener( + event: 'connect', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: 'request', listener: http.RequestListener): this; + prependOnceListener( + event: 'upgrade', + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + } + /** + * ```js + * // curl -k https://localhost:8000/ + * const https = require('https'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * + * Or + * + * ```js + * const https = require('https'); + * const fs = require('fs'); + * + * const options = { + * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), + * passphrase: 'sample' + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * @since v0.3.4 + * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. + * @param requestListener A listener to be added to the `'request'` event. + */ + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + >(requestListener?: http.RequestListener): Server; + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + >( + options: ServerOptions, + requestListener?: http.RequestListener, + ): Server; + /** + * Makes a request to a secure web server. + * + * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`, + * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * const https = require('https'); + * + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET' + * }; + * + * const req = https.request(options, (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(e); + * }); + * req.end(); + * ``` + * + * Example using options from `tls.connect()`: + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') + * }; + * options.agent = new https.Agent(options); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Alternatively, opt out of connection pooling by not using an `Agent`. + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * agent: false + * }; + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('https://abc:xyz@example.com'); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): + * + * ```js + * const tls = require('tls'); + * const https = require('https'); + * const crypto = require('crypto'); + * + * function sha256(s) { + * return crypto.createHash('sha256').update(s).digest('base64'); + * } + * const options = { + * hostname: 'github.com', + * port: 443, + * path: '/', + * method: 'GET', + * checkServerIdentity: function(host, cert) { + * // Make sure the certificate is issued to the host we are connected to + * const err = tls.checkServerIdentity(host, cert); + * if (err) { + * return err; + * } + * + * // Pin the public key, similar to HPKP pin-sha25 pinning + * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; + * if (sha256(cert.pubkey) !== pubkey256) { + * const msg = 'Certificate verification error: ' + + * `The public key of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // Pin the exact certificate, rather than the pub key + * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + + * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; + * if (cert.fingerprint256 !== cert256) { + * const msg = 'Certificate verification error: ' + + * `The certificate of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // This loop is informational only. + * // Print the certificate and public key fingerprints of all certs in the + * // chain. Its common to pin the public key of the issuer on the public + * // internet, while pinning the public key of the service in sensitive + * // environments. + * do { + * console.log('Subject Common Name:', cert.subject.CN); + * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); + * + * hash = crypto.createHash('sha256'); + * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); + * + * lastprint256 = cert.fingerprint256; + * cert = cert.issuerCertificate; + * } while (cert.fingerprint256 !== lastprint256); + * + * }, + * }; + * + * options.agent = new https.Agent(options); + * const req = https.request(options, (res) => { + * console.log('All OK. Server matched our pinned cert or public key'); + * console.log('statusCode:', res.statusCode); + * // Print the HPKP values + * console.log('headers:', res.headers['public-key-pins']); + * + * res.on('data', (d) => {}); + * }); + * + * req.on('error', (e) => { + * console.error(e.message); + * }); + * req.end(); + * ``` + * + * Outputs for example: + * + * ```text + * Subject Common Name: github.com + * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 + * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= + * Subject Common Name: DigiCert SHA2 Extended Validation Server CA + * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A + * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= + * Subject Common Name: DigiCert High Assurance EV Root CA + * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF + * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= + * All OK. Server matched our pinned cert or public key + * statusCode: 200 + * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; + * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; + * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains + * ``` + * @since v0.3.6 + * @param options Accepts all `options` from `request`, with some differences in default values: + */ + function request( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + /** + * Like `http.get()` but for HTTPS. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * ```js + * const https = require('https'); + * + * https.get('https://encrypted.google.com/', (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * + * }).on('error', (e) => { + * console.error(e); + * }); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. + */ + function get( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function get( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + let globalAgent: Agent; +} +declare module 'node:https' { + export * from 'https'; +} diff --git a/node_modules/@types/node/ts4.8/index.d.ts b/node_modules/@types/node/ts4.8/index.d.ts new file mode 100644 index 0000000..7c8b38c --- /dev/null +++ b/node_modules/@types/node/ts4.8/index.d.ts @@ -0,0 +1,88 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * 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. + */ + +// NOTE: These definitions support NodeJS and TypeScript 4.8 and earlier. + +// Reference required types from the default lib: +/// +/// +/// +/// + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + +/// diff --git a/node_modules/@types/node/ts4.8/inspector.d.ts b/node_modules/@types/node/ts4.8/inspector.d.ts new file mode 100644 index 0000000..eba0b55 --- /dev/null +++ b/node_modules/@types/node/ts4.8/inspector.d.ts @@ -0,0 +1,2741 @@ +// eslint-disable-next-line dt-header +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + +// tslint:disable:max-line-length + +/** + * The `inspector` module provides an API for interacting with the V8 inspector. + * + * It can be accessed using: + * + * ```js + * const inspector = require('inspector'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/inspector.js) + */ +declare module 'inspector' { + import EventEmitter = require('node:events'); + interface InspectorNotification { + method: string; + params: T; + } + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + /** + * Primitive value which cannot be JSON-stringified. + */ + type UnserializableValue = string; + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string | undefined; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId | undefined; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: ObjectPreview | undefined; + /** + * @experimental + */ + customPreview?: CustomPreview | undefined; + } + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId | undefined; + } + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: EntryPreview[] | undefined; + } + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string | undefined; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview | undefined; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + } + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview | undefined; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean | undefined; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: RemoteObject | undefined; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: RemoteObject | undefined; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean | undefined; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean | undefined; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: RemoteObject | undefined; + } + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + } + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId | undefined; + } + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: {} | undefined; + } + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId | undefined; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string | undefined; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace | undefined; + /** + * Exception object if available. + */ + exception?: RemoteObject | undefined; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId | undefined; + } + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string | undefined; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace | undefined; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId | undefined; + } + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + /** + * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId | undefined; + } + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + } + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should be specified. + */ + objectId?: RemoteObjectId | undefined; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: CallArgument[] | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + /** + * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string | undefined; + } + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean | undefined; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean | undefined; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean | undefined; + } + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + } + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[] | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionThrown. + */ + exceptionId: number; + } + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace | undefined; + /** + * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. + * @experimental + */ + context?: string | undefined; + } + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: {}; + } + } + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + /** + * Call frame identifier. + */ + type CallFrameId = string; + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + } + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location | undefined; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject | undefined; + } + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string | undefined; + /** + * Location in the source code where scope starts + */ + startLocation?: Location | undefined; + /** + * Location in the source code where scope ends + */ + endLocation?: Location | undefined; + } + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + type?: string | undefined; + } + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string | undefined; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string | undefined; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string | undefined; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number | undefined; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Location | undefined; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean | undefined; + } + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string | undefined; + } + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean | undefined; + } + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean | undefined; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean | undefined; + } + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean | undefined; + } + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string | undefined; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean | undefined; + } + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[] | undefined; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + } + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {} | undefined; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {} | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: {} | undefined; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[] | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId | undefined; + } + } + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string | undefined; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number | undefined; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number | undefined; + } + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number | undefined; + /** + * Child node ids. + */ + children?: number[] | undefined; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string | undefined; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[] | undefined; + } + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[] | undefined; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[] | undefined; + } + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + /** + * Describes a type collected during runtime. + * @experimental + */ + interface TypeObject { + /** + * Name of a type collected with type profiling. + */ + name: string; + } + /** + * Source offset and types for a parameter or return value. + * @experimental + */ + interface TypeProfileEntry { + /** + * Source offset of the parameter or end of function for return values. + */ + offset: number; + /** + * The types for this parameter or return value. + */ + types: TypeObject[]; + } + /** + * Type profile data collected during runtime for a JavaScript script. + * @experimental + */ + interface ScriptTypeProfile { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Type profile entries for parameters and return values of the functions in the script. + */ + entries: TypeProfileEntry[]; + } + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean | undefined; + /** + * Collect block-based coverage. + */ + detailed?: boolean | undefined; + } + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface TakeTypeProfileReturnType { + /** + * Type profile for all scripts since startTypeProfile() was turned on. + */ + result: ScriptTypeProfile[]; + } + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + } + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean | undefined; + } + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean | undefined; + } + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean | undefined; + } + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + } + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number | undefined; + } + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean | undefined; + } + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string | undefined; + /** + * Included category filters. + */ + includedCategories: string[]; + } + interface StartParameterType { + traceConfig: TraceConfig; + } + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + interface DataCollectedEventDataType { + value: Array<{}>; + } + } + namespace NodeWorker { + type WorkerID = string; + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + interface DetachParameterType { + sessionId: SessionID; + } + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + namespace NodeRuntime { + interface NotifyWhenWaitingForDisconnectParameterType { + enabled: boolean; + } + } + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + * @since v8.0.0 + */ + connect(): void; + /** + * Immediately close the session. All pending message callbacks will be called + * with an error. `session.connect()` will need to be called to be able to send + * messages again. Reconnected session will lose all inspector state, such as + * enabled agents or configured breakpoints. + * @since v8.0.0 + */ + disconnect(): void; + /** + * Posts a message to the inspector back-end. `callback` will be notified when + * a response is received. `callback` is a function that accepts two optional + * arguments: error and message-specific result. + * + * ```js + * session.post('Runtime.evaluate', { expression: '2 + 2' }, + * (error, { result }) => console.log(result)); + * // Output: { type: 'number', value: 4, description: '4' } + * ``` + * + * The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8\. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + * + * ## Example usage + * + * Apart from the debugger, various V8 Profilers are available through the DevTools + * protocol. + * @since v8.0.0 + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + /** + * Returns supported domains. + */ + post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + /** + * Add handler to promise with given promise object id. + */ + post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + /** + * Releases remote object with given id. + */ + post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void; + /** + * Disables reporting of execution contexts creation. + */ + post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void; + /** + * Discards collected exceptions and console API calls. + */ + post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void; + /** + * Compiles expression. + */ + post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + /** + * Runs script with given id in a given context. + */ + post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: 'Runtime.globalLexicalScopeNames', + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + /** + * Disables debugger for given page. + */ + post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + /** + * Removes JavaScript breakpoint. + */ + post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post( + method: 'Debugger.getPossibleBreakpoints', + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + /** + * Continues execution until specific location is reached. + */ + post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void; + /** + * Steps over the statement. + */ + post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void; + /** + * Steps into the function call. + */ + post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void; + /** + * Steps out of the function call. + */ + post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void; + /** + * Stops on the next JavaScript statement. + */ + post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void; + /** + * Resumes JavaScript execution. + */ + post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + /** + * Searches for given string in script content. + */ + post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + /** + * Edits JavaScript source live. + */ + post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + /** + * Restarts particular call frame from the beginning. + */ + post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + /** + * Returns source for the script with given id. + */ + post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void; + /** + * Evaluates expression on a given call frame. + */ + post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void; + /** + * Enables or disables async call stacks tracking. + */ + post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: 'Console.enable', callback?: (err: Error | null) => void): void; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: 'Console.disable', callback?: (err: Error | null) => void): void; + /** + * Does nothing. + */ + post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.start', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + /** + * Enable type profile. + * @experimental + */ + post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void; + /** + * Disable type profile. Disabling releases type profile data collected so far. + * @experimental + */ + post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void; + /** + * Collect type profile. + * @experimental + */ + post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; + post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void; + post( + method: 'HeapProfiler.getObjectByHeapObjectId', + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + /** + * Gets supported tracing categories. + */ + post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + /** + * Start trace events collection. + */ + post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void; + /** + * Sends protocol message over session with given id. + */ + post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void; + /** + * Detached from the worker with given sessionId. + */ + post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void; + // Events + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean; + emit(event: 'Runtime.executionContextCreated', message: InspectorNotification): boolean; + emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification): boolean; + emit(event: 'Runtime.executionContextsCleared'): boolean; + emit(event: 'Runtime.exceptionThrown', message: InspectorNotification): boolean; + emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification): boolean; + emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification): boolean; + emit(event: 'Runtime.inspectRequested', message: InspectorNotification): boolean; + emit(event: 'Debugger.scriptParsed', message: InspectorNotification): boolean; + emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification): boolean; + emit(event: 'Debugger.breakpointResolved', message: InspectorNotification): boolean; + emit(event: 'Debugger.paused', message: InspectorNotification): boolean; + emit(event: 'Debugger.resumed'): boolean; + emit(event: 'Console.messageAdded', message: InspectorNotification): boolean; + emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification): boolean; + emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.resetProfiles'): boolean; + emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification): boolean; + emit(event: 'NodeTracing.dataCollected', message: InspectorNotification): boolean; + emit(event: 'NodeTracing.tracingComplete'): boolean; + emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; + emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; + emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; + emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + on(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + once(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + } + /** + * Activate inspector on host and port. Equivalent to`node --inspect=[[host:]port]`, but can be done programmatically after node has + * started. + * + * If wait is `true`, will block until a client has connected to the inspect port + * and flow control has been passed to the debugger client. + * + * See the `security warning` regarding the `host`parameter usage. + * @param [port='what was specified on the CLI'] Port to listen on for inspector connections. Optional. + * @param [host='what was specified on the CLI'] Host to listen on for inspector connections. Optional. + * @param [wait=false] Block until a client has connected. Optional. + */ + function open(port?: number, host?: string, wait?: boolean): void; + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + function close(): void; + /** + * Return the URL of the active inspector, or `undefined` if there is none. + * + * ```console + * $ node --inspect -p 'inspector.url()' + * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * For help, see: https://nodejs.org/en/docs/inspector + * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * + * $ node --inspect=localhost:3000 -p 'inspector.url()' + * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * For help, see: https://nodejs.org/en/docs/inspector + * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * + * $ node -p 'inspector.url()' + * undefined + * ``` + */ + function url(): string | undefined; + /** + * Blocks until a client (existing or connected later) has sent`Runtime.runIfWaitingForDebugger` command. + * + * An exception will be thrown if there is no active inspector. + * @since v12.7.0 + */ + function waitForDebugger(): void; +} +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module 'node:inspector' { + import inspector = require('inspector'); + export = inspector; +} diff --git a/node_modules/@types/node/ts4.8/module.d.ts b/node_modules/@types/node/ts4.8/module.d.ts new file mode 100644 index 0000000..d83aec9 --- /dev/null +++ b/node_modules/@types/node/ts4.8/module.d.ts @@ -0,0 +1,114 @@ +/** + * @since v0.3.7 + */ +declare module 'module' { + import { URL } from 'node:url'; + namespace Module { + /** + * The `module.syncBuiltinESMExports()` method updates all the live bindings for + * builtin `ES Modules` to match the properties of the `CommonJS` exports. It + * does not add or remove exported names from the `ES Modules`. + * + * ```js + * const fs = require('fs'); + * const assert = require('assert'); + * const { syncBuiltinESMExports } = require('module'); + * + * fs.readFile = newAPI; + * + * delete fs.readFileSync; + * + * function newAPI() { + * // ... + * } + * + * fs.newAPI = newAPI; + * + * syncBuiltinESMExports(); + * + * import('fs').then((esmFS) => { + * // It syncs the existing readFile property with the new value + * assert.strictEqual(esmFS.readFile, newAPI); + * // readFileSync has been deleted from the required fs + * assert.strictEqual('readFileSync' in fs, false); + * // syncBuiltinESMExports() does not remove readFileSync from esmFS + * assert.strictEqual('readFileSync' in esmFS, true); + * // syncBuiltinESMExports() does not add names + * assert.strictEqual(esmFS.newAPI, undefined); + * }); + * ``` + * @since v12.12.0 + */ + function syncBuiltinESMExports(): void; + /** + * `path` is the resolved path for the file for which a corresponding source map + * should be fetched. + * @since v13.7.0, v12.17.0 + */ + function findSourceMap(path: string, error?: Error): SourceMap; + interface SourceMapPayload { + file: string; + version: number; + sources: string[]; + sourcesContent: string[]; + names: string[]; + mappings: string; + sourceRoot: string; + } + interface SourceMapping { + generatedLine: number; + generatedColumn: number; + originalSource: string; + originalLine: number; + originalColumn: number; + } + /** + * @since v13.7.0, v12.17.0 + */ + class SourceMap { + /** + * Getter for the payload used to construct the `SourceMap` instance. + */ + readonly payload: SourceMapPayload; + constructor(payload: SourceMapPayload); + /** + * Given a line number and column number in the generated source file, returns + * an object representing the position in the original file. The object returned + * consists of the following keys: + */ + findEntry(line: number, column: number): SourceMapping; + } + } + interface Module extends NodeModule {} + class Module { + static runMain(): void; + static wrap(code: string): string; + static createRequire(path: string | URL): NodeRequire; + static builtinModules: string[]; + static Module: typeof Module; + constructor(id: string, parent?: Module); + } + global { + interface ImportMeta { + url: string; + /** + * @experimental + * This feature is only available with the `--experimental-import-meta-resolve` + * command flag enabled. + * + * Provides a module-relative resolution function scoped to each module, returning + * the URL string. + * + * @param specified The module specifier to resolve relative to `parent`. + * @param parent The absolute parent module URL to resolve from. If none + * is specified, the value of `import.meta.url` is used as the default. + */ + resolve?(specified: string, parent?: string | URL): Promise; + } + } + export = Module; +} +declare module 'node:module' { + import module = require('module'); + export = module; +} diff --git a/node_modules/@types/node/ts4.8/net.d.ts b/node_modules/@types/node/ts4.8/net.d.ts new file mode 100644 index 0000000..72cebc8 --- /dev/null +++ b/node_modules/@types/node/ts4.8/net.d.ts @@ -0,0 +1,869 @@ +/** + * > Stability: 2 - Stable + * + * The `net` module provides an asynchronous network API for creating stream-based + * TCP or `IPC` servers ({@link createServer}) and clients + * ({@link createConnection}). + * + * It can be accessed using: + * + * ```js + * const net = require('net'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/net.js) + */ +declare module 'net' { + import * as stream from 'node:stream'; + import { Abortable, EventEmitter } from 'node:events'; + import * as dns from 'node:dns'; + type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + interface AddressInfo { + address: string; + family: string; + port: number; + } + interface SocketConstructorOpts { + fd?: number | undefined; + allowHalfOpen?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + signal?: AbortSignal; + } + interface OnReadOpts { + buffer: Uint8Array | (() => Uint8Array); + /** + * This function is called for every chunk of incoming data. + * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. + * Return false from this function to implicitly pause() the socket. + */ + callback(bytesWritten: number, buf: Uint8Array): boolean; + } + interface ConnectOpts { + /** + * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. + * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will + * still be emitted as normal and methods like pause() and resume() will also behave as expected. + */ + onread?: OnReadOpts | undefined; + } + interface TcpSocketConnectOpts extends ConnectOpts { + port: number; + host?: string | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + hints?: number | undefined; + family?: number | undefined; + lookup?: LookupFunction | undefined; + noDelay?: boolean | undefined; + keepAlive?: boolean | undefined; + keepAliveInitialDelay?: number | undefined; + } + interface IpcSocketConnectOpts extends ConnectOpts { + path: string; + } + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed'; + /** + * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint + * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also + * an `EventEmitter`. + * + * A `net.Socket` can be created by the user and used directly to interact with + * a server. For example, it is returned by {@link createConnection}, + * so the user can use it to talk to the server. + * + * It can also be created by Node.js and passed to the user when a connection + * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use + * it to interact with the client. + * @since v0.3.4 + */ + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + /** + * Sends data on the socket. The second parameter specifies the encoding in the + * case of a string. It defaults to UTF8 encoding. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. + * + * The optional `callback` parameter will be executed when the data is finally + * written out, which may not be immediately. + * + * See `Writable` stream `write()` method for more + * information. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + */ + write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; + write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean; + /** + * Initiate a connection on a given socket. + * + * Possible signatures: + * + * * `socket.connect(options[, connectListener])` + * * `socket.connect(path[, connectListener])` for `IPC` connections. + * * `socket.connect(port[, host][, connectListener])` for TCP connections. + * * Returns: `net.Socket` The socket itself. + * + * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, + * instead of a `'connect'` event, an `'error'` event will be emitted with + * the error passed to the `'error'` listener. + * The last parameter `connectListener`, if supplied, will be added as a listener + * for the `'connect'` event **once**. + * + * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined + * behavior. + */ + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + /** + * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. + * @since v0.1.90 + * @return The socket itself. + */ + setEncoding(encoding?: BufferEncoding): this; + /** + * Pauses the reading of data. That is, `'data'` events will not be emitted. + * Useful to throttle back an upload. + * @return The socket itself. + */ + pause(): this; + /** + * Close the TCP connection by sending an RST packet and destroy the stream. + * If this TCP socket is in connecting status, it will send an RST packet + * and destroy this TCP socket once it is connected. Otherwise, it will call + * `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. If this is not a TCP socket + * (for example, a pipe), calling this method will immediately throw + * an `ERR_INVALID_HANDLE_TYPE` Error. + * @since v18.3.0 + * @return The socket itself. + */ + resetAndDestroy(): this; + /** + * Resumes reading after a call to `socket.pause()`. + * @return The socket itself. + */ + resume(): this; + /** + * Sets the socket to timeout after `timeout` milliseconds of inactivity on + * the socket. By default `net.Socket` do not have a timeout. + * + * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to + * end the connection. + * + * ```js + * socket.setTimeout(3000); + * socket.on('timeout', () => { + * console.log('socket timeout'); + * socket.end(); + * }); + * ``` + * + * If `timeout` is 0, then the existing idle timeout is disabled. + * + * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. + * @since v0.1.90 + * @return The socket itself. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Enable/disable the use of Nagle's algorithm. + * + * When a TCP connection is created, it will have Nagle's algorithm enabled. + * + * Nagle's algorithm delays data before it is sent via the network. It attempts + * to optimize throughput at the expense of latency. + * + * Passing `true` for `noDelay` or not passing an argument will disable Nagle's + * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's + * algorithm. + * @since v0.1.90 + * @param [noDelay=true] + * @return The socket itself. + */ + setNoDelay(noDelay?: boolean): this; + /** + * Enable/disable keep-alive functionality, and optionally set the initial + * delay before the first keepalive probe is sent on an idle socket. + * + * Set `initialDelay` (in milliseconds) to set the delay between the last + * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default + * (or previous) setting. + * + * Enabling the keep-alive functionality will set the following socket options: + * + * * `SO_KEEPALIVE=1` + * * `TCP_KEEPIDLE=initialDelay` + * * `TCP_KEEPCNT=10` + * * `TCP_KEEPINTVL=1` + * @since v0.1.92 + * @param [enable=false] + * @param [initialDelay=0] + * @return The socket itself. + */ + setKeepAlive(enable?: boolean, initialDelay?: number): this; + /** + * Returns the bound `address`, the address `family` name and `port` of the + * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` + * @since v0.1.90 + */ + address(): AddressInfo | {}; + /** + * Calling `unref()` on a socket will allow the program to exit if this is the only + * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + unref(): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). + * If the socket is `ref`ed calling `ref` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + ref(): this; + /** + * This property shows the number of characters buffered for writing. The buffer + * may contain strings whose length after encoding is not yet known. So this number + * is only an approximation of the number of bytes in the buffer. + * + * `net.Socket` has the property that `socket.write()` always works. This is to + * help users get up and running quickly. The computer cannot always keep up + * with the amount of data that is written to a socket. The network connection + * simply might be too slow. Node.js will internally queue up the data written to a + * socket and send it out over the wire when it is possible. + * + * The consequence of this internal buffering is that memory may grow. + * Users who experience large or growing `bufferSize` should attempt to + * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. + * @since v0.3.8 + * @deprecated Since v14.6.0 - Use `writableLength` instead. + */ + readonly bufferSize: number; + /** + * The amount of received bytes. + * @since v0.5.3 + */ + readonly bytesRead: number; + /** + * The amount of bytes sent. + * @since v0.5.3 + */ + readonly bytesWritten: number; + /** + * If `true`,`socket.connect(options[, connectListener])` was + * called and has not yet finished. It will stay `true` until the socket becomes + * connected, then it is set to `false` and the `'connect'` event is emitted. Note + * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. + * @since v6.1.0 + */ + readonly connecting: boolean; + /** + * See `writable.destroyed` for further details. + */ + readonly destroyed: boolean; + /** + * The string representation of the local IP address the remote client is + * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client + * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. + * @since v0.9.6 + */ + readonly localAddress?: string; + /** + * The numeric representation of the local port. For example, `80` or `21`. + * @since v0.9.6 + */ + readonly localPort?: number; + /** + * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. + * @since v18.8.0 + */ + readonly localFamily?: string; + /** + * This property represents the state of the connection as a string. + * @see {https://nodejs.org/api/net.html#socketreadystate} + * @since v0.5.0 + */ + readonly readyState: SocketReadyState; + /** + * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remoteAddress?: string | undefined; + /** + * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. + * @since v0.11.14 + */ + readonly remoteFamily?: string | undefined; + /** + * The numeric representation of the remote port. For example, `80` or `21`. + * @since v0.5.10 + */ + readonly remotePort?: number | undefined; + /** + * The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set. + * @since v10.7.0 + */ + readonly timeout?: number | undefined; + /** + * Half-closes the socket. i.e., it sends a FIN packet. It is possible the + * server will still send some data. + * + * See `writable.end()` for further details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(callback?: () => void): this; + end(buffer: Uint8Array | string, callback?: () => void): this; + end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. data + * 4. drain + * 5. end + * 6. error + * 7. lookup + * 8. ready + * 9. timeout + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: (hadError: boolean) => void): this; + addListener(event: 'connect', listener: () => void): this; + addListener(event: 'data', listener: (data: Buffer) => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'timeout', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close', hadError: boolean): boolean; + emit(event: 'connect'): boolean; + emit(event: 'data', data: Buffer): boolean; + emit(event: 'drain'): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean; + emit(event: 'ready'): boolean; + emit(event: 'timeout'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: (hadError: boolean) => void): this; + on(event: 'connect', listener: () => void): this; + on(event: 'data', listener: (data: Buffer) => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'timeout', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: (hadError: boolean) => void): this; + once(event: 'connect', listener: () => void): this; + once(event: 'data', listener: (data: Buffer) => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'timeout', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: (hadError: boolean) => void): this; + prependListener(event: 'connect', listener: () => void): this; + prependListener(event: 'data', listener: (data: Buffer) => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this; + prependOnceListener(event: 'connect', listener: () => void): this; + prependOnceListener(event: 'data', listener: (data: Buffer) => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + } + interface ListenOptions extends Abortable { + port?: number | undefined; + host?: string | undefined; + backlog?: number | undefined; + path?: string | undefined; + exclusive?: boolean | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + } + interface ServerOpts { + /** + * Indicates whether half-opened TCP connections are allowed. + * @default false + */ + allowHalfOpen?: boolean | undefined; + /** + * Indicates whether the socket should be paused on incoming connections. + * @default false + */ + pauseOnConnect?: boolean | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default false + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + } + interface DropArgument { + localAddress?: string; + localPort?: number; + localFamily?: string; + remoteAddress?: string; + remotePort?: number; + remoteFamily?: string; + } + /** + * This class is used to create a TCP or `IPC` server. + * @since v0.1.90 + */ + class Server extends EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); + /** + * Start a server listening for connections. A `net.Server` can be a TCP or + * an `IPC` server depending on what it listens to. + * + * Possible signatures: + * + * * `server.listen(handle[, backlog][, callback])` + * * `server.listen(options[, callback])` + * * `server.listen(path[, backlog][, callback])` for `IPC` servers + * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers + * + * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` + * event. + * + * All `listen()` methods can take a `backlog` parameter to specify the maximum + * length of the queue of pending connections. The actual length will be determined + * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn`on Linux. The default value of this parameter is 511 (not 512). + * + * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for + * details). + * + * The `server.listen()` method can be called again if and only if there was an + * error during the first `server.listen()` call or `server.close()` has been + * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. + * + * One of the most common errors raised when listening is `EADDRINUSE`. + * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry + * after a certain amount of time: + * + * ```js + * server.on('error', (e) => { + * if (e.code === 'EADDRINUSE') { + * console.log('Address in use, retrying...'); + * setTimeout(() => { + * server.close(); + * server.listen(PORT, HOST); + * }, 1000); + * } + * }); + * ``` + */ + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + /** + * Stops the server from accepting new connections and keeps existing + * connections. This function is asynchronous, the server is finally closed + * when all connections are ended and the server emits a `'close'` event. + * The optional `callback` will be called once the `'close'` event occurs. Unlike + * that event, it will be called with an `Error` as its only argument if the server + * was not open when it was closed. + * @since v0.1.90 + * @param callback Called when the server is closed. + */ + close(callback?: (err?: Error) => void): this; + /** + * Returns the bound `address`, the address `family` name, and `port` of the server + * as reported by the operating system if listening on an IP socket + * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. + * + * For a server listening on a pipe or Unix domain socket, the name is returned + * as a string. + * + * ```js + * const server = net.createServer((socket) => { + * socket.end('goodbye\n'); + * }).on('error', (err) => { + * // Handle errors here. + * throw err; + * }); + * + * // Grab an arbitrary unused port. + * server.listen(() => { + * console.log('opened server on', server.address()); + * }); + * ``` + * + * `server.address()` returns `null` before the `'listening'` event has been + * emitted or after calling `server.close()`. + * @since v0.1.90 + */ + address(): AddressInfo | string | null; + /** + * Asynchronously get the number of concurrent connections on the server. Works + * when sockets were sent to forks. + * + * Callback should take two arguments `err` and `count`. + * @since v0.9.7 + */ + getConnections(cb: (error: Error | null, count: number) => void): void; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). + * If the server is `ref`ed calling `ref()` again will have no effect. + * @since v0.9.1 + */ + ref(): this; + /** + * Calling `unref()` on a server will allow the program to exit if this is the only + * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + */ + unref(): this; + /** + * Set this property to reject connections when the server's connection count gets + * high. + * + * It is not recommended to use this option once a socket has been sent to a child + * with `child_process.fork()`. + * @since v0.2.0 + */ + maxConnections: number; + connections: number; + /** + * Indicates whether or not the server is listening for connections. + * @since v5.7.0 + */ + listening: boolean; + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + * 5. drop + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Socket) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'drop', listener: (data?: DropArgument) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Socket): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit(event: 'drop', data?: DropArgument): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Socket) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'drop', listener: (data?: DropArgument) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Socket) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'drop', listener: (data?: DropArgument) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Socket) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'drop', listener: (data?: DropArgument) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'drop', listener: (data?: DropArgument) => void): this; + } + type IPVersion = 'ipv4' | 'ipv6'; + /** + * The `BlockList` object can be used with some network APIs to specify rules for + * disabling inbound or outbound access to specific IP addresses, IP ranges, or + * IP subnets. + * @since v15.0.0, v14.18.0 + */ + class BlockList { + /** + * Adds a rule to block the given IP address. + * @since v15.0.0, v14.18.0 + * @param address An IPv4 or IPv6 address. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addAddress(address: string, type?: IPVersion): void; + addAddress(address: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). + * @since v15.0.0, v14.18.0 + * @param start The starting IPv4 or IPv6 address in the range. + * @param end The ending IPv4 or IPv6 address in the range. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addRange(start: string, end: string, type?: IPVersion): void; + addRange(start: SocketAddress, end: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses specified as a subnet mask. + * @since v15.0.0, v14.18.0 + * @param net The network IPv4 or IPv6 address. + * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addSubnet(net: SocketAddress, prefix: number): void; + addSubnet(net: string, prefix: number, type?: IPVersion): void; + /** + * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. + * + * ```js + * const blockList = new net.BlockList(); + * blockList.addAddress('123.123.123.123'); + * blockList.addRange('10.0.0.1', '10.0.0.10'); + * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); + * + * console.log(blockList.check('123.123.123.123')); // Prints: true + * console.log(blockList.check('10.0.0.3')); // Prints: true + * console.log(blockList.check('222.111.111.222')); // Prints: false + * + * // IPv6 notation for IPv4 addresses works: + * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true + * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true + * ``` + * @since v15.0.0, v14.18.0 + * @param address The IP address to check + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + check(address: SocketAddress): boolean; + check(address: string, type?: IPVersion): boolean; + } + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + /** + * Creates a new TCP or `IPC` server. + * + * If `allowHalfOpen` is set to `true`, when the other end of the socket + * signals the end of transmission, the server will only send back the end of + * transmission when `socket.end()` is explicitly called. For example, in the + * context of TCP, when a FIN packed is received, a FIN packed is sent + * back only when `socket.end()` is explicitly called. Until then the + * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. + * + * If `pauseOnConnect` is set to `true`, then the socket associated with each + * incoming connection will be paused, and no data will be read from its handle. + * This allows connections to be passed between processes without any data being + * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. + * + * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. + * + * Here is an example of a TCP echo server which listens for connections + * on port 8124: + * + * ```js + * const net = require('net'); + * const server = net.createServer((c) => { + * // 'connection' listener. + * console.log('client connected'); + * c.on('end', () => { + * console.log('client disconnected'); + * }); + * c.write('hello\r\n'); + * c.pipe(c); + * }); + * server.on('error', (err) => { + * throw err; + * }); + * server.listen(8124, () => { + * console.log('server bound'); + * }); + * ``` + * + * Test this by using `telnet`: + * + * ```console + * $ telnet localhost 8124 + * ``` + * + * To listen on the socket `/tmp/echo.sock`: + * + * ```js + * server.listen('/tmp/echo.sock', () => { + * console.log('server bound'); + * }); + * ``` + * + * Use `nc` to connect to a Unix domain socket server: + * + * ```console + * $ nc -U /tmp/echo.sock + * ``` + * @since v0.5.0 + * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. + */ + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; + /** + * Aliases to {@link createConnection}. + * + * Possible signatures: + * + * * {@link connect} + * * {@link connect} for `IPC` connections. + * * {@link connect} for TCP connections. + */ + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + /** + * A factory function, which creates a new {@link Socket}, + * immediately initiates connection with `socket.connect()`, + * then returns the `net.Socket` that starts the connection. + * + * When the connection is established, a `'connect'` event will be emitted + * on the returned socket. The last parameter `connectListener`, if supplied, + * will be added as a listener for the `'connect'` event **once**. + * + * Possible signatures: + * + * * {@link createConnection} + * * {@link createConnection} for `IPC` connections. + * * {@link createConnection} for TCP connections. + * + * The {@link connect} function is an alias to this function. + */ + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + /** + * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 + * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. + * + * ```js + * net.isIP('::1'); // returns 6 + * net.isIP('127.0.0.1'); // returns 4 + * net.isIP('127.000.000.001'); // returns 0 + * net.isIP('127.0.0.1/24'); // returns 0 + * net.isIP('fhqwhgads'); // returns 0 + * ``` + * @since v0.3.0 + */ + function isIP(input: string): number; + /** + * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no + * leading zeroes. Otherwise, returns `false`. + * + * ```js + * net.isIPv4('127.0.0.1'); // returns true + * net.isIPv4('127.000.000.001'); // returns false + * net.isIPv4('127.0.0.1/24'); // returns false + * net.isIPv4('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv4(input: string): boolean; + /** + * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. + * + * ```js + * net.isIPv6('::1'); // returns true + * net.isIPv6('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv6(input: string): boolean; + interface SocketAddressInitOptions { + /** + * The network address as either an IPv4 or IPv6 string. + * @default 127.0.0.1 + */ + address?: string | undefined; + /** + * @default `'ipv4'` + */ + family?: IPVersion | undefined; + /** + * An IPv6 flow-label used only if `family` is `'ipv6'`. + * @default 0 + */ + flowlabel?: number | undefined; + /** + * An IP port. + * @default 0 + */ + port?: number | undefined; + } + /** + * @since v15.14.0, v14.18.0 + */ + class SocketAddress { + constructor(options: SocketAddressInitOptions); + /** + * @since v15.14.0, v14.18.0 + */ + readonly address: string; + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly family: IPVersion; + /** + * @since v15.14.0, v14.18.0 + */ + readonly port: number; + /** + * @since v15.14.0, v14.18.0 + */ + readonly flowlabel: number; + } +} +declare module 'node:net' { + export * from 'net'; +} diff --git a/node_modules/@types/node/ts4.8/os.d.ts b/node_modules/@types/node/ts4.8/os.d.ts new file mode 100644 index 0000000..3c55599 --- /dev/null +++ b/node_modules/@types/node/ts4.8/os.d.ts @@ -0,0 +1,466 @@ +/** + * The `os` module provides operating system-related utility methods and + * properties. It can be accessed using: + * + * ```js + * const os = require('os'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js) + */ +declare module 'os' { + interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + } + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: 'IPv4'; + scopeid?: undefined; + } + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: 'IPv6'; + scopeid: number; + } + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T; + homedir: T; + } + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + /** + * Returns the host name of the operating system as a string. + * @since v0.3.3 + */ + function hostname(): string; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. + * + * The load average is a measure of system activity calculated by the operating + * system and expressed as a fractional number. + * + * The load average is a Unix-specific concept. On Windows, the return value is + * always `[0, 0, 0]`. + * @since v0.3.3 + */ + function loadavg(): number[]; + /** + * Returns the system uptime in number of seconds. + * @since v0.3.3 + */ + function uptime(): number; + /** + * Returns the amount of free system memory in bytes as an integer. + * @since v0.3.3 + */ + function freemem(): number; + /** + * Returns the total amount of system memory in bytes as an integer. + * @since v0.3.3 + */ + function totalmem(): number; + /** + * Returns an array of objects containing information about each logical CPU core. + * + * The properties included on each object include: + * + * ```js + * [ + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 252020, + * nice: 0, + * sys: 30340, + * idle: 1070356870, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 306960, + * nice: 0, + * sys: 26980, + * idle: 1071569080, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 248450, + * nice: 0, + * sys: 21750, + * idle: 1070919370, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 256880, + * nice: 0, + * sys: 19430, + * idle: 1070905480, + * irq: 20 + * } + * }, + * ] + * ``` + * + * `nice` values are POSIX-only. On Windows, the `nice` values of all processors + * are always 0. + * @since v0.3.3 + */ + function cpus(): CpuInfo[]; + /** + * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it + * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. + * + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information + * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. + * @since v0.3.3 + */ + function type(): string; + /** + * Returns the operating system as a string. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See + * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v0.3.3 + */ + function release(): string; + /** + * Returns an object containing network interfaces that have been assigned a + * network address. + * + * Each key on the returned object identifies a network interface. The associated + * value is an array of objects that each describe an assigned network address. + * + * The properties available on the assigned network address object include: + * + * ```js + * { + * lo: [ + * { + * address: '127.0.0.1', + * netmask: '255.0.0.0', + * family: 'IPv4', + * mac: '00:00:00:00:00:00', + * internal: true, + * cidr: '127.0.0.1/8' + * }, + * { + * address: '::1', + * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + * family: 'IPv6', + * mac: '00:00:00:00:00:00', + * scopeid: 0, + * internal: true, + * cidr: '::1/128' + * } + * ], + * eth0: [ + * { + * address: '192.168.1.108', + * netmask: '255.255.255.0', + * family: 'IPv4', + * mac: '01:02:03:0a:0b:0c', + * internal: false, + * cidr: '192.168.1.108/24' + * }, + * { + * address: 'fe80::a00:27ff:fe4e:66a1', + * netmask: 'ffff:ffff:ffff:ffff::', + * family: 'IPv6', + * mac: '01:02:03:0a:0b:0c', + * scopeid: 1, + * internal: false, + * cidr: 'fe80::a00:27ff:fe4e:66a1/64' + * } + * ] + * } + * ``` + * @since v0.6.0 + */ + function networkInterfaces(): NodeJS.Dict; + /** + * Returns the string path of the current user's home directory. + * + * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it + * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. + * + * On Windows, it uses the `USERPROFILE` environment variable if defined. + * Otherwise it uses the path to the profile directory of the current user. + * @since v2.3.0 + */ + function homedir(): string; + /** + * Returns information about the currently effective user. On POSIX platforms, + * this is typically a subset of the password file. The returned object includes + * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`. + * + * The value of `homedir` returned by `os.userInfo()` is provided by the operating + * system. This differs from the result of `os.homedir()`, which queries + * environment variables for the home directory before falling back to the + * operating system response. + * + * Throws a `SystemError` if a user has no `username` or `homedir`. + * @since v6.0.0 + */ + function userInfo(options: { encoding: 'buffer' }): UserInfo; + function userInfo(options?: { encoding: BufferEncoding }): UserInfo; + type SignalConstants = { + [key in NodeJS.Signals]: number; + }; + namespace constants { + const UV_UDP_REUSEADDR: number; + namespace signals {} + const signals: SignalConstants; + namespace errno { + const E2BIG: number; + const EACCES: number; + const EADDRINUSE: number; + const EADDRNOTAVAIL: number; + const EAFNOSUPPORT: number; + const EAGAIN: number; + const EALREADY: number; + const EBADF: number; + const EBADMSG: number; + const EBUSY: number; + const ECANCELED: number; + const ECHILD: number; + const ECONNABORTED: number; + const ECONNREFUSED: number; + const ECONNRESET: number; + const EDEADLK: number; + const EDESTADDRREQ: number; + const EDOM: number; + const EDQUOT: number; + const EEXIST: number; + const EFAULT: number; + const EFBIG: number; + const EHOSTUNREACH: number; + const EIDRM: number; + const EILSEQ: number; + const EINPROGRESS: number; + const EINTR: number; + const EINVAL: number; + const EIO: number; + const EISCONN: number; + const EISDIR: number; + const ELOOP: number; + const EMFILE: number; + const EMLINK: number; + const EMSGSIZE: number; + const EMULTIHOP: number; + const ENAMETOOLONG: number; + const ENETDOWN: number; + const ENETRESET: number; + const ENETUNREACH: number; + const ENFILE: number; + const ENOBUFS: number; + const ENODATA: number; + const ENODEV: number; + const ENOENT: number; + const ENOEXEC: number; + const ENOLCK: number; + const ENOLINK: number; + const ENOMEM: number; + const ENOMSG: number; + const ENOPROTOOPT: number; + const ENOSPC: number; + const ENOSR: number; + const ENOSTR: number; + const ENOSYS: number; + const ENOTCONN: number; + const ENOTDIR: number; + const ENOTEMPTY: number; + const ENOTSOCK: number; + const ENOTSUP: number; + const ENOTTY: number; + const ENXIO: number; + const EOPNOTSUPP: number; + const EOVERFLOW: number; + const EPERM: number; + const EPIPE: number; + const EPROTO: number; + const EPROTONOSUPPORT: number; + const EPROTOTYPE: number; + const ERANGE: number; + const EROFS: number; + const ESPIPE: number; + const ESRCH: number; + const ESTALE: number; + const ETIME: number; + const ETIMEDOUT: number; + const ETXTBSY: number; + const EWOULDBLOCK: number; + const EXDEV: number; + const WSAEINTR: number; + const WSAEBADF: number; + const WSAEACCES: number; + const WSAEFAULT: number; + const WSAEINVAL: number; + const WSAEMFILE: number; + const WSAEWOULDBLOCK: number; + const WSAEINPROGRESS: number; + const WSAEALREADY: number; + const WSAENOTSOCK: number; + const WSAEDESTADDRREQ: number; + const WSAEMSGSIZE: number; + const WSAEPROTOTYPE: number; + const WSAENOPROTOOPT: number; + const WSAEPROTONOSUPPORT: number; + const WSAESOCKTNOSUPPORT: number; + const WSAEOPNOTSUPP: number; + const WSAEPFNOSUPPORT: number; + const WSAEAFNOSUPPORT: number; + const WSAEADDRINUSE: number; + const WSAEADDRNOTAVAIL: number; + const WSAENETDOWN: number; + const WSAENETUNREACH: number; + const WSAENETRESET: number; + const WSAECONNABORTED: number; + const WSAECONNRESET: number; + const WSAENOBUFS: number; + const WSAEISCONN: number; + const WSAENOTCONN: number; + const WSAESHUTDOWN: number; + const WSAETOOMANYREFS: number; + const WSAETIMEDOUT: number; + const WSAECONNREFUSED: number; + const WSAELOOP: number; + const WSAENAMETOOLONG: number; + const WSAEHOSTDOWN: number; + const WSAEHOSTUNREACH: number; + const WSAENOTEMPTY: number; + const WSAEPROCLIM: number; + const WSAEUSERS: number; + const WSAEDQUOT: number; + const WSAESTALE: number; + const WSAEREMOTE: number; + const WSASYSNOTREADY: number; + const WSAVERNOTSUPPORTED: number; + const WSANOTINITIALISED: number; + const WSAEDISCON: number; + const WSAENOMORE: number; + const WSAECANCELLED: number; + const WSAEINVALIDPROCTABLE: number; + const WSAEINVALIDPROVIDER: number; + const WSAEPROVIDERFAILEDINIT: number; + const WSASYSCALLFAILURE: number; + const WSASERVICE_NOT_FOUND: number; + const WSATYPE_NOT_FOUND: number; + const WSA_E_NO_MORE: number; + const WSA_E_CANCELLED: number; + const WSAEREFUSED: number; + } + namespace priority { + const PRIORITY_LOW: number; + const PRIORITY_BELOW_NORMAL: number; + const PRIORITY_NORMAL: number; + const PRIORITY_ABOVE_NORMAL: number; + const PRIORITY_HIGH: number; + const PRIORITY_HIGHEST: number; + } + } + const devNull: string; + const EOL: string; + /** + * Returns the operating system CPU architecture for which the Node.js binary was + * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`. + * + * The return value is equivalent to `process.arch`. + * @since v0.5.0 + */ + function arch(): string; + /** + * Returns a string identifying the kernel version. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v13.11.0, v12.17.0 + */ + function version(): string; + /** + * Returns a string identifying the operating system platform for which + * the Node.js binary was compiled. The value is set at compile time. + * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`. + * + * The return value is equivalent to `process.platform`. + * + * The value `'android'` may also be returned if Node.js is built on the Android + * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.5.0 + */ + function platform(): NodeJS.Platform; + /** + * Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64. + * + * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). + * On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used. + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v18.9.0 + */ + function machine(): string; + /** + * Returns the operating system's default directory for temporary files as a + * string. + * @since v0.9.9 + */ + function tmpdir(): string; + /** + * Returns a string identifying the endianness of the CPU for which the Node.js + * binary was compiled. + * + * Possible values are `'BE'` for big endian and `'LE'` for little endian. + * @since v0.9.4 + */ + function endianness(): 'BE' | 'LE'; + /** + * Returns the scheduling priority for the process specified by `pid`. If `pid` is + * not provided or is `0`, the priority of the current process is returned. + * @since v10.10.0 + * @param [pid=0] The process ID to retrieve scheduling priority for. + */ + function getPriority(pid?: number): number; + /** + * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used. + * + * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows + * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range + * mapping may cause the return value to be slightly different on Windows. To avoid + * confusion, set `priority` to one of the priority constants. + * + * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user + * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`. + * @since v10.10.0 + * @param [pid=0] The process ID to set scheduling priority for. + * @param priority The scheduling priority to assign to the process. + */ + function setPriority(priority: number): void; + function setPriority(pid: number, priority: number): void; +} +declare module 'node:os' { + export * from 'os'; +} diff --git a/node_modules/@types/node/ts4.8/path.d.ts b/node_modules/@types/node/ts4.8/path.d.ts new file mode 100644 index 0000000..1d33f79 --- /dev/null +++ b/node_modules/@types/node/ts4.8/path.d.ts @@ -0,0 +1,191 @@ +declare module 'path/posix' { + import path = require('path'); + export = path; +} +declare module 'path/win32' { + import path = require('path'); + export = path; +} +/** + * The `path` module provides utilities for working with file and directory paths. + * It can be accessed using: + * + * ```js + * const path = require('path'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/path.js) + */ +declare module 'path' { + namespace path { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string | undefined; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string | undefined; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string | undefined; + /** + * The file extension (if any) such as '.html' + */ + ext?: string | undefined; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string | undefined; + } + interface PlatformPath { + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param path string path to normalize. + * @throws {TypeError} if `path` is not a string. + */ + normalize(path: string): string; + /** + * Join all arguments together and normalize the resulting path. + * + * @param paths paths to join. + * @throws {TypeError} if any of the path segments is not a string. + */ + join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param paths A sequence of paths or path segments. + * @throws {TypeError} if any of the arguments is not a string. + */ + resolve(...paths: string[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * If the given {path} is a zero-length string, `false` will be returned. + * + * @param path path to test. + * @throws {TypeError} if `path` is not a string. + */ + isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to} based on the current working directory. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @throws {TypeError} if either `from` or `to` is not a string. + */ + relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + dirname(path: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param path the path to evaluate. + * @param suffix optionally, an extension to remove from the result. + * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. + */ + basename(path: string, suffix?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + extname(path: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + readonly sep: '\\' | '/'; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + readonly delimiter: ';' | ':'; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param path path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + parse(path: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathObject path to evaluate. + */ + format(pathObject: FormatInputPathObject): string; + /** + * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. + * If path is not a string, path will be returned without modifications. + * This method is meaningful only on Windows system. + * On POSIX systems, the method is non-operational and always returns path without modifications. + */ + toNamespacedPath(path: string): string; + /** + * Posix specific pathing. + * Same as parent object on posix. + */ + readonly posix: PlatformPath; + /** + * Windows specific pathing. + * Same as parent object on windows + */ + readonly win32: PlatformPath; + } + } + const path: path.PlatformPath; + export = path; +} +declare module 'node:path' { + import path = require('path'); + export = path; +} +declare module 'node:path/posix' { + import path = require('path/posix'); + export = path; +} +declare module 'node:path/win32' { + import path = require('path/win32'); + export = path; +} diff --git a/node_modules/@types/node/ts4.8/perf_hooks.d.ts b/node_modules/@types/node/ts4.8/perf_hooks.d.ts new file mode 100644 index 0000000..5c0b228 --- /dev/null +++ b/node_modules/@types/node/ts4.8/perf_hooks.d.ts @@ -0,0 +1,625 @@ +/** + * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for + * Node.js-specific performance measurements. + * + * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/): + * + * * [High Resolution Time](https://www.w3.org/TR/hr-time-2) + * * [Performance Timeline](https://w3c.github.io/performance-timeline/) + * * [User Timing](https://www.w3.org/TR/user-timing/) + * + * ```js + * const { PerformanceObserver, performance } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((items) => { + * console.log(items.getEntries()[0].duration); + * performance.clearMarks(); + * }); + * obs.observe({ type: 'measure' }); + * performance.measure('Start to Now'); + * + * performance.mark('A'); + * doSomeLongRunningProcess(() => { + * performance.measure('A to Now', 'A'); + * + * performance.mark('B'); + * performance.measure('A to B', 'A', 'B'); + * }); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/perf_hooks.js) + */ +declare module 'perf_hooks' { + import { AsyncResource } from 'node:async_hooks'; + type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http'; + interface NodeGCPerformanceDetail { + /** + * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies + * the type of garbage collection operation that occurred. + * See perf_hooks.constants for valid values. + */ + readonly kind?: number | undefined; + /** + * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags` + * property contains additional information about garbage collection operation. + * See perf_hooks.constants for valid values. + */ + readonly flags?: number | undefined; + } + /** + * @since v8.5.0 + */ + class PerformanceEntry { + protected constructor(); + /** + * The total number of milliseconds elapsed for this entry. This value will not + * be meaningful for all Performance Entry types. + * @since v8.5.0 + */ + readonly duration: number; + /** + * The name of the performance entry. + * @since v8.5.0 + */ + readonly name: string; + /** + * The high resolution millisecond timestamp marking the starting time of the + * Performance Entry. + * @since v8.5.0 + */ + readonly startTime: number; + /** + * The type of the performance entry. It may be one of: + * + * * `'node'` (Node.js only) + * * `'mark'` (available on the Web) + * * `'measure'` (available on the Web) + * * `'gc'` (Node.js only) + * * `'function'` (Node.js only) + * * `'http2'` (Node.js only) + * * `'http'` (Node.js only) + * @since v8.5.0 + */ + readonly entryType: EntryType; + /** + * Additional detail specific to the `entryType`. + * @since v16.0.0 + */ + readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type. + toJSON(): any; + } + class PerformanceMark extends PerformanceEntry { + readonly duration: 0; + readonly entryType: 'mark'; + } + class PerformanceMeasure extends PerformanceEntry { + readonly entryType: 'measure'; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Provides timing details for Node.js itself. The constructor of this class + * is not exposed to users. + * @since v8.5.0 + */ + class PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process + * completed bootstrapping. If bootstrapping has not yet finished, the property + * has the value of -1. + * @since v8.5.0 + */ + readonly bootstrapComplete: number; + /** + * The high resolution millisecond timestamp at which the Node.js environment was + * initialized. + * @since v8.5.0 + */ + readonly environment: number; + /** + * The high resolution millisecond timestamp of the amount of time the event loop + * has been idle within the event loop's event provider (e.g. `epoll_wait`). This + * does not take CPU usage into consideration. If the event loop has not yet + * started (e.g., in the first tick of the main script), the property has the + * value of 0. + * @since v14.10.0, v12.19.0 + */ + readonly idleTime: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * exited. If the event loop has not yet exited, the property has the value of -1\. + * It can only have a value of not -1 in a handler of the `'exit'` event. + * @since v8.5.0 + */ + readonly loopExit: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * started. If the event loop has not yet started (e.g., in the first tick of the + * main script), the property has the value of -1. + * @since v8.5.0 + */ + readonly loopStart: number; + /** + * The high resolution millisecond timestamp at which the V8 platform was + * initialized. + * @since v8.5.0 + */ + readonly v8Start: number; + } + interface EventLoopUtilization { + idle: number; + active: number; + utilization: number; + } + /** + * @param util1 The result of a previous call to eventLoopUtilization() + * @param util2 The result of a previous call to eventLoopUtilization() prior to util1 + */ + type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization; + interface MarkOptions { + /** + * Additional optional detail to include with the mark. + */ + detail?: unknown | undefined; + /** + * An optional timestamp to be used as the mark time. + * @default `performance.now()`. + */ + startTime?: number | undefined; + } + interface MeasureOptions { + /** + * Additional optional detail to include with the mark. + */ + detail?: unknown | undefined; + /** + * Duration between start and end times. + */ + duration?: number | undefined; + /** + * Timestamp to be used as the end time, or a string identifying a previously recorded mark. + */ + end?: number | string | undefined; + /** + * Timestamp to be used as the start time, or a string identifying a previously recorded mark. + */ + start?: number | string | undefined; + } + interface TimerifyOptions { + /** + * A histogram object created using + * `perf_hooks.createHistogram()` that will record runtime durations in + * nanoseconds. + */ + histogram?: RecordableHistogram | undefined; + } + interface Performance { + /** + * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. + * If name is provided, removes only the named mark. + * @param name + */ + clearMarks(name?: string): void; + /** + * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline. + * If name is provided, removes only the named measure. + * @param name + * @since v16.7.0 + */ + clearMeasures(name?: string): void; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`. + * If you are only interested in performance entries of certain types or that have certain names, see + * `performance.getEntriesByType()` and `performance.getEntriesByName()`. + * @since v16.7.0 + */ + getEntries(): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` + * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`. + * @param name + * @param type + * @since v16.7.0 + */ + getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` + * whose `performanceEntry.entryType` is equal to `type`. + * @param type + * @since v16.7.0 + */ + getEntriesByType(type: EntryType): PerformanceEntry[]; + /** + * Creates a new PerformanceMark entry in the Performance Timeline. + * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', + * and whose performanceEntry.duration is always 0. + * Performance marks are used to mark specific significant moments in the Performance Timeline. + * @param name + * @return The PerformanceMark entry that was created + */ + mark(name?: string, options?: MarkOptions): PerformanceMark; + /** + * Creates a new PerformanceMeasure entry in the Performance Timeline. + * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', + * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. + * + * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify + * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, + * then startMark is set to timeOrigin by default. + * + * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp + * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. + * @param name + * @param startMark + * @param endMark + * @return The PerformanceMeasure entry that was created + */ + measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure; + measure(name: string, options: MeasureOptions): PerformanceMeasure; + /** + * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. + */ + readonly nodeTiming: PerformanceNodeTiming; + /** + * @return the current high resolution millisecond timestamp + */ + now(): number; + /** + * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. + */ + readonly timeOrigin: number; + /** + * Wraps a function within a new function that measures the running time of the wrapped function. + * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. + * @param fn + */ + timerify any>(fn: T, options?: TimerifyOptions): T; + /** + * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time. + * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait). + * No other CPU idle time is taken into consideration. + */ + eventLoopUtilization: EventLoopUtilityFunction; + } + interface PerformanceObserverEntryList { + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntries()); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 81.465639, + * * duration: 0 + * * }, + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 81.860064, + * * duration: 0 + * * } + * * ] + * + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ type: 'mark' }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntries(): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is + * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntriesByName('meow')); + * + * * [ + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 98.545991, + * * duration: 0 + * * } + * * ] + * + * console.log(perfObserverList.getEntriesByName('nope')); // [] + * + * console.log(perfObserverList.getEntriesByName('test', 'mark')); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 63.518931, + * * duration: 0 + * * } + * * ] + * + * console.log(perfObserverList.getEntriesByName('test', 'measure')); // [] + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ entryTypes: ['mark', 'measure'] }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntriesByType('mark')); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 55.897834, + * * duration: 0 + * * }, + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 56.350146, + * * duration: 0 + * * } + * * ] + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ type: 'mark' }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntriesByType(type: EntryType): PerformanceEntry[]; + } + type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; + class PerformanceObserver extends AsyncResource { + constructor(callback: PerformanceObserverCallback); + /** + * Disconnects the `PerformanceObserver` instance from all notifications. + * @since v8.5.0 + */ + disconnect(): void; + /** + * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`: + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((list, observer) => { + * // Called once asynchronously. `list` contains three items. + * }); + * obs.observe({ type: 'mark' }); + * + * for (let n = 0; n < 3; n++) + * performance.mark(`test${n}`); + * ``` + * @since v8.5.0 + */ + observe( + options: + | { + entryTypes: ReadonlyArray; + buffered?: boolean | undefined; + } + | { + type: EntryType; + buffered?: boolean | undefined; + } + ): void; + } + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + const NODE_PERFORMANCE_GC_FLAGS_NO: number; + const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; + const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; + const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; + const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; + } + const performance: Performance; + interface EventLoopMonitorOptions { + /** + * The sampling rate in milliseconds. + * Must be greater than zero. + * @default 10 + */ + resolution?: number | undefined; + } + interface Histogram { + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v11.10.0 + */ + readonly percentiles: Map; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event + * loop delay threshold. + * @since v11.10.0 + */ + readonly exceeds: number; + /** + * The minimum recorded event loop delay. + * @since v11.10.0 + */ + readonly min: number; + /** + * The maximum recorded event loop delay. + * @since v11.10.0 + */ + readonly max: number; + /** + * The mean of the recorded event loop delays. + * @since v11.10.0 + */ + readonly mean: number; + /** + * The standard deviation of the recorded event loop delays. + * @since v11.10.0 + */ + readonly stddev: number; + /** + * Resets the collected histogram data. + * @since v11.10.0 + */ + reset(): void; + /** + * Returns the value at the given percentile. + * @since v11.10.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentile(percentile: number): number; + } + interface IntervalHistogram extends Histogram { + /** + * Enables the update interval timer. Returns `true` if the timer was + * started, `false` if it was already started. + * @since v11.10.0 + */ + enable(): boolean; + /** + * Disables the update interval timer. Returns `true` if the timer was + * stopped, `false` if it was already stopped. + * @since v11.10.0 + */ + disable(): boolean; + } + interface RecordableHistogram extends Histogram { + /** + * @since v15.9.0, v14.18.0 + * @param val The amount to record in the histogram. + */ + record(val: number | bigint): void; + /** + * Calculates the amount of time (in nanoseconds) that has passed since the + * previous call to `recordDelta()` and records that amount in the histogram. + * + * ## Examples + * @since v15.9.0, v14.18.0 + */ + recordDelta(): void; + /** + * Adds the values from other to this histogram. + * @since v17.4.0, v16.14.0 + * @param other Recordable Histogram to combine with + */ + add(other: RecordableHistogram): void; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Creates an `IntervalHistogram` object that samples and reports the event loop + * delay over time. The delays will be reported in nanoseconds. + * + * Using a timer to detect approximate event loop delay works because the + * execution of timers is tied specifically to the lifecycle of the libuv + * event loop. That is, a delay in the loop will cause a delay in the execution + * of the timer, and those delays are specifically what this API is intended to + * detect. + * + * ```js + * const { monitorEventLoopDelay } = require('perf_hooks'); + * const h = monitorEventLoopDelay({ resolution: 20 }); + * h.enable(); + * // Do something. + * h.disable(); + * console.log(h.min); + * console.log(h.max); + * console.log(h.mean); + * console.log(h.stddev); + * console.log(h.percentiles); + * console.log(h.percentile(50)); + * console.log(h.percentile(99)); + * ``` + * @since v11.10.0 + */ + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; + interface CreateHistogramOptions { + /** + * The minimum recordable value. Must be an integer value greater than 0. + * @default 1 + */ + min?: number | bigint | undefined; + /** + * The maximum recordable value. Must be an integer value greater than min. + * @default Number.MAX_SAFE_INTEGER + */ + max?: number | bigint | undefined; + /** + * The number of accuracy digits. Must be a number between 1 and 5. + * @default 3 + */ + figures?: number | undefined; + } + /** + * Returns a `RecordableHistogram`. + * @since v15.9.0, v14.18.0 + */ + function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; + + import { performance as _performance } from 'perf_hooks'; + global { + /** + * `performance` is a global reference for `require('perf_hooks').performance` + * https://nodejs.org/api/globals.html#performance + * @since v16.0.0 + */ + var performance: typeof globalThis extends { + onmessage: any; + performance: infer T; + } + ? T + : typeof _performance; + } +} +declare module 'node:perf_hooks' { + export * from 'perf_hooks'; +} diff --git a/node_modules/@types/node/ts4.8/process.d.ts b/node_modules/@types/node/ts4.8/process.d.ts new file mode 100644 index 0000000..12148f9 --- /dev/null +++ b/node_modules/@types/node/ts4.8/process.d.ts @@ -0,0 +1,1482 @@ +declare module 'process' { + import * as tty from 'node:tty'; + import { Worker } from 'node:worker_threads'; + global { + var process: NodeJS.Process; + namespace NodeJS { + // this namespace merge is here because these are specifically used + // as the type for process.stdin, process.stdout, and process.stderr. + // they can't live in tty.d.ts because we need to disambiguate the imported name. + interface ReadStream extends tty.ReadStream {} + interface WriteStream extends tty.WriteStream {} + interface MemoryUsageFn { + /** + * The `process.memoryUsage()` method iterate over each page to gather informations about memory + * usage which can be slow depending on the program memory allocations. + */ + (): MemoryUsage; + /** + * method returns an integer representing the Resident Set Size (RSS) in bytes. + */ + rss(): number; + } + interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + external: number; + arrayBuffers: number; + } + interface CpuUsage { + user: number; + system: number; + } + interface ProcessRelease { + name: string; + sourceUrl?: string | undefined; + headersUrl?: string | undefined; + libUrl?: string | undefined; + lts?: string | undefined; + } + interface ProcessVersions extends Dict { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; + type Architecture = 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x64'; + type Signals = + | 'SIGABRT' + | 'SIGALRM' + | 'SIGBUS' + | 'SIGCHLD' + | 'SIGCONT' + | 'SIGFPE' + | 'SIGHUP' + | 'SIGILL' + | 'SIGINT' + | 'SIGIO' + | 'SIGIOT' + | 'SIGKILL' + | 'SIGPIPE' + | 'SIGPOLL' + | 'SIGPROF' + | 'SIGPWR' + | 'SIGQUIT' + | 'SIGSEGV' + | 'SIGSTKFLT' + | 'SIGSTOP' + | 'SIGSYS' + | 'SIGTERM' + | 'SIGTRAP' + | 'SIGTSTP' + | 'SIGTTIN' + | 'SIGTTOU' + | 'SIGUNUSED' + | 'SIGURG' + | 'SIGUSR1' + | 'SIGUSR2' + | 'SIGVTALRM' + | 'SIGWINCH' + | 'SIGXCPU' + | 'SIGXFSZ' + | 'SIGBREAK' + | 'SIGLOST' + | 'SIGINFO'; + type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection'; + type MultipleResolveType = 'resolve' | 'reject'; + type BeforeExitListener = (code: number) => void; + type DisconnectListener = () => void; + type ExitListener = (code: number) => void; + type RejectionHandledListener = (promise: Promise) => void; + type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void; + /** + * Most of the time the unhandledRejection will be an Error, but this should not be relied upon + * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error. + */ + type UnhandledRejectionListener = (reason: unknown, promise: Promise) => void; + type WarningListener = (warning: Error) => void; + type MessageListener = (message: unknown, sendHandle: unknown) => void; + type SignalsListener = (signal: Signals) => void; + type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: unknown) => void; + type WorkerListener = (worker: Worker) => void; + interface Socket extends ReadWriteStream { + isTTY?: true | undefined; + } + // Alias for compatibility + interface ProcessEnv extends Dict { + /** + * Can be used to change the default timezone at runtime + */ + TZ?: string; + } + interface HRTime { + (time?: [number, number]): [number, number]; + bigint(): bigint; + } + interface ProcessReport { + /** + * Directory where the report is written. + * working directory of the Node.js process. + * @default '' indicating that reports are written to the current + */ + directory: string; + /** + * Filename where the report is written. + * The default value is the empty string. + * @default '' the output filename will be comprised of a timestamp, + * PID, and sequence number. + */ + filename: string; + /** + * Returns a JSON-formatted diagnostic report for the running process. + * The report's JavaScript stack trace is taken from err, if present. + */ + getReport(err?: Error): string; + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @default false + */ + reportOnSignal: boolean; + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from err, if present. + * + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param error A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string): string; + writeReport(error?: Error): string; + writeReport(fileName?: string, err?: Error): string; + } + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + interface EmitWarningOptions { + /** + * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. + * + * @default 'Warning' + */ + type?: string | undefined; + /** + * A unique identifier for the warning instance being emitted. + */ + code?: string | undefined; + /** + * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. + * + * @default process.emitWarning + */ + ctor?: Function | undefined; + /** + * Additional text to include with the error. + */ + detail?: string | undefined; + } + interface ProcessConfig { + readonly target_defaults: { + readonly cflags: any[]; + readonly default_configuration: string; + readonly defines: string[]; + readonly include_dirs: string[]; + readonly libraries: string[]; + }; + readonly variables: { + readonly clang: number; + readonly host_arch: string; + readonly node_install_npm: boolean; + readonly node_install_waf: boolean; + readonly node_prefix: string; + readonly node_shared_openssl: boolean; + readonly node_shared_v8: boolean; + readonly node_shared_zlib: boolean; + readonly node_use_dtrace: boolean; + readonly node_use_etw: boolean; + readonly node_use_openssl: boolean; + readonly target_arch: string; + readonly v8_no_strict_aliasing: number; + readonly v8_use_snapshot: boolean; + readonly visibility: string; + }; + } + interface Process extends EventEmitter { + /** + * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is + * a `Writable` stream. + * + * For example, to copy `process.stdin` to `process.stdout`: + * + * ```js + * import { stdin, stdout } from 'process'; + * + * stdin.pipe(stdout); + * ``` + * + * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stdout: WriteStream & { + fd: 1; + }; + /** + * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is + * a `Writable` stream. + * + * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stderr: WriteStream & { + fd: 2; + }; + /** + * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is + * a `Readable` stream. + * + * For details of how to read from `stdin` see `readable.read()`. + * + * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that + * is compatible with scripts written for Node.js prior to v0.10\. + * For more information see `Stream compatibility`. + * + * In "old" streams mode the `stdin` stream is paused by default, so one + * must call `process.stdin.resume()` to read from it. Note also that calling`process.stdin.resume()` itself would switch stream to "old" mode. + */ + stdin: ReadStream & { + fd: 0; + }; + openStdin(): Socket; + /** + * The `process.argv` property returns an array containing the command-line + * arguments passed when the Node.js process was launched. The first element will + * be {@link execPath}. See `process.argv0` if access to the original value + * of `argv[0]` is needed. The second element will be the path to the JavaScript + * file being executed. The remaining elements will be any additional command-line + * arguments. + * + * For example, assuming the following script for `process-args.js`: + * + * ```js + * import { argv } from 'process'; + * + * // print process.argv + * argv.forEach((val, index) => { + * console.log(`${index}: ${val}`); + * }); + * ``` + * + * Launching the Node.js process as: + * + * ```console + * $ node process-args.js one two=three four + * ``` + * + * Would generate the output: + * + * ```text + * 0: /usr/local/bin/node + * 1: /Users/mjr/work/node/process-args.js + * 2: one + * 3: two=three + * 4: four + * ``` + * @since v0.1.27 + */ + argv: string[]; + /** + * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. + * + * ```console + * $ bash -c 'exec -a customArgv0 ./node' + * > process.argv[0] + * '/Volumes/code/external/node/out/Release/node' + * > process.argv0 + * 'customArgv0' + * ``` + * @since v6.4.0 + */ + argv0: string; + /** + * The `process.execArgv` property returns the set of Node.js-specific command-line + * options passed when the Node.js process was launched. These options do not + * appear in the array returned by the {@link argv} property, and do not + * include the Node.js executable, the name of the script, or any options following + * the script name. These options are useful in order to spawn child processes with + * the same execution environment as the parent. + * + * ```console + * $ node --harmony script.js --version + * ``` + * + * Results in `process.execArgv`: + * + * ```js + * ['--harmony'] + * ``` + * + * And `process.argv`: + * + * ```js + * ['/usr/local/bin/node', 'script.js', '--version'] + * ``` + * + * Refer to `Worker constructor` for the detailed behavior of worker + * threads with this property. + * @since v0.7.7 + */ + execArgv: string[]; + /** + * The `process.execPath` property returns the absolute pathname of the executable + * that started the Node.js process. Symbolic links, if any, are resolved. + * + * ```js + * '/usr/local/bin/node' + * ``` + * @since v0.1.100 + */ + execPath: string; + /** + * The `process.abort()` method causes the Node.js process to exit immediately and + * generate a core file. + * + * This feature is not available in `Worker` threads. + * @since v0.7.0 + */ + abort(): never; + /** + * The `process.chdir()` method changes the current working directory of the + * Node.js process or throws an exception if doing so fails (for instance, if + * the specified `directory` does not exist). + * + * ```js + * import { chdir, cwd } from 'process'; + * + * console.log(`Starting directory: ${cwd()}`); + * try { + * chdir('/tmp'); + * console.log(`New directory: ${cwd()}`); + * } catch (err) { + * console.error(`chdir: ${err}`); + * } + * ``` + * + * This feature is not available in `Worker` threads. + * @since v0.1.17 + */ + chdir(directory: string): void; + /** + * The `process.cwd()` method returns the current working directory of the Node.js + * process. + * + * ```js + * import { cwd } from 'process'; + * + * console.log(`Current directory: ${cwd()}`); + * ``` + * @since v0.1.8 + */ + cwd(): string; + /** + * The port used by the Node.js debugger when enabled. + * + * ```js + * import process from 'process'; + * + * process.debugPort = 5858; + * ``` + * @since v0.7.2 + */ + debugPort: number; + /** + * The `process.emitWarning()` method can be used to emit custom or application + * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. + * + * ```js + * import { emitWarning } from 'process'; + * + * // Emit a warning with a code and additional detail. + * emitWarning('Something happened!', { + * code: 'MY_WARNING', + * detail: 'This is some additional information' + * }); + * // Emits: + * // (node:56338) [MY_WARNING] Warning: Something happened! + * // This is some additional information + * ``` + * + * In this example, an `Error` object is generated internally by`process.emitWarning()` and passed through to the `'warning'` handler. + * + * ```js + * import process from 'process'; + * + * process.on('warning', (warning) => { + * console.warn(warning.name); // 'Warning' + * console.warn(warning.message); // 'Something happened!' + * console.warn(warning.code); // 'MY_WARNING' + * console.warn(warning.stack); // Stack trace + * console.warn(warning.detail); // 'This is some additional information' + * }); + * ``` + * + * If `warning` is passed as an `Error` object, the `options` argument is ignored. + * @since v8.0.0 + * @param warning The warning to emit. + */ + emitWarning(warning: string | Error, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; + emitWarning(warning: string | Error, options?: EmitWarningOptions): void; + /** + * The `process.env` property returns an object containing the user environment. + * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). + * + * An example of this object looks like: + * + * ```js + * { + * TERM: 'xterm-256color', + * SHELL: '/usr/local/bin/bash', + * USER: 'maciej', + * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', + * PWD: '/Users/maciej', + * EDITOR: 'vim', + * SHLVL: '1', + * HOME: '/Users/maciej', + * LOGNAME: 'maciej', + * _: '/usr/local/bin/node' + * } + * ``` + * + * It is possible to modify this object, but such modifications will not be + * reflected outside the Node.js process, or (unless explicitly requested) + * to other `Worker` threads. + * In other words, the following example would not work: + * + * ```console + * $ node -e 'process.env.foo = "bar"' && echo $foo + * ``` + * + * While the following will: + * + * ```js + * import { env } from 'process'; + * + * env.foo = 'bar'; + * console.log(env.foo); + * ``` + * + * Assigning a property on `process.env` will implicitly convert the value + * to a string. **This behavior is deprecated.** Future versions of Node.js may + * throw an error when the value is not a string, number, or boolean. + * + * ```js + * import { env } from 'process'; + * + * env.test = null; + * console.log(env.test); + * // => 'null' + * env.test = undefined; + * console.log(env.test); + * // => 'undefined' + * ``` + * + * Use `delete` to delete a property from `process.env`. + * + * ```js + * import { env } from 'process'; + * + * env.TEST = 1; + * delete env.TEST; + * console.log(env.TEST); + * // => undefined + * ``` + * + * On Windows operating systems, environment variables are case-insensitive. + * + * ```js + * import { env } from 'process'; + * + * env.TEST = 1; + * console.log(env.test); + * // => 1 + * ``` + * + * Unless explicitly specified when creating a `Worker` instance, + * each `Worker` thread has its own copy of `process.env`, based on its + * parent thread’s `process.env`, or whatever was specified as the `env` option + * to the `Worker` constructor. Changes to `process.env` will not be visible + * across `Worker` threads, and only the main thread can make changes that + * are visible to the operating system or to native add-ons. + * @since v0.1.27 + */ + env: ProcessEnv; + /** + * The `process.exit()` method instructs Node.js to terminate the process + * synchronously with an exit status of `code`. If `code` is omitted, exit uses + * either the 'success' code `0` or the value of `process.exitCode` if it has been + * set. Node.js will not terminate until all the `'exit'` event listeners are + * called. + * + * To exit with a 'failure' code: + * + * ```js + * import { exit } from 'process'; + * + * exit(1); + * ``` + * + * The shell that executed Node.js should see the exit code as `1`. + * + * Calling `process.exit()` will force the process to exit as quickly as possible + * even if there are still asynchronous operations pending that have not yet + * completed fully, including I/O operations to `process.stdout` and`process.stderr`. + * + * In most situations, it is not actually necessary to call `process.exit()`explicitly. The Node.js process will exit on its own _if there is no additional_ + * _work pending_ in the event loop. The `process.exitCode` property can be set to + * tell the process which exit code to use when the process exits gracefully. + * + * For instance, the following example illustrates a _misuse_ of the`process.exit()` method that could lead to data printed to stdout being + * truncated and lost: + * + * ```js + * import { exit } from 'process'; + * + * // This is an example of what *not* to do: + * if (someConditionNotMet()) { + * printUsageToStdout(); + * exit(1); + * } + * ``` + * + * The reason this is problematic is because writes to `process.stdout` in Node.js + * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js + * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. + * + * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding + * scheduling any additional work for the event loop: + * + * ```js + * import process from 'process'; + * + * // How to properly set the exit code while letting + * // the process exit gracefully. + * if (someConditionNotMet()) { + * printUsageToStdout(); + * process.exitCode = 1; + * } + * ``` + * + * If it is necessary to terminate the Node.js process due to an error condition, + * throwing an _uncaught_ error and allowing the process to terminate accordingly + * is safer than calling `process.exit()`. + * + * In `Worker` threads, this function stops the current thread rather + * than the current process. + * @since v0.1.13 + * @param [code=0] The exit code. + */ + exit(code?: number): never; + /** + * A number which will be the process exit code, when the process either + * exits gracefully, or is exited via {@link exit} without specifying + * a code. + * + * Specifying a code to {@link exit} will override any + * previous setting of `process.exitCode`. + * @since v0.11.8 + */ + exitCode?: number | undefined; + /** + * The `process.getgid()` method returns the numerical group identity of the + * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getgid) { + * console.log(`Current gid: ${process.getgid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.31 + */ + getgid?: () => number; + /** + * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a + * numeric ID or a group name + * string. If a group name is specified, this method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getgid && process.setgid) { + * console.log(`Current gid: ${process.getgid()}`); + * try { + * process.setgid(501); + * console.log(`New gid: ${process.getgid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.31 + * @param id The group name or ID + */ + setgid?: (id: number | string) => void; + /** + * The `process.getuid()` method returns the numeric user identity of the process. + * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getuid) { + * console.log(`Current uid: ${process.getuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.28 + */ + getuid?: () => number; + /** + * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a + * numeric ID or a username string. + * If a username is specified, the method blocks while resolving the associated + * numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getuid && process.setuid) { + * console.log(`Current uid: ${process.getuid()}`); + * try { + * process.setuid(501); + * console.log(`New uid: ${process.getuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.28 + */ + setuid?: (id: number | string) => void; + /** + * The `process.geteuid()` method returns the numerical effective user identity of + * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.geteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + geteuid?: () => number; + /** + * The `process.seteuid()` method sets the effective user identity of the process. + * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username + * string. If a username is specified, the method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.geteuid && process.seteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * try { + * process.seteuid(501); + * console.log(`New uid: ${process.geteuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A user name or ID + */ + seteuid?: (id: number | string) => void; + /** + * The `process.getegid()` method returns the numerical effective group identity + * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getegid) { + * console.log(`Current gid: ${process.getegid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + getegid?: () => number; + /** + * The `process.setegid()` method sets the effective group identity of the process. + * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group + * name string. If a group name is specified, this method blocks while resolving + * the associated a numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getegid && process.setegid) { + * console.log(`Current gid: ${process.getegid()}`); + * try { + * process.setegid(501); + * console.log(`New gid: ${process.getegid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A group name or ID + */ + setegid?: (id: number | string) => void; + /** + * The `process.getgroups()` method returns an array with the supplementary group + * IDs. POSIX leaves it unspecified if the effective group ID is included but + * Node.js ensures it always is. + * + * ```js + * import process from 'process'; + * + * if (process.getgroups) { + * console.log(process.getgroups()); // [ 16, 21, 297 ] + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.9.4 + */ + getgroups?: () => number[]; + /** + * The `process.setgroups()` method sets the supplementary group IDs for the + * Node.js process. This is a privileged operation that requires the Node.js + * process to have `root` or the `CAP_SETGID` capability. + * + * The `groups` array can contain numeric group IDs, group names, or both. + * + * ```js + * import process from 'process'; + * + * if (process.getgroups && process.setgroups) { + * try { + * process.setgroups([501]); + * console.log(process.getgroups()); // new groups + * } catch (err) { + * console.log(`Failed to set groups: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.9.4 + */ + setgroups?: (groups: ReadonlyArray) => void; + /** + * The `process.setUncaughtExceptionCaptureCallback()` function sets a function + * that will be invoked when an uncaught exception occurs, which will receive the + * exception value itself as its first argument. + * + * If such a function is set, the `'uncaughtException'` event will + * not be emitted. If `--abort-on-uncaught-exception` was passed from the + * command line or set through `v8.setFlagsFromString()`, the process will + * not abort. Actions configured to take place on exceptions such as report + * generations will be affected too + * + * To unset the capture function,`process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this + * method with a non-`null` argument while another capture function is set will + * throw an error. + * + * Using this function is mutually exclusive with using the deprecated `domain` built-in module. + * @since v9.3.0 + */ + setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; + /** + * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. + * @since v9.3.0 + */ + hasUncaughtExceptionCaptureCallback(): boolean; + /** + * The `process.version` property contains the Node.js version string. + * + * ```js + * import { version } from 'process'; + * + * console.log(`Version: ${version}`); + * // Version: v14.8.0 + * ``` + * + * To get the version string without the prepended _v_, use`process.versions.node`. + * @since v0.1.3 + */ + readonly version: string; + /** + * The `process.versions` property returns an object listing the version strings of + * Node.js and its dependencies. `process.versions.modules` indicates the current + * ABI version, which is increased whenever a C++ API changes. Node.js will refuse + * to load modules that were compiled against a different module ABI version. + * + * ```js + * import { versions } from 'process'; + * + * console.log(versions); + * ``` + * + * Will generate an object similar to: + * + * ```console + * { node: '11.13.0', + * v8: '7.0.276.38-node.18', + * uv: '1.27.0', + * zlib: '1.2.11', + * brotli: '1.0.7', + * ares: '1.15.0', + * modules: '67', + * nghttp2: '1.34.0', + * napi: '4', + * llhttp: '1.1.1', + * openssl: '1.1.1b', + * cldr: '34.0', + * icu: '63.1', + * tz: '2018e', + * unicode: '11.0' } + * ``` + * @since v0.2.0 + */ + readonly versions: ProcessVersions; + /** + * The `process.config` property returns an `Object` containing the JavaScript + * representation of the configure options used to compile the current Node.js + * executable. This is the same as the `config.gypi` file that was produced when + * running the `./configure` script. + * + * An example of the possible output looks like: + * + * ```js + * { + * target_defaults: + * { cflags: [], + * default_configuration: 'Release', + * defines: [], + * include_dirs: [], + * libraries: [] }, + * variables: + * { + * host_arch: 'x64', + * napi_build_version: 5, + * node_install_npm: 'true', + * node_prefix: '', + * node_shared_cares: 'false', + * node_shared_http_parser: 'false', + * node_shared_libuv: 'false', + * node_shared_zlib: 'false', + * node_use_dtrace: 'false', + * node_use_openssl: 'true', + * node_shared_openssl: 'false', + * strict_aliasing: 'true', + * target_arch: 'x64', + * v8_use_snapshot: 1 + * } + * } + * ``` + * + * The `process.config` property is **not** read-only and there are existing + * modules in the ecosystem that are known to extend, modify, or entirely replace + * the value of `process.config`. + * + * Modifying the `process.config` property, or any child-property of the`process.config` object has been deprecated. The `process.config` will be made + * read-only in a future release. + * @since v0.7.7 + */ + readonly config: ProcessConfig; + /** + * The `process.kill()` method sends the `signal` to the process identified by`pid`. + * + * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. + * + * This method will throw an error if the target `pid` does not exist. As a special + * case, a signal of `0` can be used to test for the existence of a process. + * Windows platforms will throw an error if the `pid` is used to kill a process + * group. + * + * Even though the name of this function is `process.kill()`, it is really just a + * signal sender, like the `kill` system call. The signal sent may do something + * other than kill the target process. + * + * ```js + * import process, { kill } from 'process'; + * + * process.on('SIGHUP', () => { + * console.log('Got SIGHUP signal.'); + * }); + * + * setTimeout(() => { + * console.log('Exiting.'); + * process.exit(0); + * }, 100); + * + * kill(process.pid, 'SIGHUP'); + * ``` + * + * When `SIGUSR1` is received by a Node.js process, Node.js will start the + * debugger. See `Signal Events`. + * @since v0.0.6 + * @param pid A process ID + * @param [signal='SIGTERM'] The signal to send, either as a string or number. + */ + kill(pid: number, signal?: string | number): true; + /** + * The `process.pid` property returns the PID of the process. + * + * ```js + * import { pid } from 'process'; + * + * console.log(`This process is pid ${pid}`); + * ``` + * @since v0.1.15 + */ + readonly pid: number; + /** + * The `process.ppid` property returns the PID of the parent of the + * current process. + * + * ```js + * import { ppid } from 'process'; + * + * console.log(`The parent process is pid ${ppid}`); + * ``` + * @since v9.2.0, v8.10.0, v6.13.0 + */ + readonly ppid: number; + /** + * The `process.title` property returns the current process title (i.e. returns + * the current value of `ps`). Assigning a new value to `process.title` modifies + * the current value of `ps`. + * + * When a new value is assigned, different platforms will impose different maximum + * length restrictions on the title. Usually such restrictions are quite limited. + * For instance, on Linux and macOS, `process.title` is limited to the size of the + * binary name plus the length of the command-line arguments because setting the`process.title` overwrites the `argv` memory of the process. Node.js v0.8 + * allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure) + * cases. + * + * Assigning a value to `process.title` might not result in an accurate label + * within process manager applications such as macOS Activity Monitor or Windows + * Services Manager. + * @since v0.1.104 + */ + title: string; + /** + * The operating system CPU architecture for which the Node.js binary was compiled. + * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`. + * + * ```js + * import { arch } from 'process'; + * + * console.log(`This processor architecture is ${arch}`); + * ``` + * @since v0.5.0 + */ + readonly arch: Architecture; + /** + * The `process.platform` property returns a string identifying the operating + * system platform for which the Node.js binary was compiled. + * + * Currently possible values are: + * + * * `'aix'` + * * `'darwin'` + * * `'freebsd'` + * * `'linux'` + * * `'openbsd'` + * * `'sunos'` + * * `'win32'` + * + * ```js + * import { platform } from 'process'; + * + * console.log(`This platform is ${platform}`); + * ``` + * + * The value `'android'` may also be returned if the Node.js is built on the + * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.1.16 + */ + readonly platform: Platform; + /** + * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at + * runtime, `require.main` may still refer to the original main module in + * modules that were required before the change occurred. Generally, it's + * safe to assume that the two refer to the same module. + * + * As with `require.main`, `process.mainModule` will be `undefined` if there + * is no entry script. + * @since v0.1.17 + * @deprecated Since v14.0.0 - Use `main` instead. + */ + mainModule?: Module | undefined; + memoryUsage: MemoryUsageFn; + /** + * The `process.cpuUsage()` method returns the user and system CPU time usage of + * the current process, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). These values measure time + * spent in user and system code respectively, and may end up being greater than + * actual elapsed time if multiple CPU cores are performing work for this process. + * + * The result of a previous call to `process.cpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * + * ```js + * import { cpuUsage } from 'process'; + * + * const startUsage = cpuUsage(); + * // { user: 38579, system: 6986 } + * + * // spin the CPU for 500 milliseconds + * const now = Date.now(); + * while (Date.now() - now < 500); + * + * console.log(cpuUsage(startUsage)); + * // { user: 514883, system: 11226 } + * ``` + * @since v6.1.0 + * @param previousValue A previous return value from calling `process.cpuUsage()` + */ + cpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * `process.nextTick()` adds `callback` to the "next tick queue". This queue is + * fully drained after the current operation on the JavaScript stack runs to + * completion and before the event loop is allowed to continue. It's possible to + * create an infinite loop if one were to recursively call `process.nextTick()`. + * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. + * + * ```js + * import { nextTick } from 'process'; + * + * console.log('start'); + * nextTick(() => { + * console.log('nextTick callback'); + * }); + * console.log('scheduled'); + * // Output: + * // start + * // scheduled + * // nextTick callback + * ``` + * + * This is important when developing APIs in order to give users the opportunity + * to assign event handlers _after_ an object has been constructed but before any + * I/O has occurred: + * + * ```js + * import { nextTick } from 'process'; + * + * function MyThing(options) { + * this.setupOptions(options); + * + * nextTick(() => { + * this.startDoingStuff(); + * }); + * } + * + * const thing = new MyThing(); + * thing.getReadyForStuff(); + * + * // thing.startDoingStuff() gets called now, not before. + * ``` + * + * It is very important for APIs to be either 100% synchronous or 100% + * asynchronous. Consider this example: + * + * ```js + * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! + * function maybeSync(arg, cb) { + * if (arg) { + * cb(); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * + * This API is hazardous because in the following case: + * + * ```js + * const maybeTrue = Math.random() > 0.5; + * + * maybeSync(maybeTrue, () => { + * foo(); + * }); + * + * bar(); + * ``` + * + * It is not clear whether `foo()` or `bar()` will be called first. + * + * The following approach is much better: + * + * ```js + * import { nextTick } from 'process'; + * + * function definitelyAsync(arg, cb) { + * if (arg) { + * nextTick(cb); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * @since v0.1.26 + * @param args Additional arguments to pass when invoking the `callback` + */ + nextTick(callback: Function, ...args: any[]): void; + /** + * The `process.release` property returns an `Object` containing metadata related + * to the current release, including URLs for the source tarball and headers-only + * tarball. + * + * `process.release` contains the following properties: + * + * ```js + * { + * name: 'node', + * lts: 'Erbium', + * sourceUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1.tar.gz', + * headersUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1-headers.tar.gz', + * libUrl: 'https://nodejs.org/download/release/v12.18.1/win-x64/node.lib' + * } + * ``` + * + * In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be + * relied upon to exist. + * @since v3.0.0 + */ + readonly release: ProcessRelease; + features: { + inspector: boolean; + debug: boolean; + uv: boolean; + ipv6: boolean; + tls_alpn: boolean; + tls_sni: boolean; + tls_ocsp: boolean; + tls: boolean; + }; + /** + * `process.umask()` returns the Node.js process's file mode creation mask. Child + * processes inherit the mask from the parent process. + * @since v0.1.19 + * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential * + * security vulnerability. There is no safe, cross-platform alternative API. + */ + umask(): number; + /** + * Can only be set if not in worker thread. + */ + umask(mask: string | number): number; + /** + * The `process.uptime()` method returns the number of seconds the current Node.js + * process has been running. + * + * The return value includes fractions of a second. Use `Math.floor()` to get whole + * seconds. + * @since v0.5.0 + */ + uptime(): number; + hrtime: HRTime; + /** + * If Node.js is spawned with an IPC channel, the `process.send()` method can be + * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. + * + * If Node.js was not spawned with an IPC channel, `process.send` will be`undefined`. + * + * The message goes through serialization and parsing. The resulting message might + * not be the same as what is originally sent. + * @since v0.5.9 + * @param options used to parameterize the sending of certain types of handles.`options` supports the following properties: + */ + send?( + message: any, + sendHandle?: any, + options?: { + swallowErrors?: boolean | undefined; + }, + callback?: (error: Error | null) => void + ): boolean; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the + * IPC channel to the parent process, allowing the child process to exit gracefully + * once there are no other connections keeping it alive. + * + * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. + * + * If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`. + * @since v0.7.2 + */ + disconnect(): void; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return`true` so long as the IPC + * channel is connected and will return `false` after`process.disconnect()` is called. + * + * Once `process.connected` is `false`, it is no longer possible to send messages + * over the IPC channel using `process.send()`. + * @since v0.7.2 + */ + connected: boolean; + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. + * + * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag + * representations. `process.allowedNodeEnvironmentFlags.has()` will + * return `true` in the following cases: + * + * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`. + * * Flags passed through to V8 (as listed in `--v8-options`) may replace + * one or more _non-leading_ dashes for an underscore, or vice-versa; + * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, + * etc. + * * Flags may contain one or more equals (`=`) characters; all + * characters after and including the first equals will be ignored; + * e.g., `--stack-trace-limit=100`. + * * Flags _must_ be allowable within `NODE_OPTIONS`. + * + * When iterating over `process.allowedNodeEnvironmentFlags`, flags will + * appear only _once_; each will begin with one or more dashes. Flags + * passed through to V8 will contain underscores instead of non-leading + * dashes: + * + * ```js + * import { allowedNodeEnvironmentFlags } from 'process'; + * + * allowedNodeEnvironmentFlags.forEach((flag) => { + * // -r + * // --inspect-brk + * // --abort_on_uncaught_exception + * // ... + * }); + * ``` + * + * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail + * silently. + * + * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will + * contain what _would have_ been allowable. + * @since v10.10.0 + */ + allowedNodeEnvironmentFlags: ReadonlySet; + /** + * `process.report` is an object whose methods are used to generate diagnostic + * reports for the current process. Additional documentation is available in the `report documentation`. + * @since v11.8.0 + */ + report?: ProcessReport | undefined; + /** + * ```js + * import { resourceUsage } from 'process'; + * + * console.log(resourceUsage()); + * /* + * Will output: + * { + * userCPUTime: 82872, + * systemCPUTime: 4143, + * maxRSS: 33164, + * sharedMemorySize: 0, + * unsharedDataSize: 0, + * unsharedStackSize: 0, + * minorPageFault: 2469, + * majorPageFault: 0, + * swappedOut: 0, + * fsRead: 0, + * fsWrite: 8, + * ipcSent: 0, + * ipcReceived: 0, + * signalsCount: 0, + * voluntaryContextSwitches: 79, + * involuntaryContextSwitches: 1 + * } + * + * ``` + * @since v12.6.0 + * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. + */ + resourceUsage(): ResourceUsage; + /** + * The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the + * documentation for the `'warning' event` and the `emitWarning() method` for more information about this + * flag's behavior. + * @since v0.8.0 + */ + traceDeprecation: boolean; + /* EventEmitter */ + addListener(event: 'beforeExit', listener: BeforeExitListener): this; + addListener(event: 'disconnect', listener: DisconnectListener): this; + addListener(event: 'exit', listener: ExitListener): this; + addListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + addListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + addListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + addListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + addListener(event: 'warning', listener: WarningListener): this; + addListener(event: 'message', listener: MessageListener): this; + addListener(event: Signals, listener: SignalsListener): this; + addListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + addListener(event: 'worker', listener: WorkerListener): this; + emit(event: 'beforeExit', code: number): boolean; + emit(event: 'disconnect'): boolean; + emit(event: 'exit', code: number): boolean; + emit(event: 'rejectionHandled', promise: Promise): boolean; + emit(event: 'uncaughtException', error: Error): boolean; + emit(event: 'uncaughtExceptionMonitor', error: Error): boolean; + emit(event: 'unhandledRejection', reason: unknown, promise: Promise): boolean; + emit(event: 'warning', warning: Error): boolean; + emit(event: 'message', message: unknown, sendHandle: unknown): this; + emit(event: Signals, signal?: Signals): boolean; + emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise, value: unknown): this; + emit(event: 'worker', listener: WorkerListener): this; + on(event: 'beforeExit', listener: BeforeExitListener): this; + on(event: 'disconnect', listener: DisconnectListener): this; + on(event: 'exit', listener: ExitListener): this; + on(event: 'rejectionHandled', listener: RejectionHandledListener): this; + on(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + on(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + on(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + on(event: 'warning', listener: WarningListener): this; + on(event: 'message', listener: MessageListener): this; + on(event: Signals, listener: SignalsListener): this; + on(event: 'multipleResolves', listener: MultipleResolveListener): this; + on(event: 'worker', listener: WorkerListener): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'beforeExit', listener: BeforeExitListener): this; + once(event: 'disconnect', listener: DisconnectListener): this; + once(event: 'exit', listener: ExitListener): this; + once(event: 'rejectionHandled', listener: RejectionHandledListener): this; + once(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + once(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + once(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + once(event: 'warning', listener: WarningListener): this; + once(event: 'message', listener: MessageListener): this; + once(event: Signals, listener: SignalsListener): this; + once(event: 'multipleResolves', listener: MultipleResolveListener): this; + once(event: 'worker', listener: WorkerListener): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'beforeExit', listener: BeforeExitListener): this; + prependListener(event: 'disconnect', listener: DisconnectListener): this; + prependListener(event: 'exit', listener: ExitListener): this; + prependListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + prependListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + prependListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + prependListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + prependListener(event: 'warning', listener: WarningListener): this; + prependListener(event: 'message', listener: MessageListener): this; + prependListener(event: Signals, listener: SignalsListener): this; + prependListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + prependListener(event: 'worker', listener: WorkerListener): this; + prependOnceListener(event: 'beforeExit', listener: BeforeExitListener): this; + prependOnceListener(event: 'disconnect', listener: DisconnectListener): this; + prependOnceListener(event: 'exit', listener: ExitListener): this; + prependOnceListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + prependOnceListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + prependOnceListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + prependOnceListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + prependOnceListener(event: 'warning', listener: WarningListener): this; + prependOnceListener(event: 'message', listener: MessageListener): this; + prependOnceListener(event: Signals, listener: SignalsListener): this; + prependOnceListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + prependOnceListener(event: 'worker', listener: WorkerListener): this; + listeners(event: 'beforeExit'): BeforeExitListener[]; + listeners(event: 'disconnect'): DisconnectListener[]; + listeners(event: 'exit'): ExitListener[]; + listeners(event: 'rejectionHandled'): RejectionHandledListener[]; + listeners(event: 'uncaughtException'): UncaughtExceptionListener[]; + listeners(event: 'uncaughtExceptionMonitor'): UncaughtExceptionListener[]; + listeners(event: 'unhandledRejection'): UnhandledRejectionListener[]; + listeners(event: 'warning'): WarningListener[]; + listeners(event: 'message'): MessageListener[]; + listeners(event: Signals): SignalsListener[]; + listeners(event: 'multipleResolves'): MultipleResolveListener[]; + listeners(event: 'worker'): WorkerListener[]; + } + } + } + export = process; +} +declare module 'node:process' { + import process = require('process'); + export = process; +} diff --git a/node_modules/@types/node/ts4.8/punycode.d.ts b/node_modules/@types/node/ts4.8/punycode.d.ts new file mode 100644 index 0000000..87ebbb9 --- /dev/null +++ b/node_modules/@types/node/ts4.8/punycode.d.ts @@ -0,0 +1,117 @@ +/** + * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users + * currently depending on the `punycode` module should switch to using the + * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL + * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`. + * + * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It + * can be accessed using: + * + * ```js + * const punycode = require('punycode'); + * ``` + * + * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is + * primarily intended for use in Internationalized Domain Names. Because host + * names in URLs are limited to ASCII characters only, Domain Names that contain + * non-ASCII characters must be converted into ASCII using the Punycode scheme. + * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent + * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`. + * + * The `punycode` module provides a simple implementation of the Punycode standard. + * + * The `punycode` module is a third-party dependency used by Node.js and + * made available to developers as a convenience. Fixes or other modifications to + * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. + * @deprecated Since v7.0.0 - Deprecated + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/punycode.js) + */ +declare module 'punycode' { + /** + * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only + * characters to the equivalent string of Unicode codepoints. + * + * ```js + * punycode.decode('maana-pta'); // 'mañana' + * punycode.decode('--dqo34k'); // '☃-⌘' + * ``` + * @since v0.5.1 + */ + function decode(string: string): string; + /** + * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. + * + * ```js + * punycode.encode('mañana'); // 'maana-pta' + * punycode.encode('☃-⌘'); // '--dqo34k' + * ``` + * @since v0.5.1 + */ + function encode(string: string): string; + /** + * The `punycode.toUnicode()` method converts a string representing a domain name + * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be + * converted. + * + * ```js + * // decode domain names + * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' + * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' + * punycode.toUnicode('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toUnicode(domain: string): string; + /** + * The `punycode.toASCII()` method converts a Unicode string representing an + * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the + * domain name will be converted. Calling `punycode.toASCII()` on a string that + * already only contains ASCII characters will have no effect. + * + * ```js + * // encode domain names + * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' + * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' + * punycode.toASCII('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toASCII(domain: string): string; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const ucs2: ucs2; + interface ucs2 { + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + decode(string: string): number[]; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + encode(codePoints: ReadonlyArray): string; + } + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const version: string; +} +declare module 'node:punycode' { + export * from 'punycode'; +} diff --git a/node_modules/@types/node/ts4.8/querystring.d.ts b/node_modules/@types/node/ts4.8/querystring.d.ts new file mode 100644 index 0000000..e118547 --- /dev/null +++ b/node_modules/@types/node/ts4.8/querystring.d.ts @@ -0,0 +1,131 @@ +/** + * The `querystring` module provides utilities for parsing and formatting URL + * query strings. It can be accessed using: + * + * ```js + * const querystring = require('querystring'); + * ``` + * + * `querystring` is more performant than `URLSearchParams` but is not a + * standardized API. Use `URLSearchParams` when performance is not critical + * or when compatibility with browser code is desirable. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js) + */ +declare module 'querystring' { + interface StringifyOptions { + encodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParseOptions { + maxKeys?: number | undefined; + decodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParsedUrlQuery extends NodeJS.Dict {} + interface ParsedUrlQueryInput extends NodeJS.Dict | ReadonlyArray | ReadonlyArray | null> {} + /** + * The `querystring.stringify()` method produces a URL query string from a + * given `obj` by iterating through the object's "own properties". + * + * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | + * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to + * empty strings. + * + * ```js + * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); + * // Returns 'foo=bar&baz=qux&baz=quux&corge=' + * + * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); + * // Returns 'foo:bar;baz:qux' + * ``` + * + * By default, characters requiring percent-encoding within the query string will + * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkEncodeURIComponent function already exists, + * + * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, + * { encodeURIComponent: gbkEncodeURIComponent }); + * ``` + * @since v0.1.25 + * @param obj The object to serialize into a URL query string + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + /** + * The `querystring.parse()` method parses a URL query string (`str`) into a + * collection of key and value pairs. + * + * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: + * + * ```js + * { + * foo: 'bar', + * abc: ['xyz', '123'] + * } + * ``` + * + * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * By default, percent-encoded characters within the query string will be assumed + * to use UTF-8 encoding. If an alternative character encoding is used, then an + * alternative `decodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkDecodeURIComponent function already exists... + * + * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, + * { decodeURIComponent: gbkDecodeURIComponent }); + * ``` + * @since v0.1.25 + * @param str The URL query string to parse + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + /** + * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL + * query strings. + * + * The `querystring.escape()` method is used by `querystring.stringify()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement percent-encoding implementation if + * necessary by assigning `querystring.escape` to an alternative function. + * @since v0.1.25 + */ + function escape(str: string): string; + /** + * The `querystring.unescape()` method performs decoding of URL percent-encoded + * characters on the given `str`. + * + * The `querystring.unescape()` method is used by `querystring.parse()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement decoding implementation if + * necessary by assigning `querystring.unescape` to an alternative function. + * + * By default, the `querystring.unescape()` method will attempt to use the + * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, + * a safer equivalent that does not throw on malformed URLs will be used. + * @since v0.1.25 + */ + function unescape(str: string): string; +} +declare module 'node:querystring' { + export * from 'querystring'; +} diff --git a/node_modules/@types/node/ts4.8/readline.d.ts b/node_modules/@types/node/ts4.8/readline.d.ts new file mode 100644 index 0000000..6ab64ac --- /dev/null +++ b/node_modules/@types/node/ts4.8/readline.d.ts @@ -0,0 +1,653 @@ +/** + * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time. + * + * To use the promise-based APIs: + * + * ```js + * import * as readline from 'node:readline/promises'; + * ``` + * + * To use the callback and sync APIs: + * + * ```js + * import * as readline from 'node:readline'; + * ``` + * + * The following simple example illustrates the basic use of the `readline` module. + * + * ```js + * import * as readline from 'node:readline/promises'; + * import { stdin as input, stdout as output } from 'node:process'; + * + * const rl = readline.createInterface({ input, output }); + * + * const answer = await rl.question('What do you think of Node.js? '); + * + * console.log(`Thank you for your valuable feedback: ${answer}`); + * + * rl.close(); + * ``` + * + * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be + * received on the `input` stream. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline.js) + */ +declare module 'readline' { + import { Abortable, EventEmitter } from 'node:events'; + import * as promises from 'node:readline/promises'; + + export { promises }; + export interface Key { + sequence?: string | undefined; + name?: string | undefined; + ctrl?: boolean | undefined; + meta?: boolean | undefined; + shift?: boolean | undefined; + } + /** + * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a + * single `input` `Readable` stream and a single `output` `Writable` stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v0.1.104 + */ + export class Interface extends EventEmitter { + readonly terminal: boolean; + /** + * The current input data being processed by node. + * + * This can be used when collecting input from a TTY stream to retrieve the + * current value that has been processed thus far, prior to the `line` event + * being emitted. Once the `line` event has been emitted, this property will + * be an empty string. + * + * Be aware that modifying the value during the instance runtime may have + * unintended consequences if `rl.cursor` is not also controlled. + * + * **If not using a TTY stream for input, use the `'line'` event.** + * + * One possible use case would be as follows: + * + * ```js + * const values = ['lorem ipsum', 'dolor sit amet']; + * const rl = readline.createInterface(process.stdin); + * const showResults = debounce(() => { + * console.log( + * '\n', + * values.filter((val) => val.startsWith(rl.line)).join(' ') + * ); + * }, 300); + * process.stdin.on('keypress', (c, k) => { + * showResults(); + * }); + * ``` + * @since v0.1.98 + */ + readonly line: string; + /** + * The cursor position relative to `rl.line`. + * + * This will track where the current cursor lands in the input string, when + * reading input from a TTY stream. The position of cursor determines the + * portion of the input string that will be modified as input is processed, + * as well as the column where the terminal caret will be rendered. + * @since v0.1.98 + */ + readonly cursor: number; + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(options: ReadLineOptions); + /** + * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + * @since v15.3.0 + * @return the current prompt string + */ + getPrompt(): string; + /** + * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called. + * @since v0.1.98 + */ + setPrompt(prompt: string): void; + /** + * The `rl.prompt()` method writes the `readline.Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new + * location at which to provide input. + * + * When called, `rl.prompt()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the prompt is not written. + * @since v0.1.98 + * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. + */ + prompt(preserveCursor?: boolean): void; + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `query` is not written. + * + * The `callback` function passed to `rl.question()` does not follow the typical + * pattern of accepting an `Error` object or `null` as the first argument. + * The `callback` is called with the provided answer as the only argument. + * + * Example usage: + * + * ```js + * rl.question('What is your favorite food? ', (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * ``` + * + * Using an `AbortController` to cancel a question. + * + * ```js + * const ac = new AbortController(); + * const signal = ac.signal; + * + * rl.question('What is your favorite food? ', { signal }, (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * setTimeout(() => ac.abort(), 10000); + * ``` + * + * If this method is invoked as it's util.promisify()ed version, it returns a + * Promise that fulfills with the answer. If the question is canceled using + * an `AbortController` it will reject with an `AbortError`. + * + * ```js + * const util = require('util'); + * const question = util.promisify(rl.question).bind(rl); + * + * async function questionExample() { + * try { + * const answer = await question('What is you favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * } catch (err) { + * console.error('Question rejected', err); + * } + * } + * questionExample(); + * ``` + * @since v0.3.3 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @param callback A callback function that is invoked with the user's input in response to the `query`. + */ + question(query: string, callback: (answer: string) => void): void; + question(query: string, options: Abortable, callback: (answer: string) => void): void; + /** + * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed + * later if necessary. + * + * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `readline.Interface` instance. + * @since v0.3.4 + */ + pause(): this; + /** + * The `rl.resume()` method resumes the `input` stream if it has been paused. + * @since v0.3.4 + */ + resume(): this; + /** + * The `rl.close()` method closes the `readline.Interface` instance and + * relinquishes control over the `input` and `output` streams. When called, + * the `'close'` event will be emitted. + * + * Calling `rl.close()` does not immediately stop other events (including `'line'`) + * from being emitted by the `readline.Interface` instance. + * @since v0.1.98 + */ + close(): void; + /** + * The `rl.write()` method will write either `data` or a key sequence identified + * by `key` to the `output`. The `key` argument is supported only if `output` is + * a `TTY` text terminal. See `TTY keybindings` for a list of key + * combinations. + * + * If `key` is specified, `data` is ignored. + * + * When called, `rl.write()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written. + * + * ```js + * rl.write('Delete this!'); + * // Simulate Ctrl+U to delete the line written previously + * rl.write(null, { ctrl: true, name: 'u' }); + * ``` + * + * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_. + * @since v0.1.98 + */ + write(data: string | Buffer, key?: Key): void; + write(data: undefined | null | string | Buffer, key: Key): void; + /** + * Returns the real position of the cursor in relation to the input + * prompt + string. Long input (wrapping) strings, as well as multiple + * line prompts are included in the calculations. + * @since v13.5.0, v12.16.0 + */ + getCursorPos(): CursorPos; + /** + * events.EventEmitter + * 1. close + * 2. line + * 3. pause + * 4. resume + * 5. SIGCONT + * 6. SIGINT + * 7. SIGTSTP + * 8. history + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'line', listener: (input: string) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: 'SIGCONT', listener: () => void): this; + addListener(event: 'SIGINT', listener: () => void): this; + addListener(event: 'SIGTSTP', listener: () => void): this; + addListener(event: 'history', listener: (history: string[]) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'line', input: string): boolean; + emit(event: 'pause'): boolean; + emit(event: 'resume'): boolean; + emit(event: 'SIGCONT'): boolean; + emit(event: 'SIGINT'): boolean; + emit(event: 'SIGTSTP'): boolean; + emit(event: 'history', history: string[]): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'line', listener: (input: string) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: 'SIGCONT', listener: () => void): this; + on(event: 'SIGINT', listener: () => void): this; + on(event: 'SIGTSTP', listener: () => void): this; + on(event: 'history', listener: (history: string[]) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'line', listener: (input: string) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: 'SIGCONT', listener: () => void): this; + once(event: 'SIGINT', listener: () => void): this; + once(event: 'SIGTSTP', listener: () => void): this; + once(event: 'history', listener: (history: string[]) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'line', listener: (input: string) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: 'SIGCONT', listener: () => void): this; + prependListener(event: 'SIGINT', listener: () => void): this; + prependListener(event: 'SIGTSTP', listener: () => void): this; + prependListener(event: 'history', listener: (history: string[]) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'line', listener: (input: string) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: 'SIGCONT', listener: () => void): this; + prependOnceListener(event: 'SIGINT', listener: () => void): this; + prependOnceListener(event: 'SIGTSTP', listener: () => void): this; + prependOnceListener(event: 'history', listener: (history: string[]) => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + export type ReadLine = Interface; // type forwarded for backwards compatibility + export type Completer = (line: string) => CompleterResult; + export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void; + export type CompleterResult = [string[], string]; + export interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream | undefined; + completer?: Completer | AsyncCompleter | undefined; + terminal?: boolean | undefined; + /** + * Initial list of history lines. This option makes sense + * only if `terminal` is set to `true` by the user or by an internal `output` + * check, otherwise the history caching mechanism is not initialized at all. + * @default [] + */ + history?: string[] | undefined; + historySize?: number | undefined; + prompt?: string | undefined; + crlfDelay?: number | undefined; + /** + * If `true`, when a new input line added + * to the history list duplicates an older one, this removes the older line + * from the list. + * @default false + */ + removeHistoryDuplicates?: boolean | undefined; + escapeCodeTimeout?: number | undefined; + tabSize?: number | undefined; + } + /** + * The `readline.createInterface()` method creates a new `readline.Interface`instance. + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout + * }); + * ``` + * + * Once the `readline.Interface` instance is created, the most common case is to + * listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * + * When creating a `readline.Interface` using `stdin` as input, the program + * will not terminate until it receives `EOF` (Ctrl+D on + * Linux/macOS, Ctrl+Z followed by Return on + * Windows). + * If you want your application to exit without waiting for user input, you can `unref()` the standard input stream: + * + * ```js + * process.stdin.unref(); + * ``` + * @since v0.1.98 + */ + export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; + export function createInterface(options: ReadLineOptions): Interface; + /** + * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. + * + * Optionally, `interface` specifies a `readline.Interface` instance for which + * autocompletion is disabled when copy-pasted input is detected. + * + * If the `stream` is a `TTY`, then it must be in raw mode. + * + * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop + * the `input` from emitting `'keypress'` events. + * + * ```js + * readline.emitKeypressEvents(process.stdin); + * if (process.stdin.isTTY) + * process.stdin.setRawMode(true); + * ``` + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ' + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * const { once } = require('events'); + * const { createReadStream } = require('fs'); + * const { createInterface } = require('readline'); + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + */ + export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; + export type Direction = -1 | 0 | 1; + export interface CursorPos { + rows: number; + cols: number; + } + /** + * The `readline.clearLine()` method clears current line of given `TTY` stream + * in a specified direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; + /** + * The `readline.clearScreenDown()` method clears the given `TTY` stream from + * the current position of the cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; + /** + * The `readline.cursorTo()` method moves cursor to the specified position in a + * given `TTY` `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; + /** + * The `readline.moveCursor()` method moves the cursor _relative_ to its current + * position in a given `TTY` `stream`. + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ' + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * const { once } = require('events'); + * const { createReadStream } = require('fs'); + * const { createInterface } = require('readline'); + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; +} +declare module 'node:readline' { + export * from 'readline'; +} diff --git a/node_modules/@types/node/ts4.8/readline/promises.d.ts b/node_modules/@types/node/ts4.8/readline/promises.d.ts new file mode 100644 index 0000000..8f9f06f --- /dev/null +++ b/node_modules/@types/node/ts4.8/readline/promises.d.ts @@ -0,0 +1,143 @@ +/** + * The `readline/promise` module provides an API for reading lines of input from a Readable stream one line at a time. + * + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline/promises.js) + * @since v17.0.0 + */ +declare module 'readline/promises' { + import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline'; + import { Abortable } from 'node:events'; + + class Interface extends _Interface { + /** + * The rl.question() method displays the query by writing it to the output, waits for user input to be provided on input, + * then invokes the callback function passing the provided input as the first argument. + * + * When called, rl.question() will resume the input stream if it has been paused. + * + * If the readlinePromises.Interface was created with output set to null or undefined the query is not written. + * + * If the question is called after rl.close(), it returns a rejected promise. + * + * Example usage: + * + * ```js + * const answer = await rl.question('What is your favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * + * Using an AbortSignal to cancel a question. + * + * ```js + * const signal = AbortSignal.timeout(10_000); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * const answer = await rl.question('What is your favorite food? ', { signal }); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * + * @since v17.0.0 + * @param query A statement or query to write to output, prepended to the prompt. + */ + question(query: string): Promise; + question(query: string, options: Abortable): Promise; + } + + class Readline { + /** + * @param stream A TTY stream. + */ + constructor(stream: NodeJS.WritableStream, options?: { autoCommit?: boolean }); + /** + * The `rl.clearLine()` method adds to the internal list of pending action an action that clears current line of the associated `stream` in a specified direction identified by `dir`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + */ + clearLine(dir: Direction): this; + /** + * The `rl.clearScreenDown()` method adds to the internal list of pending action an action that clears the associated `stream` from the current position of the cursor down. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + */ + clearScreenDown(): this; + /** + * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. + */ + commit(): Promise; + /** + * The `rl.cursorTo()` method adds to the internal list of pending action an action that moves cursor to the specified position in the associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + */ + cursorTo(x: number, y?: number): this; + /** + * The `rl.moveCursor()` method adds to the internal list of pending action an action that moves the cursor relative to its current position in the associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless autoCommit: true was passed to the constructor. + */ + moveCursor(dx: number, dy: number): this; + /** + * The `rl.rollback()` method clears the internal list of pending actions without sending it to the associated `stream`. + */ + rollback(): this; + } + + /** + * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. + * + * ```js + * const readlinePromises = require('node:readline/promises'); + * const rl = readlinePromises.createInterface({ + * input: process.stdin, + * output: process.stdout + * }); + * ``` + * + * Once the `readlinePromises.Interface` instance is created, the most common case is to listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get the best compatibility if it defines an `output.columns` property, + * and emits a `'resize'` event on the `output`, if or when the columns ever change (`process.stdout` does this automatically when it is a TTY). + * + * ## Use of the `completer` function + * + * The `completer` function takes the current line entered by the user as an argument, and returns an `Array` with 2 entries: + * + * - An Array with matching entries for the completion. + * - The substring that was used for the matching. + * + * For instance: `[[substr1, substr2, ...], originalsubstring]`. + * + * ```js + * function completer(line) { + * const completions = '.help .error .exit .quit .q'.split(' '); + * const hits = completions.filter((c) => c.startsWith(line)); + * // Show all completions if none found + * return [hits.length ? hits : completions, line]; + * } + * ``` + * + * The `completer` function can also returns a `Promise`, or be asynchronous: + * + * ```js + * async function completer(linePartial) { + * await someAsyncWork(); + * return [['123'], linePartial]; + * } + * ``` + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; +} +declare module 'node:readline/promises' { + export * from 'readline/promises'; +} diff --git a/node_modules/@types/node/ts4.8/repl.d.ts b/node_modules/@types/node/ts4.8/repl.d.ts new file mode 100644 index 0000000..be42ccc --- /dev/null +++ b/node_modules/@types/node/ts4.8/repl.d.ts @@ -0,0 +1,424 @@ +/** + * The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that + * is available both as a standalone program or includible in other applications. + * It can be accessed using: + * + * ```js + * const repl = require('repl'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/repl.js) + */ +declare module 'repl' { + import { Interface, Completer, AsyncCompleter } from 'node:readline'; + import { Context } from 'node:vm'; + import { InspectOptions } from 'node:util'; + interface ReplOptions { + /** + * The input prompt to display. + * @default "> " + */ + prompt?: string | undefined; + /** + * The `Readable` stream from which REPL input will be read. + * @default process.stdin + */ + input?: NodeJS.ReadableStream | undefined; + /** + * The `Writable` stream to which REPL output will be written. + * @default process.stdout + */ + output?: NodeJS.WritableStream | undefined; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean | undefined; + /** + * The function to be used when evaluating each given line of input. + * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions + */ + eval?: REPLEval | undefined; + /** + * Defines if the repl prints output previews or not. + * @default `true` Always `false` in case `terminal` is falsy. + */ + preview?: boolean | undefined; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * Default: the REPL instance's `terminal` value. + */ + useColors?: boolean | undefined; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * Default: `false`. + */ + useGlobal?: boolean | undefined; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * Default: `false`. + */ + ignoreUndefined?: boolean | undefined; + /** + * The function to invoke to format the output of each command before writing to `output`. + * Default: a wrapper for `util.inspect`. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter | undefined; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * Default: `false`. + */ + breakEvalOnSigint?: boolean | undefined; + } + type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { + options: InspectOptions; + }; + type REPLCommandAction = (this: REPLServer, text: string) => void; + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string | undefined; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + /** + * Instances of `repl.REPLServer` are created using the {@link start} method + * or directly using the JavaScript `new` keyword. + * + * ```js + * const repl = require('repl'); + * + * const options = { useColors: true }; + * + * const firstInstance = repl.start(options); + * const secondInstance = new repl.REPLServer(options); + * ``` + * @since v0.1.91 + */ + class REPLServer extends Interface { + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * @deprecated since v14.3.0 - Use `input` instead. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * @deprecated since v14.3.0 - Use `output` instead. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly input: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly output: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: NodeJS.ReadOnlyDict; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + /** + * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands + * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following + * properties: + * + * The following example shows two new commands added to the REPL instance: + * + * ```js + * const repl = require('repl'); + * + * const replServer = repl.start({ prompt: '> ' }); + * replServer.defineCommand('sayhello', { + * help: 'Say hello', + * action(name) { + * this.clearBufferedCommand(); + * console.log(`Hello, ${name}!`); + * this.displayPrompt(); + * } + * }); + * replServer.defineCommand('saybye', function saybye() { + * console.log('Goodbye!'); + * this.close(); + * }); + * ``` + * + * The new commands can then be used from within the REPL instance: + * + * ```console + * > .sayhello Node.js User + * Hello, Node.js User! + * > .saybye + * Goodbye! + * ``` + * @since v0.3.0 + * @param keyword The command keyword (_without_ a leading `.` character). + * @param cmd The function to invoke when the command is processed. + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * The `replServer.displayPrompt()` method readies the REPL instance for input + * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input. + * + * When multi-line input is being entered, an ellipsis is printed rather than the + * 'prompt'. + * + * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. + * + * The `replServer.displayPrompt` method is primarily intended to be called from + * within the action function for commands registered using the`replServer.defineCommand()` method. + * @since v0.1.91 + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * The `replServer.clearBufferedCommand()` method clears any command that has been + * buffered but not yet executed. This method is primarily intended to be + * called from within the action function for commands registered using the`replServer.defineCommand()` method. + * @since v9.0.0 + */ + clearBufferedCommand(): void; + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command-line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @since v11.10.0 + * @param historyPath the path to the history file + * @param callback called when history writes are ready or upon error + */ + setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void; + /** + * events.EventEmitter + * 1. close - inherited from `readline.Interface` + * 2. line - inherited from `readline.Interface` + * 3. pause - inherited from `readline.Interface` + * 4. resume - inherited from `readline.Interface` + * 5. SIGCONT - inherited from `readline.Interface` + * 6. SIGINT - inherited from `readline.Interface` + * 7. SIGTSTP - inherited from `readline.Interface` + * 8. exit + * 9. reset + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'line', listener: (input: string) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: 'SIGCONT', listener: () => void): this; + addListener(event: 'SIGINT', listener: () => void): this; + addListener(event: 'SIGTSTP', listener: () => void): this; + addListener(event: 'exit', listener: () => void): this; + addListener(event: 'reset', listener: (context: Context) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'line', input: string): boolean; + emit(event: 'pause'): boolean; + emit(event: 'resume'): boolean; + emit(event: 'SIGCONT'): boolean; + emit(event: 'SIGINT'): boolean; + emit(event: 'SIGTSTP'): boolean; + emit(event: 'exit'): boolean; + emit(event: 'reset', context: Context): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'line', listener: (input: string) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: 'SIGCONT', listener: () => void): this; + on(event: 'SIGINT', listener: () => void): this; + on(event: 'SIGTSTP', listener: () => void): this; + on(event: 'exit', listener: () => void): this; + on(event: 'reset', listener: (context: Context) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'line', listener: (input: string) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: 'SIGCONT', listener: () => void): this; + once(event: 'SIGINT', listener: () => void): this; + once(event: 'SIGTSTP', listener: () => void): this; + once(event: 'exit', listener: () => void): this; + once(event: 'reset', listener: (context: Context) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'line', listener: (input: string) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: 'SIGCONT', listener: () => void): this; + prependListener(event: 'SIGINT', listener: () => void): this; + prependListener(event: 'SIGTSTP', listener: () => void): this; + prependListener(event: 'exit', listener: () => void): this; + prependListener(event: 'reset', listener: (context: Context) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'line', listener: (input: string) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: 'SIGCONT', listener: () => void): this; + prependOnceListener(event: 'SIGINT', listener: () => void): this; + prependOnceListener(event: 'SIGTSTP', listener: () => void): this; + prependOnceListener(event: 'exit', listener: () => void): this; + prependOnceListener(event: 'reset', listener: (context: Context) => void): this; + } + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + const REPL_MODE_SLOPPY: unique symbol; + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + const REPL_MODE_STRICT: unique symbol; + /** + * The `repl.start()` method creates and starts a {@link REPLServer} instance. + * + * If `options` is a string, then it specifies the input prompt: + * + * ```js + * const repl = require('repl'); + * + * // a Unix style prompt + * repl.start('$ '); + * ``` + * @since v0.1.91 + */ + function start(options?: string | ReplOptions): REPLServer; + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + constructor(err: Error); + } +} +declare module 'node:repl' { + export * from 'repl'; +} diff --git a/node_modules/@types/node/ts4.8/stream.d.ts b/node_modules/@types/node/ts4.8/stream.d.ts new file mode 100644 index 0000000..a0df689 --- /dev/null +++ b/node_modules/@types/node/ts4.8/stream.d.ts @@ -0,0 +1,1340 @@ +/** + * A stream is an abstract interface for working with streaming data in Node.js. + * The `stream` module provides an API for implementing the stream interface. + * + * There are many stream objects provided by Node.js. For instance, a `request to an HTTP server` and `process.stdout` are both stream instances. + * + * Streams can be readable, writable, or both. All streams are instances of `EventEmitter`. + * + * To access the `stream` module: + * + * ```js + * const stream = require('stream'); + * ``` + * + * The `stream` module is useful for creating new types of stream instances. It is + * usually not necessary to use the `stream` module to consume streams. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/stream.js) + */ +declare module 'stream' { + import { EventEmitter, Abortable } from 'node:events'; + import { Blob as NodeBlob } from "node:buffer"; + import * as streamPromises from 'node:stream/promises'; + import * as streamConsumers from 'node:stream/consumers'; + import * as streamWeb from 'node:stream/web'; + class internal extends EventEmitter { + pipe( + destination: T, + options?: { + end?: boolean | undefined; + } + ): T; + } + namespace internal { + class Stream extends internal { + constructor(opts?: ReadableOptions); + } + interface StreamOptions extends Abortable { + emitClose?: boolean | undefined; + highWaterMark?: number | undefined; + objectMode?: boolean | undefined; + construct?(this: T, callback: (error?: Error | null) => void): void; + destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean | undefined; + } + interface ReadableOptions extends StreamOptions { + encoding?: BufferEncoding | undefined; + read?(this: Readable, size: number): void; + } + /** + * @since v0.9.4 + */ + class Readable extends Stream implements NodeJS.ReadableStream { + /** + * A utility method for creating Readable Streams out of iterators. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + /** + * A utility method for creating a `Readable` from a web `ReadableStream`. + * @since v17.0.0 + * @experimental + */ + static fromWeb(readableStream: streamWeb.ReadableStream, options?: Pick): Readable; + /** + * Returns whether the stream has been read from or cancelled. + * @since v16.8.0 + */ + static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean; + /** + * A utility method for creating a web `ReadableStream` from a `Readable`. + * @since v17.0.0 + * @experimental + */ + static toWeb(streamReadable: Readable): streamWeb.ReadableStream; + /** + * Returns whether the stream was destroyed or errored before emitting `'end'`. + * @since v16.8.0 + * @experimental + */ + readonly readableAborted: boolean; + /** + * Is `true` if it is safe to call `readable.read()`, which means + * the stream has not been destroyed or emitted `'error'` or `'end'`. + * @since v11.4.0 + */ + readable: boolean; + /** + * Returns whether `'data'` has been emitted. + * @since v16.7.0, v14.18.0 + * @experimental + */ + readonly readableDidRead: boolean; + /** + * Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method. + * @since v12.7.0 + */ + readonly readableEncoding: BufferEncoding | null; + /** + * Becomes `true` when `'end'` event is emitted. + * @since v12.9.0 + */ + readonly readableEnded: boolean; + /** + * This property reflects the current state of a `Readable` stream as described + * in the `Three states` section. + * @since v9.4.0 + */ + readonly readableFlowing: boolean | null; + /** + * Returns the value of `highWaterMark` passed when creating this `Readable`. + * @since v9.3.0 + */ + readonly readableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be read. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly readableLength: number; + /** + * Getter for the property `objectMode` of a given `Readable` stream. + * @since v12.3.0 + */ + readonly readableObjectMode: boolean; + /** + * Is `true` after `readable.destroy()` has been called. + * @since v18.0.0 + */ + destroyed: boolean; + /** + * Is true after 'close' has been emitted. + * @since v8.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + constructor(opts?: ReadableOptions); + _construct?(callback: (error?: Error | null) => void): void; + _read(size: number): void; + /** + * The `readable.read()` method reads data out of the internal buffer and + * returns it. If no data is available to be read, `null` is returned. By default, + * the data is returned as a `Buffer` object unless an encoding has been + * specified using the `readable.setEncoding()` method or the stream is operating + * in object mode. + * + * The optional `size` argument specifies a specific number of bytes to read. If`size` bytes are not available to be read, `null` will be returned _unless_the stream has ended, in which + * case all of the data remaining in the internal + * buffer will be returned. + * + * If the `size` argument is not specified, all of the data contained in the + * internal buffer will be returned. + * + * The `size` argument must be less than or equal to 1 GiB. + * + * The `readable.read()` method should only be called on `Readable` streams + * operating in paused mode. In flowing mode, `readable.read()` is called + * automatically until the internal buffer is fully drained. + * + * ```js + * const readable = getReadableStreamSomehow(); + * + * // 'readable' may be triggered multiple times as data is buffered in + * readable.on('readable', () => { + * let chunk; + * console.log('Stream is readable (new data received in buffer)'); + * // Use a loop to make sure we read all currently available data + * while (null !== (chunk = readable.read())) { + * console.log(`Read ${chunk.length} bytes of data...`); + * } + * }); + * + * // 'end' will be triggered once when there is no more data available + * readable.on('end', () => { + * console.log('Reached end of stream.'); + * }); + * ``` + * + * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks + * are not concatenated. A `while` loop is necessary to consume all data + * currently in the buffer. When reading a large file `.read()` may return `null`, + * having consumed all buffered content so far, but there is still more data to + * come not yet buffered. In this case a new `'readable'` event will be emitted + * when there is more data in the buffer. Finally the `'end'` event will be + * emitted when there is no more data to come. + * + * Therefore to read a file's whole contents from a `readable`, it is necessary + * to collect chunks across multiple `'readable'` events: + * + * ```js + * const chunks = []; + * + * readable.on('readable', () => { + * let chunk; + * while (null !== (chunk = readable.read())) { + * chunks.push(chunk); + * } + * }); + * + * readable.on('end', () => { + * const content = chunks.join(''); + * }); + * ``` + * + * A `Readable` stream in object mode will always return a single item from + * a call to `readable.read(size)`, regardless of the value of the`size` argument. + * + * If the `readable.read()` method returns a chunk of data, a `'data'` event will + * also be emitted. + * + * Calling {@link read} after the `'end'` event has + * been emitted will return `null`. No runtime error will be raised. + * @since v0.9.4 + * @param size Optional argument to specify how much data to read. + */ + read(size?: number): any; + /** + * The `readable.setEncoding()` method sets the character encoding for + * data read from the `Readable` stream. + * + * By default, no encoding is assigned and stream data will be returned as`Buffer` objects. Setting an encoding causes the stream data + * to be returned as strings of the specified encoding rather than as `Buffer`objects. For instance, calling `readable.setEncoding('utf8')` will cause the + * output data to be interpreted as UTF-8 data, and passed as strings. Calling`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal + * string format. + * + * The `Readable` stream will properly handle multi-byte characters delivered + * through the stream that would otherwise become improperly decoded if simply + * pulled from the stream as `Buffer` objects. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.setEncoding('utf8'); + * readable.on('data', (chunk) => { + * assert.equal(typeof chunk, 'string'); + * console.log('Got %d characters of string data:', chunk.length); + * }); + * ``` + * @since v0.9.4 + * @param encoding The encoding to use. + */ + setEncoding(encoding: BufferEncoding): this; + /** + * The `readable.pause()` method will cause a stream in flowing mode to stop + * emitting `'data'` events, switching out of flowing mode. Any data that + * becomes available will remain in the internal buffer. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.on('data', (chunk) => { + * console.log(`Received ${chunk.length} bytes of data.`); + * readable.pause(); + * console.log('There will be no additional data for 1 second.'); + * setTimeout(() => { + * console.log('Now data will start flowing again.'); + * readable.resume(); + * }, 1000); + * }); + * ``` + * + * The `readable.pause()` method has no effect if there is a `'readable'`event listener. + * @since v0.9.4 + */ + pause(): this; + /** + * The `readable.resume()` method causes an explicitly paused `Readable` stream to + * resume emitting `'data'` events, switching the stream into flowing mode. + * + * The `readable.resume()` method can be used to fully consume the data from a + * stream without actually processing any of that data: + * + * ```js + * getReadableStreamSomehow() + * .resume() + * .on('end', () => { + * console.log('Reached the end, but did not read anything.'); + * }); + * ``` + * + * The `readable.resume()` method has no effect if there is a `'readable'`event listener. + * @since v0.9.4 + */ + resume(): this; + /** + * The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most + * typical cases, there will be no reason to + * use this method directly. + * + * ```js + * const readable = new stream.Readable(); + * + * readable.isPaused(); // === false + * readable.pause(); + * readable.isPaused(); // === true + * readable.resume(); + * readable.isPaused(); // === false + * ``` + * @since v0.11.14 + */ + isPaused(): boolean; + /** + * The `readable.unpipe()` method detaches a `Writable` stream previously attached + * using the {@link pipe} method. + * + * If the `destination` is not specified, then _all_ pipes are detached. + * + * If the `destination` is specified, but no pipe is set up for it, then + * the method does nothing. + * + * ```js + * const fs = require('fs'); + * const readable = getReadableStreamSomehow(); + * const writable = fs.createWriteStream('file.txt'); + * // All the data from readable goes into 'file.txt', + * // but only for the first second. + * readable.pipe(writable); + * setTimeout(() => { + * console.log('Stop writing to file.txt.'); + * readable.unpipe(writable); + * console.log('Manually close the file stream.'); + * writable.end(); + * }, 1000); + * ``` + * @since v0.9.4 + * @param destination Optional specific stream to unpipe + */ + unpipe(destination?: NodeJS.WritableStream): this; + /** + * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the + * same as `readable.push(null)`, after which no more data can be written. The EOF + * signal is put at the end of the buffer and any buffered data will still be + * flushed. + * + * The `readable.unshift()` method pushes a chunk of data back into the internal + * buffer. This is useful in certain situations where a stream is being consumed by + * code that needs to "un-consume" some amount of data that it has optimistically + * pulled out of the source, so that the data can be passed on to some other party. + * + * The `stream.unshift(chunk)` method cannot be called after the `'end'` event + * has been emitted or a runtime error will be thrown. + * + * Developers using `stream.unshift()` often should consider switching to + * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. + * + * ```js + * // Pull off a header delimited by \n\n. + * // Use unshift() if we get too much. + * // Call the callback with (error, header, stream). + * const { StringDecoder } = require('string_decoder'); + * function parseHeader(stream, callback) { + * stream.on('error', callback); + * stream.on('readable', onReadable); + * const decoder = new StringDecoder('utf8'); + * let header = ''; + * function onReadable() { + * let chunk; + * while (null !== (chunk = stream.read())) { + * const str = decoder.write(chunk); + * if (str.includes('\n\n')) { + * // Found the header boundary. + * const split = str.split(/\n\n/); + * header += split.shift(); + * const remaining = split.join('\n\n'); + * const buf = Buffer.from(remaining, 'utf8'); + * stream.removeListener('error', callback); + * // Remove the 'readable' listener before unshifting. + * stream.removeListener('readable', onReadable); + * if (buf.length) + * stream.unshift(buf); + * // Now the body of the message can be read from the stream. + * callback(null, header, stream); + * return; + * } + * // Still reading the header. + * header += str; + * } + * } + * } + * ``` + * + * Unlike {@link push}, `stream.unshift(chunk)` will not + * end the reading process by resetting the internal reading state of the stream. + * This can cause unexpected results if `readable.unshift()` is called during a + * read (i.e. from within a {@link _read} implementation on a + * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, + * however it is best to simply avoid calling `readable.unshift()` while in the + * process of performing a read. + * @since v0.9.11 + * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array` or `null`. For object mode + * streams, `chunk` may be any JavaScript value. + * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. + */ + unshift(chunk: any, encoding?: BufferEncoding): void; + /** + * Prior to Node.js 0.10, streams did not implement the entire `stream` module API + * as it is currently defined. (See `Compatibility` for more information.) + * + * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the`readable.wrap()` method can be used to create a `Readable` + * stream that uses + * the old stream as its data source. + * + * It will rarely be necessary to use `readable.wrap()` but the method has been + * provided as a convenience for interacting with older Node.js applications and + * libraries. + * + * ```js + * const { OldReader } = require('./old-api-module.js'); + * const { Readable } = require('stream'); + * const oreader = new OldReader(); + * const myReader = new Readable().wrap(oreader); + * + * myReader.on('readable', () => { + * myReader.read(); // etc. + * }); + * ``` + * @since v0.9.4 + * @param stream An "old style" readable stream + */ + wrap(stream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: BufferEncoding): boolean; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable + * stream will release any internal resources and subsequent calls to `push()`will be ignored. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, but instead implement `readable._destroy()`. + * @since v8.0.0 + * @param error Error which will be passed as payload in `'error'` event + */ + destroy(error?: Error): this; + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. error + * 5. pause + * 6. readable + * 7. resume + */ + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: any) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: any): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'pause'): boolean; + emit(event: 'readable'): boolean; + emit(event: 'resume'): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: any) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: any) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: any) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: any) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: 'close', listener: () => void): this; + removeListener(event: 'data', listener: (chunk: any) => void): this; + removeListener(event: 'end', listener: () => void): this; + removeListener(event: 'error', listener: (err: Error) => void): this; + removeListener(event: 'pause', listener: () => void): this; + removeListener(event: 'readable', listener: () => void): this; + removeListener(event: 'resume', listener: () => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + interface WritableOptions extends StreamOptions { + decodeStrings?: boolean | undefined; + defaultEncoding?: BufferEncoding | undefined; + write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + writev?( + this: Writable, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + final?(this: Writable, callback: (error?: Error | null) => void): void; + } + /** + * @since v0.9.4 + */ + class Writable extends Stream implements NodeJS.WritableStream { + /** + * A utility method for creating a `Writable` from a web `WritableStream`. + * @since v17.0.0 + * @experimental + */ + static fromWeb(writableStream: streamWeb.WritableStream, options?: Pick): Writable; + /** + * A utility method for creating a web `WritableStream` from a `Writable`. + * @since v17.0.0 + * @experimental + */ + static toWeb(streamWritable: Writable): streamWeb.WritableStream; + /** + * Is `true` if it is safe to call `writable.write()`, which means + * the stream has not been destroyed, errored or ended. + * @since v11.4.0 + */ + readonly writable: boolean; + /** + * Is `true` after `writable.end()` has been called. This property + * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. + * @since v12.9.0 + */ + readonly writableEnded: boolean; + /** + * Is set to `true` immediately before the `'finish'` event is emitted. + * @since v12.6.0 + */ + readonly writableFinished: boolean; + /** + * Return the value of `highWaterMark` passed when creating this `Writable`. + * @since v9.3.0 + */ + readonly writableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be written. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly writableLength: number; + /** + * Getter for the property `objectMode` of a given `Writable` stream. + * @since v12.3.0 + */ + readonly writableObjectMode: boolean; + /** + * Number of times `writable.uncork()` needs to be + * called in order to fully uncork the stream. + * @since v13.2.0, v12.16.0 + */ + readonly writableCorked: number; + /** + * Is `true` after `writable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is true after 'close' has been emitted. + * @since v8.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + /** + * Is `true` if the stream's buffer has been full and stream will emit 'drain'. + * @since v15.2.0, v14.17.0 + */ + readonly writableNeedDrain: boolean; + constructor(opts?: WritableOptions); + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + _construct?(callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + /** + * The `writable.write()` method writes some data to the stream, and calls the + * supplied `callback` once the data has been fully handled. If an error + * occurs, the `callback` will be called with the error as its + * first argument. The `callback` is called asynchronously and before `'error'` is + * emitted. + * + * The return value is `true` if the internal buffer is less than the`highWaterMark` configured when the stream was created after admitting `chunk`. + * If `false` is returned, further attempts to write data to the stream should + * stop until the `'drain'` event is emitted. + * + * While a stream is not draining, calls to `write()` will buffer `chunk`, and + * return false. Once all currently buffered chunks are drained (accepted for + * delivery by the operating system), the `'drain'` event will be emitted. + * Once `write()` returns false, do not write more chunks + * until the `'drain'` event is emitted. While calling `write()` on a stream that + * is not draining is allowed, Node.js will buffer all written chunks until + * maximum memory usage occurs, at which point it will abort unconditionally. + * Even before it aborts, high memory usage will cause poor garbage collector + * performance and high RSS (which is not typically released back to the system, + * even after the memory is no longer required). Since TCP sockets may never + * drain if the remote peer does not read the data, writing a socket that is + * not draining may lead to a remotely exploitable vulnerability. + * + * Writing data while the stream is not draining is particularly + * problematic for a `Transform`, because the `Transform` streams are paused + * by default until they are piped or a `'data'` or `'readable'` event handler + * is added. + * + * If the data to be written can be generated or fetched on demand, it is + * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is + * possible to respect backpressure and avoid memory issues using the `'drain'` event: + * + * ```js + * function write(data, cb) { + * if (!stream.write(data)) { + * stream.once('drain', cb); + * } else { + * process.nextTick(cb); + * } + * } + * + * // Wait for cb to be called before doing any other write. + * write('hello', () => { + * console.log('Write completed, do more writes now.'); + * }); + * ``` + * + * A `Writable` stream in object mode will always ignore the `encoding` argument. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any + * JavaScript value other than `null`. + * @param [encoding='utf8'] The encoding, if `chunk` is a string. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; + /** + * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. + * @since v0.11.15 + * @param encoding The new default encoding + */ + setDefaultEncoding(encoding: BufferEncoding): this; + /** + * Calling the `writable.end()` method signals that no more data will be written + * to the `Writable`. The optional `chunk` and `encoding` arguments allow one + * final additional chunk of data to be written immediately before closing the + * stream. + * + * Calling the {@link write} method after calling {@link end} will raise an error. + * + * ```js + * // Write 'hello, ' and then end with 'world!'. + * const fs = require('fs'); + * const file = fs.createWriteStream('example.txt'); + * file.write('hello, '); + * file.end('world!'); + * // Writing more now is not allowed! + * ``` + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any + * JavaScript value other than `null`. + * @param encoding The encoding if `chunk` is a string + * @param callback Callback for when the stream is finished. + */ + end(cb?: () => void): this; + end(chunk: any, cb?: () => void): this; + end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; + /** + * The `writable.cork()` method forces all written data to be buffered in memory. + * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. + * + * The primary intent of `writable.cork()` is to accommodate a situation in which + * several small chunks are written to the stream in rapid succession. Instead of + * immediately forwarding them to the underlying destination, `writable.cork()`buffers all the chunks until `writable.uncork()` is called, which will pass them + * all to `writable._writev()`, if present. This prevents a head-of-line blocking + * situation where data is being buffered while waiting for the first small chunk + * to be processed. However, use of `writable.cork()` without implementing`writable._writev()` may have an adverse effect on throughput. + * + * See also: `writable.uncork()`, `writable._writev()`. + * @since v0.11.2 + */ + cork(): void; + /** + * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. + * + * When using `writable.cork()` and `writable.uncork()` to manage the buffering + * of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event + * loop phase. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.write('data '); + * process.nextTick(() => stream.uncork()); + * ``` + * + * If the `writable.cork()` method is called multiple times on a stream, the + * same number of calls to `writable.uncork()` must be called to flush the buffered + * data. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.cork(); + * stream.write('data '); + * process.nextTick(() => { + * stream.uncork(); + * // The data will not be flushed until uncork() is called a second time. + * stream.uncork(); + * }); + * ``` + * + * See also: `writable.cork()`. + * @since v0.11.2 + */ + uncork(): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the writable + * stream has ended and subsequent calls to `write()` or `end()` will result in + * an `ERR_STREAM_DESTROYED` error. + * This is a destructive and immediate way to destroy a stream. Previous calls to`write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. + * Use `end()` instead of destroy if data should flush before close, or wait for + * the `'drain'` event before destroying the stream. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, + * but instead implement `writable._destroy()`. + * @since v8.0.0 + * @param error Optional, an error to emit with `'error'` event. + */ + destroy(error?: Error): this; + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + */ + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: Readable) => void): this; + addListener(event: 'unpipe', listener: (src: Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'close'): boolean; + emit(event: 'drain'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'pipe', src: Readable): boolean; + emit(event: 'unpipe', src: Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: Readable) => void): this; + on(event: 'unpipe', listener: (src: Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: Readable) => void): this; + once(event: 'unpipe', listener: (src: Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: 'close', listener: () => void): this; + removeListener(event: 'drain', listener: () => void): this; + removeListener(event: 'error', listener: (err: Error) => void): this; + removeListener(event: 'finish', listener: () => void): this; + removeListener(event: 'pipe', listener: (src: Readable) => void): this; + removeListener(event: 'unpipe', listener: (src: Readable) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean | undefined; + readableObjectMode?: boolean | undefined; + writableObjectMode?: boolean | undefined; + readableHighWaterMark?: number | undefined; + writableHighWaterMark?: number | undefined; + writableCorked?: number | undefined; + construct?(this: Duplex, callback: (error?: Error | null) => void): void; + read?(this: Duplex, size: number): void; + write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + writev?( + this: Duplex, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + final?(this: Duplex, callback: (error?: Error | null) => void): void; + destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void; + } + /** + * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Duplex` streams include: + * + * * `TCP sockets` + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Duplex extends Readable implements Writable { + readonly writable: boolean; + readonly writableEnded: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + readonly writableObjectMode: boolean; + readonly writableCorked: number; + readonly writableNeedDrain: boolean; + readonly closed: boolean; + readonly errored: Error | null; + /** + * If `false` then the stream will automatically end the writable side when the + * readable side ends. Set initially by the `allowHalfOpen` constructor option, + * which defaults to `false`. + * + * This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is + * emitted. + * @since v0.9.4 + */ + allowHalfOpen: boolean; + constructor(opts?: DuplexOptions); + /** + * A utility method for creating duplex streams. + * + * - `Stream` converts writable stream into writable `Duplex` and readable stream + * to `Duplex`. + * - `Blob` converts into readable `Duplex`. + * - `string` converts into readable `Duplex`. + * - `ArrayBuffer` converts into readable `Duplex`. + * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. + * - `AsyncGeneratorFunction` converts into a readable/writable transform + * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * - `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined` + * - `Object ({ writable, readable })` converts `readable` and + * `writable` into `Stream` and then combines them into `Duplex` where the + * `Duplex` will write to the `writable` and read from the `readable`. + * - `Promise` converts into readable `Duplex`. Value `null` is ignored. + * + * @since v16.8.0 + */ + static from(src: Stream | NodeBlob | ArrayBuffer | string | Iterable | AsyncIterable | AsyncGeneratorFunction | Promise | Object): Duplex; + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + _destroy(error: Error | null, callback: (error: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: BufferEncoding): this; + end(cb?: () => void): this; + end(chunk: any, cb?: () => void): this; + end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this; + cork(): void; + uncork(): void; + } + type TransformCallback = (error?: Error | null, data?: any) => void; + interface TransformOptions extends DuplexOptions { + construct?(this: Transform, callback: (error?: Error | null) => void): void; + read?(this: Transform, size: number): void; + write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + writev?( + this: Transform, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + final?(this: Transform, callback: (error?: Error | null) => void): void; + destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void; + transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + flush?(this: Transform, callback: TransformCallback): void; + } + /** + * Transform streams are `Duplex` streams where the output is in some way + * related to the input. Like all `Duplex` streams, `Transform` streams + * implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Transform` streams include: + * + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Transform extends Duplex { + constructor(opts?: TransformOptions); + _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + /** + * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is + * primarily for examples and testing, but there are some use cases where`stream.PassThrough` is useful as a building block for novel sorts of streams. + */ + class PassThrough extends Transform {} + /** + * Attaches an AbortSignal to a readable or writeable stream. This lets code + * control stream destruction using an `AbortController`. + * + * Calling `abort` on the `AbortController` corresponding to the passed`AbortSignal` will behave the same way as calling `.destroy(new AbortError())`on the stream. + * + * ```js + * const fs = require('fs'); + * + * const controller = new AbortController(); + * const read = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')) + * ); + * // Later, abort the operation closing the stream + * controller.abort(); + * ``` + * + * Or using an `AbortSignal` with a readable stream as an async iterable: + * + * ```js + * const controller = new AbortController(); + * setTimeout(() => controller.abort(), 10_000); // set a timeout + * const stream = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')) + * ); + * (async () => { + * try { + * for await (const chunk of stream) { + * await process(chunk); + * } + * } catch (e) { + * if (e.name === 'AbortError') { + * // The operation was cancelled + * } else { + * throw e; + * } + * } + * })(); + * ``` + * @since v15.4.0 + * @param signal A signal representing possible cancellation + * @param stream a stream to attach a signal to + */ + function addAbortSignal(signal: AbortSignal, stream: T): T; + interface FinishedOptions extends Abortable { + error?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + } + /** + * A function to get notified when a stream is no longer readable, writable + * or has experienced an error or a premature close event. + * + * ```js + * const { finished } = require('stream'); + * + * const rs = fs.createReadStream('archive.tar'); + * + * finished(rs, (err) => { + * if (err) { + * console.error('Stream failed.', err); + * } else { + * console.log('Stream is done reading.'); + * } + * }); + * + * rs.resume(); // Drain the stream. + * ``` + * + * Especially useful in error handling scenarios where a stream is destroyed + * prematurely (like an aborted HTTP request), and will not emit `'end'`or `'finish'`. + * + * The `finished` API provides promise version: + * + * ```js + * const { finished } = require('stream/promises'); + * + * const rs = fs.createReadStream('archive.tar'); + * + * async function run() { + * await finished(rs); + * console.log('Stream is done reading.'); + * } + * + * run().catch(console.error); + * rs.resume(); // Drain the stream. + * ``` + * + * `stream.finished()` leaves dangling event listeners (in particular`'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been + * invoked. The reason for this is so that unexpected `'error'` events (due to + * incorrect stream implementations) do not cause unexpected crashes. + * If this is unwanted behavior then the returned cleanup function needs to be + * invoked in the callback: + * + * ```js + * const cleanup = finished(rs, (err) => { + * cleanup(); + * // ... + * }); + * ``` + * @since v10.0.0 + * @param stream A readable and/or writable stream. + * @param callback A callback function that takes an optional error argument. + * @return A cleanup function which removes all registered listeners. + */ + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; + namespace finished { + function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise; + } + type PipelineSourceFunction = () => Iterable | AsyncIterable; + type PipelineSource = Iterable | AsyncIterable | NodeJS.ReadableStream | PipelineSourceFunction; + type PipelineTransform, U> = + | NodeJS.ReadWriteStream + | ((source: S extends (...args: any[]) => Iterable | AsyncIterable ? AsyncIterable : S) => AsyncIterable); + type PipelineTransformSource = PipelineSource | PipelineTransform; + type PipelineDestinationIterableFunction = (source: AsyncIterable) => AsyncIterable; + type PipelineDestinationPromiseFunction = (source: AsyncIterable) => Promise

; + type PipelineDestination, P> = S extends PipelineTransformSource + ? NodeJS.WritableStream | PipelineDestinationIterableFunction | PipelineDestinationPromiseFunction + : never; + type PipelineCallback> = S extends PipelineDestinationPromiseFunction + ? (err: NodeJS.ErrnoException | null, value: P) => void + : (err: NodeJS.ErrnoException | null) => void; + type PipelinePromise> = S extends PipelineDestinationPromiseFunction ? Promise

: Promise; + interface PipelineOptions { + signal: AbortSignal; + } + /** + * A module method to pipe between streams and generators forwarding errors and + * properly cleaning up and provide a callback when the pipeline is complete. + * + * ```js + * const { pipeline } = require('stream'); + * const fs = require('fs'); + * const zlib = require('zlib'); + * + * // Use the pipeline API to easily pipe a series of streams + * // together and get notified when the pipeline is fully done. + * + * // A pipeline to gzip a potentially huge tar file efficiently: + * + * pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * (err) => { + * if (err) { + * console.error('Pipeline failed.', err); + * } else { + * console.log('Pipeline succeeded.'); + * } + * } + * ); + * ``` + * + * The `pipeline` API provides a promise version, which can also + * receive an options argument as the last parameter with a`signal` `AbortSignal` property. When the signal is aborted,`destroy` will be called on the underlying pipeline, with + * an`AbortError`. + * + * ```js + * const { pipeline } = require('stream/promises'); + * + * async function run() { + * await pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * To use an `AbortSignal`, pass it inside an options object, + * as the last argument: + * + * ```js + * const { pipeline } = require('stream/promises'); + * + * async function run() { + * const ac = new AbortController(); + * const signal = ac.signal; + * + * setTimeout(() => ac.abort(), 1); + * await pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * { signal }, + * ); + * } + * + * run().catch(console.error); // AbortError + * ``` + * + * The `pipeline` API also supports async generators: + * + * ```js + * const { pipeline } = require('stream/promises'); + * const fs = require('fs'); + * + * async function run() { + * await pipeline( + * fs.createReadStream('lowercase.txt'), + * async function* (source, { signal }) { + * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. + * for await (const chunk of source) { + * yield await processChunk(chunk, { signal }); + * } + * }, + * fs.createWriteStream('uppercase.txt') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * Remember to handle the `signal` argument passed into the async generator. + * Especially in the case where the async generator is the source for the + * pipeline (i.e. first argument) or the pipeline will never complete. + * + * ```js + * const { pipeline } = require('stream/promises'); + * const fs = require('fs'); + * + * async function run() { + * await pipeline( + * async function* ({ signal }) { + * await someLongRunningfn({ signal }); + * yield 'asd'; + * }, + * fs.createWriteStream('uppercase.txt') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: + * + * * `Readable` streams which have emitted `'end'` or `'close'`. + * * `Writable` streams which have emitted `'finish'` or `'close'`. + * + * `stream.pipeline()` leaves dangling event listeners on the streams + * after the `callback` has been invoked. In the case of reuse of streams after + * failure, this can cause event listener leaks and swallowed errors. If the last + * stream is readable, dangling event listeners will be removed so that the last + * stream can be consumed later. + * + * `stream.pipeline()` closes all the streams when an error is raised. + * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior + * once it would destroy the socket without sending the expected response. + * See the example below: + * + * ```js + * const fs = require('fs'); + * const http = require('http'); + * const { pipeline } = require('stream'); + * + * const server = http.createServer((req, res) => { + * const fileStream = fs.createReadStream('./fileNotExist.txt'); + * pipeline(fileStream, res, (err) => { + * if (err) { + * console.log(err); // No such file + * // this message can't be sent once `pipeline` already destroyed the socket + * return res.end('error!!!'); + * } + * }); + * }); + * ``` + * @since v10.0.0 + * @param callback Called when the pipeline is fully done. + */ + function pipeline, B extends PipelineDestination>( + source: A, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, callback?: PipelineCallback): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, callback?: PipelineCallback): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline( + streams: ReadonlyArray, + callback?: (err: NodeJS.ErrnoException | null) => void + ): NodeJS.WritableStream; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array void)> + ): NodeJS.WritableStream; + namespace pipeline { + function __promisify__, B extends PipelineDestination>(source: A, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function __promisify__, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__(streams: ReadonlyArray, options?: PipelineOptions): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array + ): Promise; + } + interface Pipe { + close(): void; + hasRef(): boolean; + ref(): void; + unref(): void; + } + + /** + * Returns whether the stream has encountered an error. + * @since v17.3.0 + */ + function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean; + + /** + * Returns whether the stream is readable. + * @since v17.4.0 + */ + function isReadable(stream: Readable | NodeJS.ReadableStream): boolean; + + const promises: typeof streamPromises; + const consumers: typeof streamConsumers; + } + export = internal; +} +declare module 'node:stream' { + import stream = require('stream'); + export = stream; +} diff --git a/node_modules/@types/node/ts4.8/stream/consumers.d.ts b/node_modules/@types/node/ts4.8/stream/consumers.d.ts new file mode 100644 index 0000000..1ebf12e --- /dev/null +++ b/node_modules/@types/node/ts4.8/stream/consumers.d.ts @@ -0,0 +1,12 @@ +declare module 'stream/consumers' { + import { Blob as NodeBlob } from "node:buffer"; + import { Readable } from 'node:stream'; + function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; +} +declare module 'node:stream/consumers' { + export * from 'stream/consumers'; +} diff --git a/node_modules/@types/node/ts4.8/stream/promises.d.ts b/node_modules/@types/node/ts4.8/stream/promises.d.ts new file mode 100644 index 0000000..b427073 --- /dev/null +++ b/node_modules/@types/node/ts4.8/stream/promises.d.ts @@ -0,0 +1,42 @@ +declare module 'stream/promises' { + import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream'; + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise; + function pipeline, B extends PipelineDestination>(source: A, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function pipeline, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline(streams: ReadonlyArray, options?: PipelineOptions): Promise; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array + ): Promise; +} +declare module 'node:stream/promises' { + export * from 'stream/promises'; +} diff --git a/node_modules/@types/node/ts4.8/stream/web.d.ts b/node_modules/@types/node/ts4.8/stream/web.d.ts new file mode 100644 index 0000000..f9ef057 --- /dev/null +++ b/node_modules/@types/node/ts4.8/stream/web.d.ts @@ -0,0 +1,330 @@ +declare module 'stream/web' { + // stub module, pending copy&paste from .d.ts or manual impl + // copy from lib.dom.d.ts + interface ReadableWritablePair { + readable: ReadableStream; + /** + * Provides a convenient, chainable way of piping this readable stream + * through a transform stream (or any other { writable, readable } + * pair). It simply pipes the stream into the writable side of the + * supplied pair, and returns the readable side for further use. + * + * Piping a stream will lock it for the duration of the pipe, preventing + * any other consumer from acquiring a reader. + */ + writable: WritableStream; + } + interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + /** + * Pipes this readable stream to a given writable stream destination. + * The way in which the piping process behaves under various error + * conditions can be customized with a number of passed options. It + * returns a promise that fulfills when the piping process completes + * successfully, or rejects if any errors were encountered. + * + * Piping a stream will lock it for the duration of the pipe, preventing + * any other consumer from acquiring a reader. + * + * Errors and closures of the source and destination streams propagate + * as follows: + * + * An error in this source readable stream will abort destination, + * unless preventAbort is truthy. The returned promise will be rejected + * with the source's error, or with any error that occurs during + * aborting the destination. + * + * An error in destination will cancel this source readable stream, + * unless preventCancel is truthy. The returned promise will be rejected + * with the destination's error, or with any error that occurs during + * canceling the source. + * + * When this source readable stream closes, destination will be closed, + * unless preventClose is truthy. The returned promise will be fulfilled + * once this process completes, unless an error is encountered while + * closing the destination, in which case it will be rejected with that + * error. + * + * If destination starts out closed or closing, this source readable + * stream will be canceled, unless preventCancel is true. The returned + * promise will be rejected with an error indicating piping to a closed + * stream failed, or with any error that occurs during canceling the + * source. + * + * The signal option can be set to an AbortSignal to allow aborting an + * ongoing pipe operation via the corresponding AbortController. In this + * case, this source readable stream will be canceled, and destination + * aborted, unless the respective options preventCancel or preventAbort + * are set. + */ + preventClose?: boolean; + signal?: AbortSignal; + } + interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; + } + interface ReadableStreamDefaultReadValueResult { + done: false; + value: T; + } + interface ReadableStreamDefaultReadDoneResult { + done: true; + value?: undefined; + } + type ReadableStreamController = ReadableStreamDefaultController; + type ReadableStreamDefaultReadResult = ReadableStreamDefaultReadValueResult | ReadableStreamDefaultReadDoneResult; + interface ReadableByteStreamControllerCallback { + (controller: ReadableByteStreamController): void | PromiseLike; + } + interface UnderlyingSinkAbortCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSinkCloseCallback { + (): void | PromiseLike; + } + interface UnderlyingSinkStartCallback { + (controller: WritableStreamDefaultController): any; + } + interface UnderlyingSinkWriteCallback { + (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; + } + interface UnderlyingSourceCancelCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSourcePullCallback { + (controller: ReadableStreamController): void | PromiseLike; + } + interface UnderlyingSourceStartCallback { + (controller: ReadableStreamController): any; + } + interface TransformerFlushCallback { + (controller: TransformStreamDefaultController): void | PromiseLike; + } + interface TransformerStartCallback { + (controller: TransformStreamDefaultController): any; + } + interface TransformerTransformCallback { + (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; + } + interface UnderlyingByteSource { + autoAllocateChunkSize?: number; + cancel?: ReadableStreamErrorCallback; + pull?: ReadableByteStreamControllerCallback; + start?: ReadableByteStreamControllerCallback; + type: 'bytes'; + } + interface UnderlyingSource { + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; + type?: undefined; + } + interface UnderlyingSink { + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; + type?: undefined; + write?: UnderlyingSinkWriteCallback; + } + interface ReadableStreamErrorCallback { + (reason: any): void | PromiseLike; + } + /** This Streams API interface represents a readable stream of byte data. */ + interface ReadableStream { + readonly locked: boolean; + cancel(reason?: any): Promise; + getReader(): ReadableStreamDefaultReader; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + tee(): [ReadableStream, ReadableStream]; + values(options?: { preventCancel?: boolean }): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + const ReadableStream: { + prototype: ReadableStream; + new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy): ReadableStream; + new (underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + }; + interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; + } + const ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new (stream: ReadableStream): ReadableStreamDefaultReader; + }; + const ReadableStreamBYOBReader: any; + const ReadableStreamBYOBRequest: any; + interface ReadableByteStreamController { + readonly byobRequest: undefined; + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: ArrayBufferView): void; + error(error?: any): void; + } + const ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new (): ReadableByteStreamController; + }; + interface ReadableStreamDefaultController { + readonly desiredSize: number | null; + close(): void; + enqueue(chunk?: R): void; + error(e?: any): void; + } + const ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new (): ReadableStreamDefaultController; + }; + interface Transformer { + flush?: TransformerFlushCallback; + readableType?: undefined; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; + writableType?: undefined; + } + interface TransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + const TransformStream: { + prototype: TransformStream; + new (transformer?: Transformer, writableStrategy?: QueuingStrategy, readableStrategy?: QueuingStrategy): TransformStream; + }; + interface TransformStreamDefaultController { + readonly desiredSize: number | null; + enqueue(chunk?: O): void; + error(reason?: any): void; + terminate(): void; + } + const TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new (): TransformStreamDefaultController; + }; + /** + * This Streams API interface provides a standard abstraction for writing + * streaming data to a destination, known as a sink. This object comes with + * built-in back pressure and queuing. + */ + interface WritableStream { + readonly locked: boolean; + abort(reason?: any): Promise; + close(): Promise; + getWriter(): WritableStreamDefaultWriter; + } + const WritableStream: { + prototype: WritableStream; + new (underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; + }; + /** + * This Streams API interface is the object returned by + * WritableStream.getWriter() and once created locks the < writer to the + * WritableStream ensuring that no other streams can write to the underlying + * sink. + */ + interface WritableStreamDefaultWriter { + readonly closed: Promise; + readonly desiredSize: number | null; + readonly ready: Promise; + abort(reason?: any): Promise; + close(): Promise; + releaseLock(): void; + write(chunk?: W): Promise; + } + const WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new (stream: WritableStream): WritableStreamDefaultWriter; + }; + /** + * This Streams API interface represents a controller allowing control of a + * WritableStream's state. When constructing a WritableStream, the + * underlying sink is given a corresponding WritableStreamDefaultController + * instance to manipulate. + */ + interface WritableStreamDefaultController { + error(e?: any): void; + } + const WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new (): WritableStreamDefaultController; + }; + interface QueuingStrategy { + highWaterMark?: number; + size?: QueuingStrategySize; + } + interface QueuingStrategySize { + (chunk?: T): number; + } + interface QueuingStrategyInit { + /** + * Creates a new ByteLengthQueuingStrategy with the provided high water + * mark. + * + * Note that the provided high water mark will not be validated ahead of + * time. Instead, if it is negative, NaN, or not a number, the resulting + * ByteLengthQueuingStrategy will cause the corresponding stream + * constructor to throw. + */ + highWaterMark: number; + } + /** + * This Streams API interface provides a built-in byte length queuing + * strategy that can be used when constructing streams. + */ + interface ByteLengthQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + const ByteLengthQueuingStrategy: { + prototype: ByteLengthQueuingStrategy; + new (init: QueuingStrategyInit): ByteLengthQueuingStrategy; + }; + /** + * This Streams API interface provides a built-in byte length queuing + * strategy that can be used when constructing streams. + */ + interface CountQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + const CountQueuingStrategy: { + prototype: CountQueuingStrategy; + new (init: QueuingStrategyInit): CountQueuingStrategy; + }; + interface TextEncoderStream { + /** Returns "utf-8". */ + readonly encoding: 'utf-8'; + readonly readable: ReadableStream; + readonly writable: WritableStream; + readonly [Symbol.toStringTag]: string; + } + const TextEncoderStream: { + prototype: TextEncoderStream; + new (): TextEncoderStream; + }; + interface TextDecoderOptions { + fatal?: boolean; + ignoreBOM?: boolean; + } + type BufferSource = ArrayBufferView | ArrayBuffer; + interface TextDecoderStream { + /** Returns encoding's name, lower cased. */ + readonly encoding: string; + /** Returns `true` if error mode is "fatal", and `false` otherwise. */ + readonly fatal: boolean; + /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */ + readonly ignoreBOM: boolean; + readonly readable: ReadableStream; + readonly writable: WritableStream; + readonly [Symbol.toStringTag]: string; + } + const TextDecoderStream: { + prototype: TextDecoderStream; + new (label?: string, options?: TextDecoderOptions): TextDecoderStream; + }; +} +declare module 'node:stream/web' { + export * from 'stream/web'; +} diff --git a/node_modules/@types/node/ts4.8/string_decoder.d.ts b/node_modules/@types/node/ts4.8/string_decoder.d.ts new file mode 100644 index 0000000..a585804 --- /dev/null +++ b/node_modules/@types/node/ts4.8/string_decoder.d.ts @@ -0,0 +1,67 @@ +/** + * The `string_decoder` module provides an API for decoding `Buffer` objects into + * strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 + * characters. It can be accessed using: + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * ``` + * + * The following example shows the basic use of the `StringDecoder` class. + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * const decoder = new StringDecoder('utf8'); + * + * const cent = Buffer.from([0xC2, 0xA2]); + * console.log(decoder.write(cent)); + * + * const euro = Buffer.from([0xE2, 0x82, 0xAC]); + * console.log(decoder.write(euro)); + * ``` + * + * When a `Buffer` instance is written to the `StringDecoder` instance, an + * internal buffer is used to ensure that the decoded string does not contain + * any incomplete multibyte characters. These are held in the buffer until the + * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. + * + * In the following example, the three UTF-8 encoded bytes of the European Euro + * symbol (`€`) are written over three separate operations: + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * const decoder = new StringDecoder('utf8'); + * + * decoder.write(Buffer.from([0xE2])); + * decoder.write(Buffer.from([0x82])); + * console.log(decoder.end(Buffer.from([0xAC]))); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/string_decoder.js) + */ +declare module 'string_decoder' { + class StringDecoder { + constructor(encoding?: BufferEncoding); + /** + * Returns a decoded string, ensuring that any incomplete multibyte characters at + * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the + * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`. + * @since v0.1.99 + * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode. + */ + write(buffer: Buffer): string; + /** + * Returns any remaining input stored in the internal buffer as a string. Bytes + * representing incomplete UTF-8 and UTF-16 characters will be replaced with + * substitution characters appropriate for the character encoding. + * + * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input. + * After `end()` is called, the `stringDecoder` object can be reused for new input. + * @since v0.9.3 + * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode. + */ + end(buffer?: Buffer): string; + } +} +declare module 'node:string_decoder' { + export * from 'string_decoder'; +} diff --git a/node_modules/@types/node/ts4.8/test.d.ts b/node_modules/@types/node/ts4.8/test.d.ts new file mode 100644 index 0000000..8e20710 --- /dev/null +++ b/node_modules/@types/node/ts4.8/test.d.ts @@ -0,0 +1,446 @@ +/** + * The `node:test` module provides a standalone testing module. + * @see [source](https://github.com/nodejs/node/blob/v18.x/lib/test.js) + */ +declare module 'node:test' { + /** + * Programmatically start the test runner. + * @since v18.9.0 + * @param options Configuration options for running tests. + * @returns A {@link TapStream} that emits events about the test execution. + */ + function run(options?: RunOptions): TapStream; + + /** + * The `test()` function is the value imported from the test module. Each invocation of this + * function results in the creation of a test point in the TAP output. + * + * The {@link TestContext} object passed to the fn argument can be used to perform actions + * related to the current test. Examples include skipping the test, adding additional TAP + * diagnostic information, or creating subtests. + * + * `test()` returns a {@link Promise} that resolves once the test completes. The return value + * can usually be discarded for top level tests. However, the return value from subtests should + * be used to prevent the parent test from finishing first and cancelling the subtest as shown + * in the following example. + * + * ```js + * test('top level test', async (t) => { + * // The setTimeout() in the following subtest would cause it to outlive its + * // parent test if 'await' is removed on the next line. Once the parent test + * // completes, it will cancel any outstanding subtests. + * await t.test('longer running subtest', async (t) => { + * return new Promise((resolve, reject) => { + * setTimeout(resolve, 1000); + * }); + * }); + * }); + * ``` + * @since v18.0.0 + * @param name The name of the test, which is displayed when reporting test results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the test + * @param fn The function under test. The first argument to this function is a + * {@link TestContext} object. If the test uses callbacks, the callback function is + * passed as the second argument. Default: A no-op function. + * @returns A {@link Promise} resolved with `undefined` once the test completes. + */ + function test(name?: string, fn?: TestFn): Promise; + function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function test(options?: TestOptions, fn?: TestFn): Promise; + function test(fn?: TestFn): Promise; + + /** + * @since v18.6.0 + * @param name The name of the suite, which is displayed when reporting suite results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the suite + * @param fn The function under suite. Default: A no-op function. + */ + function describe(name?: string, options?: TestOptions, fn?: SuiteFn): void; + function describe(name?: string, fn?: SuiteFn): void; + function describe(options?: TestOptions, fn?: SuiteFn): void; + function describe(fn?: SuiteFn): void; + namespace describe { + // Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`. + function skip(name?: string, options?: TestOptions, fn?: SuiteFn): void; + function skip(name?: string, fn?: SuiteFn): void; + function skip(options?: TestOptions, fn?: SuiteFn): void; + function skip(fn?: SuiteFn): void; + + // Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`. + function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void; + function todo(name?: string, fn?: SuiteFn): void; + function todo(options?: TestOptions, fn?: SuiteFn): void; + function todo(fn?: SuiteFn): void; + } + + /** + * @since v18.6.0 + * @param name The name of the test, which is displayed when reporting test results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the test + * @param fn The function under test. If the test uses callbacks, the callback function is + * passed as the second argument. Default: A no-op function. + */ + function it(name?: string, options?: TestOptions, fn?: ItFn): void; + function it(name?: string, fn?: ItFn): void; + function it(options?: TestOptions, fn?: ItFn): void; + function it(fn?: ItFn): void; + namespace it { + // Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`. + function skip(name?: string, options?: TestOptions, fn?: ItFn): void; + function skip(name?: string, fn?: ItFn): void; + function skip(options?: TestOptions, fn?: ItFn): void; + function skip(fn?: ItFn): void; + + // Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`. + function todo(name?: string, options?: TestOptions, fn?: ItFn): void; + function todo(name?: string, fn?: ItFn): void; + function todo(options?: TestOptions, fn?: ItFn): void; + function todo(fn?: ItFn): void; + } + + /** + * The type of a function under test. The first argument to this function is a + * {@link TestContext} object. If the test uses callbacks, the callback function is passed as + * the second argument. + */ + type TestFn = (t: TestContext, done: (result?: any) => void) => any; + + /** + * The type of a function under Suite. + * If the test uses callbacks, the callback function is passed as an argument + */ + type SuiteFn = (done: (result?: any) => void) => void; + + /** + * The type of a function under test. + * If the test uses callbacks, the callback function is passed as an argument + */ + type ItFn = (done: (result?: any) => void) => any; + + interface RunOptions { + /** + * If a number is provided, then that many files would run in parallel. + * If truthy, it would run (number of cpu cores - 1) files in parallel. + * If falsy, it would only run one file at a time. + * If unspecified, subtests inherit this value from their parent. + * @default true + */ + concurrency?: number | boolean | undefined; + + /** + * An array containing the list of files to run. + * If unspecified, the test runner execution model will be used. + */ + files?: readonly string[] | undefined; + + /** + * Allows aborting an in-progress test execution. + * @default undefined + */ + signal?: AbortSignal | undefined; + + /** + * A number of milliseconds the test will fail after. + * If unspecified, subtests inherit this value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + + /** + * Sets inspector port of test child process. + * If a nullish value is provided, each process gets its own port, + * incremented from the primary's `process.debugPort`. + */ + inspectPort?: number | (() => number) | undefined; + } + + /** + * A successful call of the `run()` method will return a new `TapStream` object, + * streaming a [TAP](https://testanything.org/) output. + * `TapStream` will emit events in the order of the tests' definitions. + * @since v18.9.0 + */ + interface TapStream extends NodeJS.ReadableStream { + addListener(event: 'test:diagnostic', listener: (message: string) => void): this; + addListener(event: 'test:fail', listener: (data: TestFail) => void): this; + addListener(event: 'test:pass', listener: (data: TestPass) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + emit(event: 'test:diagnostic', message: string): boolean; + emit(event: 'test:fail', data: TestFail): boolean; + emit(event: 'test:pass', data: TestPass): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'test:diagnostic', listener: (message: string) => void): this; + on(event: 'test:fail', listener: (data: TestFail) => void): this; + on(event: 'test:pass', listener: (data: TestPass) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: 'test:diagnostic', listener: (message: string) => void): this; + once(event: 'test:fail', listener: (data: TestFail) => void): this; + once(event: 'test:pass', listener: (data: TestPass) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'test:diagnostic', listener: (message: string) => void): this; + prependListener(event: 'test:fail', listener: (data: TestFail) => void): this; + prependListener(event: 'test:pass', listener: (data: TestPass) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this; + prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this; + prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + } + + interface TestFail { + /** + * The test duration. + */ + duration: number; + + /** + * The failure casing test to fail. + */ + error: Error; + + /** + * The test name. + */ + name: string; + + /** + * The ordinal number of the test. + */ + testNumber: number; + + /** + * Present if `context.todo` is called. + */ + todo?: string; + + /** + * Present if `context.skip` is called. + */ + skip?: string; + } + + interface TestPass { + /** + * The test duration. + */ + duration: number; + + /** + * The test name. + */ + name: string; + + /** + * The ordinal number of the test. + */ + testNumber: number; + + /** + * Present if `context.todo` is called. + */ + todo?: string; + + /** + * Present if `context.skip` is called. + */ + skip?: string; + } + + /** + * An instance of `TestContext` is passed to each test function in order to interact with the + * test runner. However, the `TestContext` constructor is not exposed as part of the API. + * @since v18.0.0 + */ + interface TestContext { + /** + * This function is used to create a hook running before each subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + beforeEach: typeof beforeEach; + + /** + * This function is used to create a hook running after each subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + afterEach: typeof afterEach; + + /** + * This function is used to write TAP diagnostics to the output. Any diagnostic information is + * included at the end of the test's results. This function does not return a value. + * @param message Message to be displayed as a TAP diagnostic. + * @since v18.0.0 + */ + diagnostic(message: string): void; + + /** + * The name of the test. + * @since v18.8.0 + */ + readonly name: string; + + /** + * If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only` + * option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only` + * command-line option, this function is a no-op. + * @param shouldRunOnlyTests Whether or not to run `only` tests. + * @since v18.0.0 + */ + runOnly(shouldRunOnlyTests: boolean): void; + + /** + * Can be used to abort test subtasks when the test has been aborted. + * @since v18.7.0 + */ + readonly signal: AbortSignal; + + /** + * This function causes the test's output to indicate the test as skipped. If `message` is + * provided, it is included in the TAP output. Calling `skip()` does not terminate execution of + * the test function. This function does not return a value. + * @param message Optional skip message to be displayed in TAP output. + * @since v18.0.0 + */ + skip(message?: string): void; + + /** + * This function adds a `TODO` directive to the test's output. If `message` is provided, it is + * included in the TAP output. Calling `todo()` does not terminate execution of the test + * function. This function does not return a value. + * @param message Optional `TODO` message to be displayed in TAP output. + * @since v18.0.0 + */ + todo(message?: string): void; + + /** + * This function is used to create subtests under the current test. This function behaves in + * the same fashion as the top level {@link test} function. + * @since v18.0.0 + * @param name The name of the test, which is displayed when reporting test results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the test + * @param fn The function under test. This first argument to this function is a + * {@link TestContext} object. If the test uses callbacks, the callback function is + * passed as the second argument. Default: A no-op function. + * @returns A {@link Promise} resolved with `undefined` once the test completes. + */ + test: typeof test; + } + + interface TestOptions { + /** + * If a number is provided, then that many tests would run in parallel. + * If truthy, it would run (number of cpu cores - 1) tests in parallel. + * For subtests, it will be `Infinity` tests in parallel. + * If falsy, it would only run one test at a time. + * If unspecified, subtests inherit this value from their parent. + * @default false + */ + concurrency?: number | boolean | undefined; + + /** + * If truthy, and the test context is configured to run `only` tests, then this test will be + * run. Otherwise, the test is skipped. + * @default false + */ + only?: boolean | undefined; + + /** + * Allows aborting an in-progress test. + * @since v18.8.0 + */ + signal?: AbortSignal | undefined; + + /** + * If truthy, the test is skipped. If a string is provided, that string is displayed in the + * test results as the reason for skipping the test. + * @default false + */ + skip?: boolean | string | undefined; + + /** + * A number of milliseconds the test will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + * @since v18.7.0 + */ + timeout?: number | undefined; + + /** + * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in + * the test results as the reason why the test is `TODO`. + * @default false + */ + todo?: boolean | string | undefined; + } + + /** + * This function is used to create a hook running before running a suite. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + function before(fn?: HookFn, options?: HookOptions): void; + + /** + * This function is used to create a hook running after running a suite. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + function after(fn?: HookFn, options?: HookOptions): void; + + /** + * This function is used to create a hook running before each subtest of the current suite. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + function beforeEach(fn?: HookFn, options?: HookOptions): void; + + /** + * This function is used to create a hook running after each subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + function afterEach(fn?: HookFn, options?: HookOptions): void; + + /** + * The hook function. If the hook uses callbacks, the callback function is passed as the + * second argument. + */ + type HookFn = (done: (result?: any) => void) => any; + + /** + * Configuration options for hooks. + * @since v18.8.0 + */ + interface HookOptions { + /** + * Allows aborting an in-progress hook. + */ + signal?: AbortSignal | undefined; + + /** + * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + } + + export { test as default, run, test, describe, it, before, after, beforeEach, afterEach }; +} diff --git a/node_modules/@types/node/ts4.8/timers.d.ts b/node_modules/@types/node/ts4.8/timers.d.ts new file mode 100644 index 0000000..b26f3ce --- /dev/null +++ b/node_modules/@types/node/ts4.8/timers.d.ts @@ -0,0 +1,94 @@ +/** + * The `timer` module exposes a global API for scheduling functions to + * be called at some future period of time. Because the timer functions are + * globals, there is no need to call `require('timers')` to use the API. + * + * The timer functions within Node.js implement a similar API as the timers API + * provided by Web Browsers but use a different internal implementation that is + * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/timers.js) + */ +declare module 'timers' { + import { Abortable } from 'node:events'; + import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises'; + interface TimerOptions extends Abortable { + /** + * Set to `false` to indicate that the scheduled `Timeout` + * should not require the Node.js event loop to remain active. + * @default true + */ + ref?: boolean | undefined; + } + let setTimeout: typeof global.setTimeout; + let clearTimeout: typeof global.clearTimeout; + let setInterval: typeof global.setInterval; + let clearInterval: typeof global.clearInterval; + let setImmediate: typeof global.setImmediate; + let clearImmediate: typeof global.clearImmediate; + global { + namespace NodeJS { + // compatibility with older typings + interface Timer extends RefCounted { + hasRef(): boolean; + refresh(): this; + [Symbol.toPrimitive](): number; + } + interface Immediate extends RefCounted { + /** + * If true, the `Immediate` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + _onImmediate: Function; // to distinguish it from the Timeout class + } + interface Timeout extends Timer { + /** + * If true, the `Timeout` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * Sets the timer's start time to the current time, and reschedules the timer to + * call its callback at the previously specified duration adjusted to the current + * time. This is useful for refreshing a timer without allocating a new + * JavaScript object. + * + * Using this on a timer that has already called its callback will reactivate the + * timer. + * @since v10.2.0 + * @return a reference to `timeout` + */ + refresh(): this; + [Symbol.toPrimitive](): number; + } + } + function setTimeout(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout; + namespace setTimeout { + const __promisify__: typeof setTimeoutPromise; + } + function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void; + function setInterval(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer; + namespace setInterval { + const __promisify__: typeof setIntervalPromise; + } + function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void; + function setImmediate(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setImmediate(callback: (args: void) => void): NodeJS.Immediate; + namespace setImmediate { + const __promisify__: typeof setImmediatePromise; + } + function clearImmediate(immediateId: NodeJS.Immediate | undefined): void; + function queueMicrotask(callback: () => void): void; + } +} +declare module 'node:timers' { + export * from 'timers'; +} diff --git a/node_modules/@types/node/ts4.8/timers/promises.d.ts b/node_modules/@types/node/ts4.8/timers/promises.d.ts new file mode 100644 index 0000000..c145068 --- /dev/null +++ b/node_modules/@types/node/ts4.8/timers/promises.d.ts @@ -0,0 +1,93 @@ +/** + * The `timers/promises` API provides an alternative set of timer functions + * that return `Promise` objects. The API is accessible via`require('timers/promises')`. + * + * ```js + * import { + * setTimeout, + * setImmediate, + * setInterval, + * } from 'timers/promises'; + * ``` + * @since v15.0.0 + */ +declare module 'timers/promises' { + import { TimerOptions } from 'node:timers'; + /** + * ```js + * import { + * setTimeout, + * } from 'timers/promises'; + * + * const res = await setTimeout(100, 'result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. + * @param value A value with which the promise is fulfilled. + */ + function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; + /** + * ```js + * import { + * setImmediate, + * } from 'timers/promises'; + * + * const res = await setImmediate('result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param value A value with which the promise is fulfilled. + */ + function setImmediate(value?: T, options?: TimerOptions): Promise; + /** + * Returns an async iterator that generates values in an interval of `delay` ms. + * + * ```js + * import { + * setInterval, + * } from 'timers/promises'; + * + * const interval = 100; + * for await (const startTime of setInterval(interval, Date.now())) { + * const now = Date.now(); + * console.log(now); + * if ((now - startTime) > 1000) + * break; + * } + * console.log(Date.now()); + * ``` + * @since v15.9.0 + */ + function setInterval(delay?: number, value?: T, options?: TimerOptions): AsyncIterable; + + interface Scheduler { + /** + * ```js + * import { scheduler } from 'node:timers/promises'; + * + * await scheduler.wait(1000); // Wait one second before continuing + * ``` + * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API. + * Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported. + * @since v16.14.0 + * @experimental + * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. + */ + wait: (delay?: number, options?: TimerOptions) => Promise; + /** + * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API. + * Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments. + * @since v16.14.0 + * @experimental + */ + yield: () => Promise; + } + + const scheduler: Scheduler; +} +declare module 'node:timers/promises' { + export * from 'timers/promises'; +} diff --git a/node_modules/@types/node/ts4.8/tls.d.ts b/node_modules/@types/node/ts4.8/tls.d.ts new file mode 100644 index 0000000..2cbc716 --- /dev/null +++ b/node_modules/@types/node/ts4.8/tls.d.ts @@ -0,0 +1,1028 @@ +/** + * The `tls` module provides an implementation of the Transport Layer Security + * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. + * The module can be accessed using: + * + * ```js + * const tls = require('tls'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tls.js) + */ +declare module 'tls' { + import { X509Certificate } from 'node:crypto'; + import * as net from 'node:net'; + import * as stream from 'stream'; + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + interface PeerCertificate { + subject: Certificate; + issuer: Certificate; + subjectaltname: string; + infoAccess: NodeJS.Dict; + modulus: string; + exponent: string; + valid_from: string; + valid_to: string; + fingerprint: string; + fingerprint256: string; + ext_key_usage: string[]; + serialNumber: string; + raw: Buffer; + } + interface DetailedPeerCertificate extends PeerCertificate { + issuerCertificate: DetailedPeerCertificate; + } + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + /** + * IETF name for the cipher suite. + */ + standardName: string; + } + interface EphemeralKeyInfo { + /** + * The supported types are 'DH' and 'ECDH'. + */ + type: string; + /** + * The name property is available only when type is 'ECDH'. + */ + name?: string | undefined; + /** + * The size of parameter of an ephemeral key exchange. + */ + size: number; + } + interface KeyObject { + /** + * Private keys in PEM format. + */ + pem: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface PxfObject { + /** + * PFX or PKCS12 encoded private key and certificate chain. + */ + buf: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean | undefined; + /** + * An optional net.Server instance. + */ + server?: net.Server | undefined; + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer | undefined; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication + */ + requestOCSP?: boolean | undefined; + } + /** + * Performs transparent encryption of written data and all required TLS + * negotiation. + * + * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. + * + * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate} will only return data while the + * connection is open. + * @since v0.11.4 + */ + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket, options?: TLSSocketOptions); + /** + * This property is `true` if the peer certificate was signed by one of the CAs + * specified when creating the `tls.TLSSocket` instance, otherwise `false`. + * @since v0.11.4 + */ + authorized: boolean; + /** + * Returns the reason why the peer's certificate was not been verified. This + * property is set only when `tlsSocket.authorized === false`. + * @since v0.11.4 + */ + authorizationError: Error; + /** + * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. + * @since v0.11.4 + */ + encrypted: true; + /** + * String containing the selected ALPN protocol. + * Before a handshake has completed, this value is always null. + * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. + */ + alpnProtocol: string | false | null; + /** + * Returns an object representing the local certificate. The returned object has + * some properties corresponding to the fields of the certificate. + * + * See {@link TLSSocket.getPeerCertificate} for an example of the certificate + * structure. + * + * If there is no local certificate, an empty object will be returned. If the + * socket has been destroyed, `null` will be returned. + * @since v11.2.0 + */ + getCertificate(): PeerCertificate | object | null; + /** + * Returns an object containing information on the negotiated cipher suite. + * + * For example: + * + * ```json + * { + * "name": "AES128-SHA256", + * "standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256", + * "version": "TLSv1.2" + * } + * ``` + * + * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. + * @since v0.11.4 + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the type, name, and size of parameter of + * an ephemeral key exchange in `perfect forward secrecy` on a client + * connection. It returns an empty object when the key exchange is not + * ephemeral. As this is only supported on a client socket; `null` is returned + * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`. + * + * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. + * @since v5.0.0 + */ + getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. + */ + getFinished(): Buffer | undefined; + /** + * Returns an object representing the peer's certificate. If the peer does not + * provide a certificate, an empty object will be returned. If the socket has been + * destroyed, `null` will be returned. + * + * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's + * certificate. + * @since v0.11.4 + * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. + * @return A certificate object. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so + * far. + */ + getPeerFinished(): Buffer | undefined; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the + * current connection. The value `'unknown'` will be returned for connected + * sockets that have not completed the handshaking process. The value `null` will + * be returned for server sockets or disconnected client sockets. + * + * Protocol versions are: + * + * * `'SSLv3'` + * * `'TLSv1'` + * * `'TLSv1.1'` + * * `'TLSv1.2'` + * * `'TLSv1.3'` + * + * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. + * @since v5.7.0 + */ + getProtocol(): string | null; + /** + * Returns the TLS session data or `undefined` if no session was + * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful + * for debugging. + * + * See `Session Resumption` for more information. + * + * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications + * must use the `'session'` event (it also works for TLSv1.2 and below). + * @since v0.11.4 + */ + getSession(): Buffer | undefined; + /** + * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. + * @since v12.11.0 + * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. + */ + getSharedSigalgs(): string[]; + /** + * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. + * + * It may be useful for debugging. + * + * See `Session Resumption` for more information. + * @since v0.11.4 + */ + getTLSTicket(): Buffer | undefined; + /** + * See `Session Resumption` for more information. + * @since v0.5.6 + * @return `true` if the session was reused, `false` otherwise. + */ + isSessionReused(): boolean; + /** + * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. + * Upon completion, the `callback` function will be passed a single argument + * that is either an `Error` (if the request failed) or `null`. + * + * This method can be used to request a peer's certificate after the secure + * connection has been established. + * + * When running as the server, the socket will be destroyed with an error after`handshakeTimeout` timeout. + * + * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the + * protocol. + * @since v0.11.8 + * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with + * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. + * @return `true` if renegotiation was initiated, `false` otherwise. + */ + renegotiate( + options: { + rejectUnauthorized?: boolean | undefined; + requestCert?: boolean | undefined; + }, + callback: (err: Error | null) => void + ): undefined | boolean; + /** + * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. + * Returns `true` if setting the limit succeeded; `false` otherwise. + * + * Smaller fragment sizes decrease the buffering latency on the client: larger + * fragments are buffered by the TLS layer until the entire fragment is received + * and its integrity is verified; large fragments can span multiple roundtrips + * and their processing can be delayed due to packet loss or reordering. However, + * smaller fragments add extra TLS framing bytes and CPU overhead, which may + * decrease overall server throughput. + * @since v0.11.11 + * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. + */ + setMaxSendFragment(size: number): boolean; + /** + * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts + * to renegotiate will trigger an `'error'` event on the `TLSSocket`. + * @since v8.4.0 + */ + disableRenegotiation(): void; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by + * OpenSSL's `SSL_trace()` function, the format is undocumented, can change + * without notice, and should not be relied on. + * @since v12.2.0 + */ + enableTrace(): void; + /** + * Returns the peer certificate as an `X509Certificate` object. + * + * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getPeerX509Certificate(): X509Certificate | undefined; + /** + * Returns the local certificate as an `X509Certificate` object. + * + * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getX509Certificate(): X509Certificate | undefined; + /** + * Keying material is used for validations to prevent different kind of attacks in + * network protocols, for example in the specifications of IEEE 802.1X. + * + * Example + * + * ```js + * const keyingMaterial = tlsSocket.exportKeyingMaterial( + * 128, + * 'client finished'); + * + * /* + * Example return value of keyingMaterial: + * + * + * ``` + * + * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more + * information. + * @since v13.10.0, v12.17.0 + * @param length number of bytes to retrieve from keying material + * @param label an application specific label, typically this will be a value from the [IANA Exporter Label + * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). + * @param context Optionally provide a context. + * @return requested bytes of the keying material + */ + exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + addListener(event: 'secureConnect', listener: () => void): this; + addListener(event: 'session', listener: (session: Buffer) => void): this; + addListener(event: 'keylog', listener: (line: Buffer) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'OCSPResponse', response: Buffer): boolean; + emit(event: 'secureConnect'): boolean; + emit(event: 'session', session: Buffer): boolean; + emit(event: 'keylog', line: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + on(event: 'secureConnect', listener: () => void): this; + on(event: 'session', listener: (session: Buffer) => void): this; + on(event: 'keylog', listener: (line: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + once(event: 'secureConnect', listener: () => void): this; + once(event: 'session', listener: (session: Buffer) => void): this; + once(event: 'keylog', listener: (line: Buffer) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + prependListener(event: 'secureConnect', listener: () => void): this; + prependListener(event: 'session', listener: (session: Buffer) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + prependOnceListener(event: 'secureConnect', listener: () => void): this; + prependOnceListener(event: 'session', listener: (session: Buffer) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer) => void): this; + } + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext | undefined; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean | undefined; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean | undefined; + /** + * An array of strings or a Buffer naming possible ALPN protocols. + * (Protocols should be ordered by their priority.) + */ + ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean | undefined; + } + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { + /** + * Abort the connection if the SSL/TLS handshake does not finish in the + * specified number of milliseconds. A 'tlsClientError' is emitted on + * the tls.Server object whenever a handshake times out. Default: + * 120000 (120 seconds). + */ + handshakeTimeout?: number | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + */ + ticketKeys?: Buffer | undefined; + /** + * + * @param socket + * @param identity identity parameter sent from the client. + * @return pre-shared key that must either be + * a buffer or `null` to stop the negotiation process. Returned PSK must be + * compatible with the selected cipher's digest. + * + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with the identity provided by the client. + * If the return value is `null` the negotiation process will stop and an + * "unknown_psk_identity" alert message will be sent to the other party. + * If the server wishes to hide the fact that the PSK identity was not known, + * the callback must provide some random data as `psk` to make the connection + * fail with "decrypt_error" before negotiation is finished. + * PSK ciphers are disabled by default, and using TLS-PSK thus + * requires explicitly specifying a cipher suite with the `ciphers` option. + * More information can be found in the RFC 4279. + */ + pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null; + /** + * hint to send to a client to help + * with selecting the identity during TLS-PSK negotiation. Will be ignored + * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be + * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. + */ + pskIdentityHint?: string | undefined; + } + interface PSKCallbackNegotation { + psk: DataView | NodeJS.TypedArray; + identity: string; + } + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string | undefined; + port?: number | undefined; + path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity | undefined; + servername?: string | undefined; // SNI TLS Extension + session?: Buffer | undefined; + minDHSize?: number | undefined; + lookup?: net.LookupFunction | undefined; + timeout?: number | undefined; + /** + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with optional identity `hint` provided by the server or `null` + * in case of TLS 1.3 where `hint` was removed. + * It will be necessary to provide a custom `tls.checkServerIdentity()` + * for the connection as the default one will try to check hostname/IP + * of the server against the certificate but that's not applicable for PSK + * because there won't be a certificate present. + * More information can be found in the RFC 4279. + * + * @param hint message sent from the server to help client + * decide which identity to use during negotiation. + * Always `null` if TLS 1.3 is used. + * @returns Return `null` to stop the negotiation process. `psk` must be + * compatible with the selected cipher's digest. + * `identity` must use UTF-8 encoding. + */ + pskCallback?(hint: string | null): PSKCallbackNegotation | null; + } + /** + * Accepts encrypted connections using TLS or SSL. + * @since v0.3.2 + */ + class Server extends net.Server { + constructor(secureConnectionListener?: (socket: TLSSocket) => void); + constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); + /** + * The `server.addContext()` method adds a secure context that will be used if + * the client request's SNI name matches the supplied `hostname` (or wildcard). + * + * When there are multiple matching contexts, the most recently added one is + * used. + * @since v0.5.3 + * @param hostname A SNI host name or wildcard (e.g. `'*'`) + * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). + */ + addContext(hostname: string, context: SecureContextOptions): void; + /** + * Returns the session ticket keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @return A 48-byte buffer containing the session ticket keys. + */ + getTicketKeys(): Buffer; + /** + * The `server.setSecureContext()` method replaces the secure context of an + * existing server. Existing connections to the server are not interrupted. + * @since v11.0.0 + * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). + */ + setSecureContext(options: SecureContextOptions): void; + /** + * Sets the session ticket keys. + * + * Changes to the ticket keys are effective only for future server connections. + * Existing or currently pending server connections will use the previous keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @param keys A 48-byte buffer containing the session ticket keys. + */ + setTicketKeys(keys: Buffer): void; + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + * 6. keylog + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + addListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'tlsClientError', err: Error, tlsSocket: TLSSocket): boolean; + emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean; + emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; + emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void): boolean; + emit(event: 'secureConnection', tlsSocket: TLSSocket): boolean; + emit(event: 'keylog', line: Buffer, tlsSocket: TLSSocket): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + on(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + on(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + once(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + once(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + prependListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this; + prependOnceListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + } + /** + * @deprecated since v0.11.3 Use `tls.TLSSocket` instead. + */ + interface SecurePair { + encrypted: TLSSocket; + cleartext: TLSSocket; + } + type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'; + interface SecureContextOptions { + /** + * Optionally override the trusted CA certificates. Default is to trust + * the well-known CAs curated by Mozilla. Mozilla's CAs are completely + * replaced when CAs are explicitly specified using this option. + */ + ca?: string | Buffer | Array | undefined; + /** + * Cert chains in PEM format. One cert chain should be provided per + * private key. Each cert chain should consist of the PEM formatted + * certificate for a provided private key, followed by the PEM + * formatted intermediate certificates (if any), in order, and not + * including the root CA (the root CA must be pre-known to the peer, + * see ca). When providing multiple cert chains, they do not have to + * be in the same order as their private keys in key. If the + * intermediate certificates are not provided, the peer will not be + * able to validate the certificate, and the handshake will fail. + */ + cert?: string | Buffer | Array | undefined; + /** + * Colon-separated list of supported signature algorithms. The list + * can contain digest algorithms (SHA256, MD5 etc.), public key + * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g + * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). + */ + sigalgs?: string | undefined; + /** + * Cipher suite specification, replacing the default. For more + * information, see modifying the default cipher suite. Permitted + * ciphers can be obtained via tls.getCiphers(). Cipher names must be + * uppercased in order for OpenSSL to accept them. + */ + ciphers?: string | undefined; + /** + * Name of an OpenSSL engine which can provide the client certificate. + */ + clientCertEngine?: string | undefined; + /** + * PEM formatted CRLs (Certificate Revocation Lists). + */ + crl?: string | Buffer | Array | undefined; + /** + * Diffie Hellman parameters, required for Perfect Forward Secrecy. Use + * openssl dhparam to create the parameters. The key length must be + * greater than or equal to 1024 bits or else an error will be thrown. + * Although 1024 bits is permissible, use 2048 bits or larger for + * stronger security. If omitted or invalid, the parameters are + * silently discarded and DHE ciphers will not be available. + */ + dhparam?: string | Buffer | undefined; + /** + * A string describing a named curve or a colon separated list of curve + * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key + * agreement. Set to auto to select the curve automatically. Use + * crypto.getCurves() to obtain a list of available curve names. On + * recent releases, openssl ecparam -list_curves will also display the + * name and description of each available elliptic curve. Default: + * tls.DEFAULT_ECDH_CURVE. + */ + ecdhCurve?: string | undefined; + /** + * Attempt to use the server's cipher suite preferences instead of the + * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be + * set in secureOptions + */ + honorCipherOrder?: boolean | undefined; + /** + * Private keys in PEM format. PEM allows the option of private keys + * being encrypted. Encrypted keys will be decrypted with + * options.passphrase. Multiple keys using different algorithms can be + * provided either as an array of unencrypted key strings or buffers, + * or an array of objects in the form {pem: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted keys will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + key?: string | Buffer | Array | undefined; + /** + * Name of an OpenSSL engine to get private key from. Should be used + * together with privateKeyIdentifier. + */ + privateKeyEngine?: string | undefined; + /** + * Identifier of a private key managed by an OpenSSL engine. Should be + * used together with privateKeyEngine. Should not be set together with + * key, because both options define a private key in different ways. + */ + privateKeyIdentifier?: string | undefined; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion | undefined; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion | undefined; + /** + * Shared passphrase used for a single private key and/or a PFX. + */ + passphrase?: string | undefined; + /** + * PFX or PKCS12 encoded private key and certificate chain. pfx is an + * alternative to providing key and cert individually. PFX is usually + * encrypted, if it is, passphrase will be used to decrypt it. Multiple + * PFX can be provided either as an array of unencrypted PFX buffers, + * or an array of objects in the form {buf: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted PFX will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + pfx?: string | Buffer | Array | undefined; + /** + * Optionally affect the OpenSSL protocol behavior, which is not + * usually necessary. This should be used carefully if at all! Value is + * a numeric bitmask of the SSL_OP_* options from OpenSSL Options + */ + secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options + /** + * Legacy mechanism to select the TLS protocol version to use, it does + * not support independent control of the minimum and maximum version, + * and does not support limiting the protocol to TLSv1.3. Use + * minVersion and maxVersion instead. The possible values are listed as + * SSL_METHODS, use the function names as strings. For example, use + * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow + * any TLS protocol version up to TLSv1.3. It is not recommended to use + * TLS versions less than 1.2, but it may be required for + * interoperability. Default: none, see minVersion. + */ + secureProtocol?: string | undefined; + /** + * Opaque identifier used by servers to ensure session state is not + * shared between applications. Unused by clients. + */ + sessionIdContext?: string | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + * See Session Resumption for more information. + */ + ticketKeys?: Buffer | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + } + interface SecureContext { + context: any; + } + /** + * Verifies the certificate `cert` is issued to `hostname`. + * + * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on + * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). + * + * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as + * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. + * + * This function can be overwritten by providing an alternative function as the`options.checkServerIdentity` option that is passed to `tls.connect()`. The + * overwriting function can call `tls.checkServerIdentity()` of course, to augment + * the checks done with additional verification. + * + * This function is only called if the certificate passed all other checks, such as + * being issued by trusted CA (`options.ca`). + * + * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name + * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use + * a custom`options.checkServerIdentity` function that implements the desired behavior. + * @since v0.8.4 + * @param hostname The host name or IP address to verify the certificate against. + * @param cert A `certificate object` representing the peer's certificate. + */ + function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; + /** + * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is + * automatically set as a listener for the `'secureConnection'` event. + * + * The `ticketKeys` options is automatically shared between `cluster` module + * workers. + * + * The following illustrates a simple echo server: + * + * ```js + * const tls = require('tls'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * + * // This is necessary only if using client certificate authentication. + * requestCert: true, + * + * // This is necessary only if the client uses a self-signed certificate. + * ca: [ fs.readFileSync('client-cert.pem') ] + * }; + * + * const server = tls.createServer(options, (socket) => { + * console.log('server connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * socket.write('welcome!\n'); + * socket.setEncoding('utf8'); + * socket.pipe(socket); + * }); + * server.listen(8000, () => { + * console.log('server bound'); + * }); + * ``` + * + * The server can be tested by connecting to it using the example client from {@link connect}. + * @since v0.3.2 + */ + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + /** + * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. + * + * `tls.connect()` returns a {@link TLSSocket} object. + * + * Unlike the `https` API, `tls.connect()` does not enable the + * SNI (Server Name Indication) extension by default, which may cause some + * servers to return an incorrect certificate or reject the connection + * altogether. To enable SNI, set the `servername` option in addition + * to `host`. + * + * The following illustrates a client for the echo server example from {@link createServer}: + * + * ```js + * // Assumes an echo server that is listening on port 8000. + * const tls = require('tls'); + * const fs = require('fs'); + * + * const options = { + * // Necessary only if the server requires client certificate authentication. + * key: fs.readFileSync('client-key.pem'), + * cert: fs.readFileSync('client-cert.pem'), + * + * // Necessary only if the server uses a self-signed certificate. + * ca: [ fs.readFileSync('server-cert.pem') ], + * + * // Necessary only if the server's cert isn't for "localhost". + * checkServerIdentity: () => { return null; }, + * }; + * + * const socket = tls.connect(8000, options, () => { + * console.log('client connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * process.stdin.pipe(socket); + * process.stdin.resume(); + * }); + * socket.setEncoding('utf8'); + * socket.on('data', (data) => { + * console.log(data); + * }); + * socket.on('end', () => { + * console.log('server ends connection'); + * }); + * ``` + * @since v0.11.3 + */ + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * Creates a new secure pair object with two streams, one of which reads and writes + * the encrypted data and the other of which reads and writes the cleartext data. + * Generally, the encrypted stream is piped to/from an incoming encrypted data + * stream and the cleartext one is used as a replacement for the initial encrypted + * stream. + * + * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and`encrypted` stream properties. + * + * Using `cleartext` has the same API as {@link TLSSocket}. + * + * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code: + * + * ```js + * pair = tls.createSecurePair(// ... ); + * pair.encrypted.pipe(socket); + * socket.pipe(pair.encrypted); + * ``` + * + * can be replaced by: + * + * ```js + * secureSocket = tls.TLSSocket(socket, options); + * ``` + * + * where `secureSocket` has the same API as `pair.cleartext`. + * @since v0.3.2 + * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead. + * @param context A secure context object as returned by `tls.createSecureContext()` + * @param isServer `true` to specify that this TLS connection should be opened as a server. + * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. + * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`. + */ + function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + /** + * {@link createServer} sets the default value of the `honorCipherOrder` option + * to `true`, other APIs that create secure contexts leave it unset. + * + * {@link createServer} uses a 128 bit truncated SHA1 hash value generated + * from `process.argv` as the default value of the `sessionIdContext` option, other + * APIs that create secure contexts have no default value. + * + * The `tls.createSecureContext()` method creates a `SecureContext` object. It is + * usable as an argument to several `tls` APIs, such as {@link createServer} and `server.addContext()`, but has no public methods. + * + * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it. + * + * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of + * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). + * @since v0.11.13 + */ + function createSecureContext(options?: SecureContextOptions): SecureContext; + /** + * Returns an array with the names of the supported TLS ciphers. The names are + * lower-case for historical reasons, but must be uppercased to be used in + * the `ciphers` option of {@link createSecureContext}. + * + * Not all supported ciphers are enabled by default. See `Modifying the default TLS cipher suite`. + * + * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for + * TLSv1.2 and below. + * + * ```js + * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] + * ``` + * @since v0.10.2 + */ + function getCiphers(): string[]; + /** + * The default curve name to use for ECDH key agreement in a tls server. + * The default value is 'auto'. See tls.createSecureContext() for further + * information. + */ + let DEFAULT_ECDH_CURVE: string; + /** + * The default value of the maxVersion option of + * tls.createSecureContext(). It can be assigned any of the supported TLS + * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: + * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets + * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the highest maximum + * is used. + */ + let DEFAULT_MAX_VERSION: SecureVersion; + /** + * The default value of the minVersion option of tls.createSecureContext(). + * It can be assigned any of the supported TLS protocol versions, + * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless + * changed using CLI options. Using --tls-min-v1.0 sets the default to + * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using + * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options + * are provided, the lowest minimum is used. + */ + let DEFAULT_MIN_VERSION: SecureVersion; + /** + * An immutable array of strings representing the root certificates (in PEM + * format) used for verifying peer certificates. This is the default value + * of the ca option to tls.createSecureContext(). + */ + const rootCertificates: ReadonlyArray; +} +declare module 'node:tls' { + export * from 'tls'; +} diff --git a/node_modules/@types/node/ts4.8/trace_events.d.ts b/node_modules/@types/node/ts4.8/trace_events.d.ts new file mode 100644 index 0000000..d47aa93 --- /dev/null +++ b/node_modules/@types/node/ts4.8/trace_events.d.ts @@ -0,0 +1,171 @@ +/** + * The `trace_events` module provides a mechanism to centralize tracing information + * generated by V8, Node.js core, and userspace code. + * + * Tracing can be enabled with the `--trace-event-categories` command-line flag + * or by using the `trace_events` module. The `--trace-event-categories` flag + * accepts a list of comma-separated category names. + * + * The available categories are: + * + * * `node`: An empty placeholder. + * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data. + * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. + * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. + * * `node.console`: Enables capture of `console.time()` and `console.count()`output. + * * `node.dns.native`: Enables capture of trace data for DNS queries. + * * `node.environment`: Enables capture of Node.js Environment milestones. + * * `node.fs.sync`: Enables capture of trace data for file system sync methods. + * * `node.perf`: Enables capture of `Performance API` measurements. + * * `node.perf.usertiming`: Enables capture of only Performance API User Timing + * measures and marks. + * * `node.perf.timerify`: Enables capture of only Performance API timerify + * measurements. + * * `node.promises.rejections`: Enables capture of trace data tracking the number + * of unhandled Promise rejections and handled-after-rejections. + * * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. + * * `v8`: The `V8` events are GC, compiling, and execution related. + * + * By default the `node`, `node.async_hooks`, and `v8` categories are enabled. + * + * ```bash + * node --trace-event-categories v8,node,node.async_hooks server.js + * ``` + * + * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be + * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default. + * + * ```bash + * node --trace-events-enabled + * + * # is equivalent to + * + * node --trace-event-categories v8,node,node.async_hooks + * ``` + * + * Alternatively, trace events may be enabled using the `trace_events` module: + * + * ```js + * const trace_events = require('trace_events'); + * const tracing = trace_events.createTracing({ categories: ['node.perf'] }); + * tracing.enable(); // Enable trace event capture for the 'node.perf' category + * + * // do work + * + * tracing.disable(); // Disable trace event capture for the 'node.perf' category + * ``` + * + * Running Node.js with tracing enabled will produce log files that can be opened + * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. + * + * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can + * be specified with `--trace-event-file-pattern` that accepts a template + * string that supports `${rotation}` and `${pid}`: + * + * ```bash + * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js + * ``` + * + * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers + * in your code, such as: + * + * ```js + * process.on('SIGINT', function onSigint() { + * console.info('Received SIGINT.'); + * process.exit(130); // Or applicable exit code depending on OS and signal + * }); + * ``` + * + * The tracing system uses the same time source + * as the one used by `process.hrtime()`. + * However the trace-event timestamps are expressed in microseconds, + * unlike `process.hrtime()` which returns nanoseconds. + * + * The features from this module are not available in `Worker` threads. + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/trace_events.js) + */ +declare module 'trace_events' { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + */ + readonly categories: string; + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + */ + disable(): void; + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + */ + enable(): void; + /** + * `true` only if the `Tracing` object has been enabled. + */ + readonly enabled: boolean; + } + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + /** + * Creates and returns a `Tracing` object for the given set of `categories`. + * + * ```js + * const trace_events = require('trace_events'); + * const categories = ['node.perf', 'node.async_hooks']; + * const tracing = trace_events.createTracing({ categories }); + * tracing.enable(); + * // do stuff + * tracing.disable(); + * ``` + * @since v10.0.0 + * @return . + */ + function createTracing(options: CreateTracingOptions): Tracing; + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is determined + * by the _union_ of all currently-enabled `Tracing` objects and any categories + * enabled using the `--trace-event-categories` flag. + * + * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console. + * + * ```js + * const trace_events = require('trace_events'); + * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); + * const t3 = trace_events.createTracing({ categories: ['v8'] }); + * + * t1.enable(); + * t2.enable(); + * + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + function getEnabledCategories(): string | undefined; +} +declare module 'node:trace_events' { + export * from 'trace_events'; +} diff --git a/node_modules/@types/node/ts4.8/tty.d.ts b/node_modules/@types/node/ts4.8/tty.d.ts new file mode 100644 index 0000000..6473f8d --- /dev/null +++ b/node_modules/@types/node/ts4.8/tty.d.ts @@ -0,0 +1,206 @@ +/** + * The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. + * In most cases, it will not be necessary or possible to use this module directly. + * However, it can be accessed using: + * + * ```js + * const tty = require('tty'); + * ``` + * + * When Node.js detects that it is being run with a text terminal ("TTY") + * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by + * default, be instances of `tty.WriteStream`. The preferred method of determining + * whether Node.js is being run within a TTY context is to check that the value of + * the `process.stdout.isTTY` property is `true`: + * + * ```console + * $ node -p -e "Boolean(process.stdout.isTTY)" + * true + * $ node -p -e "Boolean(process.stdout.isTTY)" | cat + * false + * ``` + * + * In most cases, there should be little to no reason for an application to + * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes. + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tty.js) + */ +declare module 'tty' { + import * as net from 'node:net'; + /** + * The `tty.isatty()` method returns `true` if the given `fd` is associated with + * a TTY and `false` if it is not, including whenever `fd` is not a non-negative + * integer. + * @since v0.5.8 + * @param fd A numeric file descriptor + */ + function isatty(fd: number): boolean; + /** + * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js + * process and there should be no reason to create additional instances. + * @since v0.5.8 + */ + class ReadStream extends net.Socket { + constructor(fd: number, options?: net.SocketConstructorOpts); + /** + * A `boolean` that is `true` if the TTY is currently configured to operate as a + * raw device. Defaults to `false`. + * @since v0.7.7 + */ + isRaw: boolean; + /** + * Allows configuration of `tty.ReadStream` so that it operates as a raw device. + * + * When in raw mode, input is always available character-by-character, not + * including modifiers. Additionally, all special processing of characters by the + * terminal is disabled, including echoing input + * characters. Ctrl+C will no longer cause a `SIGINT` when + * in this mode. + * @since v0.7.7 + * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` + * property will be set to the resulting mode. + * @return The read stream instance. + */ + setRawMode(mode: boolean): this; + /** + * A `boolean` that is always `true` for `tty.ReadStream` instances. + * @since v0.5.8 + */ + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + /** + * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there + * should be no reason to create additional instances. + * @since v0.5.8 + */ + class WriteStream extends net.Socket { + constructor(fd: number); + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'resize', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'resize'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'resize', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'resize', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'resize', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'resize', listener: () => void): this; + /** + * `writeStream.clearLine()` clears the current line of this `WriteStream` in a + * direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearLine(dir: Direction, callback?: () => void): boolean; + /** + * `writeStream.clearScreenDown()` clears this `WriteStream` from the current + * cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearScreenDown(callback?: () => void): boolean; + /** + * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified + * position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + cursorTo(x: number, y?: number, callback?: () => void): boolean; + cursorTo(x: number, callback: () => void): boolean; + /** + * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its + * current position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + moveCursor(dx: number, dy: number, callback?: () => void): boolean; + /** + * Returns: + * + * * `1` for 2, + * * `4` for 16, + * * `8` for 256, + * * `24` for 16,777,216 colors supported. + * + * Use this to determine what colors the terminal supports. Due to the nature of + * colors in terminals it is possible to either have false positives or false + * negatives. It depends on process information and the environment variables that + * may lie about what terminal is used. + * It is possible to pass in an `env` object to simulate the usage of a specific + * terminal. This can be useful to check how specific environment settings behave. + * + * To enforce a specific color support, use one of the below environment settings. + * + * * 2 colors: `FORCE_COLOR = 0` (Disables colors) + * * 16 colors: `FORCE_COLOR = 1` + * * 256 colors: `FORCE_COLOR = 2` + * * 16,777,216 colors: `FORCE_COLOR = 3` + * + * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables. + * @since v9.9.0 + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + getColorDepth(env?: object): number; + /** + * Returns `true` if the `writeStream` supports at least as many colors as provided + * in `count`. Minimum support is 2 (black and white). + * + * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. + * + * ```js + * process.stdout.hasColors(); + * // Returns true or false depending on if `stdout` supports at least 16 colors. + * process.stdout.hasColors(256); + * // Returns true or false depending on if `stdout` supports at least 256 colors. + * process.stdout.hasColors({ TMUX: '1' }); + * // Returns true. + * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); + * // Returns false (the environment setting pretends to support 2 ** 8 colors). + * ``` + * @since v11.13.0, v10.16.0 + * @param [count=16] The number of colors that are requested (minimum 2). + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + hasColors(count?: number): boolean; + hasColors(env?: object): boolean; + hasColors(count: number, env?: object): boolean; + /** + * `writeStream.getWindowSize()` returns the size of the TTY + * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number + * of columns and rows in the corresponding TTY. + * @since v0.7.7 + */ + getWindowSize(): [number, number]; + /** + * A `number` specifying the number of columns the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + columns: number; + /** + * A `number` specifying the number of rows the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + rows: number; + /** + * A `boolean` that is always `true`. + * @since v0.5.8 + */ + isTTY: boolean; + } +} +declare module 'node:tty' { + export * from 'tty'; +} diff --git a/node_modules/@types/node/ts4.8/url.d.ts b/node_modules/@types/node/ts4.8/url.d.ts new file mode 100644 index 0000000..e172acb --- /dev/null +++ b/node_modules/@types/node/ts4.8/url.d.ts @@ -0,0 +1,897 @@ +/** + * The `url` module provides utilities for URL resolution and parsing. It can be + * accessed using: + * + * ```js + * import url from 'url'; + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/url.js) + */ +declare module 'url' { + import { Blob as NodeBlob } from 'node:buffer'; + import { ClientRequestArgs } from 'node:http'; + import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring'; + // Input to `url.format` + interface UrlObject { + auth?: string | null | undefined; + hash?: string | null | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + href?: string | null | undefined; + pathname?: string | null | undefined; + protocol?: string | null | undefined; + search?: string | null | undefined; + slashes?: boolean | null | undefined; + port?: string | number | null | undefined; + query?: string | null | ParsedUrlQueryInput | undefined; + } + // Output of `url.parse` + interface Url { + auth: string | null; + hash: string | null; + host: string | null; + hostname: string | null; + href: string; + path: string | null; + pathname: string | null; + protocol: string | null; + search: string | null; + slashes: boolean | null; + port: string | null; + query: string | null | ParsedUrlQuery; + } + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + interface UrlWithStringQuery extends Url { + query: string | null; + } + /** + * The `url.parse()` method takes a URL string, parses it, and returns a URL + * object. + * + * A `TypeError` is thrown if `urlString` is not a string. + * + * A `URIError` is thrown if the `auth` property is present but cannot be decoded. + * + * Use of the legacy `url.parse()` method is discouraged. Users should + * use the WHATWG `URL` API. Because the `url.parse()` method uses a + * lenient, non-standard algorithm for parsing URL strings, security + * issues can be introduced. Specifically, issues with [host name spoofing](https://hackerone.com/reports/678487) and + * incorrect handling of usernames and passwords have been identified. + * + * Deprecation of this API has been shelved for now primarily due to the the + * inability of the [WHATWG API to parse relative URLs](https://github.com/nodejs/node/issues/12682#issuecomment-1154492373). + * [Discussions are ongoing](https://github.com/whatwg/url/issues/531) for the best way to resolve this. + * + * @since v0.1.25 + * @param urlString The URL string to parse. + * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property + * on the returned URL object will be an unparsed, undecoded string. + * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the + * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. + */ + function parse(urlString: string): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + /** + * The `url.format()` method returns a formatted URL string derived from`urlObject`. + * + * ```js + * const url = require('url'); + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json' + * } + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//`will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`; + * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string + * and appended to `result`followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to`result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the + * `querystring` module's `stringify()`method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search`_does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @deprecated Legacy: Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + */ + function format(urlObject: URL, options?: URLFormatOptions): string; + /** + * The `url.format()` method returns a formatted URL string derived from`urlObject`. + * + * ```js + * const url = require('url'); + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json' + * } + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//`will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`; + * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string + * and appended to `result`followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to`result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the + * `querystring` module's `stringify()`method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search`_does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @deprecated Legacy: Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + */ + function format(urlObject: UrlObject | string): string; + /** + * The `url.resolve()` method resolves a target URL relative to a base URL in a + * manner similar to that of a web browser resolving an anchor tag. + * + * ```js + * const url = require('url'); + * url.resolve('/one/two/three', 'four'); // '/one/two/four' + * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' + * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * + * To achieve the same result using the WHATWG URL API: + * + * ```js + * function resolve(from, to) { + * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); + * if (resolvedUrl.protocol === 'resolve:') { + * // `from` is a relative URL. + * const { pathname, search, hash } = resolvedUrl; + * return pathname + search + hash; + * } + * return resolvedUrl.toString(); + * } + * + * resolve('/one/two/three', 'four'); // '/one/two/four' + * resolve('http://example.com/', '/one'); // 'http://example.com/one' + * resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * @since v0.1.25 + * @deprecated Legacy: Use the WHATWG URL API instead. + * @param from The base URL to use if `to` is a relative URL. + * @param to The target URL to resolve. + */ + function resolve(from: string, to: string): string; + /** + * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an + * invalid domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToUnicode}. + * + * This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged. + * + * ```js + * import url from 'url'; + * + * console.log(url.domainToASCII('español.com')); + * // Prints xn--espaol-zwa.com + * console.log(url.domainToASCII('中文.com')); + * // Prints xn--fiq228c.com + * console.log(url.domainToASCII('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToASCII(domain: string): string; + /** + * Returns the Unicode serialization of the `domain`. If `domain` is an invalid + * domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToASCII}. + * + * This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged. + * + * ```js + * import url from 'url'; + * + * console.log(url.domainToUnicode('xn--espaol-zwa.com')); + * // Prints español.com + * console.log(url.domainToUnicode('xn--fiq228c.com')); + * // Prints 中文.com + * console.log(url.domainToUnicode('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToUnicode(domain: string): string; + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * + * ```js + * import { fileURLToPath } from 'url'; + * + * const __filename = fileURLToPath(import.meta.url); + * + * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ + * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) + * + * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt + * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) + * + * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt + * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) + * + * new URL('file:///hello world').pathname; // Incorrect: /hello%20world + * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) + * ``` + * @since v10.12.0 + * @param url The file URL string or URL object to convert to a path. + * @return The fully-resolved platform-specific Node.js file path. + */ + function fileURLToPath(url: string | URL): string; + /** + * This function ensures that `path` is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * + * ```js + * import { pathToFileURL } from 'url'; + * + * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 + * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) + * + * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c + * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) + * ``` + * @since v10.12.0 + * @param path The path to convert to a File URL. + * @return The file URL object. + */ + function pathToFileURL(path: string): URL; + /** + * This utility function converts a URL object into an ordinary options object as + * expected by the `http.request()` and `https.request()` APIs. + * + * ```js + * import { urlToHttpOptions } from 'url'; + * const myURL = new URL('https://a:b@測試?abc#foo'); + * + * console.log(urlToHttpOptions(myURL)); + * /* + * { + * protocol: 'https:', + * hostname: 'xn--g6w251d', + * hash: '#foo', + * search: '?abc', + * pathname: '/', + * path: '/?abc', + * href: 'https://a:b@xn--g6w251d/?abc#foo', + * auth: 'a:b' + * } + * + * ``` + * @since v15.7.0, v14.18.0 + * @param url The `WHATWG URL` object to convert to an options object. + * @return Options object + */ + function urlToHttpOptions(url: URL): ClientRequestArgs; + interface URLFormatOptions { + auth?: boolean | undefined; + fragment?: boolean | undefined; + search?: boolean | undefined; + unicode?: boolean | undefined; + } + /** + * Browser-compatible `URL` class, implemented by following the WHATWG URL + * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself. + * The `URL` class is also available on the global object. + * + * In accordance with browser conventions, all properties of `URL` objects + * are implemented as getters and setters on the class prototype, rather than as + * data properties on the object itself. Thus, unlike `legacy urlObject` s, + * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still + * return `true`. + * @since v7.0.0, v6.13.0 + */ + class URL { + /** + * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later. + * + * ```js + * const { + * Blob, + * resolveObjectURL, + * } = require('buffer'); + * + * const blob = new Blob(['hello']); + * const id = URL.createObjectURL(blob); + * + * // later... + * + * const otherBlob = resolveObjectURL(id); + * console.log(otherBlob.size); + * ``` + * + * The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it. + * + * `Blob` objects are registered within the current thread. If using Worker + * Threads, `Blob` objects registered within one Worker will not be available + * to other workers or the main thread. + * @since v16.7.0 + * @experimental + */ + static createObjectURL(blob: NodeBlob): string; + /** + * Removes the stored `Blob` identified by the given ID. Attempting to revoke a + * ID that isn’t registered will silently fail. + * @since v16.7.0 + * @experimental + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + static revokeObjectURL(objectUrl: string): void; + constructor(input: string, base?: string | URL); + /** + * Gets and sets the fragment portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/foo#bar'); + * console.log(myURL.hash); + * // Prints #bar + * + * myURL.hash = 'baz'; + * console.log(myURL.href); + * // Prints https://example.org/foo#baz + * ``` + * + * Invalid URL characters included in the value assigned to the `hash` property + * are `percent-encoded`. The selection of which characters to + * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + hash: string; + /** + * Gets and sets the host portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org:81/foo'); + * console.log(myURL.host); + * // Prints example.org:81 + * + * myURL.host = 'example.com:82'; + * console.log(myURL.href); + * // Prints https://example.com:82/foo + * ``` + * + * Invalid host values assigned to the `host` property are ignored. + */ + host: string; + /** + * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the + * port. + * + * ```js + * const myURL = new URL('https://example.org:81/foo'); + * console.log(myURL.hostname); + * // Prints example.org + * + * // Setting the hostname does not change the port + * myURL.hostname = 'example.com:82'; + * console.log(myURL.href); + * // Prints https://example.com:81/foo + * + * // Use myURL.host to change the hostname and port + * myURL.host = 'example.org:82'; + * console.log(myURL.href); + * // Prints https://example.org:82/foo + * ``` + * + * Invalid host name values assigned to the `hostname` property are ignored. + */ + hostname: string; + /** + * Gets and sets the serialized URL. + * + * ```js + * const myURL = new URL('https://example.org/foo'); + * console.log(myURL.href); + * // Prints https://example.org/foo + * + * myURL.href = 'https://example.com/bar'; + * console.log(myURL.href); + * // Prints https://example.com/bar + * ``` + * + * Getting the value of the `href` property is equivalent to calling {@link toString}. + * + * Setting the value of this property to a new value is equivalent to creating a + * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified. + * + * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown. + */ + href: string; + /** + * Gets the read-only serialization of the URL's origin. + * + * ```js + * const myURL = new URL('https://example.org/foo/bar?baz'); + * console.log(myURL.origin); + * // Prints https://example.org + * ``` + * + * ```js + * const idnURL = new URL('https://測試'); + * console.log(idnURL.origin); + * // Prints https://xn--g6w251d + * + * console.log(idnURL.hostname); + * // Prints xn--g6w251d + * ``` + */ + readonly origin: string; + /** + * Gets and sets the password portion of the URL. + * + * ```js + * const myURL = new URL('https://abc:xyz@example.com'); + * console.log(myURL.password); + * // Prints xyz + * + * myURL.password = '123'; + * console.log(myURL.href); + * // Prints https://abc:123@example.com + * ``` + * + * Invalid URL characters included in the value assigned to the `password` property + * are `percent-encoded`. The selection of which characters to + * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + password: string; + /** + * Gets and sets the path portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/abc/xyz?123'); + * console.log(myURL.pathname); + * // Prints /abc/xyz + * + * myURL.pathname = '/abcdef'; + * console.log(myURL.href); + * // Prints https://example.org/abcdef?123 + * ``` + * + * Invalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters + * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + pathname: string; + /** + * Gets and sets the port portion of the URL. + * + * The port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will + * result in the `port` value becoming + * the empty string (`''`). + * + * The port value can be an empty string in which case the port depends on + * the protocol/scheme: + * + * + * + * Upon assigning a value to the port, the value will first be converted to a + * string using `.toString()`. + * + * If that string is invalid but it begins with a number, the leading number is + * assigned to `port`. + * If the number lies outside the range denoted above, it is ignored. + * + * ```js + * const myURL = new URL('https://example.org:8888'); + * console.log(myURL.port); + * // Prints 8888 + * + * // Default ports are automatically transformed to the empty string + * // (HTTPS protocol's default port is 443) + * myURL.port = '443'; + * console.log(myURL.port); + * // Prints the empty string + * console.log(myURL.href); + * // Prints https://example.org/ + * + * myURL.port = 1234; + * console.log(myURL.port); + * // Prints 1234 + * console.log(myURL.href); + * // Prints https://example.org:1234/ + * + * // Completely invalid port strings are ignored + * myURL.port = 'abcd'; + * console.log(myURL.port); + * // Prints 1234 + * + * // Leading numbers are treated as a port number + * myURL.port = '5678abcd'; + * console.log(myURL.port); + * // Prints 5678 + * + * // Non-integers are truncated + * myURL.port = 1234.5678; + * console.log(myURL.port); + * // Prints 1234 + * + * // Out-of-range numbers which are not represented in scientific notation + * // will be ignored. + * myURL.port = 1e10; // 10000000000, will be range-checked as described below + * console.log(myURL.port); + * // Prints 1234 + * ``` + * + * Numbers which contain a decimal point, + * such as floating-point numbers or numbers in scientific notation, + * are not an exception to this rule. + * Leading numbers up to the decimal point will be set as the URL's port, + * assuming they are valid: + * + * ```js + * myURL.port = 4.567e21; + * console.log(myURL.port); + * // Prints 4 (because it is the leading number in the string '4.567e21') + * ``` + */ + port: string; + /** + * Gets and sets the protocol portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org'); + * console.log(myURL.protocol); + * // Prints https: + * + * myURL.protocol = 'ftp'; + * console.log(myURL.href); + * // Prints ftp://example.org/ + * ``` + * + * Invalid URL protocol values assigned to the `protocol` property are ignored. + */ + protocol: string; + /** + * Gets and sets the serialized query portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/abc?123'); + * console.log(myURL.search); + * // Prints ?123 + * + * myURL.search = 'abc=xyz'; + * console.log(myURL.href); + * // Prints https://example.org/abc?abc=xyz + * ``` + * + * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which + * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + search: string; + /** + * Gets the `URLSearchParams` object representing the query parameters of the + * URL. This property is read-only but the `URLSearchParams` object it provides + * can be used to mutate the URL instance; to replace the entirety of query + * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details. + * + * Use care when using `.searchParams` to modify the `URL` because, + * per the WHATWG specification, the `URLSearchParams` object uses + * different rules to determine which characters to percent-encode. For + * instance, the `URL` object will not percent encode the ASCII tilde (`~`) + * character, while `URLSearchParams` will always encode it: + * + * ```js + * const myUrl = new URL('https://example.org/abc?foo=~bar'); + * + * console.log(myUrl.search); // prints ?foo=~bar + * + * // Modify the URL via searchParams... + * myUrl.searchParams.sort(); + * + * console.log(myUrl.search); // prints ?foo=%7Ebar + * ``` + */ + readonly searchParams: URLSearchParams; + /** + * Gets and sets the username portion of the URL. + * + * ```js + * const myURL = new URL('https://abc:xyz@example.com'); + * console.log(myURL.username); + * // Prints abc + * + * myURL.username = '123'; + * console.log(myURL.href); + * // Prints https://123:xyz@example.com/ + * ``` + * + * Any invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which + * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + username: string; + /** + * The `toString()` method on the `URL` object returns the serialized URL. The + * value returned is equivalent to that of {@link href} and {@link toJSON}. + */ + toString(): string; + /** + * The `toJSON()` method on the `URL` object returns the serialized URL. The + * value returned is equivalent to that of {@link href} and {@link toString}. + * + * This method is automatically called when an `URL` object is serialized + * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). + * + * ```js + * const myURLs = [ + * new URL('https://www.example.com'), + * new URL('https://test.example.org'), + * ]; + * console.log(JSON.stringify(myURLs)); + * // Prints ["https://www.example.com/","https://test.example.org/"] + * ``` + */ + toJSON(): string; + } + /** + * The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the + * four following constructors. + * The `URLSearchParams` class is also available on the global object. + * + * The WHATWG `URLSearchParams` interface and the `querystring` module have + * similar purpose, but the purpose of the `querystring` module is more + * general, as it allows the customization of delimiter characters (`&` and `=`). + * On the other hand, this API is designed purely for URL query strings. + * + * ```js + * const myURL = new URL('https://example.org/?abc=123'); + * console.log(myURL.searchParams.get('abc')); + * // Prints 123 + * + * myURL.searchParams.append('abc', 'xyz'); + * console.log(myURL.href); + * // Prints https://example.org/?abc=123&abc=xyz + * + * myURL.searchParams.delete('abc'); + * myURL.searchParams.set('a', 'b'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b + * + * const newSearchParams = new URLSearchParams(myURL.searchParams); + * // The above is equivalent to + * // const newSearchParams = new URLSearchParams(myURL.search); + * + * newSearchParams.append('a', 'c'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b + * console.log(newSearchParams.toString()); + * // Prints a=b&a=c + * + * // newSearchParams.toString() is implicitly called + * myURL.search = newSearchParams; + * console.log(myURL.href); + * // Prints https://example.org/?a=b&a=c + * newSearchParams.delete('a'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b&a=c + * ``` + * @since v7.5.0, v6.13.0 + */ + class URLSearchParams implements Iterable<[string, string]> { + constructor(init?: URLSearchParams | string | Record> | Iterable<[string, string]> | ReadonlyArray<[string, string]>); + /** + * Append a new name-value pair to the query string. + */ + append(name: string, value: string): void; + /** + * Remove all name-value pairs whose name is `name`. + */ + delete(name: string): void; + /** + * Returns an ES6 `Iterator` over each of the name-value pairs in the query. + * Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`. + * + * Alias for `urlSearchParams[@@iterator]()`. + */ + entries(): IterableIterator<[string, string]>; + /** + * Iterates over each name-value pair in the query and invokes the given function. + * + * ```js + * const myURL = new URL('https://example.org/?a=b&c=d'); + * myURL.searchParams.forEach((value, name, searchParams) => { + * console.log(name, value, myURL.searchParams === searchParams); + * }); + * // Prints: + * // a b true + * // c d true + * ``` + * @param fn Invoked for each name-value pair in the query + * @param thisArg To be used as `this` value for when `fn` is called + */ + forEach(callback: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, thisArg?: TThis): void; + /** + * Returns the value of the first name-value pair whose name is `name`. If there + * are no such pairs, `null` is returned. + * @return or `null` if there is no name-value pair with the given `name`. + */ + get(name: string): string | null; + /** + * Returns the values of all name-value pairs whose name is `name`. If there are + * no such pairs, an empty array is returned. + */ + getAll(name: string): string[]; + /** + * Returns `true` if there is at least one name-value pair whose name is `name`. + */ + has(name: string): boolean; + /** + * Returns an ES6 `Iterator` over the names of each name-value pair. + * + * ```js + * const params = new URLSearchParams('foo=bar&foo=baz'); + * for (const name of params.keys()) { + * console.log(name); + * } + * // Prints: + * // foo + * // foo + * ``` + */ + keys(): IterableIterator; + /** + * Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`, + * set the first such pair's value to `value` and remove all others. If not, + * append the name-value pair to the query string. + * + * ```js + * const params = new URLSearchParams(); + * params.append('foo', 'bar'); + * params.append('foo', 'baz'); + * params.append('abc', 'def'); + * console.log(params.toString()); + * // Prints foo=bar&foo=baz&abc=def + * + * params.set('foo', 'def'); + * params.set('xyz', 'opq'); + * console.log(params.toString()); + * // Prints foo=def&abc=def&xyz=opq + * ``` + */ + set(name: string, value: string): void; + /** + * Sort all existing name-value pairs in-place by their names. Sorting is done + * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs + * with the same name is preserved. + * + * This method can be used, in particular, to increase cache hits. + * + * ```js + * const params = new URLSearchParams('query[]=abc&type=search&query[]=123'); + * params.sort(); + * console.log(params.toString()); + * // Prints query%5B%5D=abc&query%5B%5D=123&type=search + * ``` + * @since v7.7.0, v6.13.0 + */ + sort(): void; + /** + * Returns the search parameters serialized as a string, with characters + * percent-encoded where necessary. + */ + toString(): string; + /** + * Returns an ES6 `Iterator` over the values of each name-value pair. + */ + values(): IterableIterator; + [Symbol.iterator](): IterableIterator<[string, string]>; + } + import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url'; + global { + interface URLSearchParams extends _URLSearchParams {} + interface URL extends _URL {} + interface Global { + URL: typeof _URL; + URLSearchParams: typeof _URLSearchParams; + } + /** + * `URL` class is a global reference for `require('url').URL` + * https://nodejs.org/api/url.html#the-whatwg-url-api + * @since v10.0.0 + */ + var URL: typeof globalThis extends { + onmessage: any; + URL: infer T; + } + ? T + : typeof _URL; + /** + * `URLSearchParams` class is a global reference for `require('url').URLSearchParams` + * https://nodejs.org/api/url.html#class-urlsearchparams + * @since v10.0.0 + */ + var URLSearchParams: typeof globalThis extends { + onmessage: any; + URLSearchParams: infer T; + } + ? T + : typeof _URLSearchParams; + } +} +declare module 'node:url' { + export * from 'url'; +} diff --git a/node_modules/@types/node/ts4.8/util.d.ts b/node_modules/@types/node/ts4.8/util.d.ts new file mode 100644 index 0000000..6d35019 --- /dev/null +++ b/node_modules/@types/node/ts4.8/util.d.ts @@ -0,0 +1,1926 @@ +/** + * The `util` module supports the needs of Node.js internal APIs. Many of the + * utilities are useful for application and module developers as well. To access + * it: + * + * ```js + * const util = require('util'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.x/lib/util.js) + */ +declare module 'util' { + import * as types from 'node:util/types'; + export interface InspectOptions { + /** + * If `true`, object's non-enumerable symbols and properties are included in the formatted result. + * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). + * @default false + */ + showHidden?: boolean | undefined; + /** + * Specifies the number of times to recurse while formatting object. + * This is useful for inspecting large objects. + * To recurse up to the maximum call stack size pass `Infinity` or `null`. + * @default 2 + */ + depth?: number | null | undefined; + /** + * If `true`, the output is styled with ANSI color codes. Colors are customizable. + */ + colors?: boolean | undefined; + /** + * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. + * @default true + */ + customInspect?: boolean | undefined; + /** + * If `true`, `Proxy` inspection includes the target and handler objects. + * @default false + */ + showProxy?: boolean | undefined; + /** + * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements + * to include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no elements. + * @default 100 + */ + maxArrayLength?: number | null | undefined; + /** + * Specifies the maximum number of characters to + * include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no characters. + * @default 10000 + */ + maxStringLength?: number | null | undefined; + /** + * The length at which input values are split across multiple lines. + * Set to `Infinity` to format the input as a single line + * (in combination with `compact` set to `true` or any number >= `1`). + * @default 80 + */ + breakLength?: number | undefined; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default true + */ + compact?: boolean | number | undefined; + /** + * If set to `true` or a function, all properties of an object, and `Set` and `Map` + * entries are sorted in the resulting string. + * If set to `true` the default sort is used. + * If set to a function, it is used as a compare function. + */ + sorted?: boolean | ((a: string, b: string) => number) | undefined; + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default false + */ + getters?: 'get' | 'set' | boolean | undefined; + /** + * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. + * @default false + */ + numericSeparator?: boolean | undefined; + } + export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module'; + export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect + export interface InspectOptionsStylized extends InspectOptions { + stylize(text: string, styleType: Style): string; + } + /** + * The `util.format()` method returns a formatted string using the first argument + * as a `printf`\-like format string which can contain zero or more format + * specifiers. Each specifier is replaced with the converted value from the + * corresponding argument. Supported specifiers are: + * + * If a specifier does not have a corresponding argument, it is not replaced: + * + * ```js + * util.format('%s:%s', 'foo'); + * // Returns: 'foo:%s' + * ``` + * + * Values that are not part of the format string are formatted using`util.inspect()` if their type is not `string`. + * + * If there are more arguments passed to the `util.format()` method than the + * number of specifiers, the extra arguments are concatenated to the returned + * string, separated by spaces: + * + * ```js + * util.format('%s:%s', 'foo', 'bar', 'baz'); + * // Returns: 'foo:bar baz' + * ``` + * + * If the first argument does not contain a valid format specifier, `util.format()`returns a string that is the concatenation of all arguments separated by spaces: + * + * ```js + * util.format(1, 2, 3); + * // Returns: '1 2 3' + * ``` + * + * If only one argument is passed to `util.format()`, it is returned as it is + * without any formatting: + * + * ```js + * util.format('%% %s'); + * // Returns: '%% %s' + * ``` + * + * `util.format()` is a synchronous method that is intended as a debugging tool. + * Some input values can have a significant performance overhead that can block the + * event loop. Use this function with care and never in a hot code path. + * @since v0.5.3 + * @param format A `printf`-like format string. + */ + export function format(format?: any, ...param: any[]): string; + /** + * This function is identical to {@link format}, except in that it takes + * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. + * + * ```js + * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); + * // Returns 'See object { foo: 42 }', where `42` is colored as a number + * // when printed to a terminal. + * ``` + * @since v10.0.0 + */ + export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; + /** + * Returns the string name for a numeric error code that comes from a Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const name = util.getSystemErrorName(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v9.7.0 + */ + export function getSystemErrorName(err: number): string; + /** + * Returns a Map of all system error codes available from the Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const errorMap = util.getSystemErrorMap(); + * const name = errorMap.get(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v16.0.0, v14.17.0 + */ + export function getSystemErrorMap(): Map; + /** + * The `util.log()` method prints the given `string` to `stdout` with an included + * timestamp. + * + * ```js + * const util = require('util'); + * + * util.log('Timestamped message.'); + * ``` + * @since v0.3.0 + * @deprecated Since v6.0.0 - Use a third party module instead. + */ + export function log(string: string): void; + /** + * Returns the `string` after replacing any surrogate code points + * (or equivalently, any unpaired surrogate code units) with the + * Unicode "replacement character" U+FFFD. + * @since v16.8.0, v14.18.0 + */ + export function toUSVString(string: string): string; + /** + * Creates and returns an `AbortController` instance whose `AbortSignal` is marked + * as transferable and can be used with `structuredClone()` or `postMessage()`. + * @since v18.11.0 + * @returns A transferable AbortController + */ + export function transferableAbortController(): AbortController; + /** + * Marks the given {AbortSignal} as transferable so that it can be used with + * `structuredClone()` and `postMessage()`. + * + * ```js + * const signal = transferableAbortSignal(AbortSignal.timeout(100)); + * const channel = new MessageChannel(); + * channel.port2.postMessage(signal, [signal]); + * ``` + * @since v18.11.0 + * @param signal The AbortSignal + * @returns The same AbortSignal + */ + export function transferableAbortSignal(signal: AbortSignal): AbortSignal; + /** + * The `util.inspect()` method returns a string representation of `object` that is + * intended for debugging. The output of `util.inspect` may change at any time + * and should not be depended upon programmatically. Additional `options` may be + * passed that alter the result.`util.inspect()` will use the constructor's name and/or `@@toStringTag` to make + * an identifiable tag for an inspected value. + * + * ```js + * class Foo { + * get [Symbol.toStringTag]() { + * return 'bar'; + * } + * } + * + * class Bar {} + * + * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); + * + * util.inspect(new Foo()); // 'Foo [bar] {}' + * util.inspect(new Bar()); // 'Bar {}' + * util.inspect(baz); // '[foo] {}' + * ``` + * + * Circular references point to their anchor by using a reference index: + * + * ```js + * const { inspect } = require('util'); + * + * const obj = {}; + * obj.a = [obj]; + * obj.b = {}; + * obj.b.inner = obj.b; + * obj.b.obj = obj; + * + * console.log(inspect(obj)); + * // { + * // a: [ [Circular *1] ], + * // b: { inner: [Circular *2], obj: [Circular *1] } + * // } + * ``` + * + * The following example inspects all properties of the `util` object: + * + * ```js + * const util = require('util'); + * + * console.log(util.inspect(util, { showHidden: true, depth: null })); + * ``` + * + * The following example highlights the effect of the `compact` option: + * + * ```js + * const util = require('util'); + * + * const o = { + * a: [1, 2, [[ + * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + + * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', + * 'test', + * 'foo']], 4], + * b: new Map([['za', 1], ['zb', 'test']]) + * }; + * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 })); + * + * // { a: + * // [ 1, + * // 2, + * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line + * // 'test', + * // 'foo' ] ], + * // 4 ], + * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } + * + * // Setting `compact` to false or an integer creates more reader friendly output. + * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 })); + * + * // { + * // a: [ + * // 1, + * // 2, + * // [ + * // [ + * // 'Lorem ipsum dolor sit amet,\n' + + * // 'consectetur adipiscing elit, sed do eiusmod \n' + + * // 'tempor incididunt ut labore et dolore magna aliqua.', + * // 'test', + * // 'foo' + * // ] + * // ], + * // 4 + * // ], + * // b: Map(2) { + * // 'za' => 1, + * // 'zb' => 'test' + * // } + * // } + * + * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a + * // single line. + * ``` + * + * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and + * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be + * inspected. If there are more entries than `maxArrayLength`, there is no + * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may + * result in different output. Furthermore, entries + * with no remaining strong references may be garbage collected at any time. + * + * ```js + * const { inspect } = require('util'); + * + * const obj = { a: 1 }; + * const obj2 = { b: 2 }; + * const weakSet = new WeakSet([obj, obj2]); + * + * console.log(inspect(weakSet, { showHidden: true })); + * // WeakSet { { a: 1 }, { b: 2 } } + * ``` + * + * The `sorted` option ensures that an object's property insertion order does not + * impact the result of `util.inspect()`. + * + * ```js + * const { inspect } = require('util'); + * const assert = require('assert'); + * + * const o1 = { + * b: [2, 3, 1], + * a: '`a` comes before `b`', + * c: new Set([2, 3, 1]) + * }; + * console.log(inspect(o1, { sorted: true })); + * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } + * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); + * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } + * + * const o2 = { + * c: new Set([2, 1, 3]), + * a: '`a` comes before `b`', + * b: [2, 3, 1] + * }; + * assert.strict.equal( + * inspect(o1, { sorted: true }), + * inspect(o2, { sorted: true }) + * ); + * ``` + * + * The `numericSeparator` option adds an underscore every three digits to all + * numbers. + * + * ```js + * const { inspect } = require('util'); + * + * const thousand = 1_000; + * const million = 1_000_000; + * const bigNumber = 123_456_789n; + * const bigDecimal = 1_234.123_45; + * + * console.log(thousand, million, bigNumber, bigDecimal); + * // 1_000 1_000_000 123_456_789n 1_234.123_45 + * ``` + * + * `util.inspect()` is a synchronous method intended for debugging. Its maximum + * output length is approximately 128 MB. Inputs that result in longer output will + * be truncated. + * @since v0.3.0 + * @param object Any JavaScript primitive or `Object`. + * @return The representation of `object`. + */ + export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + export function inspect(object: any, options?: InspectOptions): string; + export namespace inspect { + let colors: NodeJS.Dict<[number, number]>; + let styles: { + [K in Style]: string; + }; + let defaultOptions: InspectOptions; + /** + * Allows changing inspect settings from the repl. + */ + let replDefaults: InspectOptions; + /** + * That can be used to declare custom inspect functions. + */ + const custom: unique symbol; + } + /** + * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). + * + * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isArray([]); + * // Returns: true + * util.isArray(new Array()); + * // Returns: true + * util.isArray({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use `isArray` instead. + */ + export function isArray(object: unknown): object is unknown[]; + /** + * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isRegExp(/some regexp/); + * // Returns: true + * util.isRegExp(new RegExp('another regexp')); + * // Returns: true + * util.isRegExp({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Deprecated + */ + export function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isDate(new Date()); + * // Returns: true + * util.isDate(Date()); + * // false (without 'new' returns a String) + * util.isDate({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use {@link types.isDate} instead. + */ + export function isDate(object: unknown): object is Date; + /** + * Returns `true` if the given `object` is an `Error`. Otherwise, returns`false`. + * + * ```js + * const util = require('util'); + * + * util.isError(new Error()); + * // Returns: true + * util.isError(new TypeError()); + * // Returns: true + * util.isError({ name: 'Error', message: 'an error occurred' }); + * // Returns: false + * ``` + * + * This method relies on `Object.prototype.toString()` behavior. It is + * possible to obtain an incorrect result when the `object` argument manipulates`@@toStringTag`. + * + * ```js + * const util = require('util'); + * const obj = { name: 'Error', message: 'an error occurred' }; + * + * util.isError(obj); + * // Returns: false + * obj[Symbol.toStringTag] = 'Error'; + * util.isError(obj); + * // Returns: true + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead. + */ + export function isError(object: unknown): object is Error; + /** + * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and`extends` keywords to get language level inheritance support. Also note + * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). + * + * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The + * prototype of `constructor` will be set to a new object created from`superConstructor`. + * + * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. + * As an additional convenience, `superConstructor` will be accessible + * through the `constructor.super_` property. + * + * ```js + * const util = require('util'); + * const EventEmitter = require('events'); + * + * function MyStream() { + * EventEmitter.call(this); + * } + * + * util.inherits(MyStream, EventEmitter); + * + * MyStream.prototype.write = function(data) { + * this.emit('data', data); + * }; + * + * const stream = new MyStream(); + * + * console.log(stream instanceof EventEmitter); // true + * console.log(MyStream.super_ === EventEmitter); // true + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('It works!'); // Received data: "It works!" + * ``` + * + * ES6 example using `class` and `extends`: + * + * ```js + * const EventEmitter = require('events'); + * + * class MyStream extends EventEmitter { + * write(data) { + * this.emit('data', data); + * } + * } + * + * const stream = new MyStream(); + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('With ES6'); + * ``` + * @since v0.3.0 + * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead. + */ + export function inherits(constructor: unknown, superConstructor: unknown): void; + export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; + export interface DebugLogger extends DebugLoggerFunction { + enabled: boolean; + } + /** + * The `util.debuglog()` method is used to create a function that conditionally + * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that + * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op. + * + * ```js + * const util = require('util'); + * const debuglog = util.debuglog('foo'); + * + * debuglog('hello from foo [%d]', 123); + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then + * it will output something like: + * + * ```console + * FOO 3245: hello from foo [123] + * ``` + * + * where `3245` is the process id. If it is not run with that + * environment variable set, then it will not print anything. + * + * The `section` supports wildcard also: + * + * ```js + * const util = require('util'); + * const debuglog = util.debuglog('foo-bar'); + * + * debuglog('hi there, it\'s foo-bar [%d]', 2333); + * ``` + * + * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output + * something like: + * + * ```console + * FOO-BAR 3257: hi there, it's foo-bar [2333] + * ``` + * + * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`. + * + * The optional `callback` argument can be used to replace the logging function + * with a different function that doesn't have any initialization or + * unnecessary wrapping. + * + * ```js + * const util = require('util'); + * let debuglog = util.debuglog('internals', (debug) => { + * // Replace with a logging function that optimizes out + * // testing if the section is enabled + * debuglog = debug; + * }); + * ``` + * @since v0.11.3 + * @param section A string identifying the portion of the application for which the `debuglog` function is being created. + * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. + * @return The logging function + */ + export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; + export const debug: typeof debuglog; + /** + * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isBoolean(1); + * // Returns: false + * util.isBoolean(0); + * // Returns: false + * util.isBoolean(false); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead. + */ + export function isBoolean(object: unknown): object is boolean; + /** + * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isBuffer({ length: 0 }); + * // Returns: false + * util.isBuffer([]); + * // Returns: false + * util.isBuffer(Buffer.from('hello world')); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `isBuffer` instead. + */ + export function isBuffer(object: unknown): object is Buffer; + /** + * Returns `true` if the given `object` is a `Function`. Otherwise, returns`false`. + * + * ```js + * const util = require('util'); + * + * function Foo() {} + * const Bar = () => {}; + * + * util.isFunction({}); + * // Returns: false + * util.isFunction(Foo); + * // Returns: true + * util.isFunction(Bar); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead. + */ + export function isFunction(object: unknown): boolean; + /** + * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`. + * + * ```js + * const util = require('util'); + * + * util.isNull(0); + * // Returns: false + * util.isNull(undefined); + * // Returns: false + * util.isNull(null); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === null` instead. + */ + export function isNull(object: unknown): object is null; + /** + * Returns `true` if the given `object` is `null` or `undefined`. Otherwise, + * returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isNullOrUndefined(0); + * // Returns: false + * util.isNullOrUndefined(undefined); + * // Returns: true + * util.isNullOrUndefined(null); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead. + */ + export function isNullOrUndefined(object: unknown): object is null | undefined; + /** + * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isNumber(false); + * // Returns: false + * util.isNumber(Infinity); + * // Returns: true + * util.isNumber(0); + * // Returns: true + * util.isNumber(NaN); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead. + */ + export function isNumber(object: unknown): object is number; + /** + * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript). + * Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isObject(5); + * // Returns: false + * util.isObject(null); + * // Returns: false + * util.isObject({}); + * // Returns: true + * util.isObject(() => {}); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Deprecated: Use `value !== null && typeof value === 'object'` instead. + */ + export function isObject(object: unknown): boolean; + /** + * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`. + * + * ```js + * const util = require('util'); + * + * util.isPrimitive(5); + * // Returns: true + * util.isPrimitive('foo'); + * // Returns: true + * util.isPrimitive(false); + * // Returns: true + * util.isPrimitive(null); + * // Returns: true + * util.isPrimitive(undefined); + * // Returns: true + * util.isPrimitive({}); + * // Returns: false + * util.isPrimitive(() => {}); + * // Returns: false + * util.isPrimitive(/^$/); + * // Returns: false + * util.isPrimitive(new Date()); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. + */ + export function isPrimitive(object: unknown): boolean; + /** + * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isString(''); + * // Returns: true + * util.isString('foo'); + * // Returns: true + * util.isString(String('foo')); + * // Returns: true + * util.isString(5); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead. + */ + export function isString(object: unknown): object is string; + /** + * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isSymbol(5); + * // Returns: false + * util.isSymbol('foo'); + * // Returns: false + * util.isSymbol(Symbol('foo')); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead. + */ + export function isSymbol(object: unknown): object is symbol; + /** + * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * const foo = undefined; + * util.isUndefined(5); + * // Returns: false + * util.isUndefined(foo); + * // Returns: true + * util.isUndefined(null); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === undefined` instead. + */ + export function isUndefined(object: unknown): object is undefined; + /** + * The `util.deprecate()` method wraps `fn` (which may be a function or class) in + * such a way that it is marked as deprecated. + * + * ```js + * const util = require('util'); + * + * exports.obsoleteFunction = util.deprecate(() => { + * // Do something here. + * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); + * ``` + * + * When called, `util.deprecate()` will return a function that will emit a`DeprecationWarning` using the `'warning'` event. The warning will + * be emitted and printed to `stderr` the first time the returned function is + * called. After the warning is emitted, the wrapped function is called without + * emitting a warning. + * + * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, + * the warning will be emitted only once for that `code`. + * + * ```js + * const util = require('util'); + * + * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001'); + * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001'); + * fn1(); // Emits a deprecation warning with code DEP0001 + * fn2(); // Does not emit a deprecation warning because it has the same code + * ``` + * + * If either the `--no-deprecation` or `--no-warnings` command-line flags are + * used, or if the `process.noDeprecation` property is set to `true`_prior_ to + * the first deprecation warning, the `util.deprecate()` method does nothing. + * + * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, + * or the `process.traceDeprecation` property is set to `true`, a warning and a + * stack trace are printed to `stderr` the first time the deprecated function is + * called. + * + * If the `--throw-deprecation` command-line flag is set, or the`process.throwDeprecation` property is set to `true`, then an exception will be + * thrown when the deprecated function is called. + * + * The `--throw-deprecation` command-line flag and `process.throwDeprecation`property take precedence over `--trace-deprecation` and`process.traceDeprecation`. + * @since v0.8.0 + * @param fn The function that is being deprecated. + * @param msg A warning message to display when the deprecated function is invoked. + * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. + * @return The deprecated function wrapped to emit a warning. + */ + export function deprecate(fn: T, msg: string, code?: string): T; + /** + * Returns `true` if there is deep strict equality between `val1` and `val2`. + * Otherwise, returns `false`. + * + * See `assert.deepStrictEqual()` for more information about deep strict + * equality. + * @since v9.0.0 + */ + export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean; + /** + * Returns `str` with any ANSI escape codes removed. + * + * ```js + * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); + * // Prints "value" + * ``` + * @since v16.11.0 + */ + export function stripVTControlCharacters(str: string): string; + /** + * Takes an `async` function (or a function that returns a `Promise`) and returns a + * function following the error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument. In the callback, the + * first argument will be the rejection reason (or `null` if the `Promise`resolved), and the second argument will be the resolved value. + * + * ```js + * const util = require('util'); + * + * async function fn() { + * return 'hello world'; + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * if (err) throw err; + * console.log(ret); + * }); + * ``` + * + * Will print: + * + * ```text + * hello world + * ``` + * + * The callback is executed asynchronously, and will have a limited stack trace. + * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit. + * + * Since `null` has a special meaning as the first argument to a callback, if a + * wrapped function rejects a `Promise` with a falsy value as a reason, the value + * is wrapped in an `Error` with the original value stored in a field named`reason`. + * + * ```js + * function fn() { + * return Promise.reject(null); + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * // When the Promise was rejected with `null` it is wrapped with an Error and + * // the original value is stored in `reason`. + * err && Object.hasOwn(err, 'reason') && err.reason === null; // true + * }); + * ``` + * @since v8.2.0 + * @param fn An `async` function + * @return a callback style function + */ + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export interface CustomPromisifyLegacy extends Function { + __promisify__: TCustom; + } + export interface CustomPromisifySymbol extends Function { + [promisify.custom]: TCustom; + } + export type CustomPromisify = CustomPromisifySymbol | CustomPromisifyLegacy; + /** + * Takes a function following the common error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument, and returns a version + * that returns promises. + * + * ```js + * const util = require('util'); + * const fs = require('fs'); + * + * const stat = util.promisify(fs.stat); + * stat('.').then((stats) => { + * // Do something with `stats` + * }).catch((error) => { + * // Handle the error. + * }); + * ``` + * + * Or, equivalently using `async function`s: + * + * ```js + * const util = require('util'); + * const fs = require('fs'); + * + * const stat = util.promisify(fs.stat); + * + * async function callStat() { + * const stats = await stat('.'); + * console.log(`This directory is owned by ${stats.uid}`); + * } + * ``` + * + * If there is an `original[util.promisify.custom]` property present, `promisify`will return its value, see `Custom promisified functions`. + * + * `promisify()` assumes that `original` is a function taking a callback as its + * final argument in all cases. If `original` is not a function, `promisify()`will throw an error. If `original` is a function but its last argument is not + * an error-first callback, it will still be passed an error-first + * callback as its last argument. + * + * Using `promisify()` on class methods or other methods that use `this` may not + * work as expected unless handled specially: + * + * ```js + * const util = require('util'); + * + * class Foo { + * constructor() { + * this.a = 42; + * } + * + * bar(callback) { + * callback(null, this.a); + * } + * } + * + * const foo = new Foo(); + * + * const naiveBar = util.promisify(foo.bar); + * // TypeError: Cannot read property 'a' of undefined + * // naiveBar().then(a => console.log(a)); + * + * naiveBar.call(foo).then((a) => console.log(a)); // '42' + * + * const bindBar = naiveBar.bind(foo); + * bindBar().then((a) => console.log(a)); // '42' + * ``` + * @since v8.0.0 + */ + export function promisify(fn: CustomPromisify): TCustom; + export function promisify(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise; + export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; + export function promisify(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: Function): Function; + export namespace promisify { + /** + * That can be used to declare custom promisified variants of functions. + */ + const custom: unique symbol; + } + /** + * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API. + * + * ```js + * const decoder = new TextDecoder(); + * const u8arr = new Uint8Array([72, 101, 108, 108, 111]); + * console.log(decoder.decode(u8arr)); // Hello + * ``` + * @since v8.3.0 + */ + export class TextDecoder { + /** + * The encoding supported by the `TextDecoder` instance. + */ + readonly encoding: string; + /** + * The value will be `true` if decoding errors result in a `TypeError` being + * thrown. + */ + readonly fatal: boolean; + /** + * The value will be `true` if the decoding result will include the byte order + * mark. + */ + readonly ignoreBOM: boolean; + constructor( + encoding?: string, + options?: { + fatal?: boolean | undefined; + ignoreBOM?: boolean | undefined; + } + ); + /** + * Decodes the `input` and returns a string. If `options.stream` is `true`, any + * incomplete byte sequences occurring at the end of the `input` are buffered + * internally and emitted after the next call to `textDecoder.decode()`. + * + * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a`TypeError` being thrown. + * @param input An `ArrayBuffer`, `DataView` or `TypedArray` instance containing the encoded data. + */ + decode( + input?: NodeJS.ArrayBufferView | ArrayBuffer | null, + options?: { + stream?: boolean | undefined; + } + ): string; + } + export interface EncodeIntoResult { + /** + * The read Unicode code units of input. + */ + read: number; + /** + * The written UTF-8 bytes of output. + */ + written: number; + } + export { types }; + + //// TextEncoder/Decoder + /** + * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All + * instances of `TextEncoder` only support UTF-8 encoding. + * + * ```js + * const encoder = new TextEncoder(); + * const uint8array = encoder.encode('this is some data'); + * ``` + * + * The `TextEncoder` class is also available on the global object. + * @since v8.3.0 + */ + export class TextEncoder { + /** + * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`. + */ + readonly encoding: string; + /** + * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the + * encoded bytes. + * @param [input='an empty string'] The text to encode. + */ + encode(input?: string): Uint8Array; + /** + * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object + * containing the read Unicode code units and written UTF-8 bytes. + * + * ```js + * const encoder = new TextEncoder(); + * const src = 'this is some data'; + * const dest = new Uint8Array(10); + * const { read, written } = encoder.encodeInto(src, dest); + * ``` + * @param src The text to encode. + * @param dest The array to hold the encode result. + */ + encodeInto(src: string, dest: Uint8Array): EncodeIntoResult; + } + + import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'util'; + global { + /** + * `TextDecoder` class is a global reference for `require('util').TextDecoder` + * https://nodejs.org/api/globals.html#textdecoder + * @since v11.0.0 + */ + var TextDecoder: typeof globalThis extends { + onmessage: any; + TextDecoder: infer TextDecoder; + } + ? TextDecoder + : typeof _TextDecoder; + + /** + * `TextEncoder` class is a global reference for `require('util').TextEncoder` + * https://nodejs.org/api/globals.html#textencoder + * @since v11.0.0 + */ + var TextEncoder: typeof globalThis extends { + onmessage: any; + TextEncoder: infer TextEncoder; + } + ? TextEncoder + : typeof _TextEncoder; + } + + //// parseArgs + /** + * Provides a high-level API for command-line argument parsing. Takes a + * specification for the expected arguments and returns a structured object + * with the parsed values and positionals. + * + * `config` provides arguments for parsing and configures the parser. It + * supports the following properties: + * + * - `args` The array of argument strings. **Default:** `process.argv` with + * `execPath` and `filename` removed. + * - `options` Arguments known to the parser. Keys of `options` are the long + * names of options and values are objects accepting the following properties: + * + * - `type` Type of argument, which must be either `boolean` (for options + * which do not take values) or `string` (for options which do). + * - `multiple` Whether this option can be provided multiple + * times. If `true`, all values will be collected in an array. If + * `false`, values for the option are last-wins. **Default:** `false`. + * - `short` A single character alias for the option. + * - `default` The default option value when it is not set by args. It + * must be of the same type as the `type` property. When `multiple` + * is `true`, it must be an array. + * + * - `strict`: Whether an error should be thrown when unknown arguments + * are encountered, or when arguments are passed that do not match the + * `type` configured in `options`. **Default:** `true`. + * - `allowPositionals`: Whether this command accepts positional arguments. + * **Default:** `false` if `strict` is `true`, otherwise `true`. + * - `tokens`: Whether tokens {boolean} Return the parsed tokens. This is useful + * for extending the built-in behavior, from adding additional checks through + * to reprocessing the tokens in different ways. + * **Default:** `false`. + * + * @returns The parsed command line arguments: + * + * - `values` A mapping of parsed option names with their string + * or boolean values. + * - `positionals` Positional arguments. + * - `tokens` Detailed parse information (only if `tokens` was specified). + * + */ + export function parseArgs(config?: T): ParsedResults; + + interface ParseArgsOptionConfig { + /** + * Type of argument. + */ + type: 'string' | 'boolean'; + /** + * Whether this option can be provided multiple times. + * If `true`, all values will be collected in an array. + * If `false`, values for the option are last-wins. + * @default false. + */ + multiple?: boolean | undefined; + /** + * A single character alias for the option. + */ + short?: string | undefined; + /** + * The default option value when it is not set by args. + * It must be of the same type as the the `type` property. + * When `multiple` is `true`, it must be an array. + * @since v18.11.0 + */ + default?: string | boolean | string[] | boolean[] | undefined; + } + + interface ParseArgsOptionsConfig { + [longOption: string]: ParseArgsOptionConfig; + } + + export interface ParseArgsConfig { + /** + * Array of argument strings. + */ + args?: string[] | undefined; + /** + * Used to describe arguments known to the parser. + */ + options?: ParseArgsOptionsConfig | undefined; + /** + * Should an error be thrown when unknown arguments are encountered, + * or when arguments are passed that do not match the `type` configured in `options`. + * @default true + */ + strict?: boolean | undefined; + /** + * Whether this command accepts positional arguments. + */ + allowPositionals?: boolean | undefined; + /** + * Return the parsed tokens. This is useful for extending the built-in behavior, + * from adding additional checks through to reprocessing the tokens in different ways. + * @default false + */ + tokens?: boolean | undefined; + } + + /* + IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. + TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 + This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". + But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. + So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. + This is technically incorrect but is a much nicer UX for the common case. + The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. + */ + type IfDefaultsTrue = T extends true + ? IfTrue + : T extends false + ? IfFalse + : IfTrue; + + // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` + type IfDefaultsFalse = T extends false + ? IfFalse + : T extends true + ? IfTrue + : IfFalse; + + type ExtractOptionValue = IfDefaultsTrue< + T['strict'], + O['type'] extends 'string' ? string : O['type'] extends 'boolean' ? boolean : string | boolean, + string | boolean + >; + + type ParsedValues = + & IfDefaultsTrue + & (T['options'] extends ParseArgsOptionsConfig + ? { + -readonly [LongOption in keyof T['options']]: IfDefaultsFalse< + T['options'][LongOption]['multiple'], + undefined | Array>, + undefined | ExtractOptionValue + >; + } + : {}); + + type ParsedPositionals = IfDefaultsTrue< + T['strict'], + IfDefaultsFalse, + IfDefaultsTrue + >; + + type PreciseTokenForOptions< + K extends string, + O extends ParseArgsOptionConfig, + > = O['type'] extends 'string' + ? { + kind: 'option'; + index: number; + name: K; + rawName: string; + value: string; + inlineValue: boolean; + } + : O['type'] extends 'boolean' + ? { + kind: 'option'; + index: number; + name: K; + rawName: string; + value: undefined; + inlineValue: undefined; + } + : OptionToken & { name: K }; + + type TokenForOptions< + T extends ParseArgsConfig, + K extends keyof T['options'] = keyof T['options'], + > = K extends unknown + ? T['options'] extends ParseArgsOptionsConfig + ? PreciseTokenForOptions + : OptionToken + : never; + + type ParsedOptionToken = IfDefaultsTrue, OptionToken>; + + type ParsedPositionalToken = IfDefaultsTrue< + T['strict'], + IfDefaultsFalse, + IfDefaultsTrue + >; + + type ParsedTokens = Array< + ParsedOptionToken | ParsedPositionalToken | { kind: 'option-terminator'; index: number } + >; + + type PreciseParsedResults = IfDefaultsFalse< + T['tokens'], + { + values: ParsedValues; + positionals: ParsedPositionals; + tokens: ParsedTokens; + }, + { + values: ParsedValues; + positionals: ParsedPositionals; + } + >; + + type OptionToken = + | { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean } + | { + kind: 'option'; + index: number; + name: string; + rawName: string; + value: undefined; + inlineValue: undefined; + }; + + type Token = + | OptionToken + | { kind: 'positional'; index: number; value: string } + | { kind: 'option-terminator'; index: number }; + + // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. + // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. + type ParsedResults = ParseArgsConfig extends T + ? { + values: { [longOption: string]: undefined | string | boolean | Array }; + positionals: string[]; + tokens?: Token[]; + } + : PreciseParsedResults; +} +declare module 'util/types' { + export * from 'util/types'; +} +declare module 'util/types' { + import { KeyObject, webcrypto } from 'node:crypto'; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or + * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * + * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. + * + * ```js + * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; + /** + * Returns `true` if the value is an `arguments` object. + * + * ```js + * function foo() { + * util.types.isArgumentsObject(arguments); // Returns true + * } + * ``` + * @since v10.0.0 + */ + function isArgumentsObject(object: unknown): object is IArguments; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. + * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false + * ``` + * @since v10.0.0 + */ + function isArrayBuffer(object: unknown): object is ArrayBuffer; + /** + * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed + * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to + * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * + * ```js + * util.types.isArrayBufferView(new Int8Array()); // true + * util.types.isArrayBufferView(Buffer.from('hello world')); // true + * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true + * util.types.isArrayBufferView(new ArrayBuffer()); // false + * ``` + * @since v10.0.0 + */ + function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; + /** + * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isAsyncFunction(function foo() {}); // Returns false + * util.types.isAsyncFunction(async function foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isAsyncFunction(object: unknown): boolean; + /** + * Returns `true` if the value is a `BigInt64Array` instance. + * + * ```js + * util.types.isBigInt64Array(new BigInt64Array()); // Returns true + * util.types.isBigInt64Array(new BigUint64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isBigInt64Array(value: unknown): value is BigInt64Array; + /** + * Returns `true` if the value is a `BigUint64Array` instance. + * + * ```js + * util.types.isBigUint64Array(new BigInt64Array()); // Returns false + * util.types.isBigUint64Array(new BigUint64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isBigUint64Array(value: unknown): value is BigUint64Array; + /** + * Returns `true` if the value is a boolean object, e.g. created + * by `new Boolean()`. + * + * ```js + * util.types.isBooleanObject(false); // Returns false + * util.types.isBooleanObject(true); // Returns false + * util.types.isBooleanObject(new Boolean(false)); // Returns true + * util.types.isBooleanObject(new Boolean(true)); // Returns true + * util.types.isBooleanObject(Boolean(false)); // Returns false + * util.types.isBooleanObject(Boolean(true)); // Returns false + * ``` + * @since v10.0.0 + */ + function isBooleanObject(object: unknown): object is Boolean; + /** + * Returns `true` if the value is any boxed primitive object, e.g. created + * by `new Boolean()`, `new String()` or `Object(Symbol())`. + * + * For example: + * + * ```js + * util.types.isBoxedPrimitive(false); // Returns false + * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true + * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false + * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true + * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true + * ``` + * @since v10.11.0 + */ + function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; + /** + * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. + * + * ```js + * const ab = new ArrayBuffer(20); + * util.types.isDataView(new DataView(ab)); // Returns true + * util.types.isDataView(new Float64Array()); // Returns false + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isDataView(object: unknown): object is DataView; + /** + * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. + * + * ```js + * util.types.isDate(new Date()); // Returns true + * ``` + * @since v10.0.0 + */ + function isDate(object: unknown): object is Date; + /** + * Returns `true` if the value is a native `External` value. + * + * A native `External` value is a special type of object that contains a + * raw C++ pointer (`void*`) for access from native code, and has no other + * properties. Such objects are created either by Node.js internals or native + * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype. + * + * ```c + * #include + * #include + * napi_value result; + * static napi_value MyNapi(napi_env env, napi_callback_info info) { + * int* raw = (int*) malloc(1024); + * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); + * if (status != napi_ok) { + * napi_throw_error(env, NULL, "napi_create_external failed"); + * return NULL; + * } + * return result; + * } + * ... + * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) + * ... + * ``` + * + * ```js + * const native = require('napi_addon.node'); + * const data = native.myNapi(); + * util.types.isExternal(data); // returns true + * util.types.isExternal(0); // returns false + * util.types.isExternal(new String('foo')); // returns false + * ``` + * + * For further information on `napi_create_external`, refer to `napi_create_external()`. + * @since v10.0.0 + */ + function isExternal(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. + * + * ```js + * util.types.isFloat32Array(new ArrayBuffer()); // Returns false + * util.types.isFloat32Array(new Float32Array()); // Returns true + * util.types.isFloat32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isFloat32Array(object: unknown): object is Float32Array; + /** + * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. + * + * ```js + * util.types.isFloat64Array(new ArrayBuffer()); // Returns false + * util.types.isFloat64Array(new Uint8Array()); // Returns false + * util.types.isFloat64Array(new Float64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isFloat64Array(object: unknown): object is Float64Array; + /** + * Returns `true` if the value is a generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isGeneratorFunction(function foo() {}); // Returns false + * util.types.isGeneratorFunction(function* foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorFunction(object: unknown): object is GeneratorFunction; + /** + * Returns `true` if the value is a generator object as returned from a + * built-in generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * function* foo() {} + * const generator = foo(); + * util.types.isGeneratorObject(generator); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorObject(object: unknown): object is Generator; + /** + * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. + * + * ```js + * util.types.isInt8Array(new ArrayBuffer()); // Returns false + * util.types.isInt8Array(new Int8Array()); // Returns true + * util.types.isInt8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt8Array(object: unknown): object is Int8Array; + /** + * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. + * + * ```js + * util.types.isInt16Array(new ArrayBuffer()); // Returns false + * util.types.isInt16Array(new Int16Array()); // Returns true + * util.types.isInt16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt16Array(object: unknown): object is Int16Array; + /** + * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. + * + * ```js + * util.types.isInt32Array(new ArrayBuffer()); // Returns false + * util.types.isInt32Array(new Int32Array()); // Returns true + * util.types.isInt32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt32Array(object: unknown): object is Int32Array; + /** + * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * util.types.isMap(new Map()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMap(object: T | {}): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) : Map; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * const map = new Map(); + * util.types.isMapIterator(map.keys()); // Returns true + * util.types.isMapIterator(map.values()); // Returns true + * util.types.isMapIterator(map.entries()); // Returns true + * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMapIterator(object: unknown): boolean; + /** + * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). + * + * ```js + * import * as ns from './a.js'; + * + * util.types.isModuleNamespaceObject(ns); // Returns true + * ``` + * @since v10.0.0 + */ + function isModuleNamespaceObject(value: unknown): boolean; + /** + * Returns `true` if the value is an instance of a built-in `Error` type. + * + * ```js + * util.types.isNativeError(new Error()); // Returns true + * util.types.isNativeError(new TypeError()); // Returns true + * util.types.isNativeError(new RangeError()); // Returns true + * ``` + * @since v10.0.0 + */ + function isNativeError(object: unknown): object is Error; + /** + * Returns `true` if the value is a number object, e.g. created + * by `new Number()`. + * + * ```js + * util.types.isNumberObject(0); // Returns false + * util.types.isNumberObject(new Number(0)); // Returns true + * ``` + * @since v10.0.0 + */ + function isNumberObject(object: unknown): object is Number; + /** + * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * + * ```js + * util.types.isPromise(Promise.resolve(42)); // Returns true + * ``` + * @since v10.0.0 + */ + function isPromise(object: unknown): object is Promise; + /** + * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. + * + * ```js + * const target = {}; + * const proxy = new Proxy(target, {}); + * util.types.isProxy(target); // Returns false + * util.types.isProxy(proxy); // Returns true + * ``` + * @since v10.0.0 + */ + function isProxy(object: unknown): boolean; + /** + * Returns `true` if the value is a regular expression object. + * + * ```js + * util.types.isRegExp(/abc/); // Returns true + * util.types.isRegExp(new RegExp('abc')); // Returns true + * ``` + * @since v10.0.0 + */ + function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * util.types.isSet(new Set()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSet(object: T | {}): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * const set = new Set(); + * util.types.isSetIterator(set.keys()); // Returns true + * util.types.isSetIterator(set.values()); // Returns true + * util.types.isSetIterator(set.entries()); // Returns true + * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSetIterator(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false + * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; + /** + * Returns `true` if the value is a string object, e.g. created + * by `new String()`. + * + * ```js + * util.types.isStringObject('foo'); // Returns false + * util.types.isStringObject(new String('foo')); // Returns true + * ``` + * @since v10.0.0 + */ + function isStringObject(object: unknown): object is String; + /** + * Returns `true` if the value is a symbol object, created + * by calling `Object()` on a `Symbol` primitive. + * + * ```js + * const symbol = Symbol('foo'); + * util.types.isSymbolObject(symbol); // Returns false + * util.types.isSymbolObject(Object(symbol)); // Returns true + * ``` + * @since v10.0.0 + */ + function isSymbolObject(object: unknown): object is Symbol; + /** + * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. + * + * ```js + * util.types.isTypedArray(new ArrayBuffer()); // Returns false + * util.types.isTypedArray(new Uint8Array()); // Returns true + * util.types.isTypedArray(new Float64Array()); // Returns true + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isTypedArray(object: unknown): object is NodeJS.TypedArray; + /** + * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. + * + * ```js + * util.types.isUint8Array(new ArrayBuffer()); // Returns false + * util.types.isUint8Array(new Uint8Array()); // Returns true + * util.types.isUint8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8Array(object: unknown): object is Uint8Array; + /** + * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. + * + * ```js + * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false + * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true + * util.types.isUint8ClampedArray(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; + /** + * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. + * + * ```js + * util.types.isUint16Array(new ArrayBuffer()); // Returns false + * util.types.isUint16Array(new Uint16Array()); // Returns true + * util.types.isUint16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint16Array(object: unknown): object is Uint16Array; + /** + * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. + * + * ```js + * util.types.isUint32Array(new ArrayBuffer()); // Returns false + * util.types.isUint32Array(new Uint32Array()); // Returns true + * util.types.isUint32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint32Array(object: unknown): object is Uint32Array; + /** + * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. + * + * ```js + * util.types.isWeakMap(new WeakMap()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakMap(object: unknown): object is WeakMap; + /** + * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. + * + * ```js + * util.types.isWeakSet(new WeakSet()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakSet(object: unknown): object is WeakSet; + /** + * Returns `true` if `value` is a `KeyObject`, `false` otherwise. + * @since v16.2.0 + */ + function isKeyObject(object: unknown): object is KeyObject; + /** + * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. + * @since v16.2.0 + */ + function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; +} +declare module 'node:util' { + export * from 'util'; +} +declare module 'node:util/types' { + export * from 'util/types'; +} diff --git a/node_modules/@types/node/ts4.8/v8.d.ts b/node_modules/@types/node/ts4.8/v8.d.ts new file mode 100644 index 0000000..6685dc2 --- /dev/null +++ b/node_modules/@types/node/ts4.8/v8.d.ts @@ -0,0 +1,396 @@ +/** + * The `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using: + * + * ```js + * const v8 = require('v8'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/v8.js) + */ +declare module 'v8' { + import { Readable } from 'node:stream'; + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + } + interface HeapCodeStatistics { + code_and_metadata_size: number; + bytecode_and_metadata_size: number; + external_script_source_size: number; + } + /** + * Returns an integer representing a version tag derived from the V8 version, + * command-line flags, and detected CPU features. This is useful for determining + * whether a `vm.Script` `cachedData` buffer is compatible with this instance + * of V8. + * + * ```js + * console.log(v8.cachedDataVersionTag()); // 3947234607 + * // The value returned by v8.cachedDataVersionTag() is derived from the V8 + * // version, command-line flags, and detected CPU features. Test that the value + * // does indeed update when flags are toggled. + * v8.setFlagsFromString('--allow_natives_syntax'); + * console.log(v8.cachedDataVersionTag()); // 183726201 + * ``` + * @since v8.0.0 + */ + function cachedDataVersionTag(): number; + /** + * Returns an object with the following properties: + * + * `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap + * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger + * because it continuously touches all heap pages and that makes them less likely + * to get swapped out by the operating system. + * + * `number_of_native_contexts` The value of native\_context is the number of the + * top-level contexts currently active. Increase of this number over time indicates + * a memory leak. + * + * `number_of_detached_contexts` The value of detached\_context is the number + * of contexts that were detached and not yet garbage collected. This number + * being non-zero indicates a potential memory leak. + * + * ```js + * { + * total_heap_size: 7326976, + * total_heap_size_executable: 4194304, + * total_physical_size: 7326976, + * total_available_size: 1152656, + * used_heap_size: 3476208, + * heap_size_limit: 1535115264, + * malloced_memory: 16384, + * peak_malloced_memory: 1127496, + * does_zap_garbage: 0, + * number_of_native_contexts: 1, + * number_of_detached_contexts: 0 + * } + * ``` + * @since v1.0.0 + */ + function getHeapStatistics(): HeapInfo; + /** + * Returns statistics about the V8 heap spaces, i.e. the segments which make up + * the V8 heap. Neither the ordering of heap spaces, nor the availability of a + * heap space can be guaranteed as the statistics are provided via the + * V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the + * next. + * + * The value returned is an array of objects containing the following properties: + * + * ```json + * [ + * { + * "space_name": "new_space", + * "space_size": 2063872, + * "space_used_size": 951112, + * "space_available_size": 80824, + * "physical_space_size": 2063872 + * }, + * { + * "space_name": "old_space", + * "space_size": 3090560, + * "space_used_size": 2493792, + * "space_available_size": 0, + * "physical_space_size": 3090560 + * }, + * { + * "space_name": "code_space", + * "space_size": 1260160, + * "space_used_size": 644256, + * "space_available_size": 960, + * "physical_space_size": 1260160 + * }, + * { + * "space_name": "map_space", + * "space_size": 1094160, + * "space_used_size": 201608, + * "space_available_size": 0, + * "physical_space_size": 1094160 + * }, + * { + * "space_name": "large_object_space", + * "space_size": 0, + * "space_used_size": 0, + * "space_available_size": 1490980608, + * "physical_space_size": 0 + * } + * ] + * ``` + * @since v6.0.0 + */ + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + /** + * The `v8.setFlagsFromString()` method can be used to programmatically set + * V8 command-line flags. This method should be used with care. Changing settings + * after the VM has started may result in unpredictable behavior, including + * crashes and data loss; or it may simply do nothing. + * + * The V8 options available for a version of Node.js may be determined by running`node --v8-options`. + * + * Usage: + * + * ```js + * // Print GC events to stdout for one minute. + * const v8 = require('v8'); + * v8.setFlagsFromString('--trace_gc'); + * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); + * ``` + * @since v1.0.0 + */ + function setFlagsFromString(flags: string): void; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine. Therefore, the schema may change from one version of V8 to the next. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * // Print heap snapshot to the console + * const v8 = require('v8'); + * const stream = v8.getHeapSnapshot(); + * stream.pipe(process.stdout); + * ``` + * @since v11.13.0 + * @return A Readable Stream containing the V8 heap snapshot + */ + function getHeapSnapshot(): Readable; + /** + * Generates a snapshot of the current V8 heap and writes it to a JSON + * file. This file is intended to be used with tools such as Chrome + * DevTools. The JSON schema is undocumented and specific to the V8 + * engine, and may change from one version of V8 to the next. + * + * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will + * not contain any information about the workers, and vice versa. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * const { writeHeapSnapshot } = require('v8'); + * const { + * Worker, + * isMainThread, + * parentPort + * } = require('worker_threads'); + * + * if (isMainThread) { + * const worker = new Worker(__filename); + * + * worker.once('message', (filename) => { + * console.log(`worker heapdump: ${filename}`); + * // Now get a heapdump for the main thread. + * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); + * }); + * + * // Tell the worker to create a heapdump. + * worker.postMessage('heapdump'); + * } else { + * parentPort.once('message', (message) => { + * if (message === 'heapdump') { + * // Generate a heapdump for the worker + * // and return the filename to the parent. + * parentPort.postMessage(writeHeapSnapshot()); + * } + * }); + * } + * ``` + * @since v11.13.0 + * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a + * worker thread. + * @return The filename where the snapshot was saved. + */ + function writeHeapSnapshot(filename?: string): string; + /** + * Returns an object with the following properties: + * + * ```js + * { + * code_and_metadata_size: 212208, + * bytecode_and_metadata_size: 161368, + * external_script_source_size: 1410794 + * } + * ``` + * @since v12.8.0 + */ + function getHeapCodeStatistics(): HeapCodeStatistics; + /** + * @since v8.0.0 + */ + class Serializer { + /** + * Writes out a header, which includes the serialization format version. + */ + writeHeader(): void; + /** + * Serializes a JavaScript value and adds the serialized representation to the + * internal buffer. + * + * This throws an error if `value` cannot be serialized. + */ + writeValue(val: any): boolean; + /** + * Returns the stored internal buffer. This serializer should not be used once + * the buffer is released. Calling this method results in undefined behavior + * if a previous write has failed. + */ + releaseBuffer(): Buffer; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Write a raw 32-bit unsigned integer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint32(value: number): void; + /** + * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint64(hi: number, lo: number): void; + /** + * Write a JS `number` value. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeDouble(value: number): void; + /** + * Write raw bytes into the serializer’s internal buffer. The deserializer + * will require a way to compute the length of the buffer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeRawBytes(buffer: NodeJS.TypedArray): void; + } + /** + * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only + * stores the part of their underlying `ArrayBuffer`s that they are referring to. + * @since v8.0.0 + */ + class DefaultSerializer extends Serializer {} + /** + * @since v8.0.0 + */ + class Deserializer { + constructor(data: NodeJS.TypedArray); + /** + * Reads and validates a header (including the format version). + * May, for example, reject an invalid or unsupported wire format. In that case, + * an `Error` is thrown. + */ + readHeader(): boolean; + /** + * Deserializes a JavaScript value from the buffer and returns it. + */ + readValue(): any; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of + * `SharedArrayBuffer`s). + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Reads the underlying wire format version. Likely mostly to be useful to + * legacy code reading old wire format versions. May not be called before`.readHeader()`. + */ + getWireFormatVersion(): number; + /** + * Read a raw 32-bit unsigned integer and return it. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint32(): number; + /** + * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint64(): [number, number]; + /** + * Read a JS `number` value. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readDouble(): number; + /** + * Read raw bytes from the deserializer’s internal buffer. The `length` parameter + * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readRawBytes(length: number): Buffer; + } + /** + * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. + * @since v8.0.0 + */ + class DefaultDeserializer extends Deserializer {} + /** + * Uses a `DefaultSerializer` to serialize `value` into a buffer. + * + * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to + * serialize a huge object which requires buffer + * larger than `buffer.constants.MAX_LENGTH`. + * @since v8.0.0 + */ + function serialize(value: any): Buffer; + /** + * Uses a `DefaultDeserializer` with default options to read a JS value + * from a buffer. + * @since v8.0.0 + * @param buffer A buffer returned by {@link serialize}. + */ + function deserialize(buffer: NodeJS.TypedArray): any; + /** + * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple + * times during the lifetime of the process. Each time the execution counter will + * be reset and a new coverage report will be written to the directory specified + * by `NODE_V8_COVERAGE`. + * + * When the process is about to exit, one last coverage will still be written to + * disk unless {@link stopCoverage} is invoked before the process exits. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function takeCoverage(): void; + /** + * The `v8.stopCoverage()` method allows the user to stop the coverage collection + * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count + * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function stopCoverage(): void; +} +declare module 'node:v8' { + export * from 'v8'; +} diff --git a/node_modules/@types/node/ts4.8/vm.d.ts b/node_modules/@types/node/ts4.8/vm.d.ts new file mode 100644 index 0000000..c96513a --- /dev/null +++ b/node_modules/@types/node/ts4.8/vm.d.ts @@ -0,0 +1,509 @@ +/** + * The `vm` module enables compiling and running code within V8 Virtual + * Machine contexts. + * + * **The `vm` module is not a security** + * **mechanism. Do not use it to run untrusted code.** + * + * JavaScript code can be compiled and run immediately or + * compiled, saved, and run later. + * + * A common use case is to run the code in a different V8 Context. This means + * invoked code has a different global object than the invoking code. + * + * One can provide the context by `contextifying` an + * object. The invoked code treats any property in the context like a + * global variable. Any changes to global variables caused by the invoked + * code are reflected in the context object. + * + * ```js + * const vm = require('vm'); + * + * const x = 1; + * + * const context = { x: 2 }; + * vm.createContext(context); // Contextify the object. + * + * const code = 'x += 40; var y = 17;'; + * // `x` and `y` are global variables in the context. + * // Initially, x has the value 2 because that is the value of context.x. + * vm.runInContext(code, context); + * + * console.log(context.x); // 42 + * console.log(context.y); // 17 + * + * console.log(x); // 1; y is not defined. + * ``` + * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/vm.js) + */ +declare module 'vm' { + interface Context extends NodeJS.Dict {} + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * Default: `''`. + */ + filename?: string | undefined; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * Default: `0`. + */ + lineOffset?: number | undefined; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + columnOffset?: number | undefined; + } + interface ScriptOptions extends BaseOptions { + displayErrors?: boolean | undefined; + timeout?: number | undefined; + cachedData?: Buffer | undefined; + /** @deprecated in favor of `script.createCachedData()` */ + produceCachedData?: boolean | undefined; + } + interface RunningScriptOptions extends BaseOptions { + /** + * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace. + * Default: `true`. + */ + displayErrors?: boolean | undefined; + /** + * Specifies the number of milliseconds to execute code before terminating execution. + * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer. + */ + timeout?: number | undefined; + /** + * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received. + * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that. + * If execution is terminated, an `Error` will be thrown. + * Default: `false`. + */ + breakOnSigint?: boolean | undefined; + /** + * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. + */ + microtaskMode?: 'afterEvaluate' | undefined; + } + interface CompileFunctionOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: Buffer | undefined; + /** + * Specifies whether to produce new cache data. + * Default: `false`, + */ + produceCachedData?: boolean | undefined; + /** + * The sandbox/context in which the said function should be compiled in. + */ + parsingContext?: Context | undefined; + /** + * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling + */ + contextExtensions?: Object[] | undefined; + } + interface CreateContextOptions { + /** + * Human-readable name of the newly created context. + * @default 'VM Context i' Where i is an ascending numerical index of the created context. + */ + name?: string | undefined; + /** + * Corresponds to the newly created context for display purposes. + * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary), + * like the value of the `url.origin` property of a URL object. + * Most notably, this string should omit the trailing slash, as that denotes a path. + * @default '' + */ + origin?: string | undefined; + codeGeneration?: + | { + /** + * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) + * will throw an EvalError. + * @default true + */ + strings?: boolean | undefined; + /** + * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. + * @default true + */ + wasm?: boolean | undefined; + } + | undefined; + /** + * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. + */ + microtaskMode?: 'afterEvaluate' | undefined; + } + type MeasureMemoryMode = 'summary' | 'detailed'; + interface MeasureMemoryOptions { + /** + * @default 'summary' + */ + mode?: MeasureMemoryMode | undefined; + context?: Context | undefined; + } + interface MemoryMeasurement { + total: { + jsMemoryEstimate: number; + jsMemoryRange: [number, number]; + }; + } + /** + * Instances of the `vm.Script` class contain precompiled scripts that can be + * executed in specific contexts. + * @since v0.3.1 + */ + class Script { + constructor(code: string, options?: ScriptOptions); + /** + * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access + * to local scope. + * + * The following example compiles code that increments a global variable, sets + * the value of another global variable, then execute the code multiple times. + * The globals are contained in the `context` object. + * + * ```js + * const vm = require('vm'); + * + * const context = { + * animal: 'cat', + * count: 2 + * }; + * + * const script = new vm.Script('count += 1; name = "kitty";'); + * + * vm.createContext(context); + * for (let i = 0; i < 10; ++i) { + * script.runInContext(context); + * } + * + * console.log(context); + * // Prints: { animal: 'cat', count: 12, name: 'kitty' } + * ``` + * + * Using the `timeout` or `breakOnSigint` options will result in new event loops + * and corresponding threads being started, which have a non-zero performance + * overhead. + * @since v0.3.1 + * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method. + * @return the result of the very last statement executed in the script. + */ + runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any; + /** + * First contextifies the given `contextObject`, runs the compiled code contained + * by the `vm.Script` object within the created context, and returns the result. + * Running code does not have access to local scope. + * + * The following example compiles code that sets a global variable, then executes + * the code multiple times in different contexts. The globals are set on and + * contained within each individual `context`. + * + * ```js + * const vm = require('vm'); + * + * const script = new vm.Script('globalVar = "set"'); + * + * const contexts = [{}, {}, {}]; + * contexts.forEach((context) => { + * script.runInNewContext(context); + * }); + * + * console.log(contexts); + * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }] + * ``` + * @since v0.3.1 + * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created. + * @return the result of the very last statement executed in the script. + */ + runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any; + /** + * Runs the compiled code contained by the `vm.Script` within the context of the + * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object. + * + * The following example compiles code that increments a `global` variable then + * executes that code multiple times: + * + * ```js + * const vm = require('vm'); + * + * global.globalVar = 0; + * + * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' }); + * + * for (let i = 0; i < 1000; ++i) { + * script.runInThisContext(); + * } + * + * console.log(globalVar); + * + * // 1000 + * ``` + * @since v0.3.1 + * @return the result of the very last statement executed in the script. + */ + runInThisContext(options?: RunningScriptOptions): any; + /** + * Creates a code cache that can be used with the `Script` constructor's`cachedData` option. Returns a `Buffer`. This method may be called at any + * time and any number of times. + * + * ```js + * const script = new vm.Script(` + * function add(a, b) { + * return a + b; + * } + * + * const x = add(1, 2); + * `); + * + * const cacheWithoutX = script.createCachedData(); + * + * script.runInThisContext(); + * + * const cacheWithX = script.createCachedData(); + * ``` + * @since v10.6.0 + */ + createCachedData(): Buffer; + /** @deprecated in favor of `script.createCachedData()` */ + cachedDataProduced?: boolean | undefined; + cachedDataRejected?: boolean | undefined; + cachedData?: Buffer | undefined; + } + /** + * If given a `contextObject`, the `vm.createContext()` method will `prepare + * that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts, + * the `contextObject` will be the global object, retaining all of its existing + * properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables + * will remain unchanged. + * + * ```js + * const vm = require('vm'); + * + * global.globalVar = 3; + * + * const context = { globalVar: 1 }; + * vm.createContext(context); + * + * vm.runInContext('globalVar *= 2;', context); + * + * console.log(context); + * // Prints: { globalVar: 2 } + * + * console.log(global.globalVar); + * // Prints: 3 + * ``` + * + * If `contextObject` is omitted (or passed explicitly as `undefined`), a new, + * empty `contextified` object will be returned. + * + * The `vm.createContext()` method is primarily useful for creating a single + * context that can be used to run multiple scripts. For instance, if emulating a + * web browser, the method can be used to create a single context representing a + * window's global object, then run all `